
(FPCore (x y z) :precision binary64 (/ (* x (+ (- y z) 1.0)) z))
double code(double x, double y, double z) {
return (x * ((y - z) + 1.0)) / z;
}
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 - z) + 1.0d0)) / z
end function
public static double code(double x, double y, double z) {
return (x * ((y - z) + 1.0)) / z;
}
def code(x, y, z): return (x * ((y - z) + 1.0)) / z
function code(x, y, z) return Float64(Float64(x * Float64(Float64(y - z) + 1.0)) / z) end
function tmp = code(x, y, z) tmp = (x * ((y - z) + 1.0)) / z; end
code[x_, y_, z_] := N[(N[(x * N[(N[(y - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(\left(y - z\right) + 1\right)}{z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (* x (+ (- y z) 1.0)) z))
double code(double x, double y, double z) {
return (x * ((y - z) + 1.0)) / z;
}
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 - z) + 1.0d0)) / z
end function
public static double code(double x, double y, double z) {
return (x * ((y - z) + 1.0)) / z;
}
def code(x, y, z): return (x * ((y - z) + 1.0)) / z
function code(x, y, z) return Float64(Float64(x * Float64(Float64(y - z) + 1.0)) / z) end
function tmp = code(x, y, z) tmp = (x * ((y - z) + 1.0)) / z; end
code[x_, y_, z_] := N[(N[(x * N[(N[(y - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(\left(y - z\right) + 1\right)}{z}
\end{array}
(FPCore (x y z) :precision binary64 (if (or (<= z -2.2e-16) (not (<= z 5e-75))) (* x (+ (/ (+ y 1.0) z) -1.0)) (/ (+ x (* x y)) z)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2.2e-16) || !(z <= 5e-75)) {
tmp = x * (((y + 1.0) / z) + -1.0);
} else {
tmp = (x + (x * y)) / 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 <= (-2.2d-16)) .or. (.not. (z <= 5d-75))) then
tmp = x * (((y + 1.0d0) / z) + (-1.0d0))
else
tmp = (x + (x * y)) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2.2e-16) || !(z <= 5e-75)) {
tmp = x * (((y + 1.0) / z) + -1.0);
} else {
tmp = (x + (x * y)) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2.2e-16) or not (z <= 5e-75): tmp = x * (((y + 1.0) / z) + -1.0) else: tmp = (x + (x * y)) / z return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2.2e-16) || !(z <= 5e-75)) tmp = Float64(x * Float64(Float64(Float64(y + 1.0) / z) + -1.0)); else tmp = Float64(Float64(x + Float64(x * y)) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2.2e-16) || ~((z <= 5e-75))) tmp = x * (((y + 1.0) / z) + -1.0); else tmp = (x + (x * y)) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2.2e-16], N[Not[LessEqual[z, 5e-75]], $MachinePrecision]], N[(x * N[(N[(N[(y + 1.0), $MachinePrecision] / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(x * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{-16} \lor \neg \left(z \leq 5 \cdot 10^{-75}\right):\\
\;\;\;\;x \cdot \left(\frac{y + 1}{z} + -1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + x \cdot y}{z}\\
\end{array}
\end{array}
if z < -2.2e-16 or 4.99999999999999979e-75 < z Initial program 71.3%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.8%
*-inverses99.8%
sub-neg99.8%
+-commutative99.8%
metadata-eval99.8%
Simplified99.8%
if -2.2e-16 < z < 4.99999999999999979e-75Initial program 99.9%
distribute-lft-in100.0%
fma-define100.0%
*-rgt-identity100.0%
Simplified100.0%
Taylor expanded in z around 0 100.0%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (/ y z))))
(if (<= z -1.05e+117)
(- x)
(if (<= z -47000000000000.0)
t_0
(if (<= z 1.35e-264) (/ x z) (if (<= z 1.8e+21) t_0 (- x)))))))
double code(double x, double y, double z) {
double t_0 = x * (y / z);
double tmp;
if (z <= -1.05e+117) {
tmp = -x;
} else if (z <= -47000000000000.0) {
tmp = t_0;
} else if (z <= 1.35e-264) {
tmp = x / z;
} else if (z <= 1.8e+21) {
tmp = t_0;
} 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 * (y / z)
if (z <= (-1.05d+117)) then
tmp = -x
else if (z <= (-47000000000000.0d0)) then
tmp = t_0
else if (z <= 1.35d-264) then
tmp = x / z
else if (z <= 1.8d+21) then
tmp = t_0
else
tmp = -x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (y / z);
double tmp;
if (z <= -1.05e+117) {
tmp = -x;
} else if (z <= -47000000000000.0) {
tmp = t_0;
} else if (z <= 1.35e-264) {
tmp = x / z;
} else if (z <= 1.8e+21) {
tmp = t_0;
} else {
tmp = -x;
}
return tmp;
}
def code(x, y, z): t_0 = x * (y / z) tmp = 0 if z <= -1.05e+117: tmp = -x elif z <= -47000000000000.0: tmp = t_0 elif z <= 1.35e-264: tmp = x / z elif z <= 1.8e+21: tmp = t_0 else: tmp = -x return tmp
function code(x, y, z) t_0 = Float64(x * Float64(y / z)) tmp = 0.0 if (z <= -1.05e+117) tmp = Float64(-x); elseif (z <= -47000000000000.0) tmp = t_0; elseif (z <= 1.35e-264) tmp = Float64(x / z); elseif (z <= 1.8e+21) tmp = t_0; else tmp = Float64(-x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (y / z); tmp = 0.0; if (z <= -1.05e+117) tmp = -x; elseif (z <= -47000000000000.0) tmp = t_0; elseif (z <= 1.35e-264) tmp = x / z; elseif (z <= 1.8e+21) tmp = t_0; else tmp = -x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.05e+117], (-x), If[LessEqual[z, -47000000000000.0], t$95$0, If[LessEqual[z, 1.35e-264], N[(x / z), $MachinePrecision], If[LessEqual[z, 1.8e+21], t$95$0, (-x)]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+117}:\\
\;\;\;\;-x\\
\mathbf{elif}\;z \leq -47000000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-264}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+21}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;-x\\
\end{array}
\end{array}
if z < -1.0500000000000001e117 or 1.8e21 < z Initial program 61.0%
associate-/l*99.9%
+-commutative99.9%
associate-+r-99.9%
div-sub99.9%
*-inverses99.9%
sub-neg99.9%
+-commutative99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 84.4%
neg-mul-184.4%
Simplified84.4%
if -1.0500000000000001e117 < z < -4.7e13 or 1.34999999999999997e-264 < z < 1.8e21Initial program 95.0%
associate-/l*93.0%
+-commutative93.0%
associate-+r-93.0%
div-sub93.0%
*-inverses93.0%
sub-neg93.0%
+-commutative93.0%
metadata-eval93.0%
Simplified93.0%
Taylor expanded in y around inf 61.4%
associate-/l*57.6%
Simplified57.6%
if -4.7e13 < z < 1.34999999999999997e-264Initial program 100.0%
associate-/l*95.9%
+-commutative95.9%
associate-+r-95.9%
div-sub96.0%
*-inverses96.0%
sub-neg96.0%
+-commutative96.0%
metadata-eval96.0%
Simplified96.0%
Taylor expanded in y around 0 61.4%
sub-neg61.4%
metadata-eval61.4%
distribute-rgt-in61.4%
associate-*l/61.5%
*-lft-identity61.5%
neg-mul-161.5%
unsub-neg61.5%
Simplified61.5%
Taylor expanded in z around 0 57.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -0.81) (not (<= z 1.0))) (* x (+ -1.0 (/ y z))) (* (+ y 1.0) (/ x z))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -0.81) || !(z <= 1.0)) {
tmp = x * (-1.0 + (y / z));
} else {
tmp = (y + 1.0) * (x / 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 <= (-0.81d0)) .or. (.not. (z <= 1.0d0))) then
tmp = x * ((-1.0d0) + (y / z))
else
tmp = (y + 1.0d0) * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -0.81) || !(z <= 1.0)) {
tmp = x * (-1.0 + (y / z));
} else {
tmp = (y + 1.0) * (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -0.81) or not (z <= 1.0): tmp = x * (-1.0 + (y / z)) else: tmp = (y + 1.0) * (x / z) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -0.81) || !(z <= 1.0)) tmp = Float64(x * Float64(-1.0 + Float64(y / z))); else tmp = Float64(Float64(y + 1.0) * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -0.81) || ~((z <= 1.0))) tmp = x * (-1.0 + (y / z)); else tmp = (y + 1.0) * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -0.81], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(x * N[(-1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + 1.0), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.81 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \left(-1 + \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + 1\right) \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -0.81000000000000005 or 1 < z Initial program 68.0%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.8%
*-inverses99.8%
sub-neg99.8%
+-commutative99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.2%
if -0.81000000000000005 < z < 1Initial program 99.9%
distribute-lft-in99.9%
fma-define99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in z around 0 98.4%
*-un-lft-identity98.4%
*-commutative98.4%
distribute-rgt-out98.4%
+-commutative98.4%
associate-*l/98.3%
Applied egg-rr98.3%
Final simplification98.2%
(FPCore (x y z) :precision binary64 (if (or (<= y -23500000.0) (not (<= y 0.0052))) (* x (+ -1.0 (/ y z))) (- (/ x z) x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -23500000.0) || !(y <= 0.0052)) {
tmp = x * (-1.0 + (y / z));
} else {
tmp = (x / z) - 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 ((y <= (-23500000.0d0)) .or. (.not. (y <= 0.0052d0))) then
tmp = x * ((-1.0d0) + (y / z))
else
tmp = (x / z) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -23500000.0) || !(y <= 0.0052)) {
tmp = x * (-1.0 + (y / z));
} else {
tmp = (x / z) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -23500000.0) or not (y <= 0.0052): tmp = x * (-1.0 + (y / z)) else: tmp = (x / z) - x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -23500000.0) || !(y <= 0.0052)) tmp = Float64(x * Float64(-1.0 + Float64(y / z))); else tmp = Float64(Float64(x / z) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -23500000.0) || ~((y <= 0.0052))) tmp = x * (-1.0 + (y / z)); else tmp = (x / z) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -23500000.0], N[Not[LessEqual[y, 0.0052]], $MachinePrecision]], N[(x * N[(-1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -23500000 \lor \neg \left(y \leq 0.0052\right):\\
\;\;\;\;x \cdot \left(-1 + \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} - x\\
\end{array}
\end{array}
if y < -2.35e7 or 0.0051999999999999998 < y Initial program 85.8%
associate-/l*93.2%
+-commutative93.2%
associate-+r-93.2%
div-sub93.2%
*-inverses93.2%
sub-neg93.2%
+-commutative93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in y around inf 93.2%
if -2.35e7 < y < 0.0051999999999999998Initial program 83.7%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.8%
*-inverses99.8%
sub-neg99.8%
+-commutative99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 98.6%
sub-neg98.6%
metadata-eval98.6%
distribute-rgt-in98.6%
associate-*l/98.8%
*-lft-identity98.8%
neg-mul-198.8%
unsub-neg98.8%
Simplified98.8%
Final simplification95.7%
(FPCore (x y z) :precision binary64 (if (<= z -0.95) (* x (+ -1.0 (/ y z))) (if (<= z 1.0) (/ (* x (+ y 1.0)) z) (- (/ x (/ z y)) x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.95) {
tmp = x * (-1.0 + (y / z));
} else if (z <= 1.0) {
tmp = (x * (y + 1.0)) / z;
} else {
tmp = (x / (z / y)) - 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 <= (-0.95d0)) then
tmp = x * ((-1.0d0) + (y / z))
else if (z <= 1.0d0) then
tmp = (x * (y + 1.0d0)) / z
else
tmp = (x / (z / y)) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.95) {
tmp = x * (-1.0 + (y / z));
} else if (z <= 1.0) {
tmp = (x * (y + 1.0)) / z;
} else {
tmp = (x / (z / y)) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.95: tmp = x * (-1.0 + (y / z)) elif z <= 1.0: tmp = (x * (y + 1.0)) / z else: tmp = (x / (z / y)) - x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.95) tmp = Float64(x * Float64(-1.0 + Float64(y / z))); elseif (z <= 1.0) tmp = Float64(Float64(x * Float64(y + 1.0)) / z); else tmp = Float64(Float64(x / Float64(z / y)) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.95) tmp = x * (-1.0 + (y / z)); elseif (z <= 1.0) tmp = (x * (y + 1.0)) / z; else tmp = (x / (z / y)) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.95], N[(x * N[(-1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(N[(x * N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.95:\\
\;\;\;\;x \cdot \left(-1 + \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{x \cdot \left(y + 1\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}} - x\\
\end{array}
\end{array}
if z < -0.94999999999999996Initial program 66.4%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.8%
*-inverses99.8%
sub-neg99.8%
+-commutative99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 97.5%
if -0.94999999999999996 < z < 1Initial program 99.9%
associate-/l*93.0%
+-commutative93.0%
associate-+r-93.0%
div-sub92.9%
*-inverses92.9%
sub-neg92.9%
+-commutative92.9%
metadata-eval92.9%
Simplified92.9%
Taylor expanded in z around 0 98.4%
if 1 < z Initial program 69.6%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.8%
*-inverses99.8%
sub-neg99.8%
+-commutative99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.7%
distribute-rgt-in98.8%
neg-mul-198.8%
unsub-neg98.8%
*-commutative98.8%
Applied egg-rr98.8%
clear-num98.7%
un-div-inv98.8%
Applied egg-rr98.8%
Final simplification98.3%
(FPCore (x y z) :precision binary64 (if (<= z -0.96) (* x (+ -1.0 (/ y z))) (if (<= z 1.0) (* (+ y 1.0) (/ x z)) (- (/ x (/ z y)) x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.96) {
tmp = x * (-1.0 + (y / z));
} else if (z <= 1.0) {
tmp = (y + 1.0) * (x / z);
} else {
tmp = (x / (z / y)) - 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 <= (-0.96d0)) then
tmp = x * ((-1.0d0) + (y / z))
else if (z <= 1.0d0) then
tmp = (y + 1.0d0) * (x / z)
else
tmp = (x / (z / y)) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.96) {
tmp = x * (-1.0 + (y / z));
} else if (z <= 1.0) {
tmp = (y + 1.0) * (x / z);
} else {
tmp = (x / (z / y)) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.96: tmp = x * (-1.0 + (y / z)) elif z <= 1.0: tmp = (y + 1.0) * (x / z) else: tmp = (x / (z / y)) - x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.96) tmp = Float64(x * Float64(-1.0 + Float64(y / z))); elseif (z <= 1.0) tmp = Float64(Float64(y + 1.0) * Float64(x / z)); else tmp = Float64(Float64(x / Float64(z / y)) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.96) tmp = x * (-1.0 + (y / z)); elseif (z <= 1.0) tmp = (y + 1.0) * (x / z); else tmp = (x / (z / y)) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.96], N[(x * N[(-1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(N[(y + 1.0), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(z / y), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.96:\\
\;\;\;\;x \cdot \left(-1 + \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\left(y + 1\right) \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}} - x\\
\end{array}
\end{array}
if z < -0.95999999999999996Initial program 66.4%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.8%
*-inverses99.8%
sub-neg99.8%
+-commutative99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 97.5%
if -0.95999999999999996 < z < 1Initial program 99.9%
distribute-lft-in99.9%
fma-define99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in z around 0 98.4%
*-un-lft-identity98.4%
*-commutative98.4%
distribute-rgt-out98.4%
+-commutative98.4%
associate-*l/98.3%
Applied egg-rr98.3%
if 1 < z Initial program 69.6%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.8%
*-inverses99.8%
sub-neg99.8%
+-commutative99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.7%
distribute-rgt-in98.8%
neg-mul-198.8%
unsub-neg98.8%
*-commutative98.8%
Applied egg-rr98.8%
clear-num98.7%
un-div-inv98.8%
Applied egg-rr98.8%
Final simplification98.3%
(FPCore (x y z) :precision binary64 (if (<= z -0.88) (* x (+ -1.0 (/ y z))) (if (<= z 1.0) (* (+ y 1.0) (/ x z)) (- (* x (/ y z)) x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -0.88) {
tmp = x * (-1.0 + (y / z));
} else if (z <= 1.0) {
tmp = (y + 1.0) * (x / z);
} else {
tmp = (x * (y / z)) - 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 <= (-0.88d0)) then
tmp = x * ((-1.0d0) + (y / z))
else if (z <= 1.0d0) then
tmp = (y + 1.0d0) * (x / z)
else
tmp = (x * (y / z)) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -0.88) {
tmp = x * (-1.0 + (y / z));
} else if (z <= 1.0) {
tmp = (y + 1.0) * (x / z);
} else {
tmp = (x * (y / z)) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -0.88: tmp = x * (-1.0 + (y / z)) elif z <= 1.0: tmp = (y + 1.0) * (x / z) else: tmp = (x * (y / z)) - x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -0.88) tmp = Float64(x * Float64(-1.0 + Float64(y / z))); elseif (z <= 1.0) tmp = Float64(Float64(y + 1.0) * Float64(x / z)); else tmp = Float64(Float64(x * Float64(y / z)) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -0.88) tmp = x * (-1.0 + (y / z)); elseif (z <= 1.0) tmp = (y + 1.0) * (x / z); else tmp = (x * (y / z)) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -0.88], N[(x * N[(-1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], N[(N[(y + 1.0), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.88:\\
\;\;\;\;x \cdot \left(-1 + \frac{y}{z}\right)\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\left(y + 1\right) \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z} - x\\
\end{array}
\end{array}
if z < -0.880000000000000004Initial program 66.4%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.8%
*-inverses99.8%
sub-neg99.8%
+-commutative99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 97.5%
if -0.880000000000000004 < z < 1Initial program 99.9%
distribute-lft-in99.9%
fma-define99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in z around 0 98.4%
*-un-lft-identity98.4%
*-commutative98.4%
distribute-rgt-out98.4%
+-commutative98.4%
associate-*l/98.3%
Applied egg-rr98.3%
if 1 < z Initial program 69.6%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.8%
*-inverses99.8%
sub-neg99.8%
+-commutative99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.7%
distribute-rgt-in98.8%
neg-mul-198.8%
unsub-neg98.8%
*-commutative98.8%
Applied egg-rr98.8%
Final simplification98.3%
(FPCore (x y z) :precision binary64 (if (or (<= y -7e+38) (not (<= y 1.6e+17))) (* y (/ x z)) (- (/ x z) x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -7e+38) || !(y <= 1.6e+17)) {
tmp = y * (x / z);
} else {
tmp = (x / z) - 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 ((y <= (-7d+38)) .or. (.not. (y <= 1.6d+17))) then
tmp = y * (x / z)
else
tmp = (x / z) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -7e+38) || !(y <= 1.6e+17)) {
tmp = y * (x / z);
} else {
tmp = (x / z) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -7e+38) or not (y <= 1.6e+17): tmp = y * (x / z) else: tmp = (x / z) - x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -7e+38) || !(y <= 1.6e+17)) tmp = Float64(y * Float64(x / z)); else tmp = Float64(Float64(x / z) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -7e+38) || ~((y <= 1.6e+17))) tmp = y * (x / z); else tmp = (x / z) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -7e+38], N[Not[LessEqual[y, 1.6e+17]], $MachinePrecision]], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+38} \lor \neg \left(y \leq 1.6 \cdot 10^{+17}\right):\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} - x\\
\end{array}
\end{array}
if y < -7.00000000000000003e38 or 1.6e17 < y Initial program 87.6%
distribute-lft-in87.6%
fma-define87.6%
*-rgt-identity87.6%
Simplified87.6%
Taylor expanded in z around 0 74.3%
*-un-lft-identity74.3%
*-commutative74.3%
distribute-rgt-out74.3%
+-commutative74.3%
associate-*l/78.5%
Applied egg-rr78.5%
Taylor expanded in y around inf 78.5%
if -7.00000000000000003e38 < y < 1.6e17Initial program 82.0%
associate-/l*99.9%
+-commutative99.9%
associate-+r-99.9%
div-sub99.9%
*-inverses99.9%
sub-neg99.9%
+-commutative99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 97.2%
sub-neg97.2%
metadata-eval97.2%
distribute-rgt-in97.2%
associate-*l/97.3%
*-lft-identity97.3%
neg-mul-197.3%
unsub-neg97.3%
Simplified97.3%
Final simplification87.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.05e+117) (not (<= z 1.1e+20))) (- x) (* y (/ x z))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.05e+117) || !(z <= 1.1e+20)) {
tmp = -x;
} else {
tmp = y * (x / 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 <= (-1.05d+117)) .or. (.not. (z <= 1.1d+20))) then
tmp = -x
else
tmp = y * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.05e+117) || !(z <= 1.1e+20)) {
tmp = -x;
} else {
tmp = y * (x / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.05e+117) or not (z <= 1.1e+20): tmp = -x else: tmp = y * (x / z) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.05e+117) || !(z <= 1.1e+20)) tmp = Float64(-x); else tmp = Float64(y * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.05e+117) || ~((z <= 1.1e+20))) tmp = -x; else tmp = y * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.05e+117], N[Not[LessEqual[z, 1.1e+20]], $MachinePrecision]], (-x), N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+117} \lor \neg \left(z \leq 1.1 \cdot 10^{+20}\right):\\
\;\;\;\;-x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -1.0500000000000001e117 or 1.1e20 < z Initial program 61.0%
associate-/l*99.9%
+-commutative99.9%
associate-+r-99.9%
div-sub99.9%
*-inverses99.9%
sub-neg99.9%
+-commutative99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 84.4%
neg-mul-184.4%
Simplified84.4%
if -1.0500000000000001e117 < z < 1.1e20Initial program 97.1%
distribute-lft-in97.1%
fma-define97.1%
*-rgt-identity97.1%
Simplified97.1%
Taylor expanded in z around 0 90.2%
*-un-lft-identity90.2%
*-commutative90.2%
distribute-rgt-out90.2%
+-commutative90.2%
associate-*l/91.5%
Applied egg-rr91.5%
Taylor expanded in y around inf 61.5%
Final simplification69.3%
(FPCore (x y z) :precision binary64 (if (<= x 9.2e-36) (/ (* x (+ (- y z) 1.0)) z) (- (/ x (/ z (+ y 1.0))) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 9.2e-36) {
tmp = (x * ((y - z) + 1.0)) / z;
} else {
tmp = (x / (z / (y + 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) :: tmp
if (x <= 9.2d-36) then
tmp = (x * ((y - z) + 1.0d0)) / z
else
tmp = (x / (z / (y + 1.0d0))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 9.2e-36) {
tmp = (x * ((y - z) + 1.0)) / z;
} else {
tmp = (x / (z / (y + 1.0))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 9.2e-36: tmp = (x * ((y - z) + 1.0)) / z else: tmp = (x / (z / (y + 1.0))) - x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 9.2e-36) tmp = Float64(Float64(x * Float64(Float64(y - z) + 1.0)) / z); else tmp = Float64(Float64(x / Float64(z / Float64(y + 1.0))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 9.2e-36) tmp = (x * ((y - z) + 1.0)) / z; else tmp = (x / (z / (y + 1.0))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 9.2e-36], N[(N[(x * N[(N[(y - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(x / N[(z / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 9.2 \cdot 10^{-36}:\\
\;\;\;\;\frac{x \cdot \left(\left(y - z\right) + 1\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y + 1}} - x\\
\end{array}
\end{array}
if x < 9.19999999999999986e-36Initial program 91.0%
if 9.19999999999999986e-36 < x Initial program 72.6%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.9%
*-inverses99.9%
sub-neg99.9%
+-commutative99.9%
metadata-eval99.9%
Simplified99.9%
distribute-lft-in99.9%
clear-num99.8%
un-div-inv100.0%
*-commutative100.0%
mul-1-neg100.0%
Applied egg-rr100.0%
Final simplification94.0%
(FPCore (x y z) :precision binary64 (let* ((t_0 (+ (- y z) 1.0))) (if (<= x 4.6e+36) (/ (* x t_0) z) (* t_0 (/ x z)))))
double code(double x, double y, double z) {
double t_0 = (y - z) + 1.0;
double tmp;
if (x <= 4.6e+36) {
tmp = (x * t_0) / z;
} else {
tmp = t_0 * (x / 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) :: t_0
real(8) :: tmp
t_0 = (y - z) + 1.0d0
if (x <= 4.6d+36) then
tmp = (x * t_0) / z
else
tmp = t_0 * (x / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (y - z) + 1.0;
double tmp;
if (x <= 4.6e+36) {
tmp = (x * t_0) / z;
} else {
tmp = t_0 * (x / z);
}
return tmp;
}
def code(x, y, z): t_0 = (y - z) + 1.0 tmp = 0 if x <= 4.6e+36: tmp = (x * t_0) / z else: tmp = t_0 * (x / z) return tmp
function code(x, y, z) t_0 = Float64(Float64(y - z) + 1.0) tmp = 0.0 if (x <= 4.6e+36) tmp = Float64(Float64(x * t_0) / z); else tmp = Float64(t_0 * Float64(x / z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (y - z) + 1.0; tmp = 0.0; if (x <= 4.6e+36) tmp = (x * t_0) / z; else tmp = t_0 * (x / z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y - z), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[x, 4.6e+36], N[(N[(x * t$95$0), $MachinePrecision] / z), $MachinePrecision], N[(t$95$0 * N[(x / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y - z\right) + 1\\
\mathbf{if}\;x \leq 4.6 \cdot 10^{+36}:\\
\;\;\;\;\frac{x \cdot t\_0}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \frac{x}{z}\\
\end{array}
\end{array}
if x < 4.59999999999999993e36Initial program 91.8%
if 4.59999999999999993e36 < x Initial program 66.4%
*-commutative66.4%
associate-/l*99.9%
+-commutative99.9%
Applied egg-rr99.9%
Final simplification94.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.0) (not (<= z 15.2))) (- x) (/ x z)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.0) || !(z <= 15.2)) {
tmp = -x;
} else {
tmp = x / 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 <= (-1.0d0)) .or. (.not. (z <= 15.2d0))) then
tmp = -x
else
tmp = x / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.0) || !(z <= 15.2)) {
tmp = -x;
} else {
tmp = x / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.0) or not (z <= 15.2): tmp = -x else: tmp = x / z return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.0) || !(z <= 15.2)) tmp = Float64(-x); else tmp = Float64(x / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.0) || ~((z <= 15.2))) tmp = -x; else tmp = x / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 15.2]], $MachinePrecision]], (-x), N[(x / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 15.2\right):\\
\;\;\;\;-x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z}\\
\end{array}
\end{array}
if z < -1 or 15.199999999999999 < z Initial program 67.8%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.8%
*-inverses99.8%
sub-neg99.8%
+-commutative99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 70.2%
neg-mul-170.2%
Simplified70.2%
if -1 < z < 15.199999999999999Initial program 99.9%
associate-/l*93.0%
+-commutative93.0%
associate-+r-93.0%
div-sub93.0%
*-inverses93.0%
sub-neg93.0%
+-commutative93.0%
metadata-eval93.0%
Simplified93.0%
Taylor expanded in y around 0 53.5%
sub-neg53.5%
metadata-eval53.5%
distribute-rgt-in53.5%
associate-*l/53.6%
*-lft-identity53.6%
neg-mul-153.6%
unsub-neg53.6%
Simplified53.6%
Taylor expanded in z around 0 52.1%
Final simplification60.6%
(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 Float64(-x) end
function tmp = code(x, y, z) tmp = -x; end
code[x_, y_, z_] := (-x)
\begin{array}{l}
\\
-x
\end{array}
Initial program 84.9%
associate-/l*96.2%
+-commutative96.2%
associate-+r-96.2%
div-sub96.2%
*-inverses96.2%
sub-neg96.2%
+-commutative96.2%
metadata-eval96.2%
Simplified96.2%
Taylor expanded in z around inf 34.6%
neg-mul-134.6%
Simplified34.6%
(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 84.9%
associate-/l*96.2%
+-commutative96.2%
associate-+r-96.2%
div-sub96.2%
*-inverses96.2%
sub-neg96.2%
+-commutative96.2%
metadata-eval96.2%
Simplified96.2%
Taylor expanded in z around inf 34.6%
neg-mul-134.6%
Simplified34.6%
neg-sub034.6%
sub-neg34.6%
add-sqr-sqrt15.7%
sqrt-unprod16.3%
sqr-neg16.3%
sqrt-unprod1.5%
add-sqr-sqrt2.9%
Applied egg-rr2.9%
Taylor expanded in x around 0 2.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (* (+ 1.0 y) (/ x z)) x)))
(if (< x -2.71483106713436e-162)
t_0
(if (< x 3.874108816439546e-197)
(* (* x (+ (- y z) 1.0)) (/ 1.0 z))
t_0))))
double code(double x, double y, double z) {
double t_0 = ((1.0 + y) * (x / z)) - x;
double tmp;
if (x < -2.71483106713436e-162) {
tmp = t_0;
} else if (x < 3.874108816439546e-197) {
tmp = (x * ((y - z) + 1.0)) * (1.0 / z);
} 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) :: tmp
t_0 = ((1.0d0 + y) * (x / z)) - x
if (x < (-2.71483106713436d-162)) then
tmp = t_0
else if (x < 3.874108816439546d-197) then
tmp = (x * ((y - z) + 1.0d0)) * (1.0d0 / z)
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 + y) * (x / z)) - x;
double tmp;
if (x < -2.71483106713436e-162) {
tmp = t_0;
} else if (x < 3.874108816439546e-197) {
tmp = (x * ((y - z) + 1.0)) * (1.0 / z);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((1.0 + y) * (x / z)) - x tmp = 0 if x < -2.71483106713436e-162: tmp = t_0 elif x < 3.874108816439546e-197: tmp = (x * ((y - z) + 1.0)) * (1.0 / z) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(1.0 + y) * Float64(x / z)) - x) tmp = 0.0 if (x < -2.71483106713436e-162) tmp = t_0; elseif (x < 3.874108816439546e-197) tmp = Float64(Float64(x * Float64(Float64(y - z) + 1.0)) * Float64(1.0 / z)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((1.0 + y) * (x / z)) - x; tmp = 0.0; if (x < -2.71483106713436e-162) tmp = t_0; elseif (x < 3.874108816439546e-197) tmp = (x * ((y - z) + 1.0)) * (1.0 / z); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(1.0 + y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]}, If[Less[x, -2.71483106713436e-162], t$95$0, If[Less[x, 3.874108816439546e-197], N[(N[(x * N[(N[(y - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(1 + y\right) \cdot \frac{x}{z} - x\\
\mathbf{if}\;x < -2.71483106713436 \cdot 10^{-162}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x < 3.874108816439546 \cdot 10^{-197}:\\
\;\;\;\;\left(x \cdot \left(\left(y - z\right) + 1\right)\right) \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
herbie shell --seed 2024123
(FPCore (x y z)
:name "Diagrams.TwoD.Segment.Bernstein:evaluateBernstein from diagrams-lib-1.3.0.3"
:precision binary64
:alt
(! :herbie-platform default (if (< x -67870776678359/25000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (+ 1 y) (/ x z)) x) (if (< x 1937054408219773/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* (* x (+ (- y z) 1)) (/ 1 z)) (- (* (+ 1 y) (/ x z)) x))))
(/ (* x (+ (- y z) 1.0)) z))