
(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 12 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.42e-5) (not (<= z 1.85e-30))) (* x (+ -1.0 (/ (+ 1.0 y) z))) (/ (+ x (* x y)) z)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.42e-5) || !(z <= 1.85e-30)) {
tmp = x * (-1.0 + ((1.0 + y) / z));
} 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 <= (-1.42d-5)) .or. (.not. (z <= 1.85d-30))) then
tmp = x * ((-1.0d0) + ((1.0d0 + y) / z))
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 <= -1.42e-5) || !(z <= 1.85e-30)) {
tmp = x * (-1.0 + ((1.0 + y) / z));
} else {
tmp = (x + (x * y)) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.42e-5) or not (z <= 1.85e-30): tmp = x * (-1.0 + ((1.0 + y) / z)) else: tmp = (x + (x * y)) / z return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.42e-5) || !(z <= 1.85e-30)) tmp = Float64(x * Float64(-1.0 + Float64(Float64(1.0 + y) / z))); 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 <= -1.42e-5) || ~((z <= 1.85e-30))) tmp = x * (-1.0 + ((1.0 + y) / z)); else tmp = (x + (x * y)) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.42e-5], N[Not[LessEqual[z, 1.85e-30]], $MachinePrecision]], N[(x * N[(-1.0 + N[(N[(1.0 + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(x * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.42 \cdot 10^{-5} \lor \neg \left(z \leq 1.85 \cdot 10^{-30}\right):\\
\;\;\;\;x \cdot \left(-1 + \frac{1 + y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + x \cdot y}{z}\\
\end{array}
\end{array}
if z < -1.42e-5 or 1.8500000000000002e-30 < z Initial program 67.9%
Taylor expanded in x around 0 67.9%
associate--l+67.9%
+-commutative67.9%
associate-*r/99.9%
+-commutative99.9%
associate--l+99.9%
div-sub99.9%
sub-neg99.9%
*-inverses99.9%
metadata-eval99.9%
Simplified99.9%
if -1.42e-5 < z < 1.8500000000000002e-30Initial program 99.9%
distribute-lft-in99.9%
fma-def99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (/ x z))))
(if (<= y -1.15e+69)
t_0
(if (<= y -5.8e+47)
(- x)
(if (or (<= y -6.5e+16)
(and (not (<= y 1.65e+15))
(or (<= y 1.86e+56) (not (<= y 4.6e+116)))))
t_0
(- (/ x z) x))))))
double code(double x, double y, double z) {
double t_0 = y * (x / z);
double tmp;
if (y <= -1.15e+69) {
tmp = t_0;
} else if (y <= -5.8e+47) {
tmp = -x;
} else if ((y <= -6.5e+16) || (!(y <= 1.65e+15) && ((y <= 1.86e+56) || !(y <= 4.6e+116)))) {
tmp = t_0;
} 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) :: t_0
real(8) :: tmp
t_0 = y * (x / z)
if (y <= (-1.15d+69)) then
tmp = t_0
else if (y <= (-5.8d+47)) then
tmp = -x
else if ((y <= (-6.5d+16)) .or. (.not. (y <= 1.65d+15)) .and. (y <= 1.86d+56) .or. (.not. (y <= 4.6d+116))) then
tmp = t_0
else
tmp = (x / z) - 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 (y <= -1.15e+69) {
tmp = t_0;
} else if (y <= -5.8e+47) {
tmp = -x;
} else if ((y <= -6.5e+16) || (!(y <= 1.65e+15) && ((y <= 1.86e+56) || !(y <= 4.6e+116)))) {
tmp = t_0;
} else {
tmp = (x / z) - x;
}
return tmp;
}
def code(x, y, z): t_0 = y * (x / z) tmp = 0 if y <= -1.15e+69: tmp = t_0 elif y <= -5.8e+47: tmp = -x elif (y <= -6.5e+16) or (not (y <= 1.65e+15) and ((y <= 1.86e+56) or not (y <= 4.6e+116))): tmp = t_0 else: tmp = (x / z) - x return tmp
function code(x, y, z) t_0 = Float64(y * Float64(x / z)) tmp = 0.0 if (y <= -1.15e+69) tmp = t_0; elseif (y <= -5.8e+47) tmp = Float64(-x); elseif ((y <= -6.5e+16) || (!(y <= 1.65e+15) && ((y <= 1.86e+56) || !(y <= 4.6e+116)))) tmp = t_0; else tmp = Float64(Float64(x / z) - x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (x / z); tmp = 0.0; if (y <= -1.15e+69) tmp = t_0; elseif (y <= -5.8e+47) tmp = -x; elseif ((y <= -6.5e+16) || (~((y <= 1.65e+15)) && ((y <= 1.86e+56) || ~((y <= 4.6e+116))))) tmp = t_0; else tmp = (x / z) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.15e+69], t$95$0, If[LessEqual[y, -5.8e+47], (-x), If[Or[LessEqual[y, -6.5e+16], And[N[Not[LessEqual[y, 1.65e+15]], $MachinePrecision], Or[LessEqual[y, 1.86e+56], N[Not[LessEqual[y, 4.6e+116]], $MachinePrecision]]]], t$95$0, N[(N[(x / z), $MachinePrecision] - x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \frac{x}{z}\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+69}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -5.8 \cdot 10^{+47}:\\
\;\;\;\;-x\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{+16} \lor \neg \left(y \leq 1.65 \cdot 10^{+15}\right) \land \left(y \leq 1.86 \cdot 10^{+56} \lor \neg \left(y \leq 4.6 \cdot 10^{+116}\right)\right):\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} - x\\
\end{array}
\end{array}
if y < -1.15000000000000008e69 or -5.79999999999999961e47 < y < -6.5e16 or 1.65e15 < y < 1.86000000000000007e56 or 4.5999999999999999e116 < y Initial program 90.1%
Taylor expanded in y around inf 79.6%
associate-/l*73.4%
associate-/r/83.1%
Simplified83.1%
if -1.15000000000000008e69 < y < -5.79999999999999961e47Initial program 42.9%
Taylor expanded in z around inf 100.0%
mul-1-neg100.0%
Simplified100.0%
if -6.5e16 < y < 1.65e15 or 1.86000000000000007e56 < y < 4.5999999999999999e116Initial program 81.2%
Taylor expanded in y around 0 77.4%
Taylor expanded in z around 0 96.2%
neg-mul-196.2%
+-commutative96.2%
unsub-neg96.2%
Simplified96.2%
Final simplification90.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (/ x z))))
(if (<= y -1.1e+69)
t_0
(if (<= y -1.3e+50)
(- x)
(if (<= y -1.45e+16)
(/ y (/ z x))
(if (or (<= y 1.7e+16) (and (not (<= y 1.25e+55)) (<= y 9.2e+115)))
(- (/ x z) x)
t_0))))))
double code(double x, double y, double z) {
double t_0 = y * (x / z);
double tmp;
if (y <= -1.1e+69) {
tmp = t_0;
} else if (y <= -1.3e+50) {
tmp = -x;
} else if (y <= -1.45e+16) {
tmp = y / (z / x);
} else if ((y <= 1.7e+16) || (!(y <= 1.25e+55) && (y <= 9.2e+115))) {
tmp = (x / z) - x;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = y * (x / z)
if (y <= (-1.1d+69)) then
tmp = t_0
else if (y <= (-1.3d+50)) then
tmp = -x
else if (y <= (-1.45d+16)) then
tmp = y / (z / x)
else if ((y <= 1.7d+16) .or. (.not. (y <= 1.25d+55)) .and. (y <= 9.2d+115)) then
tmp = (x / z) - x
else
tmp = t_0
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 (y <= -1.1e+69) {
tmp = t_0;
} else if (y <= -1.3e+50) {
tmp = -x;
} else if (y <= -1.45e+16) {
tmp = y / (z / x);
} else if ((y <= 1.7e+16) || (!(y <= 1.25e+55) && (y <= 9.2e+115))) {
tmp = (x / z) - x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = y * (x / z) tmp = 0 if y <= -1.1e+69: tmp = t_0 elif y <= -1.3e+50: tmp = -x elif y <= -1.45e+16: tmp = y / (z / x) elif (y <= 1.7e+16) or (not (y <= 1.25e+55) and (y <= 9.2e+115)): tmp = (x / z) - x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(y * Float64(x / z)) tmp = 0.0 if (y <= -1.1e+69) tmp = t_0; elseif (y <= -1.3e+50) tmp = Float64(-x); elseif (y <= -1.45e+16) tmp = Float64(y / Float64(z / x)); elseif ((y <= 1.7e+16) || (!(y <= 1.25e+55) && (y <= 9.2e+115))) tmp = Float64(Float64(x / z) - x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = y * (x / z); tmp = 0.0; if (y <= -1.1e+69) tmp = t_0; elseif (y <= -1.3e+50) tmp = -x; elseif (y <= -1.45e+16) tmp = y / (z / x); elseif ((y <= 1.7e+16) || (~((y <= 1.25e+55)) && (y <= 9.2e+115))) tmp = (x / z) - x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.1e+69], t$95$0, If[LessEqual[y, -1.3e+50], (-x), If[LessEqual[y, -1.45e+16], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 1.7e+16], And[N[Not[LessEqual[y, 1.25e+55]], $MachinePrecision], LessEqual[y, 9.2e+115]]], N[(N[(x / z), $MachinePrecision] - x), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \frac{x}{z}\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+69}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{+50}:\\
\;\;\;\;-x\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{+16}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+16} \lor \neg \left(y \leq 1.25 \cdot 10^{+55}\right) \land y \leq 9.2 \cdot 10^{+115}:\\
\;\;\;\;\frac{x}{z} - x\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -1.1000000000000001e69 or 1.7e16 < y < 1.25000000000000011e55 or 9.20000000000000014e115 < y Initial program 89.1%
Taylor expanded in y around inf 78.5%
associate-/l*72.6%
associate-/r/82.3%
Simplified82.3%
if -1.1000000000000001e69 < y < -1.3000000000000001e50Initial program 42.9%
Taylor expanded in z around inf 100.0%
mul-1-neg100.0%
Simplified100.0%
if -1.3000000000000001e50 < y < -1.45e16Initial program 99.5%
Taylor expanded in y around inf 90.2%
associate-/l*80.9%
associate-/r/90.1%
Simplified90.1%
*-commutative90.1%
clear-num89.9%
un-div-inv90.4%
Applied egg-rr90.4%
if -1.45e16 < y < 1.7e16 or 1.25000000000000011e55 < y < 9.20000000000000014e115Initial program 81.2%
Taylor expanded in y around 0 77.4%
Taylor expanded in z around 0 96.2%
neg-mul-196.2%
+-commutative96.2%
unsub-neg96.2%
Simplified96.2%
Final simplification90.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (/ x z))))
(if (<= z -5.9e+23)
(- x)
(if (<= z -1.18e-225)
t_0
(if (<= z 1.85e-287)
(/ x z)
(if (<= z 6.4e-150) t_0 (if (<= z 3.3e+19) (/ x z) (- x))))))))
double code(double x, double y, double z) {
double t_0 = y * (x / z);
double tmp;
if (z <= -5.9e+23) {
tmp = -x;
} else if (z <= -1.18e-225) {
tmp = t_0;
} else if (z <= 1.85e-287) {
tmp = x / z;
} else if (z <= 6.4e-150) {
tmp = t_0;
} else if (z <= 3.3e+19) {
tmp = x / z;
} 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 <= (-5.9d+23)) then
tmp = -x
else if (z <= (-1.18d-225)) then
tmp = t_0
else if (z <= 1.85d-287) then
tmp = x / z
else if (z <= 6.4d-150) then
tmp = t_0
else if (z <= 3.3d+19) then
tmp = x / z
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 <= -5.9e+23) {
tmp = -x;
} else if (z <= -1.18e-225) {
tmp = t_0;
} else if (z <= 1.85e-287) {
tmp = x / z;
} else if (z <= 6.4e-150) {
tmp = t_0;
} else if (z <= 3.3e+19) {
tmp = x / z;
} else {
tmp = -x;
}
return tmp;
}
def code(x, y, z): t_0 = y * (x / z) tmp = 0 if z <= -5.9e+23: tmp = -x elif z <= -1.18e-225: tmp = t_0 elif z <= 1.85e-287: tmp = x / z elif z <= 6.4e-150: tmp = t_0 elif z <= 3.3e+19: tmp = x / z else: tmp = -x return tmp
function code(x, y, z) t_0 = Float64(y * Float64(x / z)) tmp = 0.0 if (z <= -5.9e+23) tmp = Float64(-x); elseif (z <= -1.18e-225) tmp = t_0; elseif (z <= 1.85e-287) tmp = Float64(x / z); elseif (z <= 6.4e-150) tmp = t_0; elseif (z <= 3.3e+19) tmp = Float64(x / z); 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 <= -5.9e+23) tmp = -x; elseif (z <= -1.18e-225) tmp = t_0; elseif (z <= 1.85e-287) tmp = x / z; elseif (z <= 6.4e-150) tmp = t_0; elseif (z <= 3.3e+19) tmp = x / z; 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, -5.9e+23], (-x), If[LessEqual[z, -1.18e-225], t$95$0, If[LessEqual[z, 1.85e-287], N[(x / z), $MachinePrecision], If[LessEqual[z, 6.4e-150], t$95$0, If[LessEqual[z, 3.3e+19], N[(x / z), $MachinePrecision], (-x)]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \frac{x}{z}\\
\mathbf{if}\;z \leq -5.9 \cdot 10^{+23}:\\
\;\;\;\;-x\\
\mathbf{elif}\;z \leq -1.18 \cdot 10^{-225}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-287}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{-150}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+19}:\\
\;\;\;\;\frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;-x\\
\end{array}
\end{array}
if z < -5.89999999999999987e23 or 3.3e19 < z Initial program 64.4%
Taylor expanded in z around inf 82.5%
mul-1-neg82.5%
Simplified82.5%
if -5.89999999999999987e23 < z < -1.18e-225 or 1.85000000000000013e-287 < z < 6.3999999999999996e-150Initial program 98.9%
Taylor expanded in y around inf 70.8%
associate-/l*59.5%
associate-/r/74.3%
Simplified74.3%
if -1.18e-225 < z < 1.85000000000000013e-287 or 6.3999999999999996e-150 < z < 3.3e19Initial program 99.9%
distribute-lft-in99.9%
fma-def99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in y around 0 69.7%
Final simplification76.7%
(FPCore (x y z)
:precision binary64
(if (<= y -4.8e+187)
(/ (* x y) z)
(if (or (<= y -1.0) (not (<= y 0.0073)))
(* x (+ -1.0 (/ y z)))
(- (/ x z) x))))
double code(double x, double y, double z) {
double tmp;
if (y <= -4.8e+187) {
tmp = (x * y) / z;
} else if ((y <= -1.0) || !(y <= 0.0073)) {
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 <= (-4.8d+187)) then
tmp = (x * y) / z
else if ((y <= (-1.0d0)) .or. (.not. (y <= 0.0073d0))) 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 <= -4.8e+187) {
tmp = (x * y) / z;
} else if ((y <= -1.0) || !(y <= 0.0073)) {
tmp = x * (-1.0 + (y / z));
} else {
tmp = (x / z) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -4.8e+187: tmp = (x * y) / z elif (y <= -1.0) or not (y <= 0.0073): tmp = x * (-1.0 + (y / z)) else: tmp = (x / z) - x return tmp
function code(x, y, z) tmp = 0.0 if (y <= -4.8e+187) tmp = Float64(Float64(x * y) / z); elseif ((y <= -1.0) || !(y <= 0.0073)) 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 <= -4.8e+187) tmp = (x * y) / z; elseif ((y <= -1.0) || ~((y <= 0.0073))) tmp = x * (-1.0 + (y / z)); else tmp = (x / z) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -4.8e+187], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[Or[LessEqual[y, -1.0], N[Not[LessEqual[y, 0.0073]], $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 -4.8 \cdot 10^{+187}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;y \leq -1 \lor \neg \left(y \leq 0.0073\right):\\
\;\;\;\;x \cdot \left(-1 + \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} - x\\
\end{array}
\end{array}
if y < -4.79999999999999971e187Initial program 95.9%
Taylor expanded in y around inf 92.1%
if -4.79999999999999971e187 < y < -1 or 0.00730000000000000007 < y Initial program 85.0%
Taylor expanded in z around 0 91.0%
Taylor expanded in y around inf 90.4%
associate-*r/91.3%
Simplified91.3%
Taylor expanded in x around 0 91.3%
if -1 < y < 0.00730000000000000007Initial program 81.2%
Taylor expanded in y around 0 79.8%
Taylor expanded in z around 0 98.6%
neg-mul-198.6%
+-commutative98.6%
unsub-neg98.6%
Simplified98.6%
Final simplification94.9%
(FPCore (x y z)
:precision binary64
(if (<= y -4e+187)
(/ (* x y) z)
(if (<= y -1.0)
(* x (+ -1.0 (/ y z)))
(if (<= y 0.0073) (- (/ x z) x) (- (* x (/ y z)) x)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -4e+187) {
tmp = (x * y) / z;
} else if (y <= -1.0) {
tmp = x * (-1.0 + (y / z));
} else if (y <= 0.0073) {
tmp = (x / z) - x;
} 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 (y <= (-4d+187)) then
tmp = (x * y) / z
else if (y <= (-1.0d0)) then
tmp = x * ((-1.0d0) + (y / z))
else if (y <= 0.0073d0) then
tmp = (x / z) - x
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 (y <= -4e+187) {
tmp = (x * y) / z;
} else if (y <= -1.0) {
tmp = x * (-1.0 + (y / z));
} else if (y <= 0.0073) {
tmp = (x / z) - x;
} else {
tmp = (x * (y / z)) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -4e+187: tmp = (x * y) / z elif y <= -1.0: tmp = x * (-1.0 + (y / z)) elif y <= 0.0073: tmp = (x / z) - x else: tmp = (x * (y / z)) - x return tmp
function code(x, y, z) tmp = 0.0 if (y <= -4e+187) tmp = Float64(Float64(x * y) / z); elseif (y <= -1.0) tmp = Float64(x * Float64(-1.0 + Float64(y / z))); elseif (y <= 0.0073) tmp = Float64(Float64(x / z) - x); else tmp = Float64(Float64(x * Float64(y / z)) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -4e+187) tmp = (x * y) / z; elseif (y <= -1.0) tmp = x * (-1.0 + (y / z)); elseif (y <= 0.0073) tmp = (x / z) - x; else tmp = (x * (y / z)) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -4e+187], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -1.0], N[(x * N[(-1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0073], N[(N[(x / z), $MachinePrecision] - x), $MachinePrecision], N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+187}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{elif}\;y \leq -1:\\
\;\;\;\;x \cdot \left(-1 + \frac{y}{z}\right)\\
\mathbf{elif}\;y \leq 0.0073:\\
\;\;\;\;\frac{x}{z} - x\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z} - x\\
\end{array}
\end{array}
if y < -3.99999999999999963e187Initial program 95.9%
Taylor expanded in y around inf 92.1%
if -3.99999999999999963e187 < y < -1Initial program 84.8%
Taylor expanded in z around 0 94.8%
Taylor expanded in y around inf 94.8%
associate-*r/89.8%
Simplified89.8%
Taylor expanded in x around 0 89.9%
if -1 < y < 0.00730000000000000007Initial program 81.2%
Taylor expanded in y around 0 79.8%
Taylor expanded in z around 0 98.6%
neg-mul-198.6%
+-commutative98.6%
unsub-neg98.6%
Simplified98.6%
if 0.00730000000000000007 < y Initial program 85.1%
Taylor expanded in z around 0 88.9%
Taylor expanded in y around inf 88.0%
associate-*r/92.0%
Simplified92.0%
+-commutative92.0%
mul-1-neg92.0%
unsub-neg92.0%
Applied egg-rr92.0%
Final simplification94.9%
(FPCore (x y z) :precision binary64 (if (<= z -1.1) (- (* x (/ y z)) x) (if (<= z 1.0) (/ (+ x (* x y)) z) (* x (+ -1.0 (/ y z))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.1) {
tmp = (x * (y / z)) - x;
} else if (z <= 1.0) {
tmp = (x + (x * y)) / z;
} else {
tmp = x * (-1.0 + (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 <= (-1.1d0)) then
tmp = (x * (y / z)) - x
else if (z <= 1.0d0) then
tmp = (x + (x * y)) / z
else
tmp = x * ((-1.0d0) + (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.1) {
tmp = (x * (y / z)) - x;
} else if (z <= 1.0) {
tmp = (x + (x * y)) / z;
} else {
tmp = x * (-1.0 + (y / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.1: tmp = (x * (y / z)) - x elif z <= 1.0: tmp = (x + (x * y)) / z else: tmp = x * (-1.0 + (y / z)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.1) tmp = Float64(Float64(x * Float64(y / z)) - x); elseif (z <= 1.0) tmp = Float64(Float64(x + Float64(x * y)) / z); else tmp = Float64(x * Float64(-1.0 + Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.1) tmp = (x * (y / z)) - x; elseif (z <= 1.0) tmp = (x + (x * y)) / z; else tmp = x * (-1.0 + (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.1], N[(N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], If[LessEqual[z, 1.0], N[(N[(x + N[(x * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x * N[(-1.0 + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1:\\
\;\;\;\;x \cdot \frac{y}{z} - x\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;\frac{x + x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-1 + \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -1.1000000000000001Initial program 66.9%
Taylor expanded in z around 0 94.3%
Taylor expanded in y around inf 93.0%
associate-*r/98.6%
Simplified98.6%
+-commutative98.6%
mul-1-neg98.6%
unsub-neg98.6%
Applied egg-rr98.6%
if -1.1000000000000001 < z < 1Initial program 99.9%
distribute-lft-in99.9%
fma-def99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
if 1 < z Initial program 66.3%
Taylor expanded in z around 0 87.4%
Taylor expanded in y around inf 87.4%
associate-*r/99.9%
Simplified99.9%
Taylor expanded in x around 0 100.0%
Final simplification99.6%
(FPCore (x y z) :precision binary64 (if (<= x 3.2e-8) (- (/ (* x (+ 1.0 y)) z) x) (/ (+ y (- 1.0 z)) (/ z x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 3.2e-8) {
tmp = ((x * (1.0 + y)) / z) - x;
} else {
tmp = (y + (1.0 - z)) / (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 (x <= 3.2d-8) then
tmp = ((x * (1.0d0 + y)) / z) - x
else
tmp = (y + (1.0d0 - z)) / (z / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 3.2e-8) {
tmp = ((x * (1.0 + y)) / z) - x;
} else {
tmp = (y + (1.0 - z)) / (z / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 3.2e-8: tmp = ((x * (1.0 + y)) / z) - x else: tmp = (y + (1.0 - z)) / (z / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 3.2e-8) tmp = Float64(Float64(Float64(x * Float64(1.0 + y)) / z) - x); else tmp = Float64(Float64(y + Float64(1.0 - z)) / Float64(z / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 3.2e-8) tmp = ((x * (1.0 + y)) / z) - x; else tmp = (y + (1.0 - z)) / (z / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 3.2e-8], N[(N[(N[(x * N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - x), $MachinePrecision], N[(N[(y + N[(1.0 - z), $MachinePrecision]), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3.2 \cdot 10^{-8}:\\
\;\;\;\;\frac{x \cdot \left(1 + y\right)}{z} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{y + \left(1 - z\right)}{\frac{z}{x}}\\
\end{array}
\end{array}
if x < 3.2000000000000002e-8Initial program 91.1%
Taylor expanded in z around 0 96.9%
if 3.2000000000000002e-8 < x Initial program 63.8%
associate-/l*99.9%
associate-/r/99.8%
Applied egg-rr99.8%
*-commutative99.8%
clear-num99.6%
un-div-inv99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
sub-neg99.8%
Applied egg-rr99.8%
Final simplification97.6%
(FPCore (x y z) :precision binary64 (if (<= x 2.2e-62) (/ (* x (+ 1.0 (- y z))) z) (* x (+ -1.0 (/ (+ 1.0 y) z)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.2e-62) {
tmp = (x * (1.0 + (y - z))) / z;
} else {
tmp = x * (-1.0 + ((1.0 + 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 (x <= 2.2d-62) then
tmp = (x * (1.0d0 + (y - z))) / z
else
tmp = x * ((-1.0d0) + ((1.0d0 + y) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2.2e-62) {
tmp = (x * (1.0 + (y - z))) / z;
} else {
tmp = x * (-1.0 + ((1.0 + y) / z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2.2e-62: tmp = (x * (1.0 + (y - z))) / z else: tmp = x * (-1.0 + ((1.0 + y) / z)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2.2e-62) tmp = Float64(Float64(x * Float64(1.0 + Float64(y - z))) / z); else tmp = Float64(x * Float64(-1.0 + Float64(Float64(1.0 + y) / z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2.2e-62) tmp = (x * (1.0 + (y - z))) / z; else tmp = x * (-1.0 + ((1.0 + y) / z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2.2e-62], N[(N[(x * N[(1.0 + N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x * N[(-1.0 + N[(N[(1.0 + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.2 \cdot 10^{-62}:\\
\;\;\;\;\frac{x \cdot \left(1 + \left(y - z\right)\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-1 + \frac{1 + y}{z}\right)\\
\end{array}
\end{array}
if x < 2.20000000000000017e-62Initial program 90.8%
if 2.20000000000000017e-62 < x Initial program 66.9%
Taylor expanded in x around 0 66.9%
associate--l+66.9%
+-commutative66.9%
associate-*r/99.8%
+-commutative99.8%
associate--l+99.8%
div-sub99.8%
sub-neg99.8%
*-inverses99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification93.3%
(FPCore (x y z) :precision binary64 (if (<= x 2e-8) (/ (* x (+ 1.0 (- y z))) z) (/ (+ y (- 1.0 z)) (/ z x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 2e-8) {
tmp = (x * (1.0 + (y - z))) / z;
} else {
tmp = (y + (1.0 - z)) / (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 (x <= 2d-8) then
tmp = (x * (1.0d0 + (y - z))) / z
else
tmp = (y + (1.0d0 - z)) / (z / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 2e-8) {
tmp = (x * (1.0 + (y - z))) / z;
} else {
tmp = (y + (1.0 - z)) / (z / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 2e-8: tmp = (x * (1.0 + (y - z))) / z else: tmp = (y + (1.0 - z)) / (z / x) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 2e-8) tmp = Float64(Float64(x * Float64(1.0 + Float64(y - z))) / z); else tmp = Float64(Float64(y + Float64(1.0 - z)) / Float64(z / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 2e-8) tmp = (x * (1.0 + (y - z))) / z; else tmp = (y + (1.0 - z)) / (z / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 2e-8], N[(N[(x * N[(1.0 + N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(y + N[(1.0 - z), $MachinePrecision]), $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{-8}:\\
\;\;\;\;\frac{x \cdot \left(1 + \left(y - z\right)\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y + \left(1 - z\right)}{\frac{z}{x}}\\
\end{array}
\end{array}
if x < 2e-8Initial program 91.1%
if 2e-8 < x Initial program 63.8%
associate-/l*99.9%
associate-/r/99.8%
Applied egg-rr99.8%
*-commutative99.8%
clear-num99.6%
un-div-inv99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
sub-neg99.8%
Applied egg-rr99.8%
Final simplification93.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.0) (not (<= z 3.3e+19))) (- x) (/ x z)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.0) || !(z <= 3.3e+19)) {
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 <= 3.3d+19))) 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 <= 3.3e+19)) {
tmp = -x;
} else {
tmp = x / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.0) or not (z <= 3.3e+19): tmp = -x else: tmp = x / z return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.0) || !(z <= 3.3e+19)) 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 <= 3.3e+19))) 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, 3.3e+19]], $MachinePrecision]], (-x), N[(x / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 3.3 \cdot 10^{+19}\right):\\
\;\;\;\;-x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z}\\
\end{array}
\end{array}
if z < -1 or 3.3e19 < z Initial program 66.1%
Taylor expanded in z around inf 78.1%
mul-1-neg78.1%
Simplified78.1%
if -1 < z < 3.3e19Initial program 99.9%
distribute-lft-in99.9%
fma-def99.9%
*-rgt-identity99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in y around 0 54.2%
Final simplification65.3%
(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.2%
Taylor expanded in z around inf 38.1%
mul-1-neg38.1%
Simplified38.1%
Final simplification38.1%
(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 2024029
(FPCore (x y z)
:name "Diagrams.TwoD.Segment.Bernstein:evaluateBernstein from diagrams-lib-1.3.0.3"
:precision binary64
:herbie-target
(if (< x -2.71483106713436e-162) (- (* (+ 1.0 y) (/ x z)) x) (if (< x 3.874108816439546e-197) (* (* x (+ (- y z) 1.0)) (/ 1.0 z)) (- (* (+ 1.0 y) (/ x z)) x)))
(/ (* x (+ (- y z) 1.0)) z))