
(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)) 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.6%
Final simplification99.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (log (* y z))))
(if (<= t 1.4e-281)
(fma (log t) (+ a -0.5) t_1)
(if (<= t 2.2e-188)
(+ (log z) (+ (log (+ x y)) (* (log t) -0.5)))
(if (<= t 1.5e+105) (+ t_1 (- (* (log t) (+ a -0.5)) t)) (- t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((y * z));
double tmp;
if (t <= 1.4e-281) {
tmp = fma(log(t), (a + -0.5), t_1);
} else if (t <= 2.2e-188) {
tmp = log(z) + (log((x + y)) + (log(t) * -0.5));
} else if (t <= 1.5e+105) {
tmp = t_1 + ((log(t) * (a + -0.5)) - t);
} else {
tmp = -t;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = log(Float64(y * z)) tmp = 0.0 if (t <= 1.4e-281) tmp = fma(log(t), Float64(a + -0.5), t_1); elseif (t <= 2.2e-188) tmp = Float64(log(z) + Float64(log(Float64(x + y)) + Float64(log(t) * -0.5))); elseif (t <= 1.5e+105) tmp = Float64(t_1 + Float64(Float64(log(t) * Float64(a + -0.5)) - t)); else tmp = Float64(-t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.4e-281], N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 2.2e-188], N[(N[Log[z], $MachinePrecision] + N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+105], N[(t$95$1 + N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], (-t)]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(y \cdot z\right)\\
\mathbf{if}\;t \leq 1.4 \cdot 10^{-281}:\\
\;\;\;\;\mathsf{fma}\left(\log t, a + -0.5, t\_1\right)\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-188}:\\
\;\;\;\;\log z + \left(\log \left(x + y\right) + \log t \cdot -0.5\right)\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+105}:\\
\;\;\;\;t\_1 + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 1.40000000000000003e-281Initial program 99.3%
add-cube-cbrt97.6%
pow397.7%
*-commutative97.7%
*-un-lft-identity97.7%
sub-neg97.7%
*-un-lft-identity97.7%
metadata-eval97.7%
Applied egg-rr97.7%
sum-log97.7%
Applied egg-rr97.7%
Taylor expanded in x around 0 53.5%
Taylor expanded in t around 0 54.7%
*-commutative54.7%
+-commutative54.7%
pow-base-154.7%
sub-neg54.7%
metadata-eval54.7%
+-commutative54.7%
*-lft-identity54.7%
fma-def54.8%
Simplified54.8%
if 1.40000000000000003e-281 < t < 2.2e-188Initial program 99.0%
associate-+l-99.0%
associate--l+98.8%
sub-neg98.8%
+-commutative98.8%
*-commutative98.8%
distribute-rgt-neg-in98.8%
fma-udef98.8%
sub-neg98.8%
+-commutative98.8%
distribute-neg-in98.8%
metadata-eval98.8%
metadata-eval98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t around 0 98.8%
Taylor expanded in a around 0 74.5%
log-prod45.1%
cancel-sign-sub-inv45.1%
+-commutative45.1%
metadata-eval45.1%
*-commutative45.1%
Simplified45.1%
Taylor expanded in z around 0 74.5%
if 2.2e-188 < t < 1.5e105Initial program 99.7%
add-cube-cbrt98.4%
pow398.4%
*-commutative98.4%
*-un-lft-identity98.4%
sub-neg98.4%
*-un-lft-identity98.4%
metadata-eval98.4%
Applied egg-rr98.4%
sum-log77.1%
Applied egg-rr77.1%
Taylor expanded in x around 0 61.7%
associate--l+61.7%
pow-base-161.7%
sub-neg61.7%
metadata-eval61.7%
*-lft-identity61.7%
Simplified61.7%
if 1.5e105 < 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-udef99.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 84.8%
neg-mul-184.8%
Simplified84.8%
Final simplification71.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (log (* y z))))
(if (<= t 1.4e-281)
(+ t_1 (* (log t) (- a 0.5)))
(if (<= t 2e-204)
(- (+ (log z) (log y)) (* 0.5 (log t)))
(if (<= t 1.25e+105) (+ t_1 (- (* (log t) (+ a -0.5)) t)) (- t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((y * z));
double tmp;
if (t <= 1.4e-281) {
tmp = t_1 + (log(t) * (a - 0.5));
} else if (t <= 2e-204) {
tmp = (log(z) + log(y)) - (0.5 * log(t));
} else if (t <= 1.25e+105) {
tmp = t_1 + ((log(t) * (a + -0.5)) - 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) :: t_1
real(8) :: tmp
t_1 = log((y * z))
if (t <= 1.4d-281) then
tmp = t_1 + (log(t) * (a - 0.5d0))
else if (t <= 2d-204) then
tmp = (log(z) + log(y)) - (0.5d0 * log(t))
else if (t <= 1.25d+105) then
tmp = t_1 + ((log(t) * (a + (-0.5d0))) - 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 t_1 = Math.log((y * z));
double tmp;
if (t <= 1.4e-281) {
tmp = t_1 + (Math.log(t) * (a - 0.5));
} else if (t <= 2e-204) {
tmp = (Math.log(z) + Math.log(y)) - (0.5 * Math.log(t));
} else if (t <= 1.25e+105) {
tmp = t_1 + ((Math.log(t) * (a + -0.5)) - t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = math.log((y * z)) tmp = 0 if t <= 1.4e-281: tmp = t_1 + (math.log(t) * (a - 0.5)) elif t <= 2e-204: tmp = (math.log(z) + math.log(y)) - (0.5 * math.log(t)) elif t <= 1.25e+105: tmp = t_1 + ((math.log(t) * (a + -0.5)) - t) else: tmp = -t return tmp
function code(x, y, z, t, a) t_1 = log(Float64(y * z)) tmp = 0.0 if (t <= 1.4e-281) tmp = Float64(t_1 + Float64(log(t) * Float64(a - 0.5))); elseif (t <= 2e-204) tmp = Float64(Float64(log(z) + log(y)) - Float64(0.5 * log(t))); elseif (t <= 1.25e+105) tmp = Float64(t_1 + Float64(Float64(log(t) * Float64(a + -0.5)) - t)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = log((y * z)); tmp = 0.0; if (t <= 1.4e-281) tmp = t_1 + (log(t) * (a - 0.5)); elseif (t <= 2e-204) tmp = (log(z) + log(y)) - (0.5 * log(t)); elseif (t <= 1.25e+105) tmp = t_1 + ((log(t) * (a + -0.5)) - t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.4e-281], N[(t$95$1 + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-204], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - N[(0.5 * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.25e+105], N[(t$95$1 + N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], (-t)]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(y \cdot z\right)\\
\mathbf{if}\;t \leq 1.4 \cdot 10^{-281}:\\
\;\;\;\;t\_1 + \log t \cdot \left(a - 0.5\right)\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-204}:\\
\;\;\;\;\left(\log z + \log y\right) - 0.5 \cdot \log t\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+105}:\\
\;\;\;\;t\_1 + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 1.40000000000000003e-281Initial program 99.3%
associate-+l-99.3%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-udef99.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 0 99.4%
Taylor expanded in x around 0 63.5%
log-prod54.7%
Simplified54.7%
if 1.40000000000000003e-281 < t < 2e-204Initial program 99.0%
associate-+l-99.0%
associate--l+98.8%
sub-neg98.8%
+-commutative98.8%
*-commutative98.8%
distribute-rgt-neg-in98.8%
fma-udef98.8%
sub-neg98.8%
+-commutative98.8%
distribute-neg-in98.8%
metadata-eval98.8%
metadata-eval98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t around 0 98.8%
Taylor expanded in x around 0 57.3%
Taylor expanded in a around 0 36.3%
*-commutative36.3%
Simplified36.3%
if 2e-204 < t < 1.25000000000000011e105Initial program 99.6%
add-cube-cbrt98.4%
pow398.4%
*-commutative98.4%
*-un-lft-identity98.4%
sub-neg98.4%
*-un-lft-identity98.4%
metadata-eval98.4%
Applied egg-rr98.4%
sum-log77.5%
Applied egg-rr77.5%
Taylor expanded in x around 0 60.8%
associate--l+60.8%
pow-base-160.8%
sub-neg60.8%
metadata-eval60.8%
*-lft-identity60.8%
Simplified60.8%
if 1.25000000000000011e105 < 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-udef99.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 84.8%
neg-mul-184.8%
Simplified84.8%
Final simplification65.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (log (* y z))))
(if (<= t 1.4e-281)
(fma (log t) (+ a -0.5) t_1)
(if (<= t 2.05e-204)
(- (+ (log z) (log y)) (* 0.5 (log t)))
(if (<= t 1.95e+104) (+ t_1 (- (* (log t) (+ a -0.5)) t)) (- t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = log((y * z));
double tmp;
if (t <= 1.4e-281) {
tmp = fma(log(t), (a + -0.5), t_1);
} else if (t <= 2.05e-204) {
tmp = (log(z) + log(y)) - (0.5 * log(t));
} else if (t <= 1.95e+104) {
tmp = t_1 + ((log(t) * (a + -0.5)) - t);
} else {
tmp = -t;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = log(Float64(y * z)) tmp = 0.0 if (t <= 1.4e-281) tmp = fma(log(t), Float64(a + -0.5), t_1); elseif (t <= 2.05e-204) tmp = Float64(Float64(log(z) + log(y)) - Float64(0.5 * log(t))); elseif (t <= 1.95e+104) tmp = Float64(t_1 + Float64(Float64(log(t) * Float64(a + -0.5)) - t)); else tmp = Float64(-t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t, 1.4e-281], N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 2.05e-204], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] - N[(0.5 * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+104], N[(t$95$1 + N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], (-t)]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log \left(y \cdot z\right)\\
\mathbf{if}\;t \leq 1.4 \cdot 10^{-281}:\\
\;\;\;\;\mathsf{fma}\left(\log t, a + -0.5, t\_1\right)\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-204}:\\
\;\;\;\;\left(\log z + \log y\right) - 0.5 \cdot \log t\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+104}:\\
\;\;\;\;t\_1 + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 1.40000000000000003e-281Initial program 99.3%
add-cube-cbrt97.6%
pow397.7%
*-commutative97.7%
*-un-lft-identity97.7%
sub-neg97.7%
*-un-lft-identity97.7%
metadata-eval97.7%
Applied egg-rr97.7%
sum-log97.7%
Applied egg-rr97.7%
Taylor expanded in x around 0 53.5%
Taylor expanded in t around 0 54.7%
*-commutative54.7%
+-commutative54.7%
pow-base-154.7%
sub-neg54.7%
metadata-eval54.7%
+-commutative54.7%
*-lft-identity54.7%
fma-def54.8%
Simplified54.8%
if 1.40000000000000003e-281 < t < 2.05e-204Initial program 99.0%
associate-+l-99.0%
associate--l+98.8%
sub-neg98.8%
+-commutative98.8%
*-commutative98.8%
distribute-rgt-neg-in98.8%
fma-udef98.8%
sub-neg98.8%
+-commutative98.8%
distribute-neg-in98.8%
metadata-eval98.8%
metadata-eval98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t around 0 98.8%
Taylor expanded in x around 0 57.3%
Taylor expanded in a around 0 36.3%
*-commutative36.3%
Simplified36.3%
if 2.05e-204 < t < 1.95000000000000008e104Initial program 99.6%
add-cube-cbrt98.4%
pow398.4%
*-commutative98.4%
*-un-lft-identity98.4%
sub-neg98.4%
*-un-lft-identity98.4%
metadata-eval98.4%
Applied egg-rr98.4%
sum-log77.5%
Applied egg-rr77.5%
Taylor expanded in x around 0 60.8%
associate--l+60.8%
pow-base-160.8%
sub-neg60.8%
metadata-eval60.8%
*-lft-identity60.8%
Simplified60.8%
if 1.95000000000000008e104 < 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-udef99.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 84.8%
neg-mul-184.8%
Simplified84.8%
Final simplification65.3%
(FPCore (x y z t a) :precision binary64 (if (<= t 3.1e+30) (+ (log z) (+ (log (+ x y)) (* (- a 0.5) (log t)))) (if (<= t 2.65e+104) (+ (log (* y z)) (- (* (log t) (+ a -0.5)) t)) (- t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 3.1e+30) {
tmp = log(z) + (log((x + y)) + ((a - 0.5) * log(t)));
} else if (t <= 2.65e+104) {
tmp = log((y * z)) + ((log(t) * (a + -0.5)) - 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 <= 3.1d+30) then
tmp = log(z) + (log((x + y)) + ((a - 0.5d0) * log(t)))
else if (t <= 2.65d+104) then
tmp = log((y * z)) + ((log(t) * (a + (-0.5d0))) - 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 <= 3.1e+30) {
tmp = Math.log(z) + (Math.log((x + y)) + ((a - 0.5) * Math.log(t)));
} else if (t <= 2.65e+104) {
tmp = Math.log((y * z)) + ((Math.log(t) * (a + -0.5)) - t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 3.1e+30: tmp = math.log(z) + (math.log((x + y)) + ((a - 0.5) * math.log(t))) elif t <= 2.65e+104: tmp = math.log((y * z)) + ((math.log(t) * (a + -0.5)) - t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 3.1e+30) tmp = Float64(log(z) + Float64(log(Float64(x + y)) + Float64(Float64(a - 0.5) * log(t)))); elseif (t <= 2.65e+104) tmp = Float64(log(Float64(y * z)) + Float64(Float64(log(t) * Float64(a + -0.5)) - t)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 3.1e+30) tmp = log(z) + (log((x + y)) + ((a - 0.5) * log(t))); elseif (t <= 2.65e+104) tmp = log((y * z)) + ((log(t) * (a + -0.5)) - t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 3.1e+30], N[(N[Log[z], $MachinePrecision] + N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.65e+104], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], (-t)]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.1 \cdot 10^{+30}:\\
\;\;\;\;\log z + \left(\log \left(x + y\right) + \left(a - 0.5\right) \cdot \log t\right)\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{+104}:\\
\;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 3.0999999999999998e30Initial program 99.4%
Taylor expanded in t around 0 97.2%
if 3.0999999999999998e30 < t < 2.6499999999999999e104Initial program 99.8%
add-cube-cbrt99.1%
pow399.1%
*-commutative99.1%
*-un-lft-identity99.1%
sub-neg99.1%
*-un-lft-identity99.1%
metadata-eval99.1%
Applied egg-rr99.1%
sum-log88.4%
Applied egg-rr88.4%
Taylor expanded in x around 0 67.0%
associate--l+67.0%
pow-base-167.0%
sub-neg67.0%
metadata-eval67.0%
*-lft-identity67.0%
Simplified67.0%
if 2.6499999999999999e104 < 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-udef99.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 84.8%
neg-mul-184.8%
Simplified84.8%
Final simplification88.7%
(FPCore (x y z t a) :precision binary64 (if (<= t 3e+30) (+ (log (+ x y)) (+ (log z) (* (log t) (- a 0.5)))) (if (<= t 2.55e+104) (+ (log (* y z)) (- (* (log t) (+ a -0.5)) t)) (- t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 3e+30) {
tmp = log((x + y)) + (log(z) + (log(t) * (a - 0.5)));
} else if (t <= 2.55e+104) {
tmp = log((y * z)) + ((log(t) * (a + -0.5)) - 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 <= 3d+30) then
tmp = log((x + y)) + (log(z) + (log(t) * (a - 0.5d0)))
else if (t <= 2.55d+104) then
tmp = log((y * z)) + ((log(t) * (a + (-0.5d0))) - 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 <= 3e+30) {
tmp = Math.log((x + y)) + (Math.log(z) + (Math.log(t) * (a - 0.5)));
} else if (t <= 2.55e+104) {
tmp = Math.log((y * z)) + ((Math.log(t) * (a + -0.5)) - t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 3e+30: tmp = math.log((x + y)) + (math.log(z) + (math.log(t) * (a - 0.5))) elif t <= 2.55e+104: tmp = math.log((y * z)) + ((math.log(t) * (a + -0.5)) - t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 3e+30) tmp = Float64(log(Float64(x + y)) + Float64(log(z) + Float64(log(t) * Float64(a - 0.5)))); elseif (t <= 2.55e+104) tmp = Float64(log(Float64(y * z)) + Float64(Float64(log(t) * Float64(a + -0.5)) - t)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 3e+30) tmp = log((x + y)) + (log(z) + (log(t) * (a - 0.5))); elseif (t <= 2.55e+104) tmp = log((y * z)) + ((log(t) * (a + -0.5)) - t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 3e+30], N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.55e+104], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], (-t)]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3 \cdot 10^{+30}:\\
\;\;\;\;\log \left(x + y\right) + \left(\log z + \log t \cdot \left(a - 0.5\right)\right)\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{+104}:\\
\;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 2.99999999999999978e30Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-udef99.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 0 97.2%
if 2.99999999999999978e30 < t < 2.5500000000000001e104Initial program 99.8%
add-cube-cbrt99.1%
pow399.1%
*-commutative99.1%
*-un-lft-identity99.1%
sub-neg99.1%
*-un-lft-identity99.1%
metadata-eval99.1%
Applied egg-rr99.1%
sum-log88.4%
Applied egg-rr88.4%
Taylor expanded in x around 0 67.0%
associate--l+67.0%
pow-base-167.0%
sub-neg67.0%
metadata-eval67.0%
*-lft-identity67.0%
Simplified67.0%
if 2.5500000000000001e104 < 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-udef99.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 84.8%
neg-mul-184.8%
Simplified84.8%
Final simplification88.7%
(FPCore (x y z t a) :precision binary64 (if (<= t 3e+30) (+ (+ (log (+ x y)) (log z)) (* (log t) (- a 0.5))) (if (<= t 6.8e+104) (+ (log (* y z)) (- (* (log t) (+ a -0.5)) t)) (- t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 3e+30) {
tmp = (log((x + y)) + log(z)) + (log(t) * (a - 0.5));
} else if (t <= 6.8e+104) {
tmp = log((y * z)) + ((log(t) * (a + -0.5)) - 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 <= 3d+30) then
tmp = (log((x + y)) + log(z)) + (log(t) * (a - 0.5d0))
else if (t <= 6.8d+104) then
tmp = log((y * z)) + ((log(t) * (a + (-0.5d0))) - 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 <= 3e+30) {
tmp = (Math.log((x + y)) + Math.log(z)) + (Math.log(t) * (a - 0.5));
} else if (t <= 6.8e+104) {
tmp = Math.log((y * z)) + ((Math.log(t) * (a + -0.5)) - t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 3e+30: tmp = (math.log((x + y)) + math.log(z)) + (math.log(t) * (a - 0.5)) elif t <= 6.8e+104: tmp = math.log((y * z)) + ((math.log(t) * (a + -0.5)) - t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 3e+30) tmp = Float64(Float64(log(Float64(x + y)) + log(z)) + Float64(log(t) * Float64(a - 0.5))); elseif (t <= 6.8e+104) tmp = Float64(log(Float64(y * z)) + Float64(Float64(log(t) * Float64(a + -0.5)) - t)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 3e+30) tmp = (log((x + y)) + log(z)) + (log(t) * (a - 0.5)); elseif (t <= 6.8e+104) tmp = log((y * z)) + ((log(t) * (a + -0.5)) - t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 3e+30], N[(N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e+104], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], (-t)]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3 \cdot 10^{+30}:\\
\;\;\;\;\left(\log \left(x + y\right) + \log z\right) + \log t \cdot \left(a - 0.5\right)\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+104}:\\
\;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 2.99999999999999978e30Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-udef99.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 0 97.3%
if 2.99999999999999978e30 < t < 6.7999999999999994e104Initial program 99.8%
add-cube-cbrt99.1%
pow399.1%
*-commutative99.1%
*-un-lft-identity99.1%
sub-neg99.1%
*-un-lft-identity99.1%
metadata-eval99.1%
Applied egg-rr99.1%
sum-log88.4%
Applied egg-rr88.4%
Taylor expanded in x around 0 67.0%
associate--l+67.0%
pow-base-167.0%
sub-neg67.0%
metadata-eval67.0%
*-lft-identity67.0%
Simplified67.0%
if 6.7999999999999994e104 < 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-udef99.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 84.8%
neg-mul-184.8%
Simplified84.8%
Final simplification88.8%
(FPCore (x y z t a) :precision binary64 (if (<= t 3e+30) (+ (+ (log z) (log y)) (* (log t) (- a 0.5))) (if (<= t 3.9e+104) (+ (log (* y z)) (- (* (log t) (+ a -0.5)) t)) (- t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 3e+30) {
tmp = (log(z) + log(y)) + (log(t) * (a - 0.5));
} else if (t <= 3.9e+104) {
tmp = log((y * z)) + ((log(t) * (a + -0.5)) - 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 <= 3d+30) then
tmp = (log(z) + log(y)) + (log(t) * (a - 0.5d0))
else if (t <= 3.9d+104) then
tmp = log((y * z)) + ((log(t) * (a + (-0.5d0))) - 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 <= 3e+30) {
tmp = (Math.log(z) + Math.log(y)) + (Math.log(t) * (a - 0.5));
} else if (t <= 3.9e+104) {
tmp = Math.log((y * z)) + ((Math.log(t) * (a + -0.5)) - t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 3e+30: tmp = (math.log(z) + math.log(y)) + (math.log(t) * (a - 0.5)) elif t <= 3.9e+104: tmp = math.log((y * z)) + ((math.log(t) * (a + -0.5)) - t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 3e+30) tmp = Float64(Float64(log(z) + log(y)) + Float64(log(t) * Float64(a - 0.5))); elseif (t <= 3.9e+104) tmp = Float64(log(Float64(y * z)) + Float64(Float64(log(t) * Float64(a + -0.5)) - t)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 3e+30) tmp = (log(z) + log(y)) + (log(t) * (a - 0.5)); elseif (t <= 3.9e+104) tmp = log((y * z)) + ((log(t) * (a + -0.5)) - t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 3e+30], N[(N[(N[Log[z], $MachinePrecision] + N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e+104], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], (-t)]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3 \cdot 10^{+30}:\\
\;\;\;\;\left(\log z + \log y\right) + \log t \cdot \left(a - 0.5\right)\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{+104}:\\
\;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 2.99999999999999978e30Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-udef99.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 0 97.2%
Taylor expanded in x around 0 64.9%
if 2.99999999999999978e30 < t < 3.90000000000000017e104Initial program 99.8%
add-cube-cbrt99.1%
pow399.1%
*-commutative99.1%
*-un-lft-identity99.1%
sub-neg99.1%
*-un-lft-identity99.1%
metadata-eval99.1%
Applied egg-rr99.1%
sum-log88.4%
Applied egg-rr88.4%
Taylor expanded in x around 0 67.0%
associate--l+67.0%
pow-base-167.0%
sub-neg67.0%
metadata-eval67.0%
*-lft-identity67.0%
Simplified67.0%
if 3.90000000000000017e104 < 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-udef99.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 84.8%
neg-mul-184.8%
Simplified84.8%
Final simplification71.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (log t)))
(t_2 (+ (log (+ x y)) (- (log z) t)))
(t_3 (+ (- (log (* y z)) t) (* (log t) -0.5))))
(if (<= a -2.1e+42)
t_1
(if (<= a -1.25e-277)
t_3
(if (<= a 8e-135)
t_2
(if (<= a 6.5e-96) t_3 (if (<= a 2e+34) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double t_2 = log((x + y)) + (log(z) - t);
double t_3 = (log((y * z)) - t) + (log(t) * -0.5);
double tmp;
if (a <= -2.1e+42) {
tmp = t_1;
} else if (a <= -1.25e-277) {
tmp = t_3;
} else if (a <= 8e-135) {
tmp = t_2;
} else if (a <= 6.5e-96) {
tmp = t_3;
} else if (a <= 2e+34) {
tmp = t_2;
} else {
tmp = t_1;
}
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) :: t_3
real(8) :: tmp
t_1 = a * log(t)
t_2 = log((x + y)) + (log(z) - t)
t_3 = (log((y * z)) - t) + (log(t) * (-0.5d0))
if (a <= (-2.1d+42)) then
tmp = t_1
else if (a <= (-1.25d-277)) then
tmp = t_3
else if (a <= 8d-135) then
tmp = t_2
else if (a <= 6.5d-96) then
tmp = t_3
else if (a <= 2d+34) then
tmp = t_2
else
tmp = t_1
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 t_2 = Math.log((x + y)) + (Math.log(z) - t);
double t_3 = (Math.log((y * z)) - t) + (Math.log(t) * -0.5);
double tmp;
if (a <= -2.1e+42) {
tmp = t_1;
} else if (a <= -1.25e-277) {
tmp = t_3;
} else if (a <= 8e-135) {
tmp = t_2;
} else if (a <= 6.5e-96) {
tmp = t_3;
} else if (a <= 2e+34) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) t_2 = math.log((x + y)) + (math.log(z) - t) t_3 = (math.log((y * z)) - t) + (math.log(t) * -0.5) tmp = 0 if a <= -2.1e+42: tmp = t_1 elif a <= -1.25e-277: tmp = t_3 elif a <= 8e-135: tmp = t_2 elif a <= 6.5e-96: tmp = t_3 elif a <= 2e+34: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) t_2 = Float64(log(Float64(x + y)) + Float64(log(z) - t)) t_3 = Float64(Float64(log(Float64(y * z)) - t) + Float64(log(t) * -0.5)) tmp = 0.0 if (a <= -2.1e+42) tmp = t_1; elseif (a <= -1.25e-277) tmp = t_3; elseif (a <= 8e-135) tmp = t_2; elseif (a <= 6.5e-96) tmp = t_3; elseif (a <= 2e+34) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * log(t); t_2 = log((x + y)) + (log(z) - t); t_3 = (log((y * z)) - t) + (log(t) * -0.5); tmp = 0.0; if (a <= -2.1e+42) tmp = t_1; elseif (a <= -1.25e-277) tmp = t_3; elseif (a <= 8e-135) tmp = t_2; elseif (a <= 6.5e-96) tmp = t_3; elseif (a <= 2e+34) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] - t), $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.1e+42], t$95$1, If[LessEqual[a, -1.25e-277], t$95$3, If[LessEqual[a, 8e-135], t$95$2, If[LessEqual[a, 6.5e-96], t$95$3, If[LessEqual[a, 2e+34], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
t_2 := \log \left(x + y\right) + \left(\log z - t\right)\\
t_3 := \left(\log \left(y \cdot z\right) - t\right) + \log t \cdot -0.5\\
\mathbf{if}\;a \leq -2.1 \cdot 10^{+42}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.25 \cdot 10^{-277}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq 8 \cdot 10^{-135}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-96}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+34}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.09999999999999995e42 or 1.99999999999999989e34 < 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-udef99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in a around inf 78.8%
*-commutative78.8%
Simplified78.8%
if -2.09999999999999995e42 < a < -1.25e-277 or 8.0000000000000003e-135 < a < 6.50000000000000001e-96Initial program 99.6%
add-cube-cbrt99.1%
pow399.2%
*-commutative99.2%
*-un-lft-identity99.2%
sub-neg99.2%
*-un-lft-identity99.2%
metadata-eval99.2%
Applied egg-rr99.2%
sum-log77.4%
Applied egg-rr77.4%
Taylor expanded in x around 0 48.7%
Taylor expanded in a around 0 45.7%
*-commutative45.7%
pow-base-145.7%
*-lft-identity45.7%
Simplified45.7%
if -1.25e-277 < a < 8.0000000000000003e-135 or 6.50000000000000001e-96 < a < 1.99999999999999989e34Initial program 99.5%
associate-+l-99.5%
associate--l+99.5%
sub-neg99.5%
+-commutative99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
fma-udef99.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.8%
Final simplification63.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (log t))) (t_2 (+ (log (+ x y)) (- (log z) t))))
(if (<= a -2.8e+43)
t_1
(if (<= a -2.4e-243)
t_2
(if (<= a -1.65e-248)
(+ (log (* y z)) (* (log t) -0.5))
(if (<= a 2e+36) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double t_2 = log((x + y)) + (log(z) - t);
double tmp;
if (a <= -2.8e+43) {
tmp = t_1;
} else if (a <= -2.4e-243) {
tmp = t_2;
} else if (a <= -1.65e-248) {
tmp = log((y * z)) + (log(t) * -0.5);
} else if (a <= 2e+36) {
tmp = t_2;
} else {
tmp = t_1;
}
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 = a * log(t)
t_2 = log((x + y)) + (log(z) - t)
if (a <= (-2.8d+43)) then
tmp = t_1
else if (a <= (-2.4d-243)) then
tmp = t_2
else if (a <= (-1.65d-248)) then
tmp = log((y * z)) + (log(t) * (-0.5d0))
else if (a <= 2d+36) then
tmp = t_2
else
tmp = t_1
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 t_2 = Math.log((x + y)) + (Math.log(z) - t);
double tmp;
if (a <= -2.8e+43) {
tmp = t_1;
} else if (a <= -2.4e-243) {
tmp = t_2;
} else if (a <= -1.65e-248) {
tmp = Math.log((y * z)) + (Math.log(t) * -0.5);
} else if (a <= 2e+36) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) t_2 = math.log((x + y)) + (math.log(z) - t) tmp = 0 if a <= -2.8e+43: tmp = t_1 elif a <= -2.4e-243: tmp = t_2 elif a <= -1.65e-248: tmp = math.log((y * z)) + (math.log(t) * -0.5) elif a <= 2e+36: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * log(t)) t_2 = Float64(log(Float64(x + y)) + Float64(log(z) - t)) tmp = 0.0 if (a <= -2.8e+43) tmp = t_1; elseif (a <= -2.4e-243) tmp = t_2; elseif (a <= -1.65e-248) tmp = Float64(log(Float64(y * z)) + Float64(log(t) * -0.5)); elseif (a <= 2e+36) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * log(t); t_2 = log((x + y)) + (log(z) - t); tmp = 0.0; if (a <= -2.8e+43) tmp = t_1; elseif (a <= -2.4e-243) tmp = t_2; elseif (a <= -1.65e-248) tmp = log((y * z)) + (log(t) * -0.5); elseif (a <= 2e+36) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[N[(x + y), $MachinePrecision]], $MachinePrecision] + N[(N[Log[z], $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.8e+43], t$95$1, If[LessEqual[a, -2.4e-243], t$95$2, If[LessEqual[a, -1.65e-248], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e+36], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
t_2 := \log \left(x + y\right) + \left(\log z - t\right)\\
\mathbf{if}\;a \leq -2.8 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-243}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.65 \cdot 10^{-248}:\\
\;\;\;\;\log \left(y \cdot z\right) + \log t \cdot -0.5\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+36}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.80000000000000019e43 or 2.00000000000000008e36 < 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-udef99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
metadata-eval99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in a around inf 78.8%
*-commutative78.8%
Simplified78.8%
if -2.80000000000000019e43 < a < -2.4000000000000001e-243 or -1.6500000000000001e-248 < a < 2.00000000000000008e36Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-udef99.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 61.4%
if -2.4000000000000001e-243 < a < -1.6500000000000001e-248Initial program 99.3%
associate-+l-99.3%
associate--l+99.0%
sub-neg99.0%
+-commutative99.0%
*-commutative99.0%
distribute-rgt-neg-in99.0%
fma-udef99.0%
sub-neg99.0%
+-commutative99.0%
distribute-neg-in99.0%
metadata-eval99.0%
metadata-eval99.0%
unsub-neg99.0%
Simplified99.0%
Taylor expanded in t around 0 97.6%
Taylor expanded in x around 0 82.3%
Taylor expanded in a around 0 82.3%
log-prod83.0%
cancel-sign-sub-inv83.0%
metadata-eval83.0%
*-commutative83.0%
Simplified83.0%
Final simplification68.9%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.65e+105) (- (+ (log (* (+ x y) z)) (* (log t) (- a 0.5))) t) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.65e+105) {
tmp = (log(((x + y) * z)) + (log(t) * (a - 0.5))) - 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.65d+105) then
tmp = (log(((x + y) * z)) + (log(t) * (a - 0.5d0))) - 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.65e+105) {
tmp = (Math.log(((x + y) * z)) + (Math.log(t) * (a - 0.5))) - t;
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.65e+105: tmp = (math.log(((x + y) * z)) + (math.log(t) * (a - 0.5))) - t else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.65e+105) tmp = Float64(Float64(log(Float64(Float64(x + y) * z)) + Float64(log(t) * Float64(a - 0.5))) - t); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.65e+105) tmp = (log(((x + y) * z)) + (log(t) * (a - 0.5))) - t; else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.65e+105], N[(N[(N[Log[N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.65 \cdot 10^{+105}:\\
\;\;\;\;\left(\log \left(\left(x + y\right) \cdot z\right) + \log t \cdot \left(a - 0.5\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 1.64999999999999999e105Initial program 99.5%
associate-+l-99.5%
associate--l+99.5%
sub-neg99.5%
+-commutative99.5%
*-commutative99.5%
distribute-rgt-neg-in99.5%
fma-udef99.5%
sub-neg99.5%
+-commutative99.5%
distribute-neg-in99.5%
metadata-eval99.5%
metadata-eval99.5%
unsub-neg99.5%
Simplified99.5%
associate-+r-99.5%
fma-udef99.5%
associate--r+99.5%
sum-log75.1%
Applied egg-rr75.1%
if 1.64999999999999999e105 < 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-udef99.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 84.8%
neg-mul-184.8%
Simplified84.8%
Final simplification78.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (log t))))
(if (<= t 1.8e-286)
t_1
(if (<= t 3.7e-191)
(log (/ (* (+ x y) z) (sqrt t)))
(if (<= t 4.5e+46) t_1 (- t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double tmp;
if (t <= 1.8e-286) {
tmp = t_1;
} else if (t <= 3.7e-191) {
tmp = log((((x + y) * z) / sqrt(t)));
} else if (t <= 4.5e+46) {
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 (t <= 1.8d-286) then
tmp = t_1
else if (t <= 3.7d-191) then
tmp = log((((x + y) * z) / sqrt(t)))
else if (t <= 4.5d+46) 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 (t <= 1.8e-286) {
tmp = t_1;
} else if (t <= 3.7e-191) {
tmp = Math.log((((x + y) * z) / Math.sqrt(t)));
} else if (t <= 4.5e+46) {
tmp = t_1;
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) tmp = 0 if t <= 1.8e-286: tmp = t_1 elif t <= 3.7e-191: tmp = math.log((((x + y) * z) / math.sqrt(t))) elif t <= 4.5e+46: 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 (t <= 1.8e-286) tmp = t_1; elseif (t <= 3.7e-191) tmp = log(Float64(Float64(Float64(x + y) * z) / sqrt(t))); elseif (t <= 4.5e+46) 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 (t <= 1.8e-286) tmp = t_1; elseif (t <= 3.7e-191) tmp = log((((x + y) * z) / sqrt(t))); elseif (t <= 4.5e+46) 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[t, 1.8e-286], t$95$1, If[LessEqual[t, 3.7e-191], N[Log[N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] / N[Sqrt[t], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 4.5e+46], t$95$1, (-t)]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;t \leq 1.8 \cdot 10^{-286}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-191}:\\
\;\;\;\;\log \left(\frac{\left(x + y\right) \cdot z}{\sqrt{t}}\right)\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 1.80000000000000007e-286 or 3.6999999999999997e-191 < t < 4.5000000000000001e46Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-udef99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in a around inf 62.6%
*-commutative62.6%
Simplified62.6%
if 1.80000000000000007e-286 < t < 3.6999999999999997e-191Initial program 98.9%
associate-+l-98.9%
associate--l+98.8%
sub-neg98.8%
+-commutative98.8%
*-commutative98.8%
distribute-rgt-neg-in98.8%
fma-udef98.8%
sub-neg98.8%
+-commutative98.8%
distribute-neg-in98.8%
metadata-eval98.8%
metadata-eval98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t around 0 98.8%
Taylor expanded in a around 0 73.2%
log-prod45.3%
cancel-sign-sub-inv45.3%
+-commutative45.3%
metadata-eval45.3%
*-commutative45.3%
Simplified45.3%
add-sqr-sqrt45.1%
sqrt-unprod45.3%
swap-sqr45.3%
metadata-eval45.3%
metadata-eval45.3%
swap-sqr45.3%
sqrt-unprod0.0%
add-sqr-sqrt6.6%
*-commutative6.6%
metadata-eval6.6%
cancel-sign-sub-inv6.6%
*-commutative6.6%
add-log-exp6.6%
diff-log5.4%
add-sqr-sqrt5.4%
sqrt-unprod5.4%
swap-sqr5.4%
metadata-eval5.4%
metadata-eval5.4%
Applied egg-rr38.3%
if 4.5000000000000001e46 < 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-udef99.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 79.4%
neg-mul-179.4%
Simplified79.4%
Final simplification66.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (log t))))
(if (<= t 1.4e-281)
t_1
(if (<= t 8.2e-191)
(+ (log (* y z)) (* (log t) -0.5))
(if (<= t 2.7e+46) t_1 (- t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * log(t);
double tmp;
if (t <= 1.4e-281) {
tmp = t_1;
} else if (t <= 8.2e-191) {
tmp = log((y * z)) + (log(t) * -0.5);
} else if (t <= 2.7e+46) {
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 (t <= 1.4d-281) then
tmp = t_1
else if (t <= 8.2d-191) then
tmp = log((y * z)) + (log(t) * (-0.5d0))
else if (t <= 2.7d+46) 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 (t <= 1.4e-281) {
tmp = t_1;
} else if (t <= 8.2e-191) {
tmp = Math.log((y * z)) + (Math.log(t) * -0.5);
} else if (t <= 2.7e+46) {
tmp = t_1;
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * math.log(t) tmp = 0 if t <= 1.4e-281: tmp = t_1 elif t <= 8.2e-191: tmp = math.log((y * z)) + (math.log(t) * -0.5) elif t <= 2.7e+46: 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 (t <= 1.4e-281) tmp = t_1; elseif (t <= 8.2e-191) tmp = Float64(log(Float64(y * z)) + Float64(log(t) * -0.5)); elseif (t <= 2.7e+46) 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 (t <= 1.4e-281) tmp = t_1; elseif (t <= 8.2e-191) tmp = log((y * z)) + (log(t) * -0.5); elseif (t <= 2.7e+46) 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[t, 1.4e-281], t$95$1, If[LessEqual[t, 8.2e-191], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+46], t$95$1, (-t)]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \log t\\
\mathbf{if}\;t \leq 1.4 \cdot 10^{-281}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-191}:\\
\;\;\;\;\log \left(y \cdot z\right) + \log t \cdot -0.5\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 1.40000000000000003e-281 or 8.2000000000000004e-191 < t < 2.7000000000000002e46Initial program 99.6%
associate-+l-99.6%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-udef99.6%
sub-neg99.6%
+-commutative99.6%
distribute-neg-in99.6%
metadata-eval99.6%
metadata-eval99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in a around inf 62.3%
*-commutative62.3%
Simplified62.3%
if 1.40000000000000003e-281 < t < 8.2000000000000004e-191Initial program 99.0%
associate-+l-99.0%
associate--l+98.8%
sub-neg98.8%
+-commutative98.8%
*-commutative98.8%
distribute-rgt-neg-in98.8%
fma-udef98.8%
sub-neg98.8%
+-commutative98.8%
distribute-neg-in98.8%
metadata-eval98.8%
metadata-eval98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in t around 0 98.8%
Taylor expanded in x around 0 54.3%
Taylor expanded in a around 0 34.4%
log-prod16.1%
cancel-sign-sub-inv16.1%
metadata-eval16.1%
*-commutative16.1%
Simplified16.1%
if 2.7000000000000002e46 < 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-udef99.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 79.4%
neg-mul-179.4%
Simplified79.4%
Final simplification63.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 9.5e+103) (+ (log (* y z)) (- (* (log t) (+ a -0.5)) t)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 9.5e+103) {
tmp = log((y * z)) + ((log(t) * (a + -0.5)) - 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 <= 9.5d+103) then
tmp = log((y * z)) + ((log(t) * (a + (-0.5d0))) - 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 <= 9.5e+103) {
tmp = Math.log((y * z)) + ((Math.log(t) * (a + -0.5)) - t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 9.5e+103: tmp = math.log((y * z)) + ((math.log(t) * (a + -0.5)) - t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 9.5e+103) tmp = Float64(log(Float64(y * z)) + Float64(Float64(log(t) * Float64(a + -0.5)) - t)); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 9.5e+103) tmp = log((y * z)) + ((log(t) * (a + -0.5)) - t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 9.5e+103], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.5 \cdot 10^{+103}:\\
\;\;\;\;\log \left(y \cdot z\right) + \left(\log t \cdot \left(a + -0.5\right) - t\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 9.49999999999999922e103Initial program 99.5%
add-cube-cbrt98.3%
pow398.3%
*-commutative98.3%
*-un-lft-identity98.3%
sub-neg98.3%
*-un-lft-identity98.3%
metadata-eval98.3%
Applied egg-rr98.3%
sum-log74.0%
Applied egg-rr74.0%
Taylor expanded in x around 0 53.9%
associate--l+53.9%
pow-base-153.9%
sub-neg53.9%
metadata-eval53.9%
*-lft-identity53.9%
Simplified53.9%
if 9.49999999999999922e103 < 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-udef99.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 84.8%
neg-mul-184.8%
Simplified84.8%
Final simplification64.4%
(FPCore (x y z t a) :precision binary64 (if (<= t 2.65e+46) (+ (log (* y z)) (* (log t) (- a 0.5))) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2.65e+46) {
tmp = log((y * z)) + (log(t) * (a - 0.5));
} 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 <= 2.65d+46) then
tmp = log((y * z)) + (log(t) * (a - 0.5d0))
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 <= 2.65e+46) {
tmp = Math.log((y * z)) + (Math.log(t) * (a - 0.5));
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2.65e+46: tmp = math.log((y * z)) + (math.log(t) * (a - 0.5)) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2.65e+46) tmp = Float64(log(Float64(y * z)) + Float64(log(t) * Float64(a - 0.5))); else tmp = Float64(-t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 2.65e+46) tmp = log((y * z)) + (log(t) * (a - 0.5)); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2.65e+46], N[(N[Log[N[(y * z), $MachinePrecision]], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.65 \cdot 10^{+46}:\\
\;\;\;\;\log \left(y \cdot z\right) + \log t \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 2.64999999999999989e46Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-udef99.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 0 95.9%
Taylor expanded in x around 0 63.6%
log-prod48.3%
Simplified48.3%
if 2.64999999999999989e46 < 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-udef99.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 79.4%
neg-mul-179.4%
Simplified79.4%
Final simplification62.5%
(FPCore (x y z t a) :precision binary64 (if (<= t 4e+46) (* a (log t)) (- t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 4e+46) {
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 <= 4d+46) 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 <= 4e+46) {
tmp = a * Math.log(t);
} else {
tmp = -t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 4e+46: tmp = a * math.log(t) else: tmp = -t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 4e+46) 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 <= 4e+46) tmp = a * log(t); else tmp = -t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 4e+46], N[(a * N[Log[t], $MachinePrecision]), $MachinePrecision], (-t)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4 \cdot 10^{+46}:\\
\;\;\;\;a \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\end{array}
if t < 4e46Initial program 99.4%
associate-+l-99.4%
associate--l+99.4%
sub-neg99.4%
+-commutative99.4%
*-commutative99.4%
distribute-rgt-neg-in99.4%
fma-udef99.4%
sub-neg99.4%
+-commutative99.4%
distribute-neg-in99.4%
metadata-eval99.4%
metadata-eval99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in a around inf 52.3%
*-commutative52.3%
Simplified52.3%
if 4e46 < 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-udef99.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 79.4%
neg-mul-179.4%
Simplified79.4%
Final simplification64.7%
(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%
associate--l+99.6%
sub-neg99.6%
+-commutative99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
fma-udef99.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 39.5%
neg-mul-139.5%
Simplified39.5%
Final simplification39.5%
(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 2024036
(FPCore (x y z t a)
:name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t))))
(+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))