
(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 17 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.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-undefine99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log (+ x y)) (log z))))
(if (<= t_1 -750.0)
(- (* (log t) a) t)
(if (<= t_1 710.0)
(- (+ (log (* y z)) (* (log t) (- a 0.5))) t)
(- (* (log t) (+ a -0.5)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((x + y)) + log(z);
double tmp;
if (t_1 <= -750.0) {
tmp = (log(t) * a) - t;
} else if (t_1 <= 710.0) {
tmp = (log((y * z)) + (log(t) * (a - 0.5))) - t;
} 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) :: t_1
real(8) :: tmp
t_1 = log((x + y)) + log(z)
if (t_1 <= (-750.0d0)) then
tmp = (log(t) * a) - t
else if (t_1 <= 710.0d0) then
tmp = (log((y * z)) + (log(t) * (a - 0.5d0))) - t
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 t_1 = Math.log((x + y)) + Math.log(z);
double tmp;
if (t_1 <= -750.0) {
tmp = (Math.log(t) * a) - t;
} else if (t_1 <= 710.0) {
tmp = (Math.log((y * z)) + (Math.log(t) * (a - 0.5))) - t;
} else {
tmp = (Math.log(t) * (a + -0.5)) - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((x + y)) + math.log(z) tmp = 0 if t_1 <= -750.0: tmp = (math.log(t) * a) - t elif t_1 <= 710.0: tmp = (math.log((y * z)) + (math.log(t) * (a - 0.5))) - t else: tmp = (math.log(t) * (a + -0.5)) - t return tmp
function code(x, y, z, t, a) t_1 = Float64(log(Float64(x + y)) + log(z)) tmp = 0.0 if (t_1 <= -750.0) tmp = Float64(Float64(log(t) * a) - t); elseif (t_1 <= 710.0) tmp = Float64(Float64(log(Float64(y * z)) + Float64(log(t) * Float64(a - 0.5))) - t); else tmp = Float64(Float64(log(t) * Float64(a + -0.5)) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log((x + y)) + log(z); tmp = 0.0; if (t_1 <= -750.0) tmp = (log(t) * a) - t; elseif (t_1 <= 710.0) tmp = (log((y * z)) + (log(t) * (a - 0.5))) - t; else tmp = (log(t) * (a + -0.5)) - t; 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]}, If[LessEqual[t$95$1, -750.0], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$1, 710.0], N[(N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(x + y\right) + \log z\\
\mathbf{if}\;t\_1 \leq -750:\\
\;\;\;\;\log t \cdot a - t\\
\mathbf{elif}\;t\_1 \leq 710:\\
\;\;\;\;\left(\log \left(y \cdot z\right) + \log t \cdot \left(a - 0.5\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log t \cdot \left(a + -0.5\right) - t\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -750Initial program 99.4%
Taylor expanded in t around inf 99.6%
Taylor expanded in t around inf 68.2%
neg-mul-168.2%
Simplified68.2%
Taylor expanded in a around inf 70.1%
if -750 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 710Initial program 99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
associate--l+99.7%
Simplified99.7%
associate-+r-99.7%
sum-log99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 72.5%
if 710 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.8%
Taylor expanded in t around inf 99.8%
Taylor expanded in t around inf 80.5%
neg-mul-180.5%
Simplified80.5%
Taylor expanded in t around 0 80.5%
neg-mul-180.5%
+-commutative80.5%
sub-neg80.5%
metadata-eval80.5%
+-commutative80.5%
distribute-rgt-out80.5%
sub-neg80.5%
distribute-rgt-out80.5%
Simplified80.5%
Final simplification74.2%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.85) (+ (log z) (+ (log (+ x y)) (* (log t) (- a 0.5)))) (- (* (- a 0.5) (log1p (+ t -1.0))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.85) {
tmp = log(z) + (log((x + y)) + (log(t) * (a - 0.5)));
} else {
tmp = ((a - 0.5) * log1p((t + -1.0))) - t;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.85) {
tmp = Math.log(z) + (Math.log((x + y)) + (Math.log(t) * (a - 0.5)));
} else {
tmp = ((a - 0.5) * Math.log1p((t + -1.0))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.85: tmp = math.log(z) + (math.log((x + y)) + (math.log(t) * (a - 0.5))) else: tmp = ((a - 0.5) * math.log1p((t + -1.0))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.85) tmp = Float64(log(z) + Float64(log(Float64(x + y)) + Float64(log(t) * Float64(a - 0.5)))); else tmp = Float64(Float64(Float64(a - 0.5) * log1p(Float64(t + -1.0))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.85], N[(N[Log[z], $MachinePrecision] + N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[1 + N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.85:\\
\;\;\;\;\log z + \left(\log \left(x + y\right) + \log t \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a - 0.5\right) \cdot \mathsf{log1p}\left(t + -1\right) - t\\
\end{array}
\end{array}
if t < 0.849999999999999978Initial 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%
Taylor expanded in t around 0 98.3%
associate--l+98.4%
+-commutative98.4%
Simplified98.4%
if 0.849999999999999978 < t Initial program 99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in t around inf 98.3%
neg-mul-198.3%
Simplified98.3%
log1p-expm1-u98.3%
expm1-undefine98.3%
add-exp-log98.3%
Applied egg-rr98.3%
Final simplification98.4%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.85) (+ (log z) (+ (log y) (* (log t) (- a 0.5)))) (- (* (- a 0.5) (log1p (+ t -1.0))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.85) {
tmp = log(z) + (log(y) + (log(t) * (a - 0.5)));
} else {
tmp = ((a - 0.5) * log1p((t + -1.0))) - t;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.85) {
tmp = Math.log(z) + (Math.log(y) + (Math.log(t) * (a - 0.5)));
} else {
tmp = ((a - 0.5) * Math.log1p((t + -1.0))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.85: tmp = math.log(z) + (math.log(y) + (math.log(t) * (a - 0.5))) else: tmp = ((a - 0.5) * math.log1p((t + -1.0))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.85) tmp = Float64(log(z) + Float64(log(y) + Float64(log(t) * Float64(a - 0.5)))); else tmp = Float64(Float64(Float64(a - 0.5) * log1p(Float64(t + -1.0))) - t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.85], N[(N[Log[z], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a - 0.5), $MachinePrecision] * N[Log[1 + N[(t + -1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.85:\\
\;\;\;\;\log z + \left(\log y + \log t \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a - 0.5\right) \cdot \mathsf{log1p}\left(t + -1\right) - t\\
\end{array}
\end{array}
if t < 0.849999999999999978Initial 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%
Taylor expanded in t around inf 76.5%
mul-1-neg76.5%
associate-/l*76.5%
distribute-lft-neg-in76.5%
log-rec76.5%
remove-double-neg76.5%
Simplified76.5%
Taylor expanded in x around 0 42.8%
Taylor expanded in t around 0 61.5%
+-commutative61.5%
associate--l+61.6%
Simplified61.6%
if 0.849999999999999978 < t Initial program 99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in t around inf 98.3%
neg-mul-198.3%
Simplified98.3%
log1p-expm1-u98.3%
expm1-undefine98.3%
add-exp-log98.3%
Applied egg-rr98.3%
Final simplification82.5%
(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(Float64(log(Float64(x + y)) + 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[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \log t \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.7%
Final simplification99.7%
(FPCore (x y z t a) :precision binary64 (- (+ (log y) (- (log z) (* (log t) (- 0.5 a)))) t))
double code(double x, double y, double z, double t, double a) {
return (log(y) + (log(z) - (log(t) * (0.5 - a)))) - 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) * (0.5d0 - a)))) - 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) * (0.5 - a)))) - t;
}
def code(x, y, z, t, a): return (math.log(y) + (math.log(z) - (math.log(t) * (0.5 - a)))) - t
function code(x, y, z, t, a) return Float64(Float64(log(y) + Float64(log(z) - Float64(log(t) * Float64(0.5 - a)))) - t) end
function tmp = code(x, y, z, t, a) tmp = (log(y) + (log(z) - (log(t) * (0.5 - a)))) - 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[(0.5 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y + \left(\log z - \log t \cdot \left(0.5 - a\right)\right)\right) - t
\end{array}
Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 69.8%
Final simplification69.8%
(FPCore (x y z t a)
:precision binary64
(if (<= (- a 0.5) -100.0)
(- (* (log t) (+ a -0.5)) t)
(if (<= (- a 0.5) -0.4999999995)
(- (log (* y (* z (pow t (+ a -0.5))))) t)
(- (* (log t) a) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a - 0.5) <= -100.0) {
tmp = (log(t) * (a + -0.5)) - t;
} else if ((a - 0.5) <= -0.4999999995) {
tmp = log((y * (z * pow(t, (a + -0.5))))) - t;
} else {
tmp = (log(t) * a) - 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 - 0.5d0) <= (-100.0d0)) then
tmp = (log(t) * (a + (-0.5d0))) - t
else if ((a - 0.5d0) <= (-0.4999999995d0)) then
tmp = log((y * (z * (t ** (a + (-0.5d0)))))) - t
else
tmp = (log(t) * a) - 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 - 0.5) <= -100.0) {
tmp = (Math.log(t) * (a + -0.5)) - t;
} else if ((a - 0.5) <= -0.4999999995) {
tmp = Math.log((y * (z * Math.pow(t, (a + -0.5))))) - t;
} else {
tmp = (Math.log(t) * a) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a - 0.5) <= -100.0: tmp = (math.log(t) * (a + -0.5)) - t elif (a - 0.5) <= -0.4999999995: tmp = math.log((y * (z * math.pow(t, (a + -0.5))))) - t else: tmp = (math.log(t) * a) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(a - 0.5) <= -100.0) tmp = Float64(Float64(log(t) * Float64(a + -0.5)) - t); elseif (Float64(a - 0.5) <= -0.4999999995) tmp = Float64(log(Float64(y * Float64(z * (t ^ Float64(a + -0.5))))) - t); else tmp = Float64(Float64(log(t) * a) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a - 0.5) <= -100.0) tmp = (log(t) * (a + -0.5)) - t; elseif ((a - 0.5) <= -0.4999999995) tmp = log((y * (z * (t ^ (a + -0.5))))) - t; else tmp = (log(t) * a) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(a - 0.5), $MachinePrecision], -100.0], N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[N[(a - 0.5), $MachinePrecision], -0.4999999995], N[(N[Log[N[(y * N[(z * N[Power[t, N[(a + -0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -100:\\
\;\;\;\;\log t \cdot \left(a + -0.5\right) - t\\
\mathbf{elif}\;a - 0.5 \leq -0.4999999995:\\
\;\;\;\;\log \left(y \cdot \left(z \cdot {t}^{\left(a + -0.5\right)}\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log t \cdot a - t\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -100Initial program 99.7%
Taylor expanded in t around inf 99.7%
Taylor expanded in t around inf 97.2%
neg-mul-197.2%
Simplified97.2%
Taylor expanded in t around 0 97.2%
neg-mul-197.2%
+-commutative97.2%
sub-neg97.2%
metadata-eval97.2%
+-commutative97.2%
distribute-rgt-out97.2%
sub-neg97.2%
distribute-rgt-out97.2%
Simplified97.2%
if -100 < (-.f64 a #s(literal 1/2 binary64)) < -0.499999999500000014Initial program 99.7%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 62.9%
*-un-lft-identity62.9%
add-log-exp59.0%
sum-log46.3%
exp-sum46.3%
add-exp-log46.3%
exp-to-pow46.3%
sub-neg46.3%
metadata-eval46.3%
Applied egg-rr46.3%
*-lft-identity46.3%
Simplified46.3%
if -0.499999999500000014 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.8%
Taylor expanded in t around inf 99.8%
Taylor expanded in t around inf 99.7%
neg-mul-199.7%
Simplified99.7%
Taylor expanded in a around inf 99.7%
Final simplification72.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.05e+123) (not (<= a 4.6e+112))) (* (log t) a) (- (* (log t) -0.5) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.05e+123) || !(a <= 4.6e+112)) {
tmp = log(t) * a;
} else {
tmp = (log(t) * -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 <= (-2.05d+123)) .or. (.not. (a <= 4.6d+112))) then
tmp = log(t) * a
else
tmp = (log(t) * (-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 <= -2.05e+123) || !(a <= 4.6e+112)) {
tmp = Math.log(t) * a;
} else {
tmp = (Math.log(t) * -0.5) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.05e+123) or not (a <= 4.6e+112): tmp = math.log(t) * a else: tmp = (math.log(t) * -0.5) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.05e+123) || !(a <= 4.6e+112)) tmp = Float64(log(t) * a); else tmp = Float64(Float64(log(t) * -0.5) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.05e+123) || ~((a <= 4.6e+112))) tmp = log(t) * a; else tmp = (log(t) * -0.5) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.05e+123], N[Not[LessEqual[a, 4.6e+112]], $MachinePrecision]], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.05 \cdot 10^{+123} \lor \neg \left(a \leq 4.6 \cdot 10^{+112}\right):\\
\;\;\;\;\log t \cdot a\\
\mathbf{else}:\\
\;\;\;\;\log t \cdot -0.5 - t\\
\end{array}
\end{array}
if a < -2.04999999999999995e123 or 4.5999999999999999e112 < a Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-undefine99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in a around inf 84.1%
*-commutative84.1%
Simplified84.1%
if -2.04999999999999995e123 < a < 4.5999999999999999e112Initial program 99.7%
Taylor expanded in t around inf 99.7%
Taylor expanded in t around inf 67.1%
neg-mul-167.1%
Simplified67.1%
Taylor expanded in a around 0 58.6%
Final simplification67.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.1e+123) (not (<= a 3.8e+110))) (* (log t) a) (+ (* t (+ (/ 1.0 t) -1.0)) -1.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.1e+123) || !(a <= 3.8e+110)) {
tmp = log(t) * a;
} else {
tmp = (t * ((1.0 / t) + -1.0)) + -1.0;
}
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 <= (-2.1d+123)) .or. (.not. (a <= 3.8d+110))) then
tmp = log(t) * a
else
tmp = (t * ((1.0d0 / t) + (-1.0d0))) + (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.1e+123) || !(a <= 3.8e+110)) {
tmp = Math.log(t) * a;
} else {
tmp = (t * ((1.0 / t) + -1.0)) + -1.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.1e+123) or not (a <= 3.8e+110): tmp = math.log(t) * a else: tmp = (t * ((1.0 / t) + -1.0)) + -1.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.1e+123) || !(a <= 3.8e+110)) tmp = Float64(log(t) * a); else tmp = Float64(Float64(t * Float64(Float64(1.0 / t) + -1.0)) + -1.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.1e+123) || ~((a <= 3.8e+110))) tmp = log(t) * a; else tmp = (t * ((1.0 / t) + -1.0)) + -1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.1e+123], N[Not[LessEqual[a, 3.8e+110]], $MachinePrecision]], N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision], N[(N[(t * N[(N[(1.0 / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{+123} \lor \neg \left(a \leq 3.8 \cdot 10^{+110}\right):\\
\;\;\;\;\log t \cdot a\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{1}{t} + -1\right) + -1\\
\end{array}
\end{array}
if a < -2.09999999999999994e123 or 3.79999999999999989e110 < a Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-undefine99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
metadata-eval99.8%
metadata-eval99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in a around inf 84.1%
*-commutative84.1%
Simplified84.1%
if -2.09999999999999994e123 < a < 3.79999999999999989e110Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-undefine99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in t around inf 54.8%
neg-mul-154.8%
Simplified54.8%
expm1-log1p-u1.3%
expm1-undefine1.4%
Applied egg-rr1.4%
sub-neg1.4%
log1p-undefine1.4%
rem-exp-log54.8%
unsub-neg54.8%
metadata-eval54.8%
Simplified54.8%
Taylor expanded in t around inf 54.8%
Final simplification64.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.0085) (+ t (* (log t) (+ a -0.5))) (- (* (log t) a) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.0085) {
tmp = t + (log(t) * (a + -0.5));
} else {
tmp = (log(t) * a) - 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 <= 0.0085d0) then
tmp = t + (log(t) * (a + (-0.5d0)))
else
tmp = (log(t) * a) - 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 <= 0.0085) {
tmp = t + (Math.log(t) * (a + -0.5));
} else {
tmp = (Math.log(t) * a) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.0085: tmp = t + (math.log(t) * (a + -0.5)) else: tmp = (math.log(t) * a) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.0085) tmp = Float64(t + Float64(log(t) * Float64(a + -0.5))); else tmp = Float64(Float64(log(t) * a) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 0.0085) tmp = t + (log(t) * (a + -0.5)); else tmp = (log(t) * a) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.0085], N[(t + N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.0085:\\
\;\;\;\;t + \log t \cdot \left(a + -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\log t \cdot a - t\\
\end{array}
\end{array}
if t < 0.0085000000000000006Initial program 99.4%
Taylor expanded in t around inf 99.4%
Taylor expanded in t around inf 51.7%
neg-mul-151.7%
Simplified51.7%
*-un-lft-identity51.7%
fma-define51.7%
add-sqr-sqrt0.0%
sqrt-unprod51.7%
sqr-neg51.7%
sqrt-unprod51.7%
add-sqr-sqrt51.7%
sub-neg51.7%
metadata-eval51.7%
+-commutative51.7%
*-commutative51.7%
+-commutative51.7%
Applied egg-rr51.7%
fma-undefine51.7%
*-lft-identity51.7%
distribute-rgt-in51.7%
+-commutative51.7%
distribute-rgt-out51.7%
Simplified51.7%
if 0.0085000000000000006 < t Initial program 99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in t around inf 98.3%
neg-mul-198.3%
Simplified98.3%
Taylor expanded in a around inf 98.3%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.8) (* (log t) (- a 0.5)) (- (* (log t) a) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.8) {
tmp = log(t) * (a - 0.5);
} else {
tmp = (log(t) * a) - 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 <= 0.8d0) then
tmp = log(t) * (a - 0.5d0)
else
tmp = (log(t) * a) - 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 <= 0.8) {
tmp = Math.log(t) * (a - 0.5);
} else {
tmp = (Math.log(t) * a) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.8: tmp = math.log(t) * (a - 0.5) else: tmp = (math.log(t) * a) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.8) tmp = Float64(log(t) * Float64(a - 0.5)); else tmp = Float64(Float64(log(t) * a) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 0.8) tmp = log(t) * (a - 0.5); else tmp = (log(t) * a) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.8], N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] * a), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.8:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\log t \cdot a - t\\
\end{array}
\end{array}
if t < 0.80000000000000004Initial program 99.4%
Taylor expanded in t around inf 99.4%
Taylor expanded in t around inf 51.7%
neg-mul-151.7%
Simplified51.7%
Taylor expanded in t around 0 51.7%
if 0.80000000000000004 < t Initial program 99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in t around inf 98.3%
neg-mul-198.3%
Simplified98.3%
Taylor expanded in a around inf 98.3%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.45e+53) (* (log t) (- a 0.5)) (+ (* t (+ (/ 1.0 t) -1.0)) -1.0)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.45e+53) {
tmp = log(t) * (a - 0.5);
} else {
tmp = (t * ((1.0 / t) + -1.0)) + -1.0;
}
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 <= 1.45d+53) then
tmp = log(t) * (a - 0.5d0)
else
tmp = (t * ((1.0d0 / t) + (-1.0d0))) + (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.45e+53) {
tmp = Math.log(t) * (a - 0.5);
} else {
tmp = (t * ((1.0 / t) + -1.0)) + -1.0;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.45e+53: tmp = math.log(t) * (a - 0.5) else: tmp = (t * ((1.0 / t) + -1.0)) + -1.0 return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.45e+53) tmp = Float64(log(t) * Float64(a - 0.5)); else tmp = Float64(Float64(t * Float64(Float64(1.0 / t) + -1.0)) + -1.0); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.45e+53) tmp = log(t) * (a - 0.5); else tmp = (t * ((1.0 / t) + -1.0)) + -1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.45e+53], N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(N[(1.0 / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.45 \cdot 10^{+53}:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\frac{1}{t} + -1\right) + -1\\
\end{array}
\end{array}
if t < 1.4500000000000001e53Initial program 99.5%
Taylor expanded in t around inf 99.5%
Taylor expanded in t around inf 58.6%
neg-mul-158.6%
Simplified58.6%
Taylor expanded in t around 0 52.9%
if 1.4500000000000001e53 < t Initial program 99.9%
associate-+l-99.9%
associate--l+99.9%
sub-neg99.9%
+-commutative99.9%
*-commutative99.9%
distribute-rgt-neg-in99.9%
fma-undefine99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
metadata-eval99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in t around inf 77.4%
neg-mul-177.4%
Simplified77.4%
expm1-log1p-u0.0%
expm1-undefine0.0%
Applied egg-rr0.0%
sub-neg0.0%
log1p-undefine0.0%
rem-exp-log77.4%
unsub-neg77.4%
metadata-eval77.4%
Simplified77.4%
Taylor expanded in t around inf 77.4%
Final simplification64.6%
(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.7%
Taylor expanded in t around inf 99.7%
Taylor expanded in t around inf 78.3%
neg-mul-178.3%
Simplified78.3%
Taylor expanded in t around 0 78.3%
neg-mul-178.3%
+-commutative78.3%
sub-neg78.3%
metadata-eval78.3%
+-commutative78.3%
distribute-rgt-out78.3%
sub-neg78.3%
distribute-rgt-out78.3%
Simplified78.3%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (+ (* t (+ (/ 1.0 t) -1.0)) -1.0))
double code(double x, double y, double z, double t, double a) {
return (t * ((1.0 / t) + -1.0)) + -1.0;
}
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 * ((1.0d0 / t) + (-1.0d0))) + (-1.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return (t * ((1.0 / t) + -1.0)) + -1.0;
}
def code(x, y, z, t, a): return (t * ((1.0 / t) + -1.0)) + -1.0
function code(x, y, z, t, a) return Float64(Float64(t * Float64(Float64(1.0 / t) + -1.0)) + -1.0) end
function tmp = code(x, y, z, t, a) tmp = (t * ((1.0 / t) + -1.0)) + -1.0; end
code[x_, y_, z_, t_, a_] := N[(N[(t * N[(N[(1.0 / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]
\begin{array}{l}
\\
t \cdot \left(\frac{1}{t} + -1\right) + -1
\end{array}
Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-undefine99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in t around inf 41.6%
neg-mul-141.6%
Simplified41.6%
expm1-log1p-u1.2%
expm1-undefine1.2%
Applied egg-rr1.2%
sub-neg1.2%
log1p-undefine1.2%
rem-exp-log41.6%
unsub-neg41.6%
metadata-eval41.6%
Simplified41.6%
Taylor expanded in t around inf 41.6%
Final simplification41.6%
(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.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-undefine99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in t around inf 41.6%
neg-mul-141.6%
Simplified41.6%
(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 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.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-undefine99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in t around inf 41.6%
neg-mul-141.6%
Simplified41.6%
add-cube-cbrt40.9%
pow340.9%
Applied egg-rr40.9%
rem-cube-cbrt41.6%
add-sqr-sqrt0.0%
sqrt-unprod2.4%
sqr-neg2.4%
sqrt-unprod2.5%
add-sqr-sqrt2.5%
*-un-lft-identity2.5%
Applied egg-rr2.5%
*-lft-identity2.5%
Simplified2.5%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 99.7%
associate-+l-99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
fma-undefine99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in t around inf 41.6%
neg-mul-141.6%
Simplified41.6%
expm1-log1p-u1.2%
expm1-undefine1.2%
Applied egg-rr1.2%
sub-neg1.2%
log1p-undefine1.2%
rem-exp-log41.6%
unsub-neg41.6%
metadata-eval41.6%
Simplified41.6%
Taylor expanded in t around 0 2.4%
metadata-eval2.4%
Applied egg-rr2.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 2024146
(FPCore (x y z t a)
:name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
:precision binary64
:alt
(! :herbie-platform default (+ (log (+ x y)) (+ (- (log z) t) (* (- a 1/2) (log t)))))
(+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))