
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -5e+75) (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))) (+ x (/ (- y (/ t y)) (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -5e+75) {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= (-5d+75)) then
tmp = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
else
tmp = x + ((y - (t / y)) / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -5e+75) {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -5e+75: tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)) else: tmp = x + ((y - (t / y)) / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -5e+75) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))); else tmp = Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -5e+75) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); else tmp = x + ((y - (t / y)) / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -5e+75], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -5 \cdot 10^{+75}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\end{array}
\end{array}
if (*.f64 z 3) < -5.0000000000000002e75Initial program 99.8%
if -5.0000000000000002e75 < (*.f64 z 3) Initial program 96.4%
associate-+l-96.4%
sub-neg96.4%
sub-neg96.4%
distribute-neg-in96.4%
unsub-neg96.4%
neg-mul-196.4%
associate-*r/96.4%
associate-*l/96.4%
distribute-neg-frac96.4%
neg-mul-196.4%
times-frac99.3%
distribute-lft-out--99.3%
*-commutative99.3%
associate-/r*99.2%
metadata-eval99.2%
Simplified99.2%
clear-num99.2%
inv-pow99.2%
Applied egg-rr99.2%
unpow-199.2%
Simplified99.2%
expm1-log1p-u61.0%
expm1-udef53.0%
associate-*l/53.0%
*-un-lft-identity53.0%
div-inv53.0%
metadata-eval53.0%
Applied egg-rr53.0%
expm1-def60.9%
expm1-log1p99.3%
Simplified99.3%
Final simplification99.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (* z -3.0))))
(if (<= y -4.6e+144)
(/ (/ y -3.0) z)
(if (<= y -4.4e+123)
x
(if (<= y -4.7e-42)
t_1
(if (<= y -1.2e-67)
x
(if (<= y 2.2e-134)
(* 0.3333333333333333 (/ (/ t y) z))
(if (<= y 75000000000.0) x t_1))))))))
double code(double x, double y, double z, double t) {
double t_1 = y / (z * -3.0);
double tmp;
if (y <= -4.6e+144) {
tmp = (y / -3.0) / z;
} else if (y <= -4.4e+123) {
tmp = x;
} else if (y <= -4.7e-42) {
tmp = t_1;
} else if (y <= -1.2e-67) {
tmp = x;
} else if (y <= 2.2e-134) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else if (y <= 75000000000.0) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y / (z * (-3.0d0))
if (y <= (-4.6d+144)) then
tmp = (y / (-3.0d0)) / z
else if (y <= (-4.4d+123)) then
tmp = x
else if (y <= (-4.7d-42)) then
tmp = t_1
else if (y <= (-1.2d-67)) then
tmp = x
else if (y <= 2.2d-134) then
tmp = 0.3333333333333333d0 * ((t / y) / z)
else if (y <= 75000000000.0d0) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y / (z * -3.0);
double tmp;
if (y <= -4.6e+144) {
tmp = (y / -3.0) / z;
} else if (y <= -4.4e+123) {
tmp = x;
} else if (y <= -4.7e-42) {
tmp = t_1;
} else if (y <= -1.2e-67) {
tmp = x;
} else if (y <= 2.2e-134) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else if (y <= 75000000000.0) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (z * -3.0) tmp = 0 if y <= -4.6e+144: tmp = (y / -3.0) / z elif y <= -4.4e+123: tmp = x elif y <= -4.7e-42: tmp = t_1 elif y <= -1.2e-67: tmp = x elif y <= 2.2e-134: tmp = 0.3333333333333333 * ((t / y) / z) elif y <= 75000000000.0: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(z * -3.0)) tmp = 0.0 if (y <= -4.6e+144) tmp = Float64(Float64(y / -3.0) / z); elseif (y <= -4.4e+123) tmp = x; elseif (y <= -4.7e-42) tmp = t_1; elseif (y <= -1.2e-67) tmp = x; elseif (y <= 2.2e-134) tmp = Float64(0.3333333333333333 * Float64(Float64(t / y) / z)); elseif (y <= 75000000000.0) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (z * -3.0); tmp = 0.0; if (y <= -4.6e+144) tmp = (y / -3.0) / z; elseif (y <= -4.4e+123) tmp = x; elseif (y <= -4.7e-42) tmp = t_1; elseif (y <= -1.2e-67) tmp = x; elseif (y <= 2.2e-134) tmp = 0.3333333333333333 * ((t / y) / z); elseif (y <= 75000000000.0) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.6e+144], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -4.4e+123], x, If[LessEqual[y, -4.7e-42], t$95$1, If[LessEqual[y, -1.2e-67], x, If[LessEqual[y, 2.2e-134], N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 75000000000.0], x, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z \cdot -3}\\
\mathbf{if}\;y \leq -4.6 \cdot 10^{+144}:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq -4.4 \cdot 10^{+123}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -4.7 \cdot 10^{-42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-67}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-134}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 75000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -4.6000000000000003e144Initial program 99.8%
Taylor expanded in x around 0 72.2%
associate-/r*72.2%
associate-*r/72.2%
associate-*r/72.1%
div-sub72.1%
distribute-lft-out--72.1%
Simplified72.1%
Taylor expanded in t around 0 72.1%
*-commutative72.1%
Simplified72.1%
metadata-eval72.1%
div-inv72.3%
Applied egg-rr72.3%
if -4.6000000000000003e144 < y < -4.39999999999999984e123 or -4.7000000000000001e-42 < y < -1.2e-67 or 2.2e-134 < y < 7.5e10Initial program 100.0%
Taylor expanded in x around inf 66.7%
if -4.39999999999999984e123 < y < -4.7000000000000001e-42 or 7.5e10 < y Initial program 99.7%
Taylor expanded in y around inf 66.3%
*-commutative66.3%
Simplified66.3%
Taylor expanded in y around 0 66.3%
*-commutative66.3%
metadata-eval66.3%
times-frac66.4%
*-rgt-identity66.4%
Simplified66.4%
if -1.2e-67 < y < 2.2e-134Initial program 91.7%
Taylor expanded in x around 0 65.6%
associate-/r*67.0%
associate-*r/66.9%
associate-*r/66.9%
div-sub66.9%
distribute-lft-out--66.9%
Simplified66.9%
Taylor expanded in t around inf 65.3%
*-un-lft-identity65.3%
times-frac65.3%
metadata-eval65.3%
Applied egg-rr65.3%
Final simplification66.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.02e-69)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= y -5.7e-118)
(/ 0.3333333333333333 (/ (* z y) t))
(if (or (<= y -9e-178) (not (<= y 3.6e-136)))
(+ x (* y (/ -0.3333333333333333 z)))
(/ 0.3333333333333333 (* z (/ y t)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.02e-69) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= -5.7e-118) {
tmp = 0.3333333333333333 / ((z * y) / t);
} else if ((y <= -9e-178) || !(y <= 3.6e-136)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 / (z * (y / t));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.02d-69)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (y <= (-5.7d-118)) then
tmp = 0.3333333333333333d0 / ((z * y) / t)
else if ((y <= (-9d-178)) .or. (.not. (y <= 3.6d-136))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 / (z * (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.02e-69) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= -5.7e-118) {
tmp = 0.3333333333333333 / ((z * y) / t);
} else if ((y <= -9e-178) || !(y <= 3.6e-136)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 / (z * (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.02e-69: tmp = x + ((y * -0.3333333333333333) / z) elif y <= -5.7e-118: tmp = 0.3333333333333333 / ((z * y) / t) elif (y <= -9e-178) or not (y <= 3.6e-136): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 / (z * (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.02e-69) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (y <= -5.7e-118) tmp = Float64(0.3333333333333333 / Float64(Float64(z * y) / t)); elseif ((y <= -9e-178) || !(y <= 3.6e-136)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 / Float64(z * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.02e-69) tmp = x + ((y * -0.3333333333333333) / z); elseif (y <= -5.7e-118) tmp = 0.3333333333333333 / ((z * y) / t); elseif ((y <= -9e-178) || ~((y <= 3.6e-136))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 / (z * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.02e-69], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.7e-118], N[(0.3333333333333333 / N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -9e-178], N[Not[LessEqual[y, 3.6e-136]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 / N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{-69}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -5.7 \cdot 10^{-118}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{z \cdot y}{t}}\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-178} \lor \neg \left(y \leq 3.6 \cdot 10^{-136}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if y < -1.02000000000000005e-69Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
distribute-neg-in99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
times-frac98.6%
distribute-lft-out--98.6%
*-commutative98.6%
associate-/r*98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 98.6%
associate-*r/98.6%
Applied egg-rr98.6%
Taylor expanded in y around inf 84.8%
*-commutative84.8%
Simplified84.8%
if -1.02000000000000005e-69 < y < -5.70000000000000012e-118Initial program 99.2%
Taylor expanded in x around 0 85.5%
associate-/r*74.3%
associate-*r/74.3%
associate-*r/74.3%
div-sub74.3%
distribute-lft-out--74.3%
Simplified74.3%
clear-num74.3%
inv-pow74.3%
*-un-lft-identity74.3%
times-frac74.3%
metadata-eval74.3%
Applied egg-rr74.3%
unpow-174.3%
associate-/r*74.3%
metadata-eval74.3%
Simplified74.3%
Taylor expanded in t around inf 80.2%
if -5.70000000000000012e-118 < y < -8.99999999999999957e-178 or 3.5999999999999998e-136 < y Initial program 98.0%
associate-+l-98.0%
sub-neg98.0%
sub-neg98.0%
distribute-neg-in98.0%
unsub-neg98.0%
neg-mul-198.0%
associate-*r/98.0%
associate-*l/98.0%
distribute-neg-frac98.0%
neg-mul-198.0%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 81.8%
if -8.99999999999999957e-178 < y < 3.5999999999999998e-136Initial program 91.2%
Taylor expanded in x around 0 71.5%
associate-/r*73.5%
associate-*r/73.4%
associate-*r/73.4%
div-sub73.4%
distribute-lft-out--73.4%
Simplified73.4%
clear-num73.4%
inv-pow73.4%
*-un-lft-identity73.4%
times-frac73.4%
metadata-eval73.4%
Applied egg-rr73.4%
unpow-173.4%
associate-/r*73.4%
metadata-eval73.4%
Simplified73.4%
Taylor expanded in t around inf 71.6%
associate-*l/74.2%
*-commutative74.2%
Simplified74.2%
Final simplification81.2%
(FPCore (x y z t) :precision binary64 (if (or (<= x -145000000000.0) (not (<= x 8.2e-39))) (+ x (/ (* y -0.3333333333333333) z)) (* (- y (/ t y)) (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -145000000000.0) || !(x <= 8.2e-39)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-145000000000.0d0)) .or. (.not. (x <= 8.2d-39))) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else
tmp = (y - (t / y)) * ((-0.3333333333333333d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -145000000000.0) || !(x <= 8.2e-39)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -145000000000.0) or not (x <= 8.2e-39): tmp = x + ((y * -0.3333333333333333) / z) else: tmp = (y - (t / y)) * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -145000000000.0) || !(x <= 8.2e-39)) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); else tmp = Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -145000000000.0) || ~((x <= 8.2e-39))) tmp = x + ((y * -0.3333333333333333) / z); else tmp = (y - (t / y)) * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -145000000000.0], N[Not[LessEqual[x, 8.2e-39]], $MachinePrecision]], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -145000000000 \lor \neg \left(x \leq 8.2 \cdot 10^{-39}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if x < -1.45e11 or 8.2e-39 < x Initial program 97.0%
associate-+l-97.0%
sub-neg97.0%
sub-neg97.0%
distribute-neg-in97.0%
unsub-neg97.0%
neg-mul-197.0%
associate-*r/97.0%
associate-*l/96.9%
distribute-neg-frac96.9%
neg-mul-196.9%
times-frac97.6%
distribute-lft-out--97.6%
*-commutative97.6%
associate-/r*97.6%
metadata-eval97.6%
Simplified97.6%
Taylor expanded in x around 0 97.6%
associate-*r/97.6%
Applied egg-rr97.6%
Taylor expanded in y around inf 78.9%
*-commutative78.9%
Simplified78.9%
if -1.45e11 < x < 8.2e-39Initial program 97.4%
Taylor expanded in x around 0 87.9%
associate-/r*87.3%
associate-*r/87.3%
associate-*r/87.4%
div-sub87.4%
distribute-lft-out--87.4%
Simplified87.4%
Taylor expanded in z around 0 87.3%
metadata-eval87.3%
sub-neg87.3%
+-commutative87.3%
neg-sub087.3%
associate-+l-87.3%
neg-sub087.3%
times-frac87.4%
distribute-rgt-neg-in87.4%
distribute-lft-neg-in87.4%
metadata-eval87.4%
times-frac87.3%
metadata-eval87.3%
*-commutative87.3%
associate-*l/87.4%
associate-*r/87.3%
Simplified87.3%
Final simplification83.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.2e-11)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= y 1.75e+47)
(+ x (* (/ t y) (/ 0.3333333333333333 z)))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e-11) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 1.75e+47) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.2d-11)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (y <= 1.75d+47) then
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e-11) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 1.75e+47) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.2e-11: tmp = x + ((y * -0.3333333333333333) / z) elif y <= 1.75e+47: tmp = x + ((t / y) * (0.3333333333333333 / z)) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.2e-11) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (y <= 1.75e+47) tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.2e-11) tmp = x + ((y * -0.3333333333333333) / z); elseif (y <= 1.75e+47) tmp = x + ((t / y) * (0.3333333333333333 / z)); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.2e-11], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+47], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-11}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+47}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.2000000000000001e-11Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
sub-neg99.7%
distribute-neg-in99.7%
unsub-neg99.7%
neg-mul-199.7%
associate-*r/99.7%
associate-*l/99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 92.6%
*-commutative92.6%
Simplified92.6%
if -5.2000000000000001e-11 < y < 1.75000000000000008e47Initial program 95.0%
associate-+l-95.0%
sub-neg95.0%
sub-neg95.0%
distribute-neg-in95.0%
distribute-neg-frac95.0%
neg-mul-195.0%
*-commutative95.0%
times-frac95.0%
remove-double-neg95.0%
fma-def95.0%
metadata-eval95.0%
associate-*l*95.0%
associate-/r*98.4%
associate-/l/98.5%
Simplified98.5%
Taylor expanded in z around 0 95.0%
associate-*r/95.1%
Applied egg-rr95.1%
Taylor expanded in y around 0 89.0%
associate-*r/89.1%
*-commutative89.1%
times-frac88.5%
Simplified88.5%
if 1.75000000000000008e47 < y Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
distribute-neg-in99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.7%
distribute-neg-frac99.7%
neg-mul-199.7%
times-frac99.7%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.8%
Final simplification91.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.9e-10)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= y 1.05e+47)
(+ x (* 0.3333333333333333 (/ t (* z y))))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.9e-10) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 1.05e+47) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.9d-10)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (y <= 1.05d+47) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.9e-10) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 1.05e+47) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.9e-10: tmp = x + ((y * -0.3333333333333333) / z) elif y <= 1.05e+47: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.9e-10) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (y <= 1.05e+47) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.9e-10) tmp = x + ((y * -0.3333333333333333) / z); elseif (y <= 1.05e+47) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.9e-10], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+47], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-10}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+47}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.89999999999999981e-10Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
sub-neg99.7%
distribute-neg-in99.7%
unsub-neg99.7%
neg-mul-199.7%
associate-*r/99.7%
associate-*l/99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 99.7%
associate-*r/99.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 92.6%
*-commutative92.6%
Simplified92.6%
if -2.89999999999999981e-10 < y < 1.05e47Initial program 95.0%
Taylor expanded in y around 0 89.0%
if 1.05e47 < y Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
distribute-neg-in99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.7%
distribute-neg-frac99.7%
neg-mul-199.7%
times-frac99.7%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 98.8%
Final simplification91.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.2e-70) (not (<= y 7.5e-135))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ (/ t y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.2e-70) || !(y <= 7.5e-135)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * ((t / y) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-5.2d-70)) .or. (.not. (y <= 7.5d-135))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * ((t / y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.2e-70) || !(y <= 7.5e-135)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * ((t / y) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.2e-70) or not (y <= 7.5e-135): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * ((t / y) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.2e-70) || !(y <= 7.5e-135)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(Float64(t / y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5.2e-70) || ~((y <= 7.5e-135))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * ((t / y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.2e-70], N[Not[LessEqual[y, 7.5e-135]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-70} \lor \neg \left(y \leq 7.5 \cdot 10^{-135}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\end{array}
\end{array}
if y < -5.20000000000000004e-70 or 7.5e-135 < y Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
distribute-neg-in99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.7%
distribute-neg-frac99.7%
neg-mul-199.7%
times-frac99.2%
distribute-lft-out--99.2%
*-commutative99.2%
associate-/r*99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in y around inf 85.7%
if -5.20000000000000004e-70 < y < 7.5e-135Initial program 91.7%
Taylor expanded in x around 0 65.6%
associate-/r*67.0%
associate-*r/66.9%
associate-*r/66.9%
div-sub66.9%
distribute-lft-out--66.9%
Simplified66.9%
Taylor expanded in t around inf 65.3%
*-un-lft-identity65.3%
times-frac65.3%
metadata-eval65.3%
Applied egg-rr65.3%
Final simplification79.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.2e-68)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= y 2.45e-134)
(* 0.3333333333333333 (/ (/ t y) z))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e-68) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 2.45e-134) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.2d-68)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (y <= 2.45d-134) then
tmp = 0.3333333333333333d0 * ((t / y) / z)
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.2e-68) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 2.45e-134) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.2e-68: tmp = x + ((y * -0.3333333333333333) / z) elif y <= 2.45e-134: tmp = 0.3333333333333333 * ((t / y) / z) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.2e-68) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (y <= 2.45e-134) tmp = Float64(0.3333333333333333 * Float64(Float64(t / y) / z)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.2e-68) tmp = x + ((y * -0.3333333333333333) / z); elseif (y <= 2.45e-134) tmp = 0.3333333333333333 * ((t / y) / z); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.2e-68], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.45e-134], N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{-68}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{-134}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.20000000000000002e-68Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
distribute-neg-in99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
times-frac98.6%
distribute-lft-out--98.6%
*-commutative98.6%
associate-/r*98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 98.6%
associate-*r/98.6%
Applied egg-rr98.6%
Taylor expanded in y around inf 84.8%
*-commutative84.8%
Simplified84.8%
if -2.20000000000000002e-68 < y < 2.44999999999999988e-134Initial program 91.7%
Taylor expanded in x around 0 65.6%
associate-/r*67.0%
associate-*r/66.9%
associate-*r/66.9%
div-sub66.9%
distribute-lft-out--66.9%
Simplified66.9%
Taylor expanded in t around inf 65.3%
*-un-lft-identity65.3%
times-frac65.3%
metadata-eval65.3%
Applied egg-rr65.3%
if 2.44999999999999988e-134 < y Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
distribute-neg-in99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 86.7%
Final simplification79.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.7e-70)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= y 1.8e-136)
(/ 0.3333333333333333 (* z (/ y t)))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.7e-70) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 1.8e-136) {
tmp = 0.3333333333333333 / (z * (y / t));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.7d-70)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (y <= 1.8d-136) then
tmp = 0.3333333333333333d0 / (z * (y / t))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.7e-70) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 1.8e-136) {
tmp = 0.3333333333333333 / (z * (y / t));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.7e-70: tmp = x + ((y * -0.3333333333333333) / z) elif y <= 1.8e-136: tmp = 0.3333333333333333 / (z * (y / t)) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.7e-70) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (y <= 1.8e-136) tmp = Float64(0.3333333333333333 / Float64(z * Float64(y / t))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.7e-70) tmp = x + ((y * -0.3333333333333333) / z); elseif (y <= 1.8e-136) tmp = 0.3333333333333333 / (z * (y / t)); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.7e-70], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e-136], N[(0.3333333333333333 / N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-70}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-136}:\\
\;\;\;\;\frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.7000000000000001e-70Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
distribute-neg-in99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.6%
distribute-neg-frac99.6%
neg-mul-199.6%
times-frac98.6%
distribute-lft-out--98.6%
*-commutative98.6%
associate-/r*98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in x around 0 98.6%
associate-*r/98.6%
Applied egg-rr98.6%
Taylor expanded in y around inf 84.8%
*-commutative84.8%
Simplified84.8%
if -2.7000000000000001e-70 < y < 1.7999999999999999e-136Initial program 91.7%
Taylor expanded in x around 0 65.6%
associate-/r*67.0%
associate-*r/66.9%
associate-*r/66.9%
div-sub66.9%
distribute-lft-out--66.9%
Simplified66.9%
clear-num66.9%
inv-pow66.9%
*-un-lft-identity66.9%
times-frac66.9%
metadata-eval66.9%
Applied egg-rr66.9%
unpow-166.9%
associate-/r*66.9%
metadata-eval66.9%
Simplified66.9%
Taylor expanded in t around inf 65.1%
associate-*l/65.8%
*-commutative65.8%
Simplified65.8%
if 1.7999999999999999e-136 < y Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
distribute-neg-in99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 86.7%
Final simplification79.3%
(FPCore (x y z t) :precision binary64 (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) * (-0.3333333333333333 / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) * (-0.3333333333333333 / z));
}
def code(x, y, z, t): return x + ((y - (t / y)) * (-0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}
\end{array}
Initial program 97.2%
associate-+l-97.2%
sub-neg97.2%
sub-neg97.2%
distribute-neg-in97.2%
unsub-neg97.2%
neg-mul-197.2%
associate-*r/97.2%
associate-*l/97.2%
distribute-neg-frac97.2%
neg-mul-197.2%
times-frac97.2%
distribute-lft-out--97.2%
*-commutative97.2%
associate-/r*97.2%
metadata-eval97.2%
Simplified97.2%
Final simplification97.2%
(FPCore (x y z t) :precision binary64 (+ x (/ (- y (/ t y)) (* z -3.0))))
double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) / (z * -3.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - (t / y)) / (z * (-3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) / (z * -3.0));
}
def code(x, y, z, t): return x + ((y - (t / y)) / (z * -3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))) end
function tmp = code(x, y, z, t) tmp = x + ((y - (t / y)) / (z * -3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - \frac{t}{y}}{z \cdot -3}
\end{array}
Initial program 97.2%
associate-+l-97.2%
sub-neg97.2%
sub-neg97.2%
distribute-neg-in97.2%
unsub-neg97.2%
neg-mul-197.2%
associate-*r/97.2%
associate-*l/97.2%
distribute-neg-frac97.2%
neg-mul-197.2%
times-frac97.2%
distribute-lft-out--97.2%
*-commutative97.2%
associate-/r*97.2%
metadata-eval97.2%
Simplified97.2%
clear-num97.1%
inv-pow97.1%
Applied egg-rr97.1%
unpow-197.1%
Simplified97.1%
expm1-log1p-u64.3%
expm1-udef56.8%
associate-*l/56.8%
*-un-lft-identity56.8%
div-inv56.8%
metadata-eval56.8%
Applied egg-rr56.8%
expm1-def64.3%
expm1-log1p97.3%
Simplified97.3%
Final simplification97.3%
(FPCore (x y z t) :precision binary64 (if (<= x -3.4e-12) x (if (<= x 1.2e+27) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.4e-12) {
tmp = x;
} else if (x <= 1.2e+27) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-3.4d-12)) then
tmp = x
else if (x <= 1.2d+27) then
tmp = (-0.3333333333333333d0) * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.4e-12) {
tmp = x;
} else if (x <= 1.2e+27) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.4e-12: tmp = x elif x <= 1.2e+27: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.4e-12) tmp = x; elseif (x <= 1.2e+27) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.4e-12) tmp = x; elseif (x <= 1.2e+27) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.4e-12], x, If[LessEqual[x, 1.2e+27], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.4 \cdot 10^{-12}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+27}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.4000000000000001e-12 or 1.19999999999999999e27 < x Initial program 97.6%
Taylor expanded in x around inf 59.7%
if -3.4000000000000001e-12 < x < 1.19999999999999999e27Initial program 96.8%
Taylor expanded in y around inf 51.1%
*-commutative51.1%
Simplified51.1%
Final simplification55.2%
(FPCore (x y z t) :precision binary64 (if (<= x -3.9e-12) x (if (<= x 1.25e+23) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.9e-12) {
tmp = x;
} else if (x <= 1.25e+23) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-3.9d-12)) then
tmp = x
else if (x <= 1.25d+23) then
tmp = y / (z * (-3.0d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.9e-12) {
tmp = x;
} else if (x <= 1.25e+23) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.9e-12: tmp = x elif x <= 1.25e+23: tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.9e-12) tmp = x; elseif (x <= 1.25e+23) tmp = Float64(y / Float64(z * -3.0)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.9e-12) tmp = x; elseif (x <= 1.25e+23) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.9e-12], x, If[LessEqual[x, 1.25e+23], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{-12}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{+23}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.89999999999999994e-12 or 1.25e23 < x Initial program 97.6%
Taylor expanded in x around inf 59.7%
if -3.89999999999999994e-12 < x < 1.25e23Initial program 96.8%
Taylor expanded in y around inf 51.1%
*-commutative51.1%
Simplified51.1%
Taylor expanded in y around 0 51.1%
*-commutative51.1%
metadata-eval51.1%
times-frac51.2%
*-rgt-identity51.2%
Simplified51.2%
Final simplification55.2%
(FPCore (x y z t) :precision binary64 (if (<= x -1.05e-12) x (if (<= x 5e+25) (/ (* y -0.3333333333333333) z) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.05e-12) {
tmp = x;
} else if (x <= 5e+25) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-1.05d-12)) then
tmp = x
else if (x <= 5d+25) then
tmp = (y * (-0.3333333333333333d0)) / z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.05e-12) {
tmp = x;
} else if (x <= 5e+25) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.05e-12: tmp = x elif x <= 5e+25: tmp = (y * -0.3333333333333333) / z else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.05e-12) tmp = x; elseif (x <= 5e+25) tmp = Float64(Float64(y * -0.3333333333333333) / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.05e-12) tmp = x; elseif (x <= 5e+25) tmp = (y * -0.3333333333333333) / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.05e-12], x, If[LessEqual[x, 5e+25], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{-12}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+25}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.04999999999999997e-12 or 5.00000000000000024e25 < x Initial program 97.6%
Taylor expanded in x around inf 59.7%
if -1.04999999999999997e-12 < x < 5.00000000000000024e25Initial program 96.8%
Taylor expanded in x around 0 86.7%
associate-/r*86.9%
associate-*r/86.8%
associate-*r/86.9%
div-sub86.9%
distribute-lft-out--86.9%
Simplified86.9%
Taylor expanded in t around 0 51.2%
*-commutative51.2%
Simplified51.2%
Final simplification55.3%
(FPCore (x y z t) :precision binary64 (if (<= x -3.5e-12) x (if (<= x 6.2e+15) (/ (/ y -3.0) z) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.5e-12) {
tmp = x;
} else if (x <= 6.2e+15) {
tmp = (y / -3.0) / z;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (x <= (-3.5d-12)) then
tmp = x
else if (x <= 6.2d+15) then
tmp = (y / (-3.0d0)) / z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.5e-12) {
tmp = x;
} else if (x <= 6.2e+15) {
tmp = (y / -3.0) / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.5e-12: tmp = x elif x <= 6.2e+15: tmp = (y / -3.0) / z else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.5e-12) tmp = x; elseif (x <= 6.2e+15) tmp = Float64(Float64(y / -3.0) / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.5e-12) tmp = x; elseif (x <= 6.2e+15) tmp = (y / -3.0) / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.5e-12], x, If[LessEqual[x, 6.2e+15], N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{-12}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+15}:\\
\;\;\;\;\frac{\frac{y}{-3}}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.5e-12 or 6.2e15 < x Initial program 97.6%
Taylor expanded in x around inf 59.7%
if -3.5e-12 < x < 6.2e15Initial program 96.8%
Taylor expanded in x around 0 86.7%
associate-/r*86.9%
associate-*r/86.8%
associate-*r/86.9%
div-sub86.9%
distribute-lft-out--86.9%
Simplified86.9%
Taylor expanded in t around 0 51.2%
*-commutative51.2%
Simplified51.2%
metadata-eval51.2%
div-inv51.2%
Applied egg-rr51.2%
Final simplification55.3%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 97.2%
Taylor expanded in x around inf 34.4%
Final simplification34.4%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2023221
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))