
(FPCore (x y z t) :precision binary64 (- x (/ (log (+ (- 1.0 y) (* y (exp z)))) t)))
double code(double x, double y, double z, double t) {
return x - (log(((1.0 - y) + (y * exp(z)))) / t);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x - (log(((1.0d0 - y) + (y * exp(z)))) / t)
end function
public static double code(double x, double y, double z, double t) {
return x - (Math.log(((1.0 - y) + (y * Math.exp(z)))) / t);
}
def code(x, y, z, t): return x - (math.log(((1.0 - y) + (y * math.exp(z)))) / t)
function code(x, y, z, t) return Float64(x - Float64(log(Float64(Float64(1.0 - y) + Float64(y * exp(z)))) / t)) end
function tmp = code(x, y, z, t) tmp = x - (log(((1.0 - y) + (y * exp(z)))) / t); end
code[x_, y_, z_, t_] := N[(x - N[(N[Log[N[(N[(1.0 - y), $MachinePrecision] + N[(y * N[Exp[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (- x (/ (log (+ (- 1.0 y) (* y (exp z)))) t)))
double code(double x, double y, double z, double t) {
return x - (log(((1.0 - y) + (y * exp(z)))) / t);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x - (log(((1.0d0 - y) + (y * exp(z)))) / t)
end function
public static double code(double x, double y, double z, double t) {
return x - (Math.log(((1.0 - y) + (y * Math.exp(z)))) / t);
}
def code(x, y, z, t): return x - (math.log(((1.0 - y) + (y * math.exp(z)))) / t)
function code(x, y, z, t) return Float64(x - Float64(log(Float64(Float64(1.0 - y) + Float64(y * exp(z)))) / t)) end
function tmp = code(x, y, z, t) tmp = x - (log(((1.0 - y) + (y * exp(z)))) / t); end
code[x_, y_, z_, t_] := N[(x - N[(N[Log[N[(N[(1.0 - y), $MachinePrecision] + N[(y * N[Exp[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{\log \left(\left(1 - y\right) + y \cdot e^{z}\right)}{t}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* (expm1 z) y)) (t_2 (+ (* (exp z) y) (- 1.0 y))))
(if (<= t_2 0.0)
(/ (- (* t x) (log1p t_1)) t)
(if (<= t_2 1.000005)
(- x (/ 1.0 (fma 0.5 t (/ (/ t (expm1 z)) y))))
(- x (/ (log t_1) t))))))
double code(double x, double y, double z, double t) {
double t_1 = expm1(z) * y;
double t_2 = (exp(z) * y) + (1.0 - y);
double tmp;
if (t_2 <= 0.0) {
tmp = ((t * x) - log1p(t_1)) / t;
} else if (t_2 <= 1.000005) {
tmp = x - (1.0 / fma(0.5, t, ((t / expm1(z)) / y)));
} else {
tmp = x - (log(t_1) / t);
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(expm1(z) * y) t_2 = Float64(Float64(exp(z) * y) + Float64(1.0 - y)) tmp = 0.0 if (t_2 <= 0.0) tmp = Float64(Float64(Float64(t * x) - log1p(t_1)) / t); elseif (t_2 <= 1.000005) tmp = Float64(x - Float64(1.0 / fma(0.5, t, Float64(Float64(t / expm1(z)) / y)))); else tmp = Float64(x - Float64(log(t_1) / t)); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(Exp[z] - 1), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[Exp[z], $MachinePrecision] * y), $MachinePrecision] + N[(1.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[(N[(t * x), $MachinePrecision] - N[Log[1 + t$95$1], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t$95$2, 1.000005], N[(x - N[(1.0 / N[(0.5 * t + N[(N[(t / N[(Exp[z] - 1), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[Log[t$95$1], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{expm1}\left(z\right) \cdot y\\
t_2 := e^{z} \cdot y + \left(1 - y\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\frac{t \cdot x - \mathsf{log1p}\left(t\_1\right)}{t}\\
\mathbf{elif}\;t\_2 \leq 1.000005:\\
\;\;\;\;x - \frac{1}{\mathsf{fma}\left(0.5, t, \frac{\frac{t}{\mathsf{expm1}\left(z\right)}}{y}\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\log t\_1}{t}\\
\end{array}
\end{array}
if (+.f64 (-.f64 #s(literal 1 binary64) y) (*.f64 y (exp.f64 z))) < 0.0Initial program 2.2%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-*r/N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6472.2
Applied rewrites72.2%
Taylor expanded in t around 0
Applied rewrites18.0%
Taylor expanded in t around 0
lower-/.f64N/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-inN/A
metadata-evalN/A
sub-negN/A
lower-log1p.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-expm1.f6494.3
Applied rewrites94.3%
if 0.0 < (+.f64 (-.f64 #s(literal 1 binary64) y) (*.f64 y (exp.f64 z))) < 1.00000500000000003Initial program 75.1%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-expm1.f6495.9
Applied rewrites95.9%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6495.8
Applied rewrites95.8%
Taylor expanded in y around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-expm1.f6499.9
Applied rewrites99.9%
Taylor expanded in y around inf
Applied rewrites99.9%
if 1.00000500000000003 < (+.f64 (-.f64 #s(literal 1 binary64) y) (*.f64 y (exp.f64 z))) Initial program 93.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower-expm1.f6496.9
Applied rewrites96.9%
Final simplification98.0%
(FPCore (x y z t) :precision binary64 (if (<= (+ (* (exp z) y) (- 1.0 y)) 1.000005) (- x (/ 1.0 (fma 0.5 t (/ (/ t (expm1 z)) y)))) (- x (/ (log (* (expm1 z) y)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((exp(z) * y) + (1.0 - y)) <= 1.000005) {
tmp = x - (1.0 / fma(0.5, t, ((t / expm1(z)) / y)));
} else {
tmp = x - (log((expm1(z) * y)) / t);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (Float64(Float64(exp(z) * y) + Float64(1.0 - y)) <= 1.000005) tmp = Float64(x - Float64(1.0 / fma(0.5, t, Float64(Float64(t / expm1(z)) / y)))); else tmp = Float64(x - Float64(log(Float64(expm1(z) * y)) / t)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[N[(N[(N[Exp[z], $MachinePrecision] * y), $MachinePrecision] + N[(1.0 - y), $MachinePrecision]), $MachinePrecision], 1.000005], N[(x - N[(1.0 / N[(0.5 * t + N[(N[(t / N[(Exp[z] - 1), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[Log[N[(N[(Exp[z] - 1), $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{z} \cdot y + \left(1 - y\right) \leq 1.000005:\\
\;\;\;\;x - \frac{1}{\mathsf{fma}\left(0.5, t, \frac{\frac{t}{\mathsf{expm1}\left(z\right)}}{y}\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\log \left(\mathsf{expm1}\left(z\right) \cdot y\right)}{t}\\
\end{array}
\end{array}
if (+.f64 (-.f64 #s(literal 1 binary64) y) (*.f64 y (exp.f64 z))) < 1.00000500000000003Initial program 52.5%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-expm1.f6489.9
Applied rewrites89.9%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6489.8
Applied rewrites89.8%
Taylor expanded in y around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-expm1.f6493.5
Applied rewrites93.5%
Taylor expanded in y around inf
Applied rewrites94.4%
if 1.00000500000000003 < (+.f64 (-.f64 #s(literal 1 binary64) y) (*.f64 y (exp.f64 z))) Initial program 93.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower-expm1.f6496.9
Applied rewrites96.9%
Final simplification94.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.4e+18)
(- x (/ 1.0 (/ (/ (fma (* 0.5 z) (- (* t y) t) t) z) y)))
(if (<= y 4.5e+87)
(- x (* (/ (expm1 z) t) y))
(-
x
(/
(log (fma (fma (* (fma 0.16666666666666666 z 0.5) y) z y) z 1.0))
t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.4e+18) {
tmp = x - (1.0 / ((fma((0.5 * z), ((t * y) - t), t) / z) / y));
} else if (y <= 4.5e+87) {
tmp = x - ((expm1(z) / t) * y);
} else {
tmp = x - (log(fma(fma((fma(0.16666666666666666, z, 0.5) * y), z, y), z, 1.0)) / t);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= -5.4e+18) tmp = Float64(x - Float64(1.0 / Float64(Float64(fma(Float64(0.5 * z), Float64(Float64(t * y) - t), t) / z) / y))); elseif (y <= 4.5e+87) tmp = Float64(x - Float64(Float64(expm1(z) / t) * y)); else tmp = Float64(x - Float64(log(fma(fma(Float64(fma(0.16666666666666666, z, 0.5) * y), z, y), z, 1.0)) / t)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.4e+18], N[(x - N[(1.0 / N[(N[(N[(N[(0.5 * z), $MachinePrecision] * N[(N[(t * y), $MachinePrecision] - t), $MachinePrecision] + t), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+87], N[(x - N[(N[(N[(Exp[z] - 1), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[Log[N[(N[(N[(N[(0.16666666666666666 * z + 0.5), $MachinePrecision] * y), $MachinePrecision] * z + y), $MachinePrecision] * z + 1.0), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+18}:\\
\;\;\;\;x - \frac{1}{\frac{\frac{\mathsf{fma}\left(0.5 \cdot z, t \cdot y - t, t\right)}{z}}{y}}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+87}:\\
\;\;\;\;x - \frac{\mathsf{expm1}\left(z\right)}{t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\log \left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, z, 0.5\right) \cdot y, z, y\right), z, 1\right)\right)}{t}\\
\end{array}
\end{array}
if y < -5.4e18Initial program 39.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-expm1.f6461.7
Applied rewrites61.7%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6461.7
Applied rewrites61.7%
Taylor expanded in y around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-expm1.f6473.8
Applied rewrites73.8%
Taylor expanded in z around 0
Applied rewrites76.1%
if -5.4e18 < y < 4.5000000000000003e87Initial program 71.0%
Taylor expanded in y around 0
associate-/l*N/A
div-subN/A
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower-expm1.f6498.9
Applied rewrites98.9%
if 4.5000000000000003e87 < y Initial program 13.4%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-fma.f6491.0
Applied rewrites91.0%
Final simplification92.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.4e+18)
(- x (/ 1.0 (/ (/ (fma (* 0.5 z) (- (* t y) t) t) z) y)))
(if (<= y 4.5e+87)
(- x (* (/ (expm1 z) t) y))
(- x (/ (log (fma (fma (* (* 0.16666666666666666 z) y) z y) z 1.0)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.4e+18) {
tmp = x - (1.0 / ((fma((0.5 * z), ((t * y) - t), t) / z) / y));
} else if (y <= 4.5e+87) {
tmp = x - ((expm1(z) / t) * y);
} else {
tmp = x - (log(fma(fma(((0.16666666666666666 * z) * y), z, y), z, 1.0)) / t);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= -5.4e+18) tmp = Float64(x - Float64(1.0 / Float64(Float64(fma(Float64(0.5 * z), Float64(Float64(t * y) - t), t) / z) / y))); elseif (y <= 4.5e+87) tmp = Float64(x - Float64(Float64(expm1(z) / t) * y)); else tmp = Float64(x - Float64(log(fma(fma(Float64(Float64(0.16666666666666666 * z) * y), z, y), z, 1.0)) / t)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.4e+18], N[(x - N[(1.0 / N[(N[(N[(N[(0.5 * z), $MachinePrecision] * N[(N[(t * y), $MachinePrecision] - t), $MachinePrecision] + t), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+87], N[(x - N[(N[(N[(Exp[z] - 1), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[Log[N[(N[(N[(N[(0.16666666666666666 * z), $MachinePrecision] * y), $MachinePrecision] * z + y), $MachinePrecision] * z + 1.0), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+18}:\\
\;\;\;\;x - \frac{1}{\frac{\frac{\mathsf{fma}\left(0.5 \cdot z, t \cdot y - t, t\right)}{z}}{y}}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+87}:\\
\;\;\;\;x - \frac{\mathsf{expm1}\left(z\right)}{t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\log \left(\mathsf{fma}\left(\mathsf{fma}\left(\left(0.16666666666666666 \cdot z\right) \cdot y, z, y\right), z, 1\right)\right)}{t}\\
\end{array}
\end{array}
if y < -5.4e18Initial program 39.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-expm1.f6461.7
Applied rewrites61.7%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6461.7
Applied rewrites61.7%
Taylor expanded in y around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-expm1.f6473.8
Applied rewrites73.8%
Taylor expanded in z around 0
Applied rewrites76.1%
if -5.4e18 < y < 4.5000000000000003e87Initial program 71.0%
Taylor expanded in y around 0
associate-/l*N/A
div-subN/A
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower-expm1.f6498.9
Applied rewrites98.9%
if 4.5000000000000003e87 < y Initial program 13.4%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-fma.f6491.0
Applied rewrites91.0%
Taylor expanded in z around inf
Applied rewrites91.0%
Final simplification92.1%
(FPCore (x y z t)
:precision binary64
(if (<= y 6.2e+87)
(- x (/ 1.0 (fma 0.5 t (/ (/ t (expm1 z)) y))))
(-
x
(/ (log (fma (fma (* (fma 0.16666666666666666 z 0.5) y) z y) z 1.0)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 6.2e+87) {
tmp = x - (1.0 / fma(0.5, t, ((t / expm1(z)) / y)));
} else {
tmp = x - (log(fma(fma((fma(0.16666666666666666, z, 0.5) * y), z, y), z, 1.0)) / t);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= 6.2e+87) tmp = Float64(x - Float64(1.0 / fma(0.5, t, Float64(Float64(t / expm1(z)) / y)))); else tmp = Float64(x - Float64(log(fma(fma(Float64(fma(0.16666666666666666, z, 0.5) * y), z, y), z, 1.0)) / t)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, 6.2e+87], N[(x - N[(1.0 / N[(0.5 * t + N[(N[(t / N[(Exp[z] - 1), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[Log[N[(N[(N[(N[(0.16666666666666666 * z + 0.5), $MachinePrecision] * y), $MachinePrecision] * z + y), $MachinePrecision] * z + 1.0), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.2 \cdot 10^{+87}:\\
\;\;\;\;x - \frac{1}{\mathsf{fma}\left(0.5, t, \frac{\frac{t}{\mathsf{expm1}\left(z\right)}}{y}\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\log \left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, z, 0.5\right) \cdot y, z, y\right), z, 1\right)\right)}{t}\\
\end{array}
\end{array}
if y < 6.1999999999999999e87Initial program 61.8%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-expm1.f6485.6
Applied rewrites85.6%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6485.6
Applied rewrites85.6%
Taylor expanded in y around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-expm1.f6491.8
Applied rewrites91.8%
Taylor expanded in y around inf
Applied rewrites92.7%
if 6.1999999999999999e87 < y Initial program 13.4%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-fma.f6491.0
Applied rewrites91.0%
Final simplification92.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.4e+18)
(- x (/ 1.0 (/ (/ (fma (* 0.5 z) (- (* t y) t) t) z) y)))
(if (<= y 4.5e+87)
(- x (* (/ (expm1 z) t) y))
(- x (/ (log (fma (fma 0.5 (* z y) y) z 1.0)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.4e+18) {
tmp = x - (1.0 / ((fma((0.5 * z), ((t * y) - t), t) / z) / y));
} else if (y <= 4.5e+87) {
tmp = x - ((expm1(z) / t) * y);
} else {
tmp = x - (log(fma(fma(0.5, (z * y), y), z, 1.0)) / t);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= -5.4e+18) tmp = Float64(x - Float64(1.0 / Float64(Float64(fma(Float64(0.5 * z), Float64(Float64(t * y) - t), t) / z) / y))); elseif (y <= 4.5e+87) tmp = Float64(x - Float64(Float64(expm1(z) / t) * y)); else tmp = Float64(x - Float64(log(fma(fma(0.5, Float64(z * y), y), z, 1.0)) / t)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.4e+18], N[(x - N[(1.0 / N[(N[(N[(N[(0.5 * z), $MachinePrecision] * N[(N[(t * y), $MachinePrecision] - t), $MachinePrecision] + t), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+87], N[(x - N[(N[(N[(Exp[z] - 1), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[Log[N[(N[(0.5 * N[(z * y), $MachinePrecision] + y), $MachinePrecision] * z + 1.0), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+18}:\\
\;\;\;\;x - \frac{1}{\frac{\frac{\mathsf{fma}\left(0.5 \cdot z, t \cdot y - t, t\right)}{z}}{y}}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+87}:\\
\;\;\;\;x - \frac{\mathsf{expm1}\left(z\right)}{t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\log \left(\mathsf{fma}\left(\mathsf{fma}\left(0.5, z \cdot y, y\right), z, 1\right)\right)}{t}\\
\end{array}
\end{array}
if y < -5.4e18Initial program 39.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-expm1.f6461.7
Applied rewrites61.7%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6461.7
Applied rewrites61.7%
Taylor expanded in y around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-expm1.f6473.8
Applied rewrites73.8%
Taylor expanded in z around 0
Applied rewrites76.1%
if -5.4e18 < y < 4.5000000000000003e87Initial program 71.0%
Taylor expanded in y around 0
associate-/l*N/A
div-subN/A
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower-expm1.f6498.9
Applied rewrites98.9%
if 4.5000000000000003e87 < y Initial program 13.4%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6491.0
Applied rewrites91.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.4e+18)
(- x (/ 1.0 (/ (/ (fma (* 0.5 z) (- (* t y) t) t) z) y)))
(if (<= y 4.5e+87)
(- x (* (/ (expm1 z) t) y))
(- x (/ (log (fma z y 1.0)) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.4e+18) {
tmp = x - (1.0 / ((fma((0.5 * z), ((t * y) - t), t) / z) / y));
} else if (y <= 4.5e+87) {
tmp = x - ((expm1(z) / t) * y);
} else {
tmp = x - (log(fma(z, y, 1.0)) / t);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= -5.4e+18) tmp = Float64(x - Float64(1.0 / Float64(Float64(fma(Float64(0.5 * z), Float64(Float64(t * y) - t), t) / z) / y))); elseif (y <= 4.5e+87) tmp = Float64(x - Float64(Float64(expm1(z) / t) * y)); else tmp = Float64(x - Float64(log(fma(z, y, 1.0)) / t)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.4e+18], N[(x - N[(1.0 / N[(N[(N[(N[(0.5 * z), $MachinePrecision] * N[(N[(t * y), $MachinePrecision] - t), $MachinePrecision] + t), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+87], N[(x - N[(N[(N[(Exp[z] - 1), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[Log[N[(z * y + 1.0), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+18}:\\
\;\;\;\;x - \frac{1}{\frac{\frac{\mathsf{fma}\left(0.5 \cdot z, t \cdot y - t, t\right)}{z}}{y}}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+87}:\\
\;\;\;\;x - \frac{\mathsf{expm1}\left(z\right)}{t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\log \left(\mathsf{fma}\left(z, y, 1\right)\right)}{t}\\
\end{array}
\end{array}
if y < -5.4e18Initial program 39.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-expm1.f6461.7
Applied rewrites61.7%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6461.7
Applied rewrites61.7%
Taylor expanded in y around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-expm1.f6473.8
Applied rewrites73.8%
Taylor expanded in z around 0
Applied rewrites76.1%
if -5.4e18 < y < 4.5000000000000003e87Initial program 71.0%
Taylor expanded in y around 0
associate-/l*N/A
div-subN/A
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower-expm1.f6498.9
Applied rewrites98.9%
if 4.5000000000000003e87 < y Initial program 13.4%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f6491.0
Applied rewrites91.0%
(FPCore (x y z t) :precision binary64 (if (<= y -5.4e+18) (- x (/ 1.0 (/ (/ (fma (* 0.5 z) (- (* t y) t) t) z) y))) (- x (* (/ (expm1 z) t) y))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.4e+18) {
tmp = x - (1.0 / ((fma((0.5 * z), ((t * y) - t), t) / z) / y));
} else {
tmp = x - ((expm1(z) / t) * y);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= -5.4e+18) tmp = Float64(x - Float64(1.0 / Float64(Float64(fma(Float64(0.5 * z), Float64(Float64(t * y) - t), t) / z) / y))); else tmp = Float64(x - Float64(Float64(expm1(z) / t) * y)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.4e+18], N[(x - N[(1.0 / N[(N[(N[(N[(0.5 * z), $MachinePrecision] * N[(N[(t * y), $MachinePrecision] - t), $MachinePrecision] + t), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(Exp[z] - 1), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+18}:\\
\;\;\;\;x - \frac{1}{\frac{\frac{\mathsf{fma}\left(0.5 \cdot z, t \cdot y - t, t\right)}{z}}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\mathsf{expm1}\left(z\right)}{t} \cdot y\\
\end{array}
\end{array}
if y < -5.4e18Initial program 39.7%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-expm1.f6461.7
Applied rewrites61.7%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6461.7
Applied rewrites61.7%
Taylor expanded in y around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-expm1.f6473.8
Applied rewrites73.8%
Taylor expanded in z around 0
Applied rewrites76.1%
if -5.4e18 < y Initial program 64.6%
Taylor expanded in y around 0
associate-/l*N/A
div-subN/A
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower-expm1.f6494.1
Applied rewrites94.1%
(FPCore (x y z t) :precision binary64 (- x (/ 1.0 (/ (/ (fma (* 0.5 z) (- (* t y) t) t) z) y))))
double code(double x, double y, double z, double t) {
return x - (1.0 / ((fma((0.5 * z), ((t * y) - t), t) / z) / y));
}
function code(x, y, z, t) return Float64(x - Float64(1.0 / Float64(Float64(fma(Float64(0.5 * z), Float64(Float64(t * y) - t), t) / z) / y))) end
code[x_, y_, z_, t_] := N[(x - N[(1.0 / N[(N[(N[(N[(0.5 * z), $MachinePrecision] * N[(N[(t * y), $MachinePrecision] - t), $MachinePrecision] + t), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{1}{\frac{\frac{\mathsf{fma}\left(0.5 \cdot z, t \cdot y - t, t\right)}{z}}{y}}
\end{array}
Initial program 57.9%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-expm1.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6483.2
Applied rewrites83.2%
Taylor expanded in y around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-expm1.f6489.3
Applied rewrites89.3%
Taylor expanded in z around 0
Applied rewrites84.4%
(FPCore (x y z t) :precision binary64 (if (<= z -3.55e+19) (fma (- (/ 1.0 t) (/ 1.0 t)) y x) (- x (* (/ z t) y))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.55e+19) {
tmp = fma(((1.0 / t) - (1.0 / t)), y, x);
} else {
tmp = x - ((z / t) * y);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (z <= -3.55e+19) tmp = fma(Float64(Float64(1.0 / t) - Float64(1.0 / t)), y, x); else tmp = Float64(x - Float64(Float64(z / t) * y)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.55e+19], N[(N[(N[(1.0 / t), $MachinePrecision] - N[(1.0 / t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(x - N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.55 \cdot 10^{+19}:\\
\;\;\;\;\mathsf{fma}\left(\frac{1}{t} - \frac{1}{t}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z}{t} \cdot y\\
\end{array}
\end{array}
if z < -3.55e19Initial program 79.2%
Taylor expanded in y around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-exp.f6475.3
Applied rewrites75.3%
Taylor expanded in z around 0
Applied rewrites62.2%
if -3.55e19 < z Initial program 49.2%
Taylor expanded in y around 0
associate-/l*N/A
div-subN/A
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower-expm1.f6489.5
Applied rewrites89.5%
Taylor expanded in z around 0
Applied rewrites89.5%
(FPCore (x y z t) :precision binary64 (if (<= z -5e+19) (- x (/ 1.0 (* 0.5 t))) (- x (* (/ z t) y))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5e+19) {
tmp = x - (1.0 / (0.5 * t));
} else {
tmp = x - ((z / t) * y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-5d+19)) then
tmp = x - (1.0d0 / (0.5d0 * t))
else
tmp = x - ((z / t) * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5e+19) {
tmp = x - (1.0 / (0.5 * t));
} else {
tmp = x - ((z / t) * y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5e+19: tmp = x - (1.0 / (0.5 * t)) else: tmp = x - ((z / t) * y) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5e+19) tmp = Float64(x - Float64(1.0 / Float64(0.5 * t))); else tmp = Float64(x - Float64(Float64(z / t) * y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -5e+19) tmp = x - (1.0 / (0.5 * t)); else tmp = x - ((z / t) * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5e+19], N[(x - N[(1.0 / N[(0.5 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+19}:\\
\;\;\;\;x - \frac{1}{0.5 \cdot t}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z}{t} \cdot y\\
\end{array}
\end{array}
if z < -5e19Initial program 79.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
lower-expm1.f6475.4
Applied rewrites75.4%
lift-/.f64N/A
clear-numN/A
lower-/.f64N/A
lower-/.f6475.3
Applied rewrites75.3%
Taylor expanded in y around 0
lower-/.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-expm1.f6486.1
Applied rewrites86.1%
Taylor expanded in y around inf
Applied rewrites47.6%
if -5e19 < z Initial program 49.2%
Taylor expanded in y around 0
associate-/l*N/A
div-subN/A
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower-expm1.f6489.5
Applied rewrites89.5%
Taylor expanded in z around 0
Applied rewrites89.5%
(FPCore (x y z t) :precision binary64 (- x (* (/ z t) y)))
double code(double x, double y, double z, double t) {
return x - ((z / t) * y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x - ((z / t) * y)
end function
public static double code(double x, double y, double z, double t) {
return x - ((z / t) * y);
}
def code(x, y, z, t): return x - ((z / t) * y)
function code(x, y, z, t) return Float64(x - Float64(Float64(z / t) * y)) end
function tmp = code(x, y, z, t) tmp = x - ((z / t) * y); end
code[x_, y_, z_, t_] := N[(x - N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{z}{t} \cdot y
\end{array}
Initial program 57.9%
Taylor expanded in y around 0
associate-/l*N/A
div-subN/A
*-commutativeN/A
lower-*.f64N/A
div-subN/A
lower-/.f64N/A
lower-expm1.f6485.4
Applied rewrites85.4%
Taylor expanded in z around 0
Applied rewrites72.4%
(FPCore (x y z t) :precision binary64 (fma (- z) (/ y t) x))
double code(double x, double y, double z, double t) {
return fma(-z, (y / t), x);
}
function code(x, y, z, t) return fma(Float64(-z), Float64(y / t), x) end
code[x_, y_, z_, t_] := N[((-z) * N[(y / t), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(-z, \frac{y}{t}, x\right)
\end{array}
Initial program 57.9%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-*r/N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6471.7
Applied rewrites71.7%
(FPCore (x y z t) :precision binary64 (* (/ (- z) t) y))
double code(double x, double y, double z, double t) {
return (-z / t) * y;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (-z / t) * y
end function
public static double code(double x, double y, double z, double t) {
return (-z / t) * y;
}
def code(x, y, z, t): return (-z / t) * y
function code(x, y, z, t) return Float64(Float64(Float64(-z) / t) * y) end
function tmp = code(x, y, z, t) tmp = (-z / t) * y; end
code[x_, y_, z_, t_] := N[(N[((-z) / t), $MachinePrecision] * y), $MachinePrecision]
\begin{array}{l}
\\
\frac{-z}{t} \cdot y
\end{array}
Initial program 57.9%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-*r/N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6471.7
Applied rewrites71.7%
Taylor expanded in t around 0
Applied rewrites15.3%
(FPCore (x y z t) :precision binary64 (* (/ (- y) t) z))
double code(double x, double y, double z, double t) {
return (-y / t) * z;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (-y / t) * z
end function
public static double code(double x, double y, double z, double t) {
return (-y / t) * z;
}
def code(x, y, z, t): return (-y / t) * z
function code(x, y, z, t) return Float64(Float64(Float64(-y) / t) * z) end
function tmp = code(x, y, z, t) tmp = (-y / t) * z; end
code[x_, y_, z_, t_] := N[(N[((-y) / t), $MachinePrecision] * z), $MachinePrecision]
\begin{array}{l}
\\
\frac{-y}{t} \cdot z
\end{array}
Initial program 57.9%
Taylor expanded in z around 0
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
associate-*r/N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6471.7
Applied rewrites71.7%
Taylor expanded in t around 0
Applied rewrites15.3%
Taylor expanded in t around 0
Applied rewrites14.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ (- 0.5) (* y t))))
(if (< z -2.8874623088207947e+119)
(- (- x (/ t_1 (* z z))) (* t_1 (/ (/ 2.0 z) (* z z))))
(- x (/ (log (+ 1.0 (* z y))) t)))))
double code(double x, double y, double z, double t) {
double t_1 = -0.5 / (y * t);
double tmp;
if (z < -2.8874623088207947e+119) {
tmp = (x - (t_1 / (z * z))) - (t_1 * ((2.0 / z) / (z * z)));
} else {
tmp = x - (log((1.0 + (z * y))) / t);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = -0.5d0 / (y * t)
if (z < (-2.8874623088207947d+119)) then
tmp = (x - (t_1 / (z * z))) - (t_1 * ((2.0d0 / z) / (z * z)))
else
tmp = x - (log((1.0d0 + (z * y))) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -0.5 / (y * t);
double tmp;
if (z < -2.8874623088207947e+119) {
tmp = (x - (t_1 / (z * z))) - (t_1 * ((2.0 / z) / (z * z)));
} else {
tmp = x - (Math.log((1.0 + (z * y))) / t);
}
return tmp;
}
def code(x, y, z, t): t_1 = -0.5 / (y * t) tmp = 0 if z < -2.8874623088207947e+119: tmp = (x - (t_1 / (z * z))) - (t_1 * ((2.0 / z) / (z * z))) else: tmp = x - (math.log((1.0 + (z * y))) / t) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(-0.5) / Float64(y * t)) tmp = 0.0 if (z < -2.8874623088207947e+119) tmp = Float64(Float64(x - Float64(t_1 / Float64(z * z))) - Float64(t_1 * Float64(Float64(2.0 / z) / Float64(z * z)))); else tmp = Float64(x - Float64(log(Float64(1.0 + Float64(z * y))) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -0.5 / (y * t); tmp = 0.0; if (z < -2.8874623088207947e+119) tmp = (x - (t_1 / (z * z))) - (t_1 * ((2.0 / z) / (z * z))); else tmp = x - (log((1.0 + (z * y))) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[((-0.5) / N[(y * t), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -2.8874623088207947e+119], N[(N[(x - N[(t$95$1 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[(N[(2.0 / z), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[Log[N[(1.0 + N[(z * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-0.5}{y \cdot t}\\
\mathbf{if}\;z < -2.8874623088207947 \cdot 10^{+119}:\\
\;\;\;\;\left(x - \frac{t\_1}{z \cdot z}\right) - t\_1 \cdot \frac{\frac{2}{z}}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\log \left(1 + z \cdot y\right)}{t}\\
\end{array}
\end{array}
herbie shell --seed 2024254
(FPCore (x y z t)
:name "System.Random.MWC.Distributions:truncatedExp from mwc-random-0.13.3.2"
:precision binary64
:alt
(! :herbie-platform default (if (< z -288746230882079470000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- x (/ (/ (- 1/2) (* y t)) (* z z))) (* (/ (- 1/2) (* y t)) (/ (/ 2 z) (* z z)))) (- x (/ (log (+ 1 (* z y))) t))))
(- x (/ (log (+ (- 1.0 y) (* y (exp z)))) t)))