
(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 -1.2e-21) (not (<= z 4.8e-37))) (* x (+ -1.0 (/ (+ y 1.0) z))) (* (/ x z) (+ y 1.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.2e-21) || !(z <= 4.8e-37)) {
tmp = x * (-1.0 + ((y + 1.0) / z));
} else {
tmp = (x / z) * (y + 1.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) :: tmp
if ((z <= (-1.2d-21)) .or. (.not. (z <= 4.8d-37))) then
tmp = x * ((-1.0d0) + ((y + 1.0d0) / z))
else
tmp = (x / z) * (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.2e-21) || !(z <= 4.8e-37)) {
tmp = x * (-1.0 + ((y + 1.0) / z));
} else {
tmp = (x / z) * (y + 1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.2e-21) or not (z <= 4.8e-37): tmp = x * (-1.0 + ((y + 1.0) / z)) else: tmp = (x / z) * (y + 1.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.2e-21) || !(z <= 4.8e-37)) tmp = Float64(x * Float64(-1.0 + Float64(Float64(y + 1.0) / z))); else tmp = Float64(Float64(x / z) * Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.2e-21) || ~((z <= 4.8e-37))) tmp = x * (-1.0 + ((y + 1.0) / z)); else tmp = (x / z) * (y + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.2e-21], N[Not[LessEqual[z, 4.8e-37]], $MachinePrecision]], N[(x * N[(-1.0 + N[(N[(y + 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-21} \lor \neg \left(z \leq 4.8 \cdot 10^{-37}\right):\\
\;\;\;\;x \cdot \left(-1 + \frac{y + 1}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \left(y + 1\right)\\
\end{array}
\end{array}
if z < -1.2e-21 or 4.79999999999999982e-37 < z Initial program 78.1%
associate-/l*99.9%
+-commutative99.9%
associate-+r-99.9%
div-sub99.9%
*-inverses99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
if -1.2e-21 < z < 4.79999999999999982e-37Initial program 99.9%
associate-/l*89.2%
+-commutative89.2%
associate-+r-89.2%
div-sub89.2%
*-inverses89.2%
sub-neg89.2%
metadata-eval89.2%
+-commutative89.2%
Simplified89.2%
Taylor expanded in z around 0 99.9%
associate-*l/99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (/ x z))))
(if (<= z -7.5e+35)
(- x)
(if (<= z 1.12e-278)
t_0
(if (<= z 2.7e-100) (/ x z) (if (<= z 15.0) t_0 (- x)))))))
double code(double x, double y, double z) {
double t_0 = y * (x / z);
double tmp;
if (z <= -7.5e+35) {
tmp = -x;
} else if (z <= 1.12e-278) {
tmp = t_0;
} else if (z <= 2.7e-100) {
tmp = x / z;
} else if (z <= 15.0) {
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 = y * (x / z)
if (z <= (-7.5d+35)) then
tmp = -x
else if (z <= 1.12d-278) then
tmp = t_0
else if (z <= 2.7d-100) then
tmp = x / z
else if (z <= 15.0d0) 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 = y * (x / z);
double tmp;
if (z <= -7.5e+35) {
tmp = -x;
} else if (z <= 1.12e-278) {
tmp = t_0;
} else if (z <= 2.7e-100) {
tmp = x / z;
} else if (z <= 15.0) {
tmp = t_0;
} else {
tmp = -x;
}
return tmp;
}
def code(x, y, z): t_0 = y * (x / z) tmp = 0 if z <= -7.5e+35: tmp = -x elif z <= 1.12e-278: tmp = t_0 elif z <= 2.7e-100: tmp = x / z elif z <= 15.0: tmp = t_0 else: tmp = -x return tmp
function code(x, y, z) t_0 = Float64(y * Float64(x / z)) tmp = 0.0 if (z <= -7.5e+35) tmp = Float64(-x); elseif (z <= 1.12e-278) tmp = t_0; elseif (z <= 2.7e-100) tmp = Float64(x / z); elseif (z <= 15.0) tmp = t_0; else tmp = Float64(-x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (x / z); tmp = 0.0; if (z <= -7.5e+35) tmp = -x; elseif (z <= 1.12e-278) tmp = t_0; elseif (z <= 2.7e-100) tmp = x / z; elseif (z <= 15.0) tmp = t_0; else tmp = -x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+35], (-x), If[LessEqual[z, 1.12e-278], t$95$0, If[LessEqual[z, 2.7e-100], N[(x / z), $MachinePrecision], If[LessEqual[z, 15.0], t$95$0, (-x)]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+35}:\\
\;\;\;\;-x\\
\mathbf{elif}\;z \leq 1.12 \cdot 10^{-278}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-100}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{elif}\;z \leq 15:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;-x\\
\end{array}
\end{array}
if z < -7.4999999999999999e35 or 15 < z Initial program 74.0%
associate-/l*100.0%
+-commutative100.0%
associate-+r-100.0%
div-sub100.0%
*-inverses100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in z around inf 78.3%
neg-mul-178.3%
Simplified78.3%
if -7.4999999999999999e35 < z < 1.12e-278 or 2.70000000000000016e-100 < z < 15Initial program 99.8%
associate-/l*90.8%
+-commutative90.8%
associate-+r-90.8%
div-sub90.9%
*-inverses90.9%
sub-neg90.9%
metadata-eval90.9%
+-commutative90.9%
Simplified90.9%
Taylor expanded in y around inf 68.4%
*-commutative68.4%
associate-*r/71.4%
Simplified71.4%
if 1.12e-278 < z < 2.70000000000000016e-100Initial program 100.0%
associate-/l*90.6%
+-commutative90.6%
associate-+r-90.6%
div-sub90.6%
*-inverses90.6%
sub-neg90.6%
metadata-eval90.6%
+-commutative90.6%
Simplified90.6%
Taylor expanded in y around 0 69.1%
Taylor expanded in z around 0 69.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (/ y z))))
(if (<= z -4.2e+35)
(- x)
(if (<= z 1.7e-282)
t_0
(if (<= z 7e-101) (/ x z) (if (<= z 15.0) t_0 (- x)))))))
double code(double x, double y, double z) {
double t_0 = x * (y / z);
double tmp;
if (z <= -4.2e+35) {
tmp = -x;
} else if (z <= 1.7e-282) {
tmp = t_0;
} else if (z <= 7e-101) {
tmp = x / z;
} else if (z <= 15.0) {
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 <= (-4.2d+35)) then
tmp = -x
else if (z <= 1.7d-282) then
tmp = t_0
else if (z <= 7d-101) then
tmp = x / z
else if (z <= 15.0d0) 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 <= -4.2e+35) {
tmp = -x;
} else if (z <= 1.7e-282) {
tmp = t_0;
} else if (z <= 7e-101) {
tmp = x / z;
} else if (z <= 15.0) {
tmp = t_0;
} else {
tmp = -x;
}
return tmp;
}
def code(x, y, z): t_0 = x * (y / z) tmp = 0 if z <= -4.2e+35: tmp = -x elif z <= 1.7e-282: tmp = t_0 elif z <= 7e-101: tmp = x / z elif z <= 15.0: 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 <= -4.2e+35) tmp = Float64(-x); elseif (z <= 1.7e-282) tmp = t_0; elseif (z <= 7e-101) tmp = Float64(x / z); elseif (z <= 15.0) 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 <= -4.2e+35) tmp = -x; elseif (z <= 1.7e-282) tmp = t_0; elseif (z <= 7e-101) tmp = x / z; elseif (z <= 15.0) 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, -4.2e+35], (-x), If[LessEqual[z, 1.7e-282], t$95$0, If[LessEqual[z, 7e-101], N[(x / z), $MachinePrecision], If[LessEqual[z, 15.0], t$95$0, (-x)]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+35}:\\
\;\;\;\;-x\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-282}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-101}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{elif}\;z \leq 15:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;-x\\
\end{array}
\end{array}
if z < -4.1999999999999998e35 or 15 < z Initial program 74.0%
associate-/l*100.0%
+-commutative100.0%
associate-+r-100.0%
div-sub100.0%
*-inverses100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in z around inf 78.3%
neg-mul-178.3%
Simplified78.3%
if -4.1999999999999998e35 < z < 1.69999999999999999e-282 or 6.99999999999999989e-101 < z < 15Initial program 99.8%
associate-/l*90.8%
+-commutative90.8%
associate-+r-90.8%
div-sub90.9%
*-inverses90.9%
sub-neg90.9%
metadata-eval90.9%
+-commutative90.9%
Simplified90.9%
Taylor expanded in y around inf 68.4%
associate-/l*59.5%
Simplified59.5%
if 1.69999999999999999e-282 < z < 6.99999999999999989e-101Initial program 100.0%
associate-/l*90.6%
+-commutative90.6%
associate-+r-90.6%
div-sub90.6%
*-inverses90.6%
sub-neg90.6%
metadata-eval90.6%
+-commutative90.6%
Simplified90.6%
Taylor expanded in y around 0 69.1%
Taylor expanded in z around 0 69.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -2120000000.0) (not (<= z 1.0))) (* x (+ -1.0 (/ y z))) (* (/ x z) (+ y 1.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2120000000.0) || !(z <= 1.0)) {
tmp = x * (-1.0 + (y / z));
} else {
tmp = (x / z) * (y + 1.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) :: tmp
if ((z <= (-2120000000.0d0)) .or. (.not. (z <= 1.0d0))) then
tmp = x * ((-1.0d0) + (y / z))
else
tmp = (x / z) * (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2120000000.0) || !(z <= 1.0)) {
tmp = x * (-1.0 + (y / z));
} else {
tmp = (x / z) * (y + 1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2120000000.0) or not (z <= 1.0): tmp = x * (-1.0 + (y / z)) else: tmp = (x / z) * (y + 1.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2120000000.0) || !(z <= 1.0)) tmp = Float64(x * Float64(-1.0 + Float64(y / z))); else tmp = Float64(Float64(x / z) * Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2120000000.0) || ~((z <= 1.0))) tmp = x * (-1.0 + (y / z)); else tmp = (x / z) * (y + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2120000000.0], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(x * N[(-1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2120000000 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \left(-1 + \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \left(y + 1\right)\\
\end{array}
\end{array}
if z < -2.12e9 or 1 < z Initial program 75.9%
associate-/l*99.9%
+-commutative99.9%
associate-+r-99.9%
div-sub99.9%
*-inverses99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 99.3%
if -2.12e9 < z < 1Initial program 99.9%
associate-/l*90.1%
+-commutative90.1%
associate-+r-90.1%
div-sub90.2%
*-inverses90.2%
sub-neg90.2%
metadata-eval90.2%
+-commutative90.2%
Simplified90.2%
Taylor expanded in z around 0 99.1%
associate-*l/99.1%
Applied egg-rr99.1%
Final simplification99.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.8e+14) (not (<= z 1.0))) (* x (+ -1.0 (/ y z))) (* x (/ (+ y 1.0) z))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.8e+14) || !(z <= 1.0)) {
tmp = x * (-1.0 + (y / z));
} else {
tmp = x * ((y + 1.0) / 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 <= (-5.8d+14)) .or. (.not. (z <= 1.0d0))) then
tmp = x * ((-1.0d0) + (y / z))
else
tmp = x * ((y + 1.0d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5.8e+14) || !(z <= 1.0)) {
tmp = x * (-1.0 + (y / z));
} else {
tmp = x * ((y + 1.0) / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.8e+14) or not (z <= 1.0): tmp = x * (-1.0 + (y / z)) else: tmp = x * ((y + 1.0) / z) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.8e+14) || !(z <= 1.0)) tmp = Float64(x * Float64(-1.0 + Float64(y / z))); else tmp = Float64(x * Float64(Float64(y + 1.0) / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.8e+14) || ~((z <= 1.0))) tmp = x * (-1.0 + (y / z)); else tmp = x * ((y + 1.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.8e+14], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(x * N[(-1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(y + 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+14} \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \left(-1 + \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y + 1}{z}\\
\end{array}
\end{array}
if z < -5.8e14 or 1 < z Initial program 75.7%
associate-/l*99.9%
+-commutative99.9%
associate-+r-99.9%
div-sub99.9%
*-inverses99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in y around inf 99.3%
if -5.8e14 < z < 1Initial program 99.9%
associate-/l*90.2%
+-commutative90.2%
associate-+r-90.2%
div-sub90.2%
*-inverses90.2%
sub-neg90.2%
metadata-eval90.2%
+-commutative90.2%
Simplified90.2%
Taylor expanded in z around 0 99.1%
associate-/l*89.5%
Simplified89.5%
Final simplification94.1%
(FPCore (x y z) :precision binary64 (if (<= x 2.3e-150) (/ (* x (+ (- y z) 1.0)) z) (- (/ (/ x z) (/ 1.0 (+ y 1.0))) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.3e-150) {
tmp = (x * ((y - z) + 1.0)) / z;
} else {
tmp = ((x / z) / (1.0 / (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 <= 2.3d-150) then
tmp = (x * ((y - z) + 1.0d0)) / z
else
tmp = ((x / z) / (1.0d0 / (y + 1.0d0))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2.3e-150) {
tmp = (x * ((y - z) + 1.0)) / z;
} else {
tmp = ((x / z) / (1.0 / (y + 1.0))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2.3e-150: tmp = (x * ((y - z) + 1.0)) / z else: tmp = ((x / z) / (1.0 / (y + 1.0))) - x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2.3e-150) tmp = Float64(Float64(x * Float64(Float64(y - z) + 1.0)) / z); else tmp = Float64(Float64(Float64(x / z) / Float64(1.0 / Float64(y + 1.0))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2.3e-150) tmp = (x * ((y - z) + 1.0)) / z; else tmp = ((x / z) / (1.0 / (y + 1.0))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2.3e-150], N[(N[(x * N[(N[(y - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(x / z), $MachinePrecision] / N[(1.0 / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.3 \cdot 10^{-150}:\\
\;\;\;\;\frac{x \cdot \left(\left(y - z\right) + 1\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z}}{\frac{1}{y + 1}} - x\\
\end{array}
\end{array}
if x < 2.30000000000000003e-150Initial program 89.8%
if 2.30000000000000003e-150 < x Initial program 86.8%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.8%
*-inverses99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
distribute-lft-in99.8%
clear-num99.8%
un-div-inv99.9%
*-commutative99.9%
mul-1-neg99.9%
Applied egg-rr99.9%
*-un-lft-identity99.9%
div-inv99.9%
times-frac98.1%
Applied egg-rr98.1%
associate-*r/99.8%
*-commutative99.8%
div-inv99.9%
+-commutative99.9%
Applied egg-rr99.9%
Final simplification94.0%
(FPCore (x y z) :precision binary64 (if (or (<= y -7.4e+54) (not (<= y 2.9e+95))) (* y (/ x z)) (- (/ x z) x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -7.4e+54) || !(y <= 2.9e+95)) {
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 <= (-7.4d+54)) .or. (.not. (y <= 2.9d+95))) 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 <= -7.4e+54) || !(y <= 2.9e+95)) {
tmp = y * (x / z);
} else {
tmp = (x / z) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -7.4e+54) or not (y <= 2.9e+95): tmp = y * (x / z) else: tmp = (x / z) - x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -7.4e+54) || !(y <= 2.9e+95)) 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 <= -7.4e+54) || ~((y <= 2.9e+95))) tmp = y * (x / z); else tmp = (x / z) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -7.4e+54], N[Not[LessEqual[y, 2.9e+95]], $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.4 \cdot 10^{+54} \lor \neg \left(y \leq 2.9 \cdot 10^{+95}\right):\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} - x\\
\end{array}
\end{array}
if y < -7.4000000000000004e54 or 2.90000000000000013e95 < y Initial program 91.9%
associate-/l*87.7%
+-commutative87.7%
associate-+r-87.7%
div-sub87.7%
*-inverses87.7%
sub-neg87.7%
metadata-eval87.7%
+-commutative87.7%
Simplified87.7%
Taylor expanded in y around inf 84.1%
*-commutative84.1%
associate-*r/81.8%
Simplified81.8%
if -7.4000000000000004e54 < y < 2.90000000000000013e95Initial program 86.1%
associate-/l*99.9%
+-commutative99.9%
associate-+r-99.9%
div-sub99.9%
*-inverses99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
distribute-lft-in99.9%
clear-num99.9%
un-div-inv99.9%
*-commutative99.9%
mul-1-neg99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 91.6%
Final simplification87.5%
(FPCore (x y z) :precision binary64 (if (<= y -1.0) (* x (+ -1.0 (/ y z))) (if (<= y 3.9e+93) (- (/ x z) x) (/ (* x y) z))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.0) {
tmp = x * (-1.0 + (y / z));
} else if (y <= 3.9e+93) {
tmp = (x / z) - x;
} else {
tmp = (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 (y <= (-1.0d0)) then
tmp = x * ((-1.0d0) + (y / z))
else if (y <= 3.9d+93) then
tmp = (x / z) - x
else
tmp = (x * y) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1.0) {
tmp = x * (-1.0 + (y / z));
} else if (y <= 3.9e+93) {
tmp = (x / z) - x;
} else {
tmp = (x * y) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.0: tmp = x * (-1.0 + (y / z)) elif y <= 3.9e+93: tmp = (x / z) - x else: tmp = (x * y) / z return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.0) tmp = Float64(x * Float64(-1.0 + Float64(y / z))); elseif (y <= 3.9e+93) tmp = Float64(Float64(x / z) - x); else tmp = Float64(Float64(x * y) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.0) tmp = x * (-1.0 + (y / z)); elseif (y <= 3.9e+93) tmp = (x / z) - x; else tmp = (x * y) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.0], N[(x * N[(-1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+93], N[(N[(x / z), $MachinePrecision] - x), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1:\\
\;\;\;\;x \cdot \left(-1 + \frac{y}{z}\right)\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+93}:\\
\;\;\;\;\frac{x}{z} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}
\end{array}
if y < -1Initial program 86.0%
associate-/l*91.2%
+-commutative91.2%
associate-+r-91.2%
div-sub91.2%
*-inverses91.2%
sub-neg91.2%
metadata-eval91.2%
+-commutative91.2%
Simplified91.2%
Taylor expanded in y around inf 89.3%
if -1 < y < 3.9000000000000002e93Initial program 87.4%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.9%
*-inverses99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
distribute-lft-in99.9%
clear-num99.8%
un-div-inv100.0%
*-commutative100.0%
mul-1-neg100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 95.1%
if 3.9000000000000002e93 < y Initial program 95.8%
associate-/l*85.9%
+-commutative85.9%
associate-+r-85.9%
div-sub85.9%
*-inverses85.9%
sub-neg85.9%
metadata-eval85.9%
+-commutative85.9%
Simplified85.9%
Taylor expanded in y around inf 93.7%
Final simplification93.2%
(FPCore (x y z) :precision binary64 (if (<= y -8.4e+54) (* y (/ x z)) (if (<= y 1.4e+95) (- (/ x z) x) (/ (* x y) z))))
double code(double x, double y, double z) {
double tmp;
if (y <= -8.4e+54) {
tmp = y * (x / z);
} else if (y <= 1.4e+95) {
tmp = (x / z) - x;
} else {
tmp = (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 (y <= (-8.4d+54)) then
tmp = y * (x / z)
else if (y <= 1.4d+95) then
tmp = (x / z) - x
else
tmp = (x * y) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -8.4e+54) {
tmp = y * (x / z);
} else if (y <= 1.4e+95) {
tmp = (x / z) - x;
} else {
tmp = (x * y) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -8.4e+54: tmp = y * (x / z) elif y <= 1.4e+95: tmp = (x / z) - x else: tmp = (x * y) / z return tmp
function code(x, y, z) tmp = 0.0 if (y <= -8.4e+54) tmp = Float64(y * Float64(x / z)); elseif (y <= 1.4e+95) tmp = Float64(Float64(x / z) - x); else tmp = Float64(Float64(x * y) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -8.4e+54) tmp = y * (x / z); elseif (y <= 1.4e+95) tmp = (x / z) - x; else tmp = (x * y) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -8.4e+54], N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+95], N[(N[(x / z), $MachinePrecision] - x), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.4 \cdot 10^{+54}:\\
\;\;\;\;y \cdot \frac{x}{z}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+95}:\\
\;\;\;\;\frac{x}{z} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\end{array}
\end{array}
if y < -8.39999999999999943e54Initial program 88.9%
associate-/l*89.1%
+-commutative89.1%
associate-+r-89.1%
div-sub89.1%
*-inverses89.1%
sub-neg89.1%
metadata-eval89.1%
+-commutative89.1%
Simplified89.1%
Taylor expanded in y around inf 76.6%
*-commutative76.6%
associate-*r/78.1%
Simplified78.1%
if -8.39999999999999943e54 < y < 1.3999999999999999e95Initial program 86.1%
associate-/l*99.9%
+-commutative99.9%
associate-+r-99.9%
div-sub99.9%
*-inverses99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
distribute-lft-in99.9%
clear-num99.9%
un-div-inv99.9%
*-commutative99.9%
mul-1-neg99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 91.6%
if 1.3999999999999999e95 < y Initial program 95.8%
associate-/l*85.9%
+-commutative85.9%
associate-+r-85.9%
div-sub85.9%
*-inverses85.9%
sub-neg85.9%
metadata-eval85.9%
+-commutative85.9%
Simplified85.9%
Taylor expanded in y around inf 93.7%
(FPCore (x y z) :precision binary64 (if (<= x 1.5e-103) (/ (* x (+ (- y z) 1.0)) z) (- (/ x (/ z (+ y 1.0))) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.5e-103) {
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 <= 1.5d-103) 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 <= 1.5e-103) {
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 <= 1.5e-103: 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 <= 1.5e-103) 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 <= 1.5e-103) 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, 1.5e-103], 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 1.5 \cdot 10^{-103}:\\
\;\;\;\;\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 < 1.5e-103Initial program 90.5%
if 1.5e-103 < x Initial program 85.3%
associate-/l*99.8%
+-commutative99.8%
associate-+r-99.8%
div-sub99.8%
*-inverses99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
distribute-lft-in99.8%
clear-num99.8%
un-div-inv99.9%
*-commutative99.9%
mul-1-neg99.9%
Applied egg-rr99.9%
Final simplification94.0%
(FPCore (x y z) :precision binary64 (if (<= x 1.9e+26) (/ (* x (+ (- y z) 1.0)) z) (* x (+ -1.0 (/ (+ y 1.0) z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.9e+26) {
tmp = (x * ((y - z) + 1.0)) / z;
} else {
tmp = x * (-1.0 + ((y + 1.0) / 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 (x <= 1.9d+26) then
tmp = (x * ((y - z) + 1.0d0)) / z
else
tmp = x * ((-1.0d0) + ((y + 1.0d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.9e+26) {
tmp = (x * ((y - z) + 1.0)) / z;
} else {
tmp = x * (-1.0 + ((y + 1.0) / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.9e+26: tmp = (x * ((y - z) + 1.0)) / z else: tmp = x * (-1.0 + ((y + 1.0) / z)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.9e+26) tmp = Float64(Float64(x * Float64(Float64(y - z) + 1.0)) / z); else tmp = Float64(x * Float64(-1.0 + Float64(Float64(y + 1.0) / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.9e+26) tmp = (x * ((y - z) + 1.0)) / z; else tmp = x * (-1.0 + ((y + 1.0) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.9e+26], N[(N[(x * N[(N[(y - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x * N[(-1.0 + N[(N[(y + 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.9 \cdot 10^{+26}:\\
\;\;\;\;\frac{x \cdot \left(\left(y - z\right) + 1\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-1 + \frac{y + 1}{z}\right)\\
\end{array}
\end{array}
if x < 1.9000000000000001e26Initial program 92.2%
if 1.9000000000000001e26 < x Initial program 76.6%
associate-/l*99.9%
+-commutative99.9%
associate-+r-99.9%
div-sub99.9%
*-inverses99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Final simplification94.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.8e+14) (not (<= z 1.0))) (- x) (/ x z)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.8e+14) || !(z <= 1.0)) {
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 <= (-5.8d+14)) .or. (.not. (z <= 1.0d0))) 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 <= -5.8e+14) || !(z <= 1.0)) {
tmp = -x;
} else {
tmp = x / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.8e+14) or not (z <= 1.0): tmp = -x else: tmp = x / z return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.8e+14) || !(z <= 1.0)) tmp = Float64(-x); else tmp = Float64(x / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5.8e+14) || ~((z <= 1.0))) tmp = -x; else tmp = x / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.8e+14], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], (-x), N[(x / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+14} \lor \neg \left(z \leq 1\right):\\
\;\;\;\;-x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z}\\
\end{array}
\end{array}
if z < -5.8e14 or 1 < z Initial program 75.7%
associate-/l*99.9%
+-commutative99.9%
associate-+r-99.9%
div-sub99.9%
*-inverses99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 74.9%
neg-mul-174.9%
Simplified74.9%
if -5.8e14 < z < 1Initial program 99.9%
associate-/l*90.2%
+-commutative90.2%
associate-+r-90.2%
div-sub90.2%
*-inverses90.2%
sub-neg90.2%
metadata-eval90.2%
+-commutative90.2%
Simplified90.2%
Taylor expanded in y around 0 53.3%
Taylor expanded in z around 0 52.7%
Final simplification63.1%
(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 88.6%
associate-/l*94.8%
+-commutative94.8%
associate-+r-94.8%
div-sub94.8%
*-inverses94.8%
sub-neg94.8%
metadata-eval94.8%
+-commutative94.8%
Simplified94.8%
Taylor expanded in z around inf 36.5%
neg-mul-136.5%
Simplified36.5%
(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 88.6%
associate-/l*94.8%
+-commutative94.8%
associate-+r-94.8%
div-sub94.8%
*-inverses94.8%
sub-neg94.8%
metadata-eval94.8%
+-commutative94.8%
Simplified94.8%
Taylor expanded in z around inf 36.5%
neg-mul-136.5%
Simplified36.5%
neg-sub036.5%
sub-neg36.5%
add-sqr-sqrt17.2%
sqrt-unprod19.3%
sqr-neg19.3%
sqrt-unprod1.9%
add-sqr-sqrt3.2%
Applied egg-rr3.2%
+-lft-identity3.2%
Simplified3.2%
(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 2024149
(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))