
(FPCore (x y z) :precision binary64 (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))
double code(double x, double y, double z) {
return x + (y / ((1.1283791670955126 * exp(z)) - (x * y)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (y / ((1.1283791670955126d0 * exp(z)) - (x * y)))
end function
public static double code(double x, double y, double z) {
return x + (y / ((1.1283791670955126 * Math.exp(z)) - (x * y)));
}
def code(x, y, z): return x + (y / ((1.1283791670955126 * math.exp(z)) - (x * y)))
function code(x, y, z) return Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * exp(z)) - Float64(x * y)))) end
function tmp = code(x, y, z) tmp = x + (y / ((1.1283791670955126 * exp(z)) - (x * y))); end
code[x_, y_, z_] := N[(x + N[(y / N[(N[(1.1283791670955126 * N[Exp[z], $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))
double code(double x, double y, double z) {
return x + (y / ((1.1283791670955126 * exp(z)) - (x * y)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (y / ((1.1283791670955126d0 * exp(z)) - (x * y)))
end function
public static double code(double x, double y, double z) {
return x + (y / ((1.1283791670955126 * Math.exp(z)) - (x * y)));
}
def code(x, y, z): return x + (y / ((1.1283791670955126 * math.exp(z)) - (x * y)))
function code(x, y, z) return Float64(x + Float64(y / Float64(Float64(1.1283791670955126 * exp(z)) - Float64(x * y)))) end
function tmp = code(x, y, z) tmp = x + (y / ((1.1283791670955126 * exp(z)) - (x * y))); end
code[x_, y_, z_] := N[(x + N[(y / N[(N[(1.1283791670955126 * N[Exp[z], $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{1.1283791670955126 \cdot e^{z} - x \cdot y}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<= (exp z) 0.0)
(+ (/ -1.0 x) x)
(if (<= (exp z) 1.000005)
(-
x
(/
y
(fma
x
y
(fma
(fma
(fma -0.18806319451591877 z -0.5641895835477563)
z
-1.1283791670955126)
z
-1.1283791670955126))))
(fma (/ 0.8862269254527579 (exp z)) y x))))
double code(double x, double y, double z) {
double tmp;
if (exp(z) <= 0.0) {
tmp = (-1.0 / x) + x;
} else if (exp(z) <= 1.000005) {
tmp = x - (y / fma(x, y, fma(fma(fma(-0.18806319451591877, z, -0.5641895835477563), z, -1.1283791670955126), z, -1.1283791670955126)));
} else {
tmp = fma((0.8862269254527579 / exp(z)), y, x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (exp(z) <= 0.0) tmp = Float64(Float64(-1.0 / x) + x); elseif (exp(z) <= 1.000005) tmp = Float64(x - Float64(y / fma(x, y, fma(fma(fma(-0.18806319451591877, z, -0.5641895835477563), z, -1.1283791670955126), z, -1.1283791670955126)))); else tmp = fma(Float64(0.8862269254527579 / exp(z)), y, x); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[N[Exp[z], $MachinePrecision], 1.000005], N[(x - N[(y / N[(x * y + N[(N[(N[(-0.18806319451591877 * z + -0.5641895835477563), $MachinePrecision] * z + -1.1283791670955126), $MachinePrecision] * z + -1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.8862269254527579 / N[Exp[z], $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{z} \leq 0:\\
\;\;\;\;\frac{-1}{x} + x\\
\mathbf{elif}\;e^{z} \leq 1.000005:\\
\;\;\;\;x - \frac{y}{\mathsf{fma}\left(x, y, \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.18806319451591877, z, -0.5641895835477563\right), z, -1.1283791670955126\right), z, -1.1283791670955126\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{0.8862269254527579}{e^{z}}, y, x\right)\\
\end{array}
\end{array}
if (exp.f64 z) < 0.0Initial program 89.2%
Taylor expanded in x around inf
lower-/.f64100.0
Applied rewrites100.0%
if 0.0 < (exp.f64 z) < 1.00000500000000003Initial program 99.9%
lift-/.f64N/A
clear-numN/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lift--.f64N/A
sub-negN/A
distribute-neg-inN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
remove-double-negN/A
lower-fma.f64N/A
metadata-eval99.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.8
Applied rewrites99.8%
Taylor expanded in z around 0
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f6499.8
Applied rewrites99.8%
lift-+.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
clear-num-revN/A
cancel-sign-sub-invN/A
clear-num-revN/A
lift-/.f64N/A
Applied rewrites99.9%
if 1.00000500000000003 < (exp.f64 z) Initial program 95.5%
Taylor expanded in y around 0
+-commutativeN/A
associate-*r/N/A
associate-*l/N/A
metadata-evalN/A
associate-*r/N/A
lower-fma.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
lower-exp.f64100.0
Applied rewrites100.0%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (/ -1.0 x) x))
(t_1 (- x (/ y (- (* y x) (* 1.1283791670955126 (exp z)))))))
(if (<= t_1 -100.0)
t_0
(if (<= t_1 5e-19) (+ (/ y 1.1283791670955126) x) t_0))))
double code(double x, double y, double z) {
double t_0 = (-1.0 / x) + x;
double t_1 = x - (y / ((y * x) - (1.1283791670955126 * exp(z))));
double tmp;
if (t_1 <= -100.0) {
tmp = t_0;
} else if (t_1 <= 5e-19) {
tmp = (y / 1.1283791670955126) + x;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / x) + x
t_1 = x - (y / ((y * x) - (1.1283791670955126d0 * exp(z))))
if (t_1 <= (-100.0d0)) then
tmp = t_0
else if (t_1 <= 5d-19) then
tmp = (y / 1.1283791670955126d0) + x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (-1.0 / x) + x;
double t_1 = x - (y / ((y * x) - (1.1283791670955126 * Math.exp(z))));
double tmp;
if (t_1 <= -100.0) {
tmp = t_0;
} else if (t_1 <= 5e-19) {
tmp = (y / 1.1283791670955126) + x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (-1.0 / x) + x t_1 = x - (y / ((y * x) - (1.1283791670955126 * math.exp(z)))) tmp = 0 if t_1 <= -100.0: tmp = t_0 elif t_1 <= 5e-19: tmp = (y / 1.1283791670955126) + x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(-1.0 / x) + x) t_1 = Float64(x - Float64(y / Float64(Float64(y * x) - Float64(1.1283791670955126 * exp(z))))) tmp = 0.0 if (t_1 <= -100.0) tmp = t_0; elseif (t_1 <= 5e-19) tmp = Float64(Float64(y / 1.1283791670955126) + x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (-1.0 / x) + x; t_1 = x - (y / ((y * x) - (1.1283791670955126 * exp(z)))); tmp = 0.0; if (t_1 <= -100.0) tmp = t_0; elseif (t_1 <= 5e-19) tmp = (y / 1.1283791670955126) + x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$1 = N[(x - N[(y / N[(N[(y * x), $MachinePrecision] - N[(1.1283791670955126 * N[Exp[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -100.0], t$95$0, If[LessEqual[t$95$1, 5e-19], N[(N[(y / 1.1283791670955126), $MachinePrecision] + x), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{x} + x\\
t_1 := x - \frac{y}{y \cdot x - 1.1283791670955126 \cdot e^{z}}\\
\mathbf{if}\;t\_1 \leq -100:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-19}:\\
\;\;\;\;\frac{y}{1.1283791670955126} + x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y)))) < -100 or 5.0000000000000004e-19 < (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y)))) Initial program 94.4%
Taylor expanded in x around inf
lower-/.f6492.1
Applied rewrites92.1%
if -100 < (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y)))) < 5.0000000000000004e-19Initial program 99.9%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f6459.6
Applied rewrites59.6%
Taylor expanded in x around 0
Applied rewrites58.1%
Final simplification83.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (/ -1.0 x) x))
(t_1 (- x (/ y (- (* y x) (* 1.1283791670955126 (exp z)))))))
(if (<= t_1 -100.0)
t_0
(if (<= t_1 5e-19) (+ (* 0.8862269254527579 y) x) t_0))))
double code(double x, double y, double z) {
double t_0 = (-1.0 / x) + x;
double t_1 = x - (y / ((y * x) - (1.1283791670955126 * exp(z))));
double tmp;
if (t_1 <= -100.0) {
tmp = t_0;
} else if (t_1 <= 5e-19) {
tmp = (0.8862269254527579 * y) + x;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = ((-1.0d0) / x) + x
t_1 = x - (y / ((y * x) - (1.1283791670955126d0 * exp(z))))
if (t_1 <= (-100.0d0)) then
tmp = t_0
else if (t_1 <= 5d-19) then
tmp = (0.8862269254527579d0 * y) + x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (-1.0 / x) + x;
double t_1 = x - (y / ((y * x) - (1.1283791670955126 * Math.exp(z))));
double tmp;
if (t_1 <= -100.0) {
tmp = t_0;
} else if (t_1 <= 5e-19) {
tmp = (0.8862269254527579 * y) + x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (-1.0 / x) + x t_1 = x - (y / ((y * x) - (1.1283791670955126 * math.exp(z)))) tmp = 0 if t_1 <= -100.0: tmp = t_0 elif t_1 <= 5e-19: tmp = (0.8862269254527579 * y) + x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(-1.0 / x) + x) t_1 = Float64(x - Float64(y / Float64(Float64(y * x) - Float64(1.1283791670955126 * exp(z))))) tmp = 0.0 if (t_1 <= -100.0) tmp = t_0; elseif (t_1 <= 5e-19) tmp = Float64(Float64(0.8862269254527579 * y) + x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (-1.0 / x) + x; t_1 = x - (y / ((y * x) - (1.1283791670955126 * exp(z)))); tmp = 0.0; if (t_1 <= -100.0) tmp = t_0; elseif (t_1 <= 5e-19) tmp = (0.8862269254527579 * y) + x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$1 = N[(x - N[(y / N[(N[(y * x), $MachinePrecision] - N[(1.1283791670955126 * N[Exp[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -100.0], t$95$0, If[LessEqual[t$95$1, 5e-19], N[(N[(0.8862269254527579 * y), $MachinePrecision] + x), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-1}{x} + x\\
t_1 := x - \frac{y}{y \cdot x - 1.1283791670955126 \cdot e^{z}}\\
\mathbf{if}\;t\_1 \leq -100:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-19}:\\
\;\;\;\;0.8862269254527579 \cdot y + x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y)))) < -100 or 5.0000000000000004e-19 < (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y)))) Initial program 94.4%
Taylor expanded in x around inf
lower-/.f6492.1
Applied rewrites92.1%
if -100 < (+.f64 x (/.f64 y (-.f64 (*.f64 #s(literal 5641895835477563/5000000000000000 binary64) (exp.f64 z)) (*.f64 x y)))) < 5.0000000000000004e-19Initial program 99.9%
Taylor expanded in z around 0
associate-*r/N/A
unpow2N/A
associate-/r*N/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites52.8%
Taylor expanded in x around 0
Applied rewrites51.3%
Taylor expanded in z around 0
Applied rewrites58.0%
Final simplification83.3%
(FPCore (x y z)
:precision binary64
(if (<= (exp z) 0.0)
(+ (/ -1.0 x) x)
(if (<= (exp z) 1.2)
(- x (/ y (fma x y -1.1283791670955126)))
(- x (/ y (- (* y x) (* 1.1283791670955126 z)))))))
double code(double x, double y, double z) {
double tmp;
if (exp(z) <= 0.0) {
tmp = (-1.0 / x) + x;
} else if (exp(z) <= 1.2) {
tmp = x - (y / fma(x, y, -1.1283791670955126));
} else {
tmp = x - (y / ((y * x) - (1.1283791670955126 * z)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (exp(z) <= 0.0) tmp = Float64(Float64(-1.0 / x) + x); elseif (exp(z) <= 1.2) tmp = Float64(x - Float64(y / fma(x, y, -1.1283791670955126))); else tmp = Float64(x - Float64(y / Float64(Float64(y * x) - Float64(1.1283791670955126 * z)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[N[Exp[z], $MachinePrecision], 1.2], N[(x - N[(y / N[(x * y + -1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(N[(y * x), $MachinePrecision] - N[(1.1283791670955126 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{z} \leq 0:\\
\;\;\;\;\frac{-1}{x} + x\\
\mathbf{elif}\;e^{z} \leq 1.2:\\
\;\;\;\;x - \frac{y}{\mathsf{fma}\left(x, y, -1.1283791670955126\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{y \cdot x - 1.1283791670955126 \cdot z}\\
\end{array}
\end{array}
if (exp.f64 z) < 0.0Initial program 89.2%
Taylor expanded in x around inf
lower-/.f64100.0
Applied rewrites100.0%
if 0.0 < (exp.f64 z) < 1.19999999999999996Initial program 99.9%
lift-/.f64N/A
clear-numN/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lift--.f64N/A
sub-negN/A
distribute-neg-inN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
remove-double-negN/A
lower-fma.f64N/A
metadata-eval99.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.8
Applied rewrites99.8%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f6499.3
Applied rewrites99.3%
if 1.19999999999999996 < (exp.f64 z) Initial program 95.5%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6472.1
Applied rewrites72.1%
Taylor expanded in z around inf
Applied rewrites72.1%
Final simplification92.5%
(FPCore (x y z) :precision binary64 (if (<= (exp z) 0.0) (+ (/ -1.0 x) x) (- x (/ y (- (* y x) (* 1.1283791670955126 (exp z)))))))
double code(double x, double y, double z) {
double tmp;
if (exp(z) <= 0.0) {
tmp = (-1.0 / x) + x;
} else {
tmp = x - (y / ((y * x) - (1.1283791670955126 * exp(z))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (exp(z) <= 0.0d0) then
tmp = ((-1.0d0) / x) + x
else
tmp = x - (y / ((y * x) - (1.1283791670955126d0 * exp(z))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (Math.exp(z) <= 0.0) {
tmp = (-1.0 / x) + x;
} else {
tmp = x - (y / ((y * x) - (1.1283791670955126 * Math.exp(z))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if math.exp(z) <= 0.0: tmp = (-1.0 / x) + x else: tmp = x - (y / ((y * x) - (1.1283791670955126 * math.exp(z)))) return tmp
function code(x, y, z) tmp = 0.0 if (exp(z) <= 0.0) tmp = Float64(Float64(-1.0 / x) + x); else tmp = Float64(x - Float64(y / Float64(Float64(y * x) - Float64(1.1283791670955126 * exp(z))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (exp(z) <= 0.0) tmp = (-1.0 / x) + x; else tmp = x - (y / ((y * x) - (1.1283791670955126 * exp(z)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(y / N[(N[(y * x), $MachinePrecision] - N[(1.1283791670955126 * N[Exp[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{z} \leq 0:\\
\;\;\;\;\frac{-1}{x} + x\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{y \cdot x - 1.1283791670955126 \cdot e^{z}}\\
\end{array}
\end{array}
if (exp.f64 z) < 0.0Initial program 89.2%
Taylor expanded in x around inf
lower-/.f64100.0
Applied rewrites100.0%
if 0.0 < (exp.f64 z) Initial program 98.3%
Final simplification98.8%
(FPCore (x y z)
:precision binary64
(if (<= (exp z) 0.0)
(+ (/ -1.0 x) x)
(-
x
(/
y
(*
(+
(/
(fma
(fma
(fma z -0.18806319451591877 -0.5641895835477563)
z
-1.1283791670955126)
z
-1.1283791670955126)
x)
y)
x)))))
double code(double x, double y, double z) {
double tmp;
if (exp(z) <= 0.0) {
tmp = (-1.0 / x) + x;
} else {
tmp = x - (y / (((fma(fma(fma(z, -0.18806319451591877, -0.5641895835477563), z, -1.1283791670955126), z, -1.1283791670955126) / x) + y) * x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (exp(z) <= 0.0) tmp = Float64(Float64(-1.0 / x) + x); else tmp = Float64(x - Float64(y / Float64(Float64(Float64(fma(fma(fma(z, -0.18806319451591877, -0.5641895835477563), z, -1.1283791670955126), z, -1.1283791670955126) / x) + y) * x))); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(y / N[(N[(N[(N[(N[(N[(z * -0.18806319451591877 + -0.5641895835477563), $MachinePrecision] * z + -1.1283791670955126), $MachinePrecision] * z + -1.1283791670955126), $MachinePrecision] / x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{z} \leq 0:\\
\;\;\;\;\frac{-1}{x} + x\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\left(\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, -0.18806319451591877, -0.5641895835477563\right), z, -1.1283791670955126\right), z, -1.1283791670955126\right)}{x} + y\right) \cdot x}\\
\end{array}
\end{array}
if (exp.f64 z) < 0.0Initial program 89.2%
Taylor expanded in x around inf
lower-/.f64100.0
Applied rewrites100.0%
if 0.0 < (exp.f64 z) Initial program 98.3%
lift-/.f64N/A
clear-numN/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lift--.f64N/A
sub-negN/A
distribute-neg-inN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
remove-double-negN/A
lower-fma.f64N/A
metadata-eval98.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6498.3
Applied rewrites98.3%
Taylor expanded in z around 0
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f6493.4
Applied rewrites93.4%
Taylor expanded in x around inf
Applied rewrites96.7%
Applied rewrites96.7%
Final simplification97.6%
(FPCore (x y z)
:precision binary64
(if (<= (exp z) 0.0)
(+ (/ -1.0 x) x)
(-
x
(/
y
(fma
x
y
(fma
(fma
(fma -0.18806319451591877 z -0.5641895835477563)
z
-1.1283791670955126)
z
-1.1283791670955126))))))
double code(double x, double y, double z) {
double tmp;
if (exp(z) <= 0.0) {
tmp = (-1.0 / x) + x;
} else {
tmp = x - (y / fma(x, y, fma(fma(fma(-0.18806319451591877, z, -0.5641895835477563), z, -1.1283791670955126), z, -1.1283791670955126)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (exp(z) <= 0.0) tmp = Float64(Float64(-1.0 / x) + x); else tmp = Float64(x - Float64(y / fma(x, y, fma(fma(fma(-0.18806319451591877, z, -0.5641895835477563), z, -1.1283791670955126), z, -1.1283791670955126)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(y / N[(x * y + N[(N[(N[(-0.18806319451591877 * z + -0.5641895835477563), $MachinePrecision] * z + -1.1283791670955126), $MachinePrecision] * z + -1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{z} \leq 0:\\
\;\;\;\;\frac{-1}{x} + x\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\mathsf{fma}\left(x, y, \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.18806319451591877, z, -0.5641895835477563\right), z, -1.1283791670955126\right), z, -1.1283791670955126\right)\right)}\\
\end{array}
\end{array}
if (exp.f64 z) < 0.0Initial program 89.2%
Taylor expanded in x around inf
lower-/.f64100.0
Applied rewrites100.0%
if 0.0 < (exp.f64 z) Initial program 98.3%
lift-/.f64N/A
clear-numN/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lift--.f64N/A
sub-negN/A
distribute-neg-inN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
remove-double-negN/A
lower-fma.f64N/A
metadata-eval98.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6498.3
Applied rewrites98.3%
Taylor expanded in z around 0
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f6493.4
Applied rewrites93.4%
lift-+.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
clear-num-revN/A
cancel-sign-sub-invN/A
clear-num-revN/A
lift-/.f64N/A
Applied rewrites93.4%
Final simplification95.2%
(FPCore (x y z)
:precision binary64
(if (<= (exp z) 0.0)
(+ (/ -1.0 x) x)
(-
x
(/
y
(-
(* y x)
(fma
(fma 0.5641895835477563 z 1.1283791670955126)
z
1.1283791670955126))))))
double code(double x, double y, double z) {
double tmp;
if (exp(z) <= 0.0) {
tmp = (-1.0 / x) + x;
} else {
tmp = x - (y / ((y * x) - fma(fma(0.5641895835477563, z, 1.1283791670955126), z, 1.1283791670955126)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (exp(z) <= 0.0) tmp = Float64(Float64(-1.0 / x) + x); else tmp = Float64(x - Float64(y / Float64(Float64(y * x) - fma(fma(0.5641895835477563, z, 1.1283791670955126), z, 1.1283791670955126)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(y / N[(N[(y * x), $MachinePrecision] - N[(N[(0.5641895835477563 * z + 1.1283791670955126), $MachinePrecision] * z + 1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{z} \leq 0:\\
\;\;\;\;\frac{-1}{x} + x\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{y \cdot x - \mathsf{fma}\left(\mathsf{fma}\left(0.5641895835477563, z, 1.1283791670955126\right), z, 1.1283791670955126\right)}\\
\end{array}
\end{array}
if (exp.f64 z) < 0.0Initial program 89.2%
Taylor expanded in x around inf
lower-/.f64100.0
Applied rewrites100.0%
if 0.0 < (exp.f64 z) Initial program 98.3%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6491.6
Applied rewrites91.6%
Final simplification93.9%
(FPCore (x y z)
:precision binary64
(if (<= (exp z) 0.0)
(+ (/ -1.0 x) x)
(-
x
(/ y (- (* y x) (fma (* 0.5641895835477563 z) z 1.1283791670955126))))))
double code(double x, double y, double z) {
double tmp;
if (exp(z) <= 0.0) {
tmp = (-1.0 / x) + x;
} else {
tmp = x - (y / ((y * x) - fma((0.5641895835477563 * z), z, 1.1283791670955126)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (exp(z) <= 0.0) tmp = Float64(Float64(-1.0 / x) + x); else tmp = Float64(x - Float64(y / Float64(Float64(y * x) - fma(Float64(0.5641895835477563 * z), z, 1.1283791670955126)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 0.0], N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(y / N[(N[(y * x), $MachinePrecision] - N[(N[(0.5641895835477563 * z), $MachinePrecision] * z + 1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{z} \leq 0:\\
\;\;\;\;\frac{-1}{x} + x\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{y \cdot x - \mathsf{fma}\left(0.5641895835477563 \cdot z, z, 1.1283791670955126\right)}\\
\end{array}
\end{array}
if (exp.f64 z) < 0.0Initial program 89.2%
Taylor expanded in x around inf
lower-/.f64100.0
Applied rewrites100.0%
if 0.0 < (exp.f64 z) Initial program 98.3%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6491.6
Applied rewrites91.6%
Taylor expanded in z around inf
Applied rewrites91.3%
Final simplification93.7%
(FPCore (x y z)
:precision binary64
(if (<= z -17000000.0)
(+ (/ -1.0 x) x)
(if (<= z 1.25e+14)
(+ (/ (- y (* y z)) (fma (- x) y 1.1283791670955126)) x)
(-
x
(/
y
(fma
(fma
(fma z -0.18806319451591877 -0.5641895835477563)
z
-1.1283791670955126)
z
-1.1283791670955126))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -17000000.0) {
tmp = (-1.0 / x) + x;
} else if (z <= 1.25e+14) {
tmp = ((y - (y * z)) / fma(-x, y, 1.1283791670955126)) + x;
} else {
tmp = x - (y / fma(fma(fma(z, -0.18806319451591877, -0.5641895835477563), z, -1.1283791670955126), z, -1.1283791670955126));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -17000000.0) tmp = Float64(Float64(-1.0 / x) + x); elseif (z <= 1.25e+14) tmp = Float64(Float64(Float64(y - Float64(y * z)) / fma(Float64(-x), y, 1.1283791670955126)) + x); else tmp = Float64(x - Float64(y / fma(fma(fma(z, -0.18806319451591877, -0.5641895835477563), z, -1.1283791670955126), z, -1.1283791670955126))); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -17000000.0], N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.25e+14], N[(N[(N[(y - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[((-x) * y + 1.1283791670955126), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(y / N[(N[(N[(z * -0.18806319451591877 + -0.5641895835477563), $MachinePrecision] * z + -1.1283791670955126), $MachinePrecision] * z + -1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -17000000:\\
\;\;\;\;\frac{-1}{x} + x\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+14}:\\
\;\;\;\;\frac{y - y \cdot z}{\mathsf{fma}\left(-x, y, 1.1283791670955126\right)} + x\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, -0.18806319451591877, -0.5641895835477563\right), z, -1.1283791670955126\right), z, -1.1283791670955126\right)}\\
\end{array}
\end{array}
if z < -1.7e7Initial program 89.0%
Taylor expanded in x around inf
lower-/.f64100.0
Applied rewrites100.0%
if -1.7e7 < z < 1.25e14Initial program 99.1%
Taylor expanded in z around 0
associate-*r/N/A
unpow2N/A
associate-/r*N/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites99.1%
Taylor expanded in x around 0
Applied rewrites99.1%
if 1.25e14 < z Initial program 96.6%
lift-/.f64N/A
clear-numN/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lift--.f64N/A
sub-negN/A
distribute-neg-inN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
remove-double-negN/A
lower-fma.f64N/A
metadata-eval96.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6496.6
Applied rewrites96.6%
Taylor expanded in z around 0
associate--l+N/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f6480.7
Applied rewrites80.7%
Taylor expanded in x around 0
Applied rewrites80.8%
lift-+.f64N/A
lift-/.f64N/A
div-invN/A
lift-/.f64N/A
clear-num-revN/A
Applied rewrites80.8%
Final simplification95.2%
(FPCore (x y z)
:precision binary64
(if (<= z -17000000.0)
(+ (/ -1.0 x) x)
(if (<= z 0.37)
(+ (/ -1.0 (- x (/ 1.1283791670955126 y))) x)
(- x (/ y (- (* y x) (* 1.1283791670955126 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -17000000.0) {
tmp = (-1.0 / x) + x;
} else if (z <= 0.37) {
tmp = (-1.0 / (x - (1.1283791670955126 / y))) + x;
} else {
tmp = x - (y / ((y * x) - (1.1283791670955126 * z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-17000000.0d0)) then
tmp = ((-1.0d0) / x) + x
else if (z <= 0.37d0) then
tmp = ((-1.0d0) / (x - (1.1283791670955126d0 / y))) + x
else
tmp = x - (y / ((y * x) - (1.1283791670955126d0 * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -17000000.0) {
tmp = (-1.0 / x) + x;
} else if (z <= 0.37) {
tmp = (-1.0 / (x - (1.1283791670955126 / y))) + x;
} else {
tmp = x - (y / ((y * x) - (1.1283791670955126 * z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -17000000.0: tmp = (-1.0 / x) + x elif z <= 0.37: tmp = (-1.0 / (x - (1.1283791670955126 / y))) + x else: tmp = x - (y / ((y * x) - (1.1283791670955126 * z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -17000000.0) tmp = Float64(Float64(-1.0 / x) + x); elseif (z <= 0.37) tmp = Float64(Float64(-1.0 / Float64(x - Float64(1.1283791670955126 / y))) + x); else tmp = Float64(x - Float64(y / Float64(Float64(y * x) - Float64(1.1283791670955126 * z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -17000000.0) tmp = (-1.0 / x) + x; elseif (z <= 0.37) tmp = (-1.0 / (x - (1.1283791670955126 / y))) + x; else tmp = x - (y / ((y * x) - (1.1283791670955126 * z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -17000000.0], N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 0.37], N[(N[(-1.0 / N[(x - N[(1.1283791670955126 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(y / N[(N[(y * x), $MachinePrecision] - N[(1.1283791670955126 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -17000000:\\
\;\;\;\;\frac{-1}{x} + x\\
\mathbf{elif}\;z \leq 0.37:\\
\;\;\;\;\frac{-1}{x - \frac{1.1283791670955126}{y}} + x\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{y \cdot x - 1.1283791670955126 \cdot z}\\
\end{array}
\end{array}
if z < -1.7e7Initial program 89.0%
Taylor expanded in x around inf
lower-/.f64100.0
Applied rewrites100.0%
if -1.7e7 < z < 0.37Initial program 99.9%
lift-/.f64N/A
clear-numN/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lift--.f64N/A
sub-negN/A
distribute-neg-inN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
remove-double-negN/A
lower-fma.f64N/A
metadata-eval99.8
lift-*.f64N/A
*-commutativeN/A
lower-*.f6499.8
Applied rewrites99.8%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6499.9
Applied rewrites99.9%
Taylor expanded in z around 0
Applied rewrites99.4%
if 0.37 < z Initial program 95.5%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6472.1
Applied rewrites72.1%
Taylor expanded in z around inf
Applied rewrites72.1%
Final simplification92.5%
(FPCore (x y z) :precision binary64 (if (<= z -17000000.0) (+ (/ -1.0 x) x) (- x (/ y (- (* y x) (fma 1.1283791670955126 z 1.1283791670955126))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -17000000.0) {
tmp = (-1.0 / x) + x;
} else {
tmp = x - (y / ((y * x) - fma(1.1283791670955126, z, 1.1283791670955126)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -17000000.0) tmp = Float64(Float64(-1.0 / x) + x); else tmp = Float64(x - Float64(y / Float64(Float64(y * x) - fma(1.1283791670955126, z, 1.1283791670955126)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -17000000.0], N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(y / N[(N[(y * x), $MachinePrecision] - N[(1.1283791670955126 * z + 1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -17000000:\\
\;\;\;\;\frac{-1}{x} + x\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{y \cdot x - \mathsf{fma}\left(1.1283791670955126, z, 1.1283791670955126\right)}\\
\end{array}
\end{array}
if z < -1.7e7Initial program 89.0%
Taylor expanded in x around inf
lower-/.f64100.0
Applied rewrites100.0%
if -1.7e7 < z Initial program 98.3%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6490.0
Applied rewrites90.0%
Final simplification92.7%
(FPCore (x y z) :precision binary64 (if (<= z -17000000.0) (+ (/ -1.0 x) x) (- x (/ y (fma x y -1.1283791670955126)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -17000000.0) {
tmp = (-1.0 / x) + x;
} else {
tmp = x - (y / fma(x, y, -1.1283791670955126));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -17000000.0) tmp = Float64(Float64(-1.0 / x) + x); else tmp = Float64(x - Float64(y / fma(x, y, -1.1283791670955126))); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -17000000.0], N[(N[(-1.0 / x), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(y / N[(x * y + -1.1283791670955126), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -17000000:\\
\;\;\;\;\frac{-1}{x} + x\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\mathsf{fma}\left(x, y, -1.1283791670955126\right)}\\
\end{array}
\end{array}
if z < -1.7e7Initial program 89.0%
Taylor expanded in x around inf
lower-/.f64100.0
Applied rewrites100.0%
if -1.7e7 < z Initial program 98.3%
lift-/.f64N/A
clear-numN/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
lift--.f64N/A
sub-negN/A
distribute-neg-inN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
remove-double-negN/A
lower-fma.f64N/A
metadata-eval98.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6498.3
Applied rewrites98.3%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f6485.6
Applied rewrites85.6%
Final simplification89.5%
(FPCore (x y z) :precision binary64 (+ (* 0.8862269254527579 y) x))
double code(double x, double y, double z) {
return (0.8862269254527579 * y) + x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (0.8862269254527579d0 * y) + x
end function
public static double code(double x, double y, double z) {
return (0.8862269254527579 * y) + x;
}
def code(x, y, z): return (0.8862269254527579 * y) + x
function code(x, y, z) return Float64(Float64(0.8862269254527579 * y) + x) end
function tmp = code(x, y, z) tmp = (0.8862269254527579 * y) + x; end
code[x_, y_, z_] := N[(N[(0.8862269254527579 * y), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
0.8862269254527579 \cdot y + x
\end{array}
Initial program 95.8%
Taylor expanded in z around 0
associate-*r/N/A
unpow2N/A
associate-/r*N/A
div-add-revN/A
lower-/.f64N/A
Applied rewrites66.1%
Taylor expanded in x around 0
Applied rewrites46.7%
Taylor expanded in z around 0
Applied rewrites53.1%
Final simplification53.1%
(FPCore (x y z) :precision binary64 (+ x (/ 1.0 (- (* (/ 1.1283791670955126 y) (exp z)) x))))
double code(double x, double y, double z) {
return x + (1.0 / (((1.1283791670955126 / y) * exp(z)) - x));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (1.0d0 / (((1.1283791670955126d0 / y) * exp(z)) - x))
end function
public static double code(double x, double y, double z) {
return x + (1.0 / (((1.1283791670955126 / y) * Math.exp(z)) - x));
}
def code(x, y, z): return x + (1.0 / (((1.1283791670955126 / y) * math.exp(z)) - x))
function code(x, y, z) return Float64(x + Float64(1.0 / Float64(Float64(Float64(1.1283791670955126 / y) * exp(z)) - x))) end
function tmp = code(x, y, z) tmp = x + (1.0 / (((1.1283791670955126 / y) * exp(z)) - x)); end
code[x_, y_, z_] := N[(x + N[(1.0 / N[(N[(N[(1.1283791670955126 / y), $MachinePrecision] * N[Exp[z], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{1}{\frac{1.1283791670955126}{y} \cdot e^{z} - x}
\end{array}
herbie shell --seed 2024298
(FPCore (x y z)
:name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (+ x (/ 1 (- (* (/ 5641895835477563/5000000000000000 y) (exp z)) x))))
(+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))