
(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 12 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 (+ x (/ -1.0 (fma (exp z) (/ -1.1283791670955126 y) x))))
double code(double x, double y, double z) {
return x + (-1.0 / fma(exp(z), (-1.1283791670955126 / y), x));
}
function code(x, y, z) return Float64(x + Float64(-1.0 / fma(exp(z), Float64(-1.1283791670955126 / y), x))) end
code[x_, y_, z_] := N[(x + N[(-1.0 / N[(N[Exp[z], $MachinePrecision] * N[(-1.1283791670955126 / y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{-1}{\mathsf{fma}\left(e^{z}, \frac{-1.1283791670955126}{y}, x\right)}
\end{array}
Initial program 97.2%
*-lft-identity97.2%
metadata-eval97.2%
times-frac97.2%
neg-mul-197.2%
sub0-neg97.2%
associate-+l-97.2%
neg-sub097.3%
+-commutative97.3%
sub-neg97.3%
associate-/l*97.3%
div-sub97.2%
associate-*r/99.9%
*-inverses99.9%
*-rgt-identity99.9%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (let* ((t_0 (+ x (/ y (- (* (exp z) 1.1283791670955126) (* x y)))))) (if (<= t_0 1e+193) t_0 (+ x (/ -1.0 x)))))
double code(double x, double y, double z) {
double t_0 = x + (y / ((exp(z) * 1.1283791670955126) - (x * y)));
double tmp;
if (t_0 <= 1e+193) {
tmp = t_0;
} else {
tmp = x + (-1.0 / x);
}
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) :: tmp
t_0 = x + (y / ((exp(z) * 1.1283791670955126d0) - (x * y)))
if (t_0 <= 1d+193) then
tmp = t_0
else
tmp = x + ((-1.0d0) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (y / ((Math.exp(z) * 1.1283791670955126) - (x * y)));
double tmp;
if (t_0 <= 1e+193) {
tmp = t_0;
} else {
tmp = x + (-1.0 / x);
}
return tmp;
}
def code(x, y, z): t_0 = x + (y / ((math.exp(z) * 1.1283791670955126) - (x * y))) tmp = 0 if t_0 <= 1e+193: tmp = t_0 else: tmp = x + (-1.0 / x) return tmp
function code(x, y, z) t_0 = Float64(x + Float64(y / Float64(Float64(exp(z) * 1.1283791670955126) - Float64(x * y)))) tmp = 0.0 if (t_0 <= 1e+193) tmp = t_0; else tmp = Float64(x + Float64(-1.0 / x)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (y / ((exp(z) * 1.1283791670955126) - (x * y))); tmp = 0.0; if (t_0 <= 1e+193) tmp = t_0; else tmp = x + (-1.0 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y / N[(N[(N[Exp[z], $MachinePrecision] * 1.1283791670955126), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 1e+193], t$95$0, N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \frac{y}{e^{z} \cdot 1.1283791670955126 - x \cdot y}\\
\mathbf{if}\;t_0 \leq 10^{+193}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-1}{x}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 y (-.f64 (*.f64 5641895835477563/5000000000000000 (exp.f64 z)) (*.f64 x y)))) < 1.00000000000000007e193Initial program 99.4%
if 1.00000000000000007e193 < (+.f64 x (/.f64 y (-.f64 (*.f64 5641895835477563/5000000000000000 (exp.f64 z)) (*.f64 x y)))) Initial program 85.1%
*-lft-identity85.1%
metadata-eval85.1%
times-frac85.1%
neg-mul-185.1%
sub0-neg85.2%
associate-+l-85.2%
neg-sub085.4%
+-commutative85.4%
sub-neg85.4%
associate-/l*85.5%
div-sub85.5%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
Final simplification99.5%
(FPCore (x y z)
:precision binary64
(if (<= (exp z) 4e-47)
(+ x (/ -1.0 x))
(if (<= (exp z) 2.0)
(+ x (/ y (- (+ 1.1283791670955126 (* z 1.1283791670955126)) (* x y))))
x)))
double code(double x, double y, double z) {
double tmp;
if (exp(z) <= 4e-47) {
tmp = x + (-1.0 / x);
} else if (exp(z) <= 2.0) {
tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y)));
} else {
tmp = x;
}
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) <= 4d-47) then
tmp = x + ((-1.0d0) / x)
else if (exp(z) <= 2.0d0) then
tmp = x + (y / ((1.1283791670955126d0 + (z * 1.1283791670955126d0)) - (x * y)))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (Math.exp(z) <= 4e-47) {
tmp = x + (-1.0 / x);
} else if (Math.exp(z) <= 2.0) {
tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y)));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if math.exp(z) <= 4e-47: tmp = x + (-1.0 / x) elif math.exp(z) <= 2.0: tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y))) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (exp(z) <= 4e-47) tmp = Float64(x + Float64(-1.0 / x)); elseif (exp(z) <= 2.0) tmp = Float64(x + Float64(y / Float64(Float64(1.1283791670955126 + Float64(z * 1.1283791670955126)) - Float64(x * y)))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (exp(z) <= 4e-47) tmp = x + (-1.0 / x); elseif (exp(z) <= 2.0) tmp = x + (y / ((1.1283791670955126 + (z * 1.1283791670955126)) - (x * y))); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[Exp[z], $MachinePrecision], 4e-47], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Exp[z], $MachinePrecision], 2.0], N[(x + N[(y / N[(N[(1.1283791670955126 + N[(z * 1.1283791670955126), $MachinePrecision]), $MachinePrecision] - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{z} \leq 4 \cdot 10^{-47}:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;e^{z} \leq 2:\\
\;\;\;\;x + \frac{y}{\left(1.1283791670955126 + z \cdot 1.1283791670955126\right) - x \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if (exp.f64 z) < 3.9999999999999999e-47Initial program 94.3%
*-lft-identity94.3%
metadata-eval94.3%
times-frac94.3%
neg-mul-194.3%
sub0-neg94.4%
associate-+l-94.4%
neg-sub094.5%
+-commutative94.5%
sub-neg94.5%
associate-/l*94.6%
div-sub94.5%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if 3.9999999999999999e-47 < (exp.f64 z) < 2Initial program 99.8%
Taylor expanded in z around 0 99.8%
if 2 < (exp.f64 z) Initial program 94.4%
*-lft-identity94.4%
metadata-eval94.4%
times-frac94.4%
neg-mul-194.4%
sub0-neg94.4%
associate-+l-94.4%
neg-sub094.4%
+-commutative94.4%
sub-neg94.4%
associate-/l*94.4%
div-sub94.4%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
Final simplification99.9%
(FPCore (x y z) :precision binary64 (if (<= z -92.0) (+ x (/ -1.0 x)) (if (<= z 165.0) (+ x (/ -1.0 (+ x (* 1.1283791670955126 (/ -1.0 y))))) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -92.0) {
tmp = x + (-1.0 / x);
} else if (z <= 165.0) {
tmp = x + (-1.0 / (x + (1.1283791670955126 * (-1.0 / y))));
} else {
tmp = x;
}
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 <= (-92.0d0)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 165.0d0) then
tmp = x + ((-1.0d0) / (x + (1.1283791670955126d0 * ((-1.0d0) / y))))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -92.0) {
tmp = x + (-1.0 / x);
} else if (z <= 165.0) {
tmp = x + (-1.0 / (x + (1.1283791670955126 * (-1.0 / y))));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -92.0: tmp = x + (-1.0 / x) elif z <= 165.0: tmp = x + (-1.0 / (x + (1.1283791670955126 * (-1.0 / y)))) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -92.0) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 165.0) tmp = Float64(x + Float64(-1.0 / Float64(x + Float64(1.1283791670955126 * Float64(-1.0 / y))))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -92.0) tmp = x + (-1.0 / x); elseif (z <= 165.0) tmp = x + (-1.0 / (x + (1.1283791670955126 * (-1.0 / y)))); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -92.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 165.0], N[(x + N[(-1.0 / N[(x + N[(1.1283791670955126 * N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -92:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 165:\\
\;\;\;\;x + \frac{-1}{x + 1.1283791670955126 \cdot \frac{-1}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -92Initial program 94.3%
*-lft-identity94.3%
metadata-eval94.3%
times-frac94.3%
neg-mul-194.3%
sub0-neg94.4%
associate-+l-94.4%
neg-sub094.5%
+-commutative94.5%
sub-neg94.5%
associate-/l*94.6%
div-sub94.5%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if -92 < z < 165Initial program 99.8%
*-lft-identity99.8%
metadata-eval99.8%
times-frac99.8%
neg-mul-199.8%
sub0-neg99.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
sub-neg99.8%
associate-/l*99.8%
div-sub99.8%
associate-*r/99.9%
*-inverses99.9%
*-rgt-identity99.9%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
Simplified99.9%
Taylor expanded in z around 0 99.7%
if 165 < z Initial program 94.4%
*-lft-identity94.4%
metadata-eval94.4%
times-frac94.4%
neg-mul-194.4%
sub0-neg94.4%
associate-+l-94.4%
neg-sub094.4%
+-commutative94.4%
sub-neg94.4%
associate-/l*94.4%
div-sub94.4%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(if (<= z -1.3e+170)
(/ -1.0 x)
(if (<= z -2.8e+57)
x
(if (<= z -67000000000.0)
(/ -1.0 x)
(if (<= z 1.8e-82) (- x (* y -0.8862269254527579)) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.3e+170) {
tmp = -1.0 / x;
} else if (z <= -2.8e+57) {
tmp = x;
} else if (z <= -67000000000.0) {
tmp = -1.0 / x;
} else if (z <= 1.8e-82) {
tmp = x - (y * -0.8862269254527579);
} else {
tmp = x;
}
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 <= (-1.3d+170)) then
tmp = (-1.0d0) / x
else if (z <= (-2.8d+57)) then
tmp = x
else if (z <= (-67000000000.0d0)) then
tmp = (-1.0d0) / x
else if (z <= 1.8d-82) then
tmp = x - (y * (-0.8862269254527579d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.3e+170) {
tmp = -1.0 / x;
} else if (z <= -2.8e+57) {
tmp = x;
} else if (z <= -67000000000.0) {
tmp = -1.0 / x;
} else if (z <= 1.8e-82) {
tmp = x - (y * -0.8862269254527579);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.3e+170: tmp = -1.0 / x elif z <= -2.8e+57: tmp = x elif z <= -67000000000.0: tmp = -1.0 / x elif z <= 1.8e-82: tmp = x - (y * -0.8862269254527579) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.3e+170) tmp = Float64(-1.0 / x); elseif (z <= -2.8e+57) tmp = x; elseif (z <= -67000000000.0) tmp = Float64(-1.0 / x); elseif (z <= 1.8e-82) tmp = Float64(x - Float64(y * -0.8862269254527579)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.3e+170) tmp = -1.0 / x; elseif (z <= -2.8e+57) tmp = x; elseif (z <= -67000000000.0) tmp = -1.0 / x; elseif (z <= 1.8e-82) tmp = x - (y * -0.8862269254527579); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.3e+170], N[(-1.0 / x), $MachinePrecision], If[LessEqual[z, -2.8e+57], x, If[LessEqual[z, -67000000000.0], N[(-1.0 / x), $MachinePrecision], If[LessEqual[z, 1.8e-82], N[(x - N[(y * -0.8862269254527579), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+170}:\\
\;\;\;\;\frac{-1}{x}\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -67000000000:\\
\;\;\;\;\frac{-1}{x}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-82}:\\
\;\;\;\;x - y \cdot -0.8862269254527579\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.2999999999999999e170 or -2.8e57 < z < -6.7e10Initial program 99.9%
*-lft-identity99.9%
metadata-eval99.9%
times-frac99.9%
neg-mul-199.9%
sub0-neg99.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
sub-neg99.9%
associate-/l*99.9%
div-sub99.9%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
Taylor expanded in x around 0 61.5%
if -1.2999999999999999e170 < z < -2.8e57 or 1.79999999999999999e-82 < z Initial program 92.8%
*-lft-identity92.8%
metadata-eval92.8%
times-frac92.8%
neg-mul-192.8%
sub0-neg92.9%
associate-+l-92.9%
neg-sub093.0%
+-commutative93.0%
sub-neg93.0%
associate-/l*93.0%
div-sub93.0%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 85.8%
if -6.7e10 < z < 1.79999999999999999e-82Initial program 99.9%
*-lft-identity99.9%
metadata-eval99.9%
times-frac99.9%
neg-mul-199.9%
sub0-neg99.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
sub-neg99.9%
associate-/l*99.9%
div-sub99.8%
associate-*r/99.8%
*-inverses99.8%
*-rgt-identity99.8%
associate-*l/99.8%
cancel-sign-sub-inv99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
associate-*l/99.8%
distribute-rgt-neg-in99.8%
Simplified99.8%
Taylor expanded in z around 0 99.2%
Taylor expanded in x around 0 75.2%
*-commutative75.2%
Simplified75.2%
Final simplification77.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (/ -1.0 x))) (t_1 (- x (* y -0.8862269254527579))))
(if (<= z -1.65e-38)
t_0
(if (<= z 1.95e-237)
t_1
(if (<= z 4.5e-124) t_0 (if (<= z 1.9e-81) t_1 x))))))
double code(double x, double y, double z) {
double t_0 = x + (-1.0 / x);
double t_1 = x - (y * -0.8862269254527579);
double tmp;
if (z <= -1.65e-38) {
tmp = t_0;
} else if (z <= 1.95e-237) {
tmp = t_1;
} else if (z <= 4.5e-124) {
tmp = t_0;
} else if (z <= 1.9e-81) {
tmp = t_1;
} else {
tmp = x;
}
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 = x + ((-1.0d0) / x)
t_1 = x - (y * (-0.8862269254527579d0))
if (z <= (-1.65d-38)) then
tmp = t_0
else if (z <= 1.95d-237) then
tmp = t_1
else if (z <= 4.5d-124) then
tmp = t_0
else if (z <= 1.9d-81) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (-1.0 / x);
double t_1 = x - (y * -0.8862269254527579);
double tmp;
if (z <= -1.65e-38) {
tmp = t_0;
} else if (z <= 1.95e-237) {
tmp = t_1;
} else if (z <= 4.5e-124) {
tmp = t_0;
} else if (z <= 1.9e-81) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): t_0 = x + (-1.0 / x) t_1 = x - (y * -0.8862269254527579) tmp = 0 if z <= -1.65e-38: tmp = t_0 elif z <= 1.95e-237: tmp = t_1 elif z <= 4.5e-124: tmp = t_0 elif z <= 1.9e-81: tmp = t_1 else: tmp = x return tmp
function code(x, y, z) t_0 = Float64(x + Float64(-1.0 / x)) t_1 = Float64(x - Float64(y * -0.8862269254527579)) tmp = 0.0 if (z <= -1.65e-38) tmp = t_0; elseif (z <= 1.95e-237) tmp = t_1; elseif (z <= 4.5e-124) tmp = t_0; elseif (z <= 1.9e-81) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (-1.0 / x); t_1 = x - (y * -0.8862269254527579); tmp = 0.0; if (z <= -1.65e-38) tmp = t_0; elseif (z <= 1.95e-237) tmp = t_1; elseif (z <= 4.5e-124) tmp = t_0; elseif (z <= 1.9e-81) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x - N[(y * -0.8862269254527579), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e-38], t$95$0, If[LessEqual[z, 1.95e-237], t$95$1, If[LessEqual[z, 4.5e-124], t$95$0, If[LessEqual[z, 1.9e-81], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \frac{-1}{x}\\
t_1 := x - y \cdot -0.8862269254527579\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{-38}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-124}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-81}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.6500000000000001e-38 or 1.9499999999999999e-237 < z < 4.4999999999999996e-124Initial program 95.9%
*-lft-identity95.9%
metadata-eval95.9%
times-frac95.9%
neg-mul-195.9%
sub0-neg96.0%
associate-+l-96.0%
neg-sub096.0%
+-commutative96.0%
sub-neg96.0%
associate-/l*96.2%
div-sub96.1%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 94.1%
if -1.6500000000000001e-38 < z < 1.9499999999999999e-237 or 4.4999999999999996e-124 < z < 1.8999999999999999e-81Initial program 99.9%
*-lft-identity99.9%
metadata-eval99.9%
times-frac99.9%
neg-mul-199.9%
sub0-neg99.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
sub-neg99.9%
associate-/l*99.8%
div-sub99.8%
associate-*r/99.8%
*-inverses99.8%
*-rgt-identity99.8%
associate-*l/99.8%
cancel-sign-sub-inv99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
associate-*l/99.8%
distribute-rgt-neg-in99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 82.0%
*-commutative82.0%
Simplified82.0%
if 1.8999999999999999e-81 < z Initial program 95.7%
*-lft-identity95.7%
metadata-eval95.7%
times-frac95.7%
neg-mul-195.7%
sub0-neg95.7%
associate-+l-95.7%
neg-sub095.7%
+-commutative95.7%
sub-neg95.7%
associate-/l*95.7%
div-sub95.7%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 94.5%
Final simplification90.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (/ -1.0 x))))
(if (<= z -2.6e-37)
t_0
(if (<= z 7.2e-233)
(- x (* y -0.8862269254527579))
(if (<= z 3.8e-124)
t_0
(if (<= z 2.6e-81) (- x (/ y -1.1283791670955126)) x))))))
double code(double x, double y, double z) {
double t_0 = x + (-1.0 / x);
double tmp;
if (z <= -2.6e-37) {
tmp = t_0;
} else if (z <= 7.2e-233) {
tmp = x - (y * -0.8862269254527579);
} else if (z <= 3.8e-124) {
tmp = t_0;
} else if (z <= 2.6e-81) {
tmp = x - (y / -1.1283791670955126);
} else {
tmp = x;
}
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) :: tmp
t_0 = x + ((-1.0d0) / x)
if (z <= (-2.6d-37)) then
tmp = t_0
else if (z <= 7.2d-233) then
tmp = x - (y * (-0.8862269254527579d0))
else if (z <= 3.8d-124) then
tmp = t_0
else if (z <= 2.6d-81) then
tmp = x - (y / (-1.1283791670955126d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (-1.0 / x);
double tmp;
if (z <= -2.6e-37) {
tmp = t_0;
} else if (z <= 7.2e-233) {
tmp = x - (y * -0.8862269254527579);
} else if (z <= 3.8e-124) {
tmp = t_0;
} else if (z <= 2.6e-81) {
tmp = x - (y / -1.1283791670955126);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): t_0 = x + (-1.0 / x) tmp = 0 if z <= -2.6e-37: tmp = t_0 elif z <= 7.2e-233: tmp = x - (y * -0.8862269254527579) elif z <= 3.8e-124: tmp = t_0 elif z <= 2.6e-81: tmp = x - (y / -1.1283791670955126) else: tmp = x return tmp
function code(x, y, z) t_0 = Float64(x + Float64(-1.0 / x)) tmp = 0.0 if (z <= -2.6e-37) tmp = t_0; elseif (z <= 7.2e-233) tmp = Float64(x - Float64(y * -0.8862269254527579)); elseif (z <= 3.8e-124) tmp = t_0; elseif (z <= 2.6e-81) tmp = Float64(x - Float64(y / -1.1283791670955126)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (-1.0 / x); tmp = 0.0; if (z <= -2.6e-37) tmp = t_0; elseif (z <= 7.2e-233) tmp = x - (y * -0.8862269254527579); elseif (z <= 3.8e-124) tmp = t_0; elseif (z <= 2.6e-81) tmp = x - (y / -1.1283791670955126); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e-37], t$95$0, If[LessEqual[z, 7.2e-233], N[(x - N[(y * -0.8862269254527579), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-124], t$95$0, If[LessEqual[z, 2.6e-81], N[(x - N[(y / -1.1283791670955126), $MachinePrecision]), $MachinePrecision], x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \frac{-1}{x}\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{-37}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-233}:\\
\;\;\;\;x - y \cdot -0.8862269254527579\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-124}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-81}:\\
\;\;\;\;x - \frac{y}{-1.1283791670955126}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.5999999999999998e-37 or 7.20000000000000014e-233 < z < 3.80000000000000012e-124Initial program 95.9%
*-lft-identity95.9%
metadata-eval95.9%
times-frac95.9%
neg-mul-195.9%
sub0-neg96.0%
associate-+l-96.0%
neg-sub096.0%
+-commutative96.0%
sub-neg96.0%
associate-/l*96.2%
div-sub96.1%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 94.1%
if -2.5999999999999998e-37 < z < 7.20000000000000014e-233Initial program 99.9%
*-lft-identity99.9%
metadata-eval99.9%
times-frac99.9%
neg-mul-199.9%
sub0-neg99.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
sub-neg99.9%
associate-/l*99.8%
div-sub99.8%
associate-*r/99.8%
*-inverses99.8%
*-rgt-identity99.8%
associate-*l/99.8%
cancel-sign-sub-inv99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
associate-*l/99.8%
distribute-rgt-neg-in99.8%
Simplified99.8%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 80.0%
*-commutative80.0%
Simplified80.0%
if 3.80000000000000012e-124 < z < 2.5999999999999999e-81Initial program 99.8%
*-lft-identity99.8%
metadata-eval99.8%
times-frac99.8%
neg-mul-199.8%
sub0-neg99.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
sub-neg99.8%
associate-/l*99.7%
div-sub99.5%
associate-*r/99.5%
*-inverses99.5%
*-rgt-identity99.5%
associate-*l/99.5%
cancel-sign-sub-inv99.5%
distribute-lft-neg-in99.5%
distribute-rgt-neg-in99.5%
associate-*l/99.5%
distribute-rgt-neg-in99.5%
Simplified99.5%
Taylor expanded in z around 0 99.5%
Taylor expanded in x around 0 99.0%
*-commutative99.0%
Simplified99.0%
metadata-eval99.0%
div-inv99.0%
Applied egg-rr99.0%
if 2.5999999999999999e-81 < z Initial program 95.7%
*-lft-identity95.7%
metadata-eval95.7%
times-frac95.7%
neg-mul-195.7%
sub0-neg95.7%
associate-+l-95.7%
neg-sub095.7%
+-commutative95.7%
sub-neg95.7%
associate-/l*95.7%
div-sub95.7%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 94.5%
Final simplification90.1%
(FPCore (x y z) :precision binary64 (if (<= z -52.0) (+ x (/ -1.0 x)) (if (<= z 180.0) (+ x (/ y (- 1.1283791670955126 (* x y)))) x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -52.0) {
tmp = x + (-1.0 / x);
} else if (z <= 180.0) {
tmp = x + (y / (1.1283791670955126 - (x * y)));
} else {
tmp = x;
}
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 <= (-52.0d0)) then
tmp = x + ((-1.0d0) / x)
else if (z <= 180.0d0) then
tmp = x + (y / (1.1283791670955126d0 - (x * y)))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -52.0) {
tmp = x + (-1.0 / x);
} else if (z <= 180.0) {
tmp = x + (y / (1.1283791670955126 - (x * y)));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -52.0: tmp = x + (-1.0 / x) elif z <= 180.0: tmp = x + (y / (1.1283791670955126 - (x * y))) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -52.0) tmp = Float64(x + Float64(-1.0 / x)); elseif (z <= 180.0) tmp = Float64(x + Float64(y / Float64(1.1283791670955126 - Float64(x * y)))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -52.0) tmp = x + (-1.0 / x); elseif (z <= 180.0) tmp = x + (y / (1.1283791670955126 - (x * y))); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -52.0], N[(x + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 180.0], N[(x + N[(y / N[(1.1283791670955126 - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -52:\\
\;\;\;\;x + \frac{-1}{x}\\
\mathbf{elif}\;z \leq 180:\\
\;\;\;\;x + \frac{y}{1.1283791670955126 - x \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -52Initial program 94.3%
*-lft-identity94.3%
metadata-eval94.3%
times-frac94.3%
neg-mul-194.3%
sub0-neg94.4%
associate-+l-94.4%
neg-sub094.5%
+-commutative94.5%
sub-neg94.5%
associate-/l*94.6%
div-sub94.5%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
if -52 < z < 180Initial program 99.8%
Taylor expanded in z around 0 99.7%
if 180 < z Initial program 94.4%
*-lft-identity94.4%
metadata-eval94.4%
times-frac94.4%
neg-mul-194.4%
sub0-neg94.4%
associate-+l-94.4%
neg-sub094.4%
+-commutative94.4%
sub-neg94.4%
associate-/l*94.4%
div-sub94.4%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(if (<= x -1.26e-18)
x
(if (<= x -7e-274)
(/ -1.0 x)
(if (<= x 1.8e-143) (- (/ y -1.1283791670955126)) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.26e-18) {
tmp = x;
} else if (x <= -7e-274) {
tmp = -1.0 / x;
} else if (x <= 1.8e-143) {
tmp = -(y / -1.1283791670955126);
} else {
tmp = x;
}
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 (x <= (-1.26d-18)) then
tmp = x
else if (x <= (-7d-274)) then
tmp = (-1.0d0) / x
else if (x <= 1.8d-143) then
tmp = -(y / (-1.1283791670955126d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.26e-18) {
tmp = x;
} else if (x <= -7e-274) {
tmp = -1.0 / x;
} else if (x <= 1.8e-143) {
tmp = -(y / -1.1283791670955126);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.26e-18: tmp = x elif x <= -7e-274: tmp = -1.0 / x elif x <= 1.8e-143: tmp = -(y / -1.1283791670955126) else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.26e-18) tmp = x; elseif (x <= -7e-274) tmp = Float64(-1.0 / x); elseif (x <= 1.8e-143) tmp = Float64(-Float64(y / -1.1283791670955126)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.26e-18) tmp = x; elseif (x <= -7e-274) tmp = -1.0 / x; elseif (x <= 1.8e-143) tmp = -(y / -1.1283791670955126); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.26e-18], x, If[LessEqual[x, -7e-274], N[(-1.0 / x), $MachinePrecision], If[LessEqual[x, 1.8e-143], (-N[(y / -1.1283791670955126), $MachinePrecision]), x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.26 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -7 \cdot 10^{-274}:\\
\;\;\;\;\frac{-1}{x}\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-143}:\\
\;\;\;\;-\frac{y}{-1.1283791670955126}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.26000000000000004e-18 or 1.7999999999999999e-143 < x Initial program 98.1%
*-lft-identity98.1%
metadata-eval98.1%
times-frac98.1%
neg-mul-198.1%
sub0-neg98.1%
associate-+l-98.1%
neg-sub098.1%
+-commutative98.1%
sub-neg98.1%
associate-/l*98.1%
div-sub98.1%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 90.0%
if -1.26000000000000004e-18 < x < -6.99999999999999963e-274Initial program 96.6%
*-lft-identity96.6%
metadata-eval96.6%
times-frac96.6%
neg-mul-196.6%
sub0-neg96.6%
associate-+l-96.6%
neg-sub096.7%
+-commutative96.7%
sub-neg96.7%
associate-/l*96.7%
div-sub96.6%
associate-*r/99.9%
*-inverses99.9%
*-rgt-identity99.9%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
Simplified99.9%
Taylor expanded in x around inf 51.1%
Taylor expanded in x around 0 51.1%
if -6.99999999999999963e-274 < x < 1.7999999999999999e-143Initial program 94.0%
*-lft-identity94.0%
metadata-eval94.0%
times-frac94.0%
neg-mul-194.0%
sub0-neg94.4%
associate-+l-94.4%
neg-sub094.4%
+-commutative94.4%
sub-neg94.4%
associate-/l*94.4%
div-sub94.4%
associate-*r/99.7%
*-inverses99.7%
*-rgt-identity99.7%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
associate-*l/99.7%
distribute-rgt-neg-in99.7%
Simplified99.7%
Taylor expanded in z around 0 57.5%
Taylor expanded in x around 0 55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in x around 0 52.5%
*-commutative52.5%
metadata-eval52.5%
distribute-rgt-neg-in52.5%
metadata-eval52.2%
div-inv52.5%
distribute-neg-frac52.5%
Applied egg-rr52.5%
Final simplification75.8%
(FPCore (x y z)
:precision binary64
(if (<= x -6e-20)
x
(if (<= x -3.7e-271)
(/ -1.0 x)
(if (<= x 2e-143) (* y 0.8862269254527579) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= -6e-20) {
tmp = x;
} else if (x <= -3.7e-271) {
tmp = -1.0 / x;
} else if (x <= 2e-143) {
tmp = y * 0.8862269254527579;
} else {
tmp = x;
}
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 (x <= (-6d-20)) then
tmp = x
else if (x <= (-3.7d-271)) then
tmp = (-1.0d0) / x
else if (x <= 2d-143) then
tmp = y * 0.8862269254527579d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -6e-20) {
tmp = x;
} else if (x <= -3.7e-271) {
tmp = -1.0 / x;
} else if (x <= 2e-143) {
tmp = y * 0.8862269254527579;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -6e-20: tmp = x elif x <= -3.7e-271: tmp = -1.0 / x elif x <= 2e-143: tmp = y * 0.8862269254527579 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -6e-20) tmp = x; elseif (x <= -3.7e-271) tmp = Float64(-1.0 / x); elseif (x <= 2e-143) tmp = Float64(y * 0.8862269254527579); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -6e-20) tmp = x; elseif (x <= -3.7e-271) tmp = -1.0 / x; elseif (x <= 2e-143) tmp = y * 0.8862269254527579; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -6e-20], x, If[LessEqual[x, -3.7e-271], N[(-1.0 / x), $MachinePrecision], If[LessEqual[x, 2e-143], N[(y * 0.8862269254527579), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -3.7 \cdot 10^{-271}:\\
\;\;\;\;\frac{-1}{x}\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-143}:\\
\;\;\;\;y \cdot 0.8862269254527579\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -6.00000000000000057e-20 or 1.9999999999999999e-143 < x Initial program 98.1%
*-lft-identity98.1%
metadata-eval98.1%
times-frac98.1%
neg-mul-198.1%
sub0-neg98.1%
associate-+l-98.1%
neg-sub098.1%
+-commutative98.1%
sub-neg98.1%
associate-/l*98.1%
div-sub98.1%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 90.0%
if -6.00000000000000057e-20 < x < -3.70000000000000022e-271Initial program 96.6%
*-lft-identity96.6%
metadata-eval96.6%
times-frac96.6%
neg-mul-196.6%
sub0-neg96.6%
associate-+l-96.6%
neg-sub096.7%
+-commutative96.7%
sub-neg96.7%
associate-/l*96.7%
div-sub96.6%
associate-*r/99.9%
*-inverses99.9%
*-rgt-identity99.9%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
Simplified99.9%
Taylor expanded in x around inf 51.1%
Taylor expanded in x around 0 51.1%
if -3.70000000000000022e-271 < x < 1.9999999999999999e-143Initial program 94.0%
*-lft-identity94.0%
metadata-eval94.0%
times-frac94.0%
neg-mul-194.0%
sub0-neg94.4%
associate-+l-94.4%
neg-sub094.4%
+-commutative94.4%
sub-neg94.4%
associate-/l*94.4%
div-sub94.4%
associate-*r/99.7%
*-inverses99.7%
*-rgt-identity99.7%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
associate-*l/99.7%
distribute-rgt-neg-in99.7%
Simplified99.7%
Taylor expanded in z around 0 57.5%
Taylor expanded in x around 0 55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in x around 0 52.5%
Final simplification75.8%
(FPCore (x y z) :precision binary64 (if (<= x -1.55e-171) x (if (<= x 7.5e-141) (* y 0.8862269254527579) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.55e-171) {
tmp = x;
} else if (x <= 7.5e-141) {
tmp = y * 0.8862269254527579;
} else {
tmp = x;
}
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 (x <= (-1.55d-171)) then
tmp = x
else if (x <= 7.5d-141) then
tmp = y * 0.8862269254527579d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.55e-171) {
tmp = x;
} else if (x <= 7.5e-141) {
tmp = y * 0.8862269254527579;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.55e-171: tmp = x elif x <= 7.5e-141: tmp = y * 0.8862269254527579 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.55e-171) tmp = x; elseif (x <= 7.5e-141) tmp = Float64(y * 0.8862269254527579); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.55e-171) tmp = x; elseif (x <= 7.5e-141) tmp = y * 0.8862269254527579; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.55e-171], x, If[LessEqual[x, 7.5e-141], N[(y * 0.8862269254527579), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{-171}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-141}:\\
\;\;\;\;y \cdot 0.8862269254527579\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.55e-171 or 7.50000000000000046e-141 < x Initial program 98.4%
*-lft-identity98.4%
metadata-eval98.4%
times-frac98.4%
neg-mul-198.4%
sub0-neg98.4%
associate-+l-98.4%
neg-sub098.4%
+-commutative98.4%
sub-neg98.4%
associate-/l*98.5%
div-sub98.5%
associate-*r/100.0%
*-inverses100.0%
*-rgt-identity100.0%
associate-*l/100.0%
cancel-sign-sub-inv100.0%
distribute-lft-neg-in100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in x around inf 78.6%
if -1.55e-171 < x < 7.50000000000000046e-141Initial program 92.6%
*-lft-identity92.6%
metadata-eval92.6%
times-frac92.6%
neg-mul-192.6%
sub0-neg92.8%
associate-+l-92.8%
neg-sub092.9%
+-commutative92.9%
sub-neg92.9%
associate-/l*92.9%
div-sub92.8%
associate-*r/99.7%
*-inverses99.7%
*-rgt-identity99.7%
associate-*l/99.7%
cancel-sign-sub-inv99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
associate-*l/99.7%
distribute-rgt-neg-in99.7%
Simplified99.7%
Taylor expanded in z around 0 57.0%
Taylor expanded in x around 0 46.6%
*-commutative46.6%
Simplified46.6%
Taylor expanded in x around 0 44.9%
Final simplification71.4%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return 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
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 97.2%
*-lft-identity97.2%
metadata-eval97.2%
times-frac97.2%
neg-mul-197.2%
sub0-neg97.2%
associate-+l-97.2%
neg-sub097.3%
+-commutative97.3%
sub-neg97.3%
associate-/l*97.3%
div-sub97.2%
associate-*r/99.9%
*-inverses99.9%
*-rgt-identity99.9%
associate-*l/99.9%
cancel-sign-sub-inv99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
Simplified99.9%
Taylor expanded in x around inf 66.8%
Final simplification66.8%
(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 2023178
(FPCore (x y z)
:name "Numeric.SpecFunctions:invErfc from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(+ x (/ 1.0 (- (* (/ 1.1283791670955126 y) (exp z)) x)))
(+ x (/ y (- (* 1.1283791670955126 (exp z)) (* x y)))))