
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))
double code(double x, double y, double z, double t, double a) {
return ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((log((x + y)) + log(z)) - t) + ((a - 0.5d0) * log(t))
end function
public static double code(double x, double y, double z, double t, double a) {
return ((Math.log((x + y)) + Math.log(z)) - t) + ((a - 0.5) * Math.log(t));
}
def code(x, y, z, t, a): return ((math.log((x + y)) + math.log(z)) - t) + ((a - 0.5) * math.log(t))
function code(x, y, z, t, a) return Float64(Float64(Float64(log(Float64(x + y)) + log(z)) - t) + Float64(Float64(a - 0.5) * log(t))) end
function tmp = code(x, y, z, t, a) tmp = ((log((x + y)) + log(z)) - t) + ((a - 0.5) * log(t)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\end{array}
(FPCore (x y z t a) :precision binary64 (+ (log (+ x y)) (- (log z) (fma (log t) (- 0.5 a) t))))
double code(double x, double y, double z, double t, double a) {
return log((x + y)) + (log(z) - fma(log(t), (0.5 - a), t));
}
function code(x, y, z, t, a) return Float64(log(Float64(x + y)) + Float64(log(z) - fma(log(t), Float64(0.5 - a), t))) end
code[x_, y_, z_, t_, a_] := N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - N[(N[Log[t], $MachinePrecision] * N[(0.5 - a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log \left(x + y\right) + \left(\log z - \mathsf{fma}\left(\log t, 0.5 - a, t\right)\right)
\end{array}
Initial program 99.4%
associate-+l-99.4%
associate--l+99.5%
sub-neg99.5%
+-commutative99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
fma-undefine99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
metadata-eval99.5%
metadata-eval99.5%
unsub-neg99.5%
Simplified99.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log (+ x y)) (log z))) (t_2 (- (* (log t) (+ a -0.5)) t)))
(if (<= t_1 -750.0)
(- (* (log t) a) t)
(if (<= t_1 685.0) (+ t_2 (log (* z (+ x y)))) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((x + y)) + log(z);
double t_2 = (log(t) * (a + -0.5)) - t;
double tmp;
if (t_1 <= -750.0) {
tmp = (log(t) * a) - t;
} else if (t_1 <= 685.0) {
tmp = t_2 + log((z * (x + y)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = log((x + y)) + log(z)
t_2 = (log(t) * (a + (-0.5d0))) - t
if (t_1 <= (-750.0d0)) then
tmp = (log(t) * a) - t
else if (t_1 <= 685.0d0) then
tmp = t_2 + log((z * (x + y)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = Math.log((x + y)) + Math.log(z);
double t_2 = (Math.log(t) * (a + -0.5)) - t;
double tmp;
if (t_1 <= -750.0) {
tmp = (Math.log(t) * a) - t;
} else if (t_1 <= 685.0) {
tmp = t_2 + Math.log((z * (x + y)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((x + y)) + math.log(z) t_2 = (math.log(t) * (a + -0.5)) - t tmp = 0 if t_1 <= -750.0: tmp = (math.log(t) * a) - t elif t_1 <= 685.0: tmp = t_2 + math.log((z * (x + y))) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(log(Float64(x + y)) + log(z)) t_2 = Float64(Float64(log(t) * Float64(a + -0.5)) - t) tmp = 0.0 if (t_1 <= -750.0) tmp = Float64(Float64(log(t) * a) - t); elseif (t_1 <= 685.0) tmp = Float64(t_2 + log(Float64(z * Float64(x + y)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log((x + y)) + log(z); t_2 = (log(t) * (a + -0.5)) - t; tmp = 0.0; if (t_1 <= -750.0) tmp = (log(t) * a) - t; elseif (t_1 <= 685.0) tmp = t_2 + log((z * (x + y))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[t$95$1, -750.0], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$1, 685.0], N[(t$95$2 + N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(x + y\right) + \log z\\
t_2 := \log t \cdot \left(a + -0.5\right) - t\\
\mathbf{if}\;t\_1 \leq -750:\\
\;\;\;\;\log t \cdot a - t\\
\mathbf{elif}\;t\_1 \leq 685:\\
\;\;\;\;t\_2 + \log \left(z \cdot \left(x + y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750Initial program 99.8%
remove-double-neg99.8%
associate--l+99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 62.4%
Taylor expanded in a around inf 71.0%
*-commutative71.0%
Simplified71.0%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 685Initial program 99.3%
remove-double-neg99.3%
associate--l+99.3%
remove-double-neg99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
associate-+r-99.3%
associate-+l-99.3%
sum-log99.6%
*-commutative99.6%
Applied egg-rr99.6%
if 685 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.8%
remove-double-neg99.8%
associate--l+99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around -inf 99.7%
mul-1-neg99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
mul-1-neg99.7%
unsub-neg99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in t around inf 74.2%
mul-1-neg74.2%
Simplified74.2%
Final simplification90.8%
(FPCore (x y z t a) :precision binary64 (if (<= t 480.0) (+ (log y) (+ (log z) (* (log t) (- a 0.5)))) (- (* (log t) (+ a -0.5)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 480.0) {
tmp = log(y) + (log(z) + (log(t) * (a - 0.5)));
} else {
tmp = (log(t) * (a + -0.5)) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 480.0d0) then
tmp = log(y) + (log(z) + (log(t) * (a - 0.5d0)))
else
tmp = (log(t) * (a + (-0.5d0))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 480.0) {
tmp = Math.log(y) + (Math.log(z) + (Math.log(t) * (a - 0.5)));
} else {
tmp = (Math.log(t) * (a + -0.5)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 480.0: tmp = math.log(y) + (math.log(z) + (math.log(t) * (a - 0.5))) else: tmp = (math.log(t) * (a + -0.5)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 480.0) tmp = Float64(log(y) + Float64(log(z) + Float64(log(t) * Float64(a - 0.5)))); else tmp = Float64(Float64(log(t) * Float64(a + -0.5)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 480.0) tmp = log(y) + (log(z) + (log(t) * (a - 0.5))); else tmp = (log(t) * (a + -0.5)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 480.0], N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 480:\\
\;\;\;\;\log y + \left(\log z + \log t \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\log t \cdot \left(a + -0.5\right) - t\\
\end{array}
\end{array}
if t < 480Initial program 99.1%
remove-double-neg99.1%
associate--l+99.2%
remove-double-neg99.2%
sub-neg99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 56.0%
Taylor expanded in t around 0 54.9%
if 480 < t Initial program 99.8%
remove-double-neg99.8%
associate--l+99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in t around -inf 99.8%
mul-1-neg99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
mul-1-neg99.8%
unsub-neg99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 97.9%
mul-1-neg97.9%
Simplified97.9%
Final simplification73.7%
(FPCore (x y z t a) :precision binary64 (+ (+ (log (+ x y)) (- (log z) t)) (* (log t) (+ a -0.5))))
double code(double x, double y, double z, double t, double a) {
return (log((x + y)) + (log(z) - t)) + (log(t) * (a + -0.5));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (log((x + y)) + (log(z) - t)) + (log(t) * (a + (-0.5d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log((x + y)) + (Math.log(z) - t)) + (Math.log(t) * (a + -0.5));
}
def code(x, y, z, t, a): return (math.log((x + y)) + (math.log(z) - t)) + (math.log(t) * (a + -0.5))
function code(x, y, z, t, a) return Float64(Float64(log(Float64(x + y)) + Float64(log(z) - t)) + Float64(log(t) * Float64(a + -0.5))) end
function tmp = code(x, y, z, t, a) tmp = (log((x + y)) + (log(z) - t)) + (log(t) * (a + -0.5)); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \log t \cdot \left(a + -0.5\right)
\end{array}
Initial program 99.4%
remove-double-neg99.4%
associate--l+99.5%
remove-double-neg99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (x y z t a) :precision binary64 (- (+ (log y) (+ (log z) (* (log t) (- a 0.5)))) t))
double code(double x, double y, double z, double t, double a) {
return (log(y) + (log(z) + (log(t) * (a - 0.5)))) - t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (log(y) + (log(z) + (log(t) * (a - 0.5d0)))) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(y) + (Math.log(z) + (Math.log(t) * (a - 0.5)))) - t;
}
def code(x, y, z, t, a): return (math.log(y) + (math.log(z) + (math.log(t) * (a - 0.5)))) - t
function code(x, y, z, t, a) return Float64(Float64(log(y) + Float64(log(z) + Float64(log(t) * Float64(a - 0.5)))) - t) end
function tmp = code(x, y, z, t, a) tmp = (log(y) + (log(z) + (log(t) * (a - 0.5)))) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[y], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y + \left(\log z + \log t \cdot \left(a - 0.5\right)\right)\right) - t
\end{array}
Initial program 99.4%
remove-double-neg99.4%
associate--l+99.5%
remove-double-neg99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 61.9%
(FPCore (x y z t a) :precision binary64 (+ (- (log z) t) (+ (log y) (* (log t) (- a 0.5)))))
double code(double x, double y, double z, double t, double a) {
return (log(z) - t) + (log(y) + (log(t) * (a - 0.5)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (log(z) - t) + (log(y) + (log(t) * (a - 0.5d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(z) - t) + (Math.log(y) + (Math.log(t) * (a - 0.5)));
}
def code(x, y, z, t, a): return (math.log(z) - t) + (math.log(y) + (math.log(t) * (a - 0.5)))
function code(x, y, z, t, a) return Float64(Float64(log(z) - t) + Float64(log(y) + Float64(log(t) * Float64(a - 0.5)))) end
function tmp = code(x, y, z, t, a) tmp = (log(z) - t) + (log(y) + (log(t) * (a - 0.5))); end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log z - t\right) + \left(\log y + \log t \cdot \left(a - 0.5\right)\right)
\end{array}
Initial program 99.4%
associate--l+99.5%
+-commutative99.5%
associate-+l+99.4%
+-commutative99.4%
fma-define99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 61.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log (* z (+ x y))) (- (* (log t) -0.5) t)))
(t_2 (- (* (log t) (+ a -0.5)) t)))
(if (<= a -3.7e-103)
t_2
(if (<= a -2.6e-262)
t_1
(if (<= a -2.8e-299)
(- (+ (log z) (log y)) t)
(if (<= a 0.0072) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((z * (x + y))) + ((log(t) * -0.5) - t);
double t_2 = (log(t) * (a + -0.5)) - t;
double tmp;
if (a <= -3.7e-103) {
tmp = t_2;
} else if (a <= -2.6e-262) {
tmp = t_1;
} else if (a <= -2.8e-299) {
tmp = (log(z) + log(y)) - t;
} else if (a <= 0.0072) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = log((z * (x + y))) + ((log(t) * (-0.5d0)) - t)
t_2 = (log(t) * (a + (-0.5d0))) - t
if (a <= (-3.7d-103)) then
tmp = t_2
else if (a <= (-2.6d-262)) then
tmp = t_1
else if (a <= (-2.8d-299)) then
tmp = (log(z) + log(y)) - t
else if (a <= 0.0072d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = Math.log((z * (x + y))) + ((Math.log(t) * -0.5) - t);
double t_2 = (Math.log(t) * (a + -0.5)) - t;
double tmp;
if (a <= -3.7e-103) {
tmp = t_2;
} else if (a <= -2.6e-262) {
tmp = t_1;
} else if (a <= -2.8e-299) {
tmp = (Math.log(z) + Math.log(y)) - t;
} else if (a <= 0.0072) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((z * (x + y))) + ((math.log(t) * -0.5) - t) t_2 = (math.log(t) * (a + -0.5)) - t tmp = 0 if a <= -3.7e-103: tmp = t_2 elif a <= -2.6e-262: tmp = t_1 elif a <= -2.8e-299: tmp = (math.log(z) + math.log(y)) - t elif a <= 0.0072: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(log(Float64(z * Float64(x + y))) + Float64(Float64(log(t) * -0.5) - t)) t_2 = Float64(Float64(log(t) * Float64(a + -0.5)) - t) tmp = 0.0 if (a <= -3.7e-103) tmp = t_2; elseif (a <= -2.6e-262) tmp = t_1; elseif (a <= -2.8e-299) tmp = Float64(Float64(log(z) + log(y)) - t); elseif (a <= 0.0072) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log((z * (x + y))) + ((log(t) * -0.5) - t); t_2 = (log(t) * (a + -0.5)) - t; tmp = 0.0; if (a <= -3.7e-103) tmp = t_2; elseif (a <= -2.6e-262) tmp = t_1; elseif (a <= -2.8e-299) tmp = (log(z) + log(y)) - t; elseif (a <= 0.0072) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[a, -3.7e-103], t$95$2, If[LessEqual[a, -2.6e-262], t$95$1, If[LessEqual[a, -2.8e-299], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[a, 0.0072], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(z \cdot \left(x + y\right)\right) + \left(\log t \cdot -0.5 - t\right)\\
t_2 := \log t \cdot \left(a + -0.5\right) - t\\
\mathbf{if}\;a \leq -3.7 \cdot 10^{-103}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2.6 \cdot 10^{-262}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.8 \cdot 10^{-299}:\\
\;\;\;\;\left(\log z + \log y\right) - t\\
\mathbf{elif}\;a \leq 0.0072:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -3.6999999999999999e-103 or 0.0071999999999999998 < a Initial program 99.6%
remove-double-neg99.6%
associate--l+99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around -inf 99.6%
mul-1-neg99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
mul-1-neg99.6%
unsub-neg99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in t around inf 90.5%
mul-1-neg90.5%
Simplified90.5%
if -3.6999999999999999e-103 < a < -2.5999999999999999e-262 or -2.8000000000000001e-299 < a < 0.0071999999999999998Initial program 99.1%
remove-double-neg99.1%
associate--l+99.2%
remove-double-neg99.2%
sub-neg99.2%
metadata-eval99.2%
Simplified99.2%
flip-+99.2%
associate-*l/99.2%
fma-neg99.2%
metadata-eval99.2%
metadata-eval99.2%
sub-neg99.2%
metadata-eval99.2%
+-commutative99.2%
Applied egg-rr99.2%
associate-+r-99.1%
sum-log71.1%
Applied egg-rr71.1%
Taylor expanded in a around 0 70.2%
associate--l+70.3%
+-commutative70.3%
Simplified70.3%
if -2.5999999999999999e-262 < a < -2.8000000000000001e-299Initial program 100.0%
associate-+l-100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
fma-undefine100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 68.7%
Taylor expanded in x around 0 55.5%
Final simplification81.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.5e-125) (not (<= a 1.85e-5))) (- (* (log t) (+ a -0.5)) t) (- (log (* y (* z (pow t (+ a -0.5))))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.5e-125) || !(a <= 1.85e-5)) {
tmp = (log(t) * (a + -0.5)) - t;
} else {
tmp = log((y * (z * pow(t, (a + -0.5))))) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.5d-125)) .or. (.not. (a <= 1.85d-5))) then
tmp = (log(t) * (a + (-0.5d0))) - t
else
tmp = log((y * (z * (t ** (a + (-0.5d0)))))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.5e-125) || !(a <= 1.85e-5)) {
tmp = (Math.log(t) * (a + -0.5)) - t;
} else {
tmp = Math.log((y * (z * Math.pow(t, (a + -0.5))))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.5e-125) or not (a <= 1.85e-5): tmp = (math.log(t) * (a + -0.5)) - t else: tmp = math.log((y * (z * math.pow(t, (a + -0.5))))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.5e-125) || !(a <= 1.85e-5)) tmp = Float64(Float64(log(t) * Float64(a + -0.5)) - t); else tmp = Float64(log(Float64(y * Float64(z * (t ^ Float64(a + -0.5))))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.5e-125) || ~((a <= 1.85e-5))) tmp = (log(t) * (a + -0.5)) - t; else tmp = log((y * (z * (t ^ (a + -0.5))))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.5e-125], N[Not[LessEqual[a, 1.85e-5]], $MachinePrecision]], N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[N[(y * N[(z * N[Power[t, N[(a + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{-125} \lor \neg \left(a \leq 1.85 \cdot 10^{-5}\right):\\
\;\;\;\;\log t \cdot \left(a + -0.5\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log \left(y \cdot \left(z \cdot {t}^{\left(a + -0.5\right)}\right)\right) - t\\
\end{array}
\end{array}
if a < -1.49999999999999995e-125 or 1.84999999999999991e-5 < a Initial program 99.6%
remove-double-neg99.6%
associate--l+99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around -inf 99.6%
mul-1-neg99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
mul-1-neg99.6%
unsub-neg99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in t around inf 90.7%
mul-1-neg90.7%
Simplified90.7%
if -1.49999999999999995e-125 < a < 1.84999999999999991e-5Initial program 99.2%
remove-double-neg99.2%
associate--l+99.2%
remove-double-neg99.2%
sub-neg99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in x around 0 56.7%
*-un-lft-identity56.7%
add-log-exp50.9%
sum-log39.4%
exp-sum39.3%
add-exp-log39.5%
exp-to-pow39.5%
sub-neg39.5%
metadata-eval39.5%
Applied egg-rr39.5%
*-lft-identity39.5%
Simplified39.5%
Final simplification69.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -600.0) (not (<= a 1.7e-9))) (- (* (log t) a) t) (- (log (+ x y)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -600.0) || !(a <= 1.7e-9)) {
tmp = (log(t) * a) - t;
} else {
tmp = log((x + y)) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-600.0d0)) .or. (.not. (a <= 1.7d-9))) then
tmp = (log(t) * a) - t
else
tmp = log((x + y)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -600.0) || !(a <= 1.7e-9)) {
tmp = (Math.log(t) * a) - t;
} else {
tmp = Math.log((x + y)) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -600.0) or not (a <= 1.7e-9): tmp = (math.log(t) * a) - t else: tmp = math.log((x + y)) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -600.0) || !(a <= 1.7e-9)) tmp = Float64(Float64(log(t) * a) - t); else tmp = Float64(log(Float64(x + y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -600.0) || ~((a <= 1.7e-9))) tmp = (log(t) * a) - t; else tmp = log((x + y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -600.0], N[Not[LessEqual[a, 1.7e-9]], $MachinePrecision]], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -600 \lor \neg \left(a \leq 1.7 \cdot 10^{-9}\right):\\
\;\;\;\;\log t \cdot a - t\\
\mathbf{else}:\\
\;\;\;\;\log \left(x + y\right) - t\\
\end{array}
\end{array}
if a < -600 or 1.6999999999999999e-9 < a Initial program 99.6%
remove-double-neg99.6%
associate--l+99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 69.5%
Taylor expanded in a around inf 97.4%
*-commutative97.4%
Simplified97.4%
if -600 < a < 1.6999999999999999e-9Initial program 99.3%
associate-+l-99.3%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in t around inf 50.2%
neg-mul-150.2%
Simplified50.2%
Final simplification73.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -600.0) (not (<= a 1.7e-9))) (- (* (log t) a) t) (- (log y) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -600.0) || !(a <= 1.7e-9)) {
tmp = (log(t) * a) - t;
} else {
tmp = log(y) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-600.0d0)) .or. (.not. (a <= 1.7d-9))) then
tmp = (log(t) * a) - t
else
tmp = log(y) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -600.0) || !(a <= 1.7e-9)) {
tmp = (Math.log(t) * a) - t;
} else {
tmp = Math.log(y) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -600.0) or not (a <= 1.7e-9): tmp = (math.log(t) * a) - t else: tmp = math.log(y) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -600.0) || !(a <= 1.7e-9)) tmp = Float64(Float64(log(t) * a) - t); else tmp = Float64(log(y) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -600.0) || ~((a <= 1.7e-9))) tmp = (log(t) * a) - t; else tmp = log(y) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -600.0], N[Not[LessEqual[a, 1.7e-9]], $MachinePrecision]], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -600 \lor \neg \left(a \leq 1.7 \cdot 10^{-9}\right):\\
\;\;\;\;\log t \cdot a - t\\
\mathbf{else}:\\
\;\;\;\;\log y - t\\
\end{array}
\end{array}
if a < -600 or 1.6999999999999999e-9 < a Initial program 99.6%
remove-double-neg99.6%
associate--l+99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 69.5%
Taylor expanded in a around inf 97.4%
*-commutative97.4%
Simplified97.4%
if -600 < a < 1.6999999999999999e-9Initial program 99.3%
associate-+l-99.3%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in t around inf 50.2%
neg-mul-150.2%
Simplified50.2%
Taylor expanded in x around 0 33.2%
Final simplification65.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.2e+27) (not (<= a 7.5e-8))) (* (log t) a) (- (log y) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.2e+27) || !(a <= 7.5e-8)) {
tmp = log(t) * a;
} else {
tmp = log(y) - t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.2d+27)) .or. (.not. (a <= 7.5d-8))) then
tmp = log(t) * a
else
tmp = log(y) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.2e+27) || !(a <= 7.5e-8)) {
tmp = Math.log(t) * a;
} else {
tmp = Math.log(y) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.2e+27) or not (a <= 7.5e-8): tmp = math.log(t) * a else: tmp = math.log(y) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.2e+27) || !(a <= 7.5e-8)) tmp = Float64(log(t) * a); else tmp = Float64(log(y) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.2e+27) || ~((a <= 7.5e-8))) tmp = log(t) * a; else tmp = log(y) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.2e+27], N[Not[LessEqual[a, 7.5e-8]], $MachinePrecision]], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision], N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{+27} \lor \neg \left(a \leq 7.5 \cdot 10^{-8}\right):\\
\;\;\;\;\log t \cdot a\\
\mathbf{else}:\\
\;\;\;\;\log y - t\\
\end{array}
\end{array}
if a < -1.19999999999999999e27 or 7.4999999999999997e-8 < a Initial program 99.6%
remove-double-neg99.6%
associate--l+99.6%
remove-double-neg99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around -inf 99.6%
mul-1-neg99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
mul-1-neg99.6%
unsub-neg99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in a around inf 77.6%
*-commutative77.6%
Simplified77.6%
if -1.19999999999999999e27 < a < 7.4999999999999997e-8Initial program 99.3%
associate-+l-99.3%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-undefine99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in t around inf 50.8%
neg-mul-150.8%
Simplified50.8%
Taylor expanded in x around 0 34.3%
Final simplification55.0%
(FPCore (x y z t a) :precision binary64 (if (<= t 9e+50) (* (log t) a) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 9e+50) {
tmp = log(t) * a;
} else {
tmp = -t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 9d+50) then
tmp = log(t) * a
else
tmp = -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 9e+50) {
tmp = Math.log(t) * a;
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 9e+50: tmp = math.log(t) * a else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 9e+50) tmp = Float64(log(t) * a); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 9e+50) tmp = log(t) * a; else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 9e+50], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9 \cdot 10^{+50}:\\
\;\;\;\;\log t \cdot a\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 9.00000000000000027e50Initial program 99.2%
remove-double-neg99.2%
associate--l+99.2%
remove-double-neg99.2%
sub-neg99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in t around -inf 98.0%
mul-1-neg98.0%
*-commutative98.0%
distribute-rgt-neg-in98.0%
mul-1-neg98.0%
unsub-neg98.0%
+-commutative98.0%
Simplified98.0%
Taylor expanded in a around inf 50.1%
*-commutative50.1%
Simplified50.1%
if 9.00000000000000027e50 < t Initial program 99.9%
remove-double-neg99.9%
associate--l+99.9%
remove-double-neg99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 72.5%
Taylor expanded in t around inf 77.9%
neg-mul-177.9%
Simplified77.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 230.0) (log (+ x y)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 230.0) {
tmp = log((x + y));
} else {
tmp = -t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 230.0d0) then
tmp = log((x + y))
else
tmp = -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 230.0) {
tmp = Math.log((x + y));
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 230.0: tmp = math.log((x + y)) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 230.0) tmp = log(Float64(x + y)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 230.0) tmp = log((x + y)); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 230.0], N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 230:\\
\;\;\;\;\log \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 230Initial program 99.1%
associate-+l-99.1%
associate--l+99.2%
sub-neg99.2%
+-commutative99.2%
*-commutative99.2%
distribute-rgt-neg-in99.2%
fma-undefine99.2%
sub-neg99.2%
+-commutative99.2%
distribute-neg-in99.2%
metadata-eval99.2%
metadata-eval99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in t around inf 8.9%
neg-mul-18.9%
Simplified8.9%
Taylor expanded in t around 0 8.9%
+-commutative8.9%
Simplified8.9%
if 230 < t Initial program 99.8%
remove-double-neg99.8%
associate--l+99.8%
remove-double-neg99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 69.4%
Taylor expanded in t around inf 70.2%
neg-mul-170.2%
Simplified70.2%
Final simplification35.7%
(FPCore (x y z t a) :precision binary64 (- (* (log t) (+ a -0.5)) t))
double code(double x, double y, double z, double t, double a) {
return (log(t) * (a + -0.5)) - t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (log(t) * (a + (-0.5d0))) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(t) * (a + -0.5)) - t;
}
def code(x, y, z, t, a): return (math.log(t) * (a + -0.5)) - t
function code(x, y, z, t, a) return Float64(Float64(log(t) * Float64(a + -0.5)) - t) end
function tmp = code(x, y, z, t, a) tmp = (log(t) * (a + -0.5)) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\log t \cdot \left(a + -0.5\right) - t
\end{array}
Initial program 99.4%
remove-double-neg99.4%
associate--l+99.5%
remove-double-neg99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in t around -inf 98.7%
mul-1-neg98.7%
*-commutative98.7%
distribute-rgt-neg-in98.7%
mul-1-neg98.7%
unsub-neg98.7%
+-commutative98.7%
Simplified98.7%
Taylor expanded in t around inf 73.3%
mul-1-neg73.3%
Simplified73.3%
Final simplification73.3%
(FPCore (x y z t a) :precision binary64 (- t))
double code(double x, double y, double z, double t, double a) {
return -t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = -t
end function
public static double code(double x, double y, double z, double t, double a) {
return -t;
}
def code(x, y, z, t, a): return -t
function code(x, y, z, t, a) return Float64(-t) end
function tmp = code(x, y, z, t, a) tmp = -t; end
code[x_, y_, z_, t_, a_] := (-t)
\begin{array}{l}
\\
-t
\end{array}
Initial program 99.4%
remove-double-neg99.4%
associate--l+99.5%
remove-double-neg99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around 0 61.9%
Taylor expanded in t around inf 32.4%
neg-mul-132.4%
Simplified32.4%
(FPCore (x y z t a) :precision binary64 (+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t)))))
double code(double x, double y, double z, double t, double a) {
return log((x + y)) + ((log(z) - t) + ((a - 0.5) * log(t)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = log((x + y)) + ((log(z) - t) + ((a - 0.5d0) * log(t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return Math.log((x + y)) + ((Math.log(z) - t) + ((a - 0.5) * Math.log(t)));
}
def code(x, y, z, t, a): return math.log((x + y)) + ((math.log(z) - t) + ((a - 0.5) * math.log(t)))
function code(x, y, z, t, a) return Float64(log(Float64(x + y)) + Float64(Float64(log(z) - t) + Float64(Float64(a - 0.5) * log(t)))) end
function tmp = code(x, y, z, t, a) tmp = log((x + y)) + ((log(z) - t) + ((a - 0.5) * log(t))); end
code[x_, y_, z_, t_, a_] := N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log \left(x + y\right) + \left(\left(\log z - t\right) + \left(a - 0.5\right) \cdot \log t\right)
\end{array}
herbie shell --seed 2024102
(FPCore (x y z t a)
:name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
:precision binary64
:alt
(+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t))))
(+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))