
(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 16 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) 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(log(Float64(x + y)) + 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[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \left(a + -0.5\right) \cdot \log t
\end{array}
Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log (+ x y)) (log z))))
(if (<= t_1 -800.0)
(- (* (+ a -0.5) (log t)) t)
(if (<= t_1 631.33)
(+ (* (log t) (- a 0.5)) (- (log (* z (+ x y))) t))
(- (+ (log y) (* a (log t))) 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 <= -800.0) {
tmp = ((a + -0.5) * log(t)) - t;
} else if (t_1 <= 631.33) {
tmp = (log(t) * (a - 0.5)) + (log((z * (x + y))) - t);
} else {
tmp = (log(y) + (a * log(t))) - 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 <= (-800.0d0)) then
tmp = ((a + (-0.5d0)) * log(t)) - t
else if (t_1 <= 631.33d0) then
tmp = (log(t) * (a - 0.5d0)) + (log((z * (x + y))) - t)
else
tmp = (log(y) + (a * log(t))) - 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 <= -800.0) {
tmp = ((a + -0.5) * Math.log(t)) - t;
} else if (t_1 <= 631.33) {
tmp = (Math.log(t) * (a - 0.5)) + (Math.log((z * (x + y))) - t);
} else {
tmp = (Math.log(y) + (a * Math.log(t))) - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((x + y)) + math.log(z) tmp = 0 if t_1 <= -800.0: tmp = ((a + -0.5) * math.log(t)) - t elif t_1 <= 631.33: tmp = (math.log(t) * (a - 0.5)) + (math.log((z * (x + y))) - t) else: tmp = (math.log(y) + (a * math.log(t))) - 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 <= -800.0) tmp = Float64(Float64(Float64(a + -0.5) * log(t)) - t); elseif (t_1 <= 631.33) tmp = Float64(Float64(log(t) * Float64(a - 0.5)) + Float64(log(Float64(z * Float64(x + y))) - t)); else tmp = Float64(Float64(log(y) + Float64(a * log(t))) - 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 <= -800.0) tmp = ((a + -0.5) * log(t)) - t; elseif (t_1 <= 631.33) tmp = (log(t) * (a - 0.5)) + (log((z * (x + y))) - t); else tmp = (log(y) + (a * log(t))) - 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, -800.0], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$1, 631.33], N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(N[Log[N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(x + y\right) + \log z\\
\mathbf{if}\;t\_1 \leq -800:\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t - t\\
\mathbf{elif}\;t\_1 \leq 631.33:\\
\;\;\;\;\log t \cdot \left(a - 0.5\right) + \left(\log \left(z \cdot \left(x + y\right)\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log y + a \cdot \log t\right) - t\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -800Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
Taylor expanded in x around 0 62.5%
+-commutative62.5%
Simplified62.5%
Taylor expanded in t around inf 100.0%
neg-mul-1100.0%
Simplified100.0%
if -800 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 631.330000000000041Initial program 99.5%
*-un-lft-identity99.5%
+-commutative99.5%
sum-log99.6%
Applied egg-rr99.6%
*-lft-identity99.6%
+-commutative99.6%
Simplified99.6%
if 631.330000000000041 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 79.8%
Taylor expanded in a around inf 64.5%
*-commutative64.5%
Simplified64.5%
Final simplification92.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (log (+ x y)) (log z))))
(if (<= t_1 -800.0)
(- (* (+ a -0.5) (log t)) t)
(if (<= t_1 631.33)
(- (+ (* (log t) (- a 0.5)) (log (* y z))) t)
(- (+ (log y) (* a (log t))) 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 <= -800.0) {
tmp = ((a + -0.5) * log(t)) - t;
} else if (t_1 <= 631.33) {
tmp = ((log(t) * (a - 0.5)) + log((y * z))) - t;
} else {
tmp = (log(y) + (a * log(t))) - 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 <= (-800.0d0)) then
tmp = ((a + (-0.5d0)) * log(t)) - t
else if (t_1 <= 631.33d0) then
tmp = ((log(t) * (a - 0.5d0)) + log((y * z))) - t
else
tmp = (log(y) + (a * log(t))) - 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 <= -800.0) {
tmp = ((a + -0.5) * Math.log(t)) - t;
} else if (t_1 <= 631.33) {
tmp = ((Math.log(t) * (a - 0.5)) + Math.log((y * z))) - t;
} else {
tmp = (Math.log(y) + (a * Math.log(t))) - t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((x + y)) + math.log(z) tmp = 0 if t_1 <= -800.0: tmp = ((a + -0.5) * math.log(t)) - t elif t_1 <= 631.33: tmp = ((math.log(t) * (a - 0.5)) + math.log((y * z))) - t else: tmp = (math.log(y) + (a * math.log(t))) - 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 <= -800.0) tmp = Float64(Float64(Float64(a + -0.5) * log(t)) - t); elseif (t_1 <= 631.33) tmp = Float64(Float64(Float64(log(t) * Float64(a - 0.5)) + log(Float64(y * z))) - t); else tmp = Float64(Float64(log(y) + Float64(a * log(t))) - 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 <= -800.0) tmp = ((a + -0.5) * log(t)) - t; elseif (t_1 <= 631.33) tmp = ((log(t) * (a - 0.5)) + log((y * z))) - t; else tmp = (log(y) + (a * log(t))) - 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, -800.0], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t$95$1, 631.33], N[(N[(N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(x + y\right) + \log z\\
\mathbf{if}\;t\_1 \leq -800:\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t - t\\
\mathbf{elif}\;t\_1 \leq 631.33:\\
\;\;\;\;\left(\log t \cdot \left(a - 0.5\right) + \log \left(y \cdot z\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(\log y + a \cdot \log t\right) - t\\
\end{array}
\end{array}
if (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < -800Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t around inf 100.0%
Taylor expanded in x around 0 62.5%
+-commutative62.5%
Simplified62.5%
Taylor expanded in t around inf 100.0%
neg-mul-1100.0%
Simplified100.0%
if -800 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) < 631.330000000000041Initial program 99.5%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
fma-define99.6%
associate-+r-99.6%
+-commutative99.6%
sum-log99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 60.9%
if 631.330000000000041 < (+.f64 (log.f64 (+.f64 x y)) (log.f64 z)) Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 79.8%
Taylor expanded in a around inf 64.5%
*-commutative64.5%
Simplified64.5%
Final simplification62.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.0007) (+ (log y) (+ (log z) (* (log t) (- a 0.5)))) (- (+ (log y) (* a (log t))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.0007) {
tmp = log(y) + (log(z) + (log(t) * (a - 0.5)));
} else {
tmp = (log(y) + (a * log(t))) - 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.0007d0) then
tmp = log(y) + (log(z) + (log(t) * (a - 0.5d0)))
else
tmp = (log(y) + (a * log(t))) - 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.0007) {
tmp = Math.log(y) + (Math.log(z) + (Math.log(t) * (a - 0.5)));
} else {
tmp = (Math.log(y) + (a * Math.log(t))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.0007: tmp = math.log(y) + (math.log(z) + (math.log(t) * (a - 0.5))) else: tmp = (math.log(y) + (a * math.log(t))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.0007) tmp = Float64(log(y) + Float64(log(z) + Float64(log(t) * Float64(a - 0.5)))); else tmp = Float64(Float64(log(y) + Float64(a * log(t))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 0.0007) tmp = log(y) + (log(z) + (log(t) * (a - 0.5))); else tmp = (log(y) + (a * log(t))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.0007], 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[y], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.0007:\\
\;\;\;\;\log y + \left(\log z + \log t \cdot \left(a - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log y + a \cdot \log t\right) - t\\
\end{array}
\end{array}
if t < 6.99999999999999993e-4Initial program 99.3%
associate--l+99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in x around 0 60.2%
Taylor expanded in t around 0 59.7%
if 6.99999999999999993e-4 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 75.5%
Taylor expanded in a around inf 75.6%
*-commutative75.6%
Simplified75.6%
Final simplification67.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 0.0007) (+ (* (+ a -0.5) (log t)) (+ (log z) (log y))) (- (+ (log y) (* a (log t))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 0.0007) {
tmp = ((a + -0.5) * log(t)) + (log(z) + log(y));
} else {
tmp = (log(y) + (a * log(t))) - 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.0007d0) then
tmp = ((a + (-0.5d0)) * log(t)) + (log(z) + log(y))
else
tmp = (log(y) + (a * log(t))) - 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.0007) {
tmp = ((a + -0.5) * Math.log(t)) + (Math.log(z) + Math.log(y));
} else {
tmp = (Math.log(y) + (a * Math.log(t))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 0.0007: tmp = ((a + -0.5) * math.log(t)) + (math.log(z) + math.log(y)) else: tmp = (math.log(y) + (a * math.log(t))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 0.0007) tmp = Float64(Float64(Float64(a + -0.5) * log(t)) + Float64(log(z) + log(y))); else tmp = Float64(Float64(log(y) + Float64(a * log(t))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 0.0007) tmp = ((a + -0.5) * log(t)) + (log(z) + log(y)); else tmp = (log(y) + (a * log(t))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 0.0007], N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 0.0007:\\
\;\;\;\;\left(a + -0.5\right) \cdot \log t + \left(\log z + \log y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\log y + a \cdot \log t\right) - t\\
\end{array}
\end{array}
if t < 6.99999999999999993e-4Initial program 99.3%
associate--l+99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in t around inf 99.2%
Taylor expanded in x around 0 60.1%
+-commutative60.1%
Simplified60.1%
Taylor expanded in t around 0 59.7%
if 6.99999999999999993e-4 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 75.5%
Taylor expanded in a around inf 75.6%
*-commutative75.6%
Simplified75.6%
Final simplification67.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.6%
associate--l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 68.1%
Final simplification68.1%
(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.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 68.1%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.5e-5) (not (<= a 1.55e-22))) (- (+ (log y) (* a (log t))) t) (- (+ (* -0.5 (log t)) (log (* y z))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.5e-5) || !(a <= 1.55e-22)) {
tmp = (log(y) + (a * log(t))) - t;
} else {
tmp = ((-0.5 * log(t)) + log((y * z))) - 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 <= (-4.5d-5)) .or. (.not. (a <= 1.55d-22))) then
tmp = (log(y) + (a * log(t))) - t
else
tmp = (((-0.5d0) * log(t)) + log((y * z))) - 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 <= -4.5e-5) || !(a <= 1.55e-22)) {
tmp = (Math.log(y) + (a * Math.log(t))) - t;
} else {
tmp = ((-0.5 * Math.log(t)) + Math.log((y * z))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.5e-5) or not (a <= 1.55e-22): tmp = (math.log(y) + (a * math.log(t))) - t else: tmp = ((-0.5 * math.log(t)) + math.log((y * z))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.5e-5) || !(a <= 1.55e-22)) tmp = Float64(Float64(log(y) + Float64(a * log(t))) - t); else tmp = Float64(Float64(Float64(-0.5 * log(t)) + log(Float64(y * z))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.5e-5) || ~((a <= 1.55e-22))) tmp = (log(y) + (a * log(t))) - t; else tmp = ((-0.5 * log(t)) + log((y * z))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.5e-5], N[Not[LessEqual[a, 1.55e-22]], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[(-0.5 * N[Log[t], $MachinePrecision]), $MachinePrecision] + N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{-5} \lor \neg \left(a \leq 1.55 \cdot 10^{-22}\right):\\
\;\;\;\;\left(\log y + a \cdot \log t\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(-0.5 \cdot \log t + \log \left(y \cdot z\right)\right) - t\\
\end{array}
\end{array}
if a < -4.50000000000000028e-5 or 1.55000000000000006e-22 < a Initial program 99.7%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 73.0%
Taylor expanded in a around inf 72.1%
*-commutative72.1%
Simplified72.1%
if -4.50000000000000028e-5 < a < 1.55000000000000006e-22Initial program 99.5%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
+-commutative99.5%
fma-define99.5%
associate-+r-99.5%
+-commutative99.5%
sum-log83.4%
Applied egg-rr83.4%
Taylor expanded in x around 0 50.6%
Taylor expanded in a around 0 50.6%
+-commutative50.6%
*-commutative50.6%
*-commutative50.6%
Simplified50.6%
Final simplification62.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8e-49) (not (<= a 2.9e-102))) (- (+ (log y) (* a (log t))) t) (- (log (* y (* z (pow t -0.5)))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8e-49) || !(a <= 2.9e-102)) {
tmp = (log(y) + (a * log(t))) - t;
} else {
tmp = log((y * (z * pow(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 <= (-8d-49)) .or. (.not. (a <= 2.9d-102))) then
tmp = (log(y) + (a * log(t))) - t
else
tmp = log((y * (z * (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 <= -8e-49) || !(a <= 2.9e-102)) {
tmp = (Math.log(y) + (a * Math.log(t))) - t;
} else {
tmp = Math.log((y * (z * Math.pow(t, -0.5)))) - t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8e-49) or not (a <= 2.9e-102): tmp = (math.log(y) + (a * math.log(t))) - t else: tmp = math.log((y * (z * math.pow(t, -0.5)))) - t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8e-49) || !(a <= 2.9e-102)) tmp = Float64(Float64(log(y) + Float64(a * log(t))) - t); else tmp = Float64(log(Float64(y * Float64(z * (t ^ -0.5)))) - t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -8e-49) || ~((a <= 2.9e-102))) tmp = (log(y) + (a * log(t))) - t; else tmp = log((y * (z * (t ^ -0.5)))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8e-49], N[Not[LessEqual[a, 2.9e-102]], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[N[(y * N[(z * N[Power[t, -0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{-49} \lor \neg \left(a \leq 2.9 \cdot 10^{-102}\right):\\
\;\;\;\;\left(\log y + a \cdot \log t\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log \left(y \cdot \left(z \cdot {t}^{-0.5}\right)\right) - t\\
\end{array}
\end{array}
if a < -7.99999999999999949e-49 or 2.89999999999999986e-102 < a Initial program 99.7%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 69.6%
Taylor expanded in a around inf 68.4%
*-commutative68.4%
Simplified68.4%
if -7.99999999999999949e-49 < a < 2.89999999999999986e-102Initial program 99.4%
associate--l+99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in x around 0 65.8%
Taylor expanded in a around 0 65.8%
+-commutative65.8%
*-commutative65.8%
Simplified65.8%
*-un-lft-identity65.8%
+-commutative65.8%
add-log-exp59.0%
sum-log47.7%
exp-sum47.6%
add-exp-log47.7%
pow-to-exp47.8%
Applied egg-rr47.8%
*-lft-identity47.8%
Simplified47.8%
Final simplification60.3%
(FPCore (x y z t a) :precision binary64 (- (+ (log y) (* a (log t))) t))
double code(double x, double y, double z, double t, double a) {
return (log(y) + (a * log(t))) - 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) + (a * log(t))) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return (Math.log(y) + (a * Math.log(t))) - t;
}
def code(x, y, z, t, a): return (math.log(y) + (a * math.log(t))) - t
function code(x, y, z, t, a) return Float64(Float64(log(y) + Float64(a * log(t))) - t) end
function tmp = code(x, y, z, t, a) tmp = (log(y) + (a * log(t))) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(N[Log[y], $MachinePrecision] + N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y + a \cdot \log t\right) - t
\end{array}
Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 68.1%
Taylor expanded in a around inf 58.4%
*-commutative58.4%
Simplified58.4%
Final simplification58.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (log t))))
(if (<= a -1.35e+16)
t_1
(if (<= a 2.7e+58)
(- (log y) t)
(if (or (<= a 4.3e+117) (not (<= a 2.55e+128))) t_1 (- t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double tmp;
if (a <= -1.35e+16) {
tmp = t_1;
} else if (a <= 2.7e+58) {
tmp = log(y) - t;
} else if ((a <= 4.3e+117) || !(a <= 2.55e+128)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = a * log(t)
if (a <= (-1.35d+16)) then
tmp = t_1
else if (a <= 2.7d+58) then
tmp = log(y) - t
else if ((a <= 4.3d+117) .or. (.not. (a <= 2.55d+128))) then
tmp = t_1
else
tmp = -t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = a * Math.log(t);
double tmp;
if (a <= -1.35e+16) {
tmp = t_1;
} else if (a <= 2.7e+58) {
tmp = Math.log(y) - t;
} else if ((a <= 4.3e+117) || !(a <= 2.55e+128)) {
tmp = t_1;
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) tmp = 0 if a <= -1.35e+16: tmp = t_1 elif a <= 2.7e+58: tmp = math.log(y) - t elif (a <= 4.3e+117) or not (a <= 2.55e+128): tmp = t_1 else: tmp = -t return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) tmp = 0.0 if (a <= -1.35e+16) tmp = t_1; elseif (a <= 2.7e+58) tmp = Float64(log(y) - t); elseif ((a <= 4.3e+117) || !(a <= 2.55e+128)) tmp = t_1; else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * log(t); tmp = 0.0; if (a <= -1.35e+16) tmp = t_1; elseif (a <= 2.7e+58) tmp = log(y) - t; elseif ((a <= 4.3e+117) || ~((a <= 2.55e+128))) tmp = t_1; else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.35e+16], t$95$1, If[LessEqual[a, 2.7e+58], N[(N[Log[y], $MachinePrecision] - t), $MachinePrecision], If[Or[LessEqual[a, 4.3e+117], N[Not[LessEqual[a, 2.55e+128]], $MachinePrecision]], t$95$1, (-t)]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;a \leq -1.35 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{+58}:\\
\;\;\;\;\log y - t\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{+117} \lor \neg \left(a \leq 2.55 \cdot 10^{+128}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if a < -1.35e16 or 2.7000000000000001e58 < a < 4.29999999999999998e117 or 2.5499999999999999e128 < a Initial program 99.7%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t around inf 99.7%
Taylor expanded in a around inf 84.3%
*-commutative84.3%
Simplified84.3%
if -1.35e16 < a < 2.7000000000000001e58Initial program 99.5%
associate-+l-99.5%
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 60.5%
neg-mul-160.5%
Simplified60.5%
Taylor expanded in x around 0 45.4%
if 4.29999999999999998e117 < a < 2.5499999999999999e128Initial program 99.7%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in t around inf 99.7%
Taylor expanded in t around inf 84.0%
mul-1-neg84.0%
Simplified84.0%
Final simplification62.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 220.0) (log (+ x y)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 220.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 <= 220.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 <= 220.0) {
tmp = Math.log((x + y));
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 220.0: tmp = math.log((x + y)) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 220.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 <= 220.0) tmp = log((x + y)); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 220.0], N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 220:\\
\;\;\;\;\log \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 220Initial program 99.3%
associate-+l-99.3%
associate--l+99.3%
sub-neg99.3%
+-commutative99.3%
*-commutative99.3%
distribute-rgt-neg-in99.3%
fma-undefine99.3%
sub-neg99.3%
+-commutative99.3%
distribute-neg-in99.3%
metadata-eval99.3%
metadata-eval99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in t around inf 9.6%
neg-mul-19.6%
Simplified9.6%
Taylor expanded in t around 0 9.6%
if 220 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in t around inf 74.0%
mul-1-neg74.0%
Simplified74.0%
Final simplification42.6%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.6e+43) (* a (log t)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.6e+43) {
tmp = a * log(t);
} 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 <= 1.6d+43) then
tmp = a * log(t)
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 <= 1.6e+43) {
tmp = a * Math.log(t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.6e+43: tmp = a * math.log(t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.6e+43) tmp = Float64(a * log(t)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.6e+43) tmp = a * log(t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.6e+43], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.6 \cdot 10^{+43}:\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 1.60000000000000007e43Initial program 99.4%
associate--l+99.4%
sub-neg99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in t around inf 99.3%
Taylor expanded in a around inf 54.3%
*-commutative54.3%
Simplified54.3%
if 1.60000000000000007e43 < t Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in t around inf 99.9%
Taylor expanded in t around inf 79.8%
mul-1-neg79.8%
Simplified79.8%
Final simplification65.7%
(FPCore (x y z t a) :precision binary64 (- (* (+ a -0.5) (log t)) t))
double code(double x, double y, double z, double t, double a) {
return ((a + -0.5) * log(t)) - 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 = ((a + (-0.5d0)) * log(t)) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return ((a + -0.5) * Math.log(t)) - t;
}
def code(x, y, z, t, a): return ((a + -0.5) * math.log(t)) - t
function code(x, y, z, t, a) return Float64(Float64(Float64(a + -0.5) * log(t)) - t) end
function tmp = code(x, y, z, t, a) tmp = ((a + -0.5) * log(t)) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(N[(a + -0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(a + -0.5\right) \cdot \log t - t
\end{array}
Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 99.5%
Taylor expanded in x around 0 68.1%
+-commutative68.1%
Simplified68.1%
Taylor expanded in t around inf 79.1%
neg-mul-179.1%
Simplified79.1%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (- (/ x y) t))
double code(double x, double y, double z, double t, double a) {
return (x / y) - 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 = (x / y) - t
end function
public static double code(double x, double y, double z, double t, double a) {
return (x / y) - t;
}
def code(x, y, z, t, a): return (x / y) - t
function code(x, y, z, t, a) return Float64(Float64(x / y) - t) end
function tmp = code(x, y, z, t, a) tmp = (x / y) - t; end
code[x_, y_, z_, t_, a_] := N[(N[(x / y), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y} - t
\end{array}
Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-undefine99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in t around inf 42.6%
neg-mul-142.6%
Simplified42.6%
Taylor expanded in x around 0 25.4%
Taylor expanded in y around 0 29.9%
Final simplification29.9%
(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.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in t around inf 99.5%
Taylor expanded in t around inf 39.2%
mul-1-neg39.2%
Simplified39.2%
Final simplification39.2%
(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 2024115
(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))))