
(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 (<= t -5e+35) (+ (+ (/ t (* z (* y 3.0))) x) (/ y (* z -3.0))) (+ x (/ (- y (/ t y)) (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5e+35) {
tmp = ((t / (z * (y * 3.0))) + x) + (y / (z * -3.0));
} 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 (t <= (-5d+35)) then
tmp = ((t / (z * (y * 3.0d0))) + x) + (y / (z * (-3.0d0)))
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 (t <= -5e+35) {
tmp = ((t / (z * (y * 3.0))) + x) + (y / (z * -3.0));
} else {
tmp = x + ((y - (t / y)) / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -5e+35: tmp = ((t / (z * (y * 3.0))) + x) + (y / (z * -3.0)) else: tmp = x + ((y - (t / y)) / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -5e+35) tmp = Float64(Float64(Float64(t / Float64(z * Float64(y * 3.0))) + x) + Float64(y / Float64(z * -3.0))); 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 (t <= -5e+35) tmp = ((t / (z * (y * 3.0))) + x) + (y / (z * -3.0)); else tmp = x + ((y - (t / y)) / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -5e+35], N[(N[(N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] + N[(y / N[(z * -3.0), $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}\;t \leq -5 \cdot 10^{+35}:\\
\;\;\;\;\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - \frac{t}{y}}{z \cdot -3}\\
\end{array}
\end{array}
if t < -5.00000000000000021e35Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
sub-neg99.7%
associate-*l*99.8%
*-commutative99.8%
distribute-frac-neg299.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
if -5.00000000000000021e35 < t Initial program 93.1%
sub-neg93.1%
associate-+l+93.1%
remove-double-neg93.1%
distribute-frac-neg93.1%
sub-neg93.1%
distribute-frac-neg93.1%
neg-mul-193.1%
*-commutative93.1%
associate-/l*93.1%
*-commutative93.1%
neg-mul-193.1%
times-frac98.8%
distribute-lft-out--99.3%
*-commutative99.3%
associate-/r*99.3%
metadata-eval99.3%
Simplified99.3%
div-inv99.2%
Applied egg-rr99.2%
*-commutative99.2%
clear-num99.2%
un-div-inv99.2%
un-div-inv99.3%
div-inv99.3%
metadata-eval99.3%
Applied egg-rr99.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.9e+58)
(/ y (* z -3.0))
(if (<= y 1400.0)
(* 0.3333333333333333 (/ (/ t y) z))
(if (<= y 3.6e+56) (/ y (/ y x)) (/ (/ y z) -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.9e+58) {
tmp = y / (z * -3.0);
} else if (y <= 1400.0) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else if (y <= 3.6e+56) {
tmp = y / (y / x);
} else {
tmp = (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 (y <= (-7.9d+58)) then
tmp = y / (z * (-3.0d0))
else if (y <= 1400.0d0) then
tmp = 0.3333333333333333d0 * ((t / y) / z)
else if (y <= 3.6d+56) then
tmp = y / (y / x)
else
tmp = (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 (y <= -7.9e+58) {
tmp = y / (z * -3.0);
} else if (y <= 1400.0) {
tmp = 0.3333333333333333 * ((t / y) / z);
} else if (y <= 3.6e+56) {
tmp = y / (y / x);
} else {
tmp = (y / z) / -3.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.9e+58: tmp = y / (z * -3.0) elif y <= 1400.0: tmp = 0.3333333333333333 * ((t / y) / z) elif y <= 3.6e+56: tmp = y / (y / x) else: tmp = (y / z) / -3.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.9e+58) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= 1400.0) tmp = Float64(0.3333333333333333 * Float64(Float64(t / y) / z)); elseif (y <= 3.6e+56) tmp = Float64(y / Float64(y / x)); else tmp = Float64(Float64(y / z) / -3.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.9e+58) tmp = y / (z * -3.0); elseif (y <= 1400.0) tmp = 0.3333333333333333 * ((t / y) / z); elseif (y <= 3.6e+56) tmp = y / (y / x); else tmp = (y / z) / -3.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.9e+58], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1400.0], N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e+56], N[(y / N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.9 \cdot 10^{+58}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 1400:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y}}{z}\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+56}:\\
\;\;\;\;\frac{y}{\frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\end{array}
\end{array}
if y < -7.89999999999999988e58Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 93.7%
Taylor expanded in x around 0 68.0%
clear-num67.9%
div-inv68.0%
metadata-eval68.0%
div-inv68.0%
Applied egg-rr68.0%
if -7.89999999999999988e58 < y < 1400Initial program 91.4%
Taylor expanded in z around 0 69.2%
Taylor expanded in t around inf 62.6%
associate-/r*62.9%
Simplified62.9%
if 1400 < y < 3.59999999999999998e56Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
times-frac100.0%
fma-define100.0%
metadata-eval100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 91.2%
Taylor expanded in x around inf 81.7%
clear-num81.6%
un-div-inv82.0%
Applied egg-rr82.0%
if 3.59999999999999998e56 < y Initial program 95.5%
sub-neg95.5%
associate-+l+95.5%
distribute-frac-neg95.5%
neg-mul-195.5%
*-commutative95.5%
times-frac95.5%
fma-define95.5%
metadata-eval95.5%
associate-*l*95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in y around inf 91.5%
Taylor expanded in x around 0 75.6%
clear-num75.6%
div-inv75.7%
metadata-eval75.7%
div-inv75.7%
associate-/r*75.7%
Applied egg-rr75.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.2e+58)
(/ y (* z -3.0))
(if (<= y 380.0)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 3e+56) (/ y (/ y x)) (/ (/ y z) -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e+58) {
tmp = y / (z * -3.0);
} else if (y <= 380.0) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 3e+56) {
tmp = y / (y / x);
} else {
tmp = (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 (y <= (-5.2d+58)) then
tmp = y / (z * (-3.0d0))
else if (y <= 380.0d0) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 3d+56) then
tmp = y / (y / x)
else
tmp = (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 (y <= -5.2e+58) {
tmp = y / (z * -3.0);
} else if (y <= 380.0) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 3e+56) {
tmp = y / (y / x);
} else {
tmp = (y / z) / -3.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.2e+58: tmp = y / (z * -3.0) elif y <= 380.0: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 3e+56: tmp = y / (y / x) else: tmp = (y / z) / -3.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.2e+58) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= 380.0) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 3e+56) tmp = Float64(y / Float64(y / x)); else tmp = Float64(Float64(y / z) / -3.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.2e+58) tmp = y / (z * -3.0); elseif (y <= 380.0) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 3e+56) tmp = y / (y / x); else tmp = (y / z) / -3.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.2e+58], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 380.0], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e+56], N[(y / N[(y / x), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+58}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 380:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+56}:\\
\;\;\;\;\frac{y}{\frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\end{array}
\end{array}
if y < -5.19999999999999976e58Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 93.7%
Taylor expanded in x around 0 68.0%
clear-num67.9%
div-inv68.0%
metadata-eval68.0%
div-inv68.0%
Applied egg-rr68.0%
if -5.19999999999999976e58 < y < 380Initial program 91.4%
Taylor expanded in z around 0 69.2%
Taylor expanded in t around inf 62.6%
if 380 < y < 3.00000000000000006e56Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
times-frac100.0%
fma-define100.0%
metadata-eval100.0%
associate-*l*100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 91.2%
Taylor expanded in x around inf 81.7%
clear-num81.6%
un-div-inv82.0%
Applied egg-rr82.0%
if 3.00000000000000006e56 < y Initial program 95.5%
sub-neg95.5%
associate-+l+95.5%
distribute-frac-neg95.5%
neg-mul-195.5%
*-commutative95.5%
times-frac95.5%
fma-define95.5%
metadata-eval95.5%
associate-*l*95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in y around inf 91.5%
Taylor expanded in x around 0 75.6%
clear-num75.6%
div-inv75.7%
metadata-eval75.7%
div-inv75.7%
associate-/r*75.7%
Applied egg-rr75.7%
Final simplification67.2%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.4e-6) (not (<= t 2.5e-133))) (* (/ 0.3333333333333333 z) (- (/ t y) y)) (- x (/ (* y 0.3333333333333333) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.4e-6) || !(t <= 2.5e-133)) {
tmp = (0.3333333333333333 / z) * ((t / y) - 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 ((t <= (-2.4d-6)) .or. (.not. (t <= 2.5d-133))) then
tmp = (0.3333333333333333d0 / z) * ((t / y) - 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 ((t <= -2.4e-6) || !(t <= 2.5e-133)) {
tmp = (0.3333333333333333 / z) * ((t / y) - y);
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.4e-6) or not (t <= 2.5e-133): tmp = (0.3333333333333333 / z) * ((t / y) - y) else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.4e-6) || !(t <= 2.5e-133)) tmp = Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y)); else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.4e-6) || ~((t <= 2.5e-133))) tmp = (0.3333333333333333 / z) * ((t / y) - y); else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.4e-6], N[Not[LessEqual[t, 2.5e-133]], $MachinePrecision]], N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{-6} \lor \neg \left(t \leq 2.5 \cdot 10^{-133}\right):\\
\;\;\;\;\frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if t < -2.3999999999999999e-6 or 2.5e-133 < t Initial program 96.2%
Taylor expanded in z around 0 78.7%
Taylor expanded in t around 0 79.9%
associate-*r/79.9%
associate-*l/79.9%
+-commutative79.9%
associate-*l/79.9%
*-commutative79.9%
times-frac78.1%
metadata-eval78.1%
associate-*r/78.1%
associate-*r/78.1%
associate-*l/78.1%
metadata-eval78.1%
associate-*l/78.1%
associate-*l*78.1%
metadata-eval78.1%
distribute-lft-neg-in78.1%
distribute-rgt-neg-in78.1%
associate-*r*78.1%
*-commutative78.1%
distribute-lft-in78.7%
associate-*r/78.7%
metadata-eval78.7%
sub-neg78.7%
Simplified78.7%
if -2.3999999999999999e-6 < t < 2.5e-133Initial program 91.9%
sub-neg91.9%
associate-+l+91.9%
distribute-frac-neg91.9%
neg-mul-191.9%
*-commutative91.9%
times-frac91.9%
fma-define91.9%
metadata-eval91.9%
associate-*l*91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in t around 0 86.0%
metadata-eval86.0%
cancel-sign-sub-inv86.0%
associate-*r/86.1%
*-commutative86.1%
Simplified86.1%
Final simplification81.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.2e+58)
(+ x (/ y (* z -3.0)))
(if (<= y 3.5e-27)
(+ x (/ 0.3333333333333333 (* y (/ z t))))
(- x (/ (* y 0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.2e+58) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.5e-27) {
tmp = x + (0.3333333333333333 / (y * (z / 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 <= (-5.2d+58)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 3.5d-27) then
tmp = x + (0.3333333333333333d0 / (y * (z / 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 <= -5.2e+58) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.5e-27) {
tmp = x + (0.3333333333333333 / (y * (z / t)));
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.2e+58: tmp = x + (y / (z * -3.0)) elif y <= 3.5e-27: tmp = x + (0.3333333333333333 / (y * (z / t))) else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.2e+58) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 3.5e-27) tmp = Float64(x + Float64(0.3333333333333333 / Float64(y * Float64(z / t)))); else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.2e+58) tmp = x + (y / (z * -3.0)); elseif (y <= 3.5e-27) tmp = x + (0.3333333333333333 / (y * (z / t))); else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.2e+58], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e-27], N[(x + N[(0.3333333333333333 / N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+58}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-27}:\\
\;\;\;\;x + \frac{0.3333333333333333}{y \cdot \frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.19999999999999976e58Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
sub-neg99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
neg-mul-199.9%
times-frac99.9%
distribute-lft-out--99.9%
*-commutative99.9%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 93.7%
*-commutative93.7%
metadata-eval93.7%
times-frac93.8%
*-rgt-identity93.8%
Simplified93.8%
if -5.19999999999999976e58 < y < 3.5000000000000001e-27Initial program 91.2%
sub-neg91.2%
associate-+l+91.2%
remove-double-neg91.2%
distribute-frac-neg91.2%
sub-neg91.2%
distribute-frac-neg91.2%
neg-mul-191.2%
*-commutative91.2%
associate-/l*91.2%
*-commutative91.2%
neg-mul-191.2%
times-frac93.3%
distribute-lft-out--93.3%
*-commutative93.3%
associate-/r*93.3%
metadata-eval93.3%
Simplified93.3%
div-inv93.3%
Applied egg-rr93.3%
Taylor expanded in y around 0 86.2%
*-commutative86.2%
associate-/r*91.4%
Simplified91.4%
clear-num91.4%
un-div-inv91.4%
div-inv90.9%
clear-num91.4%
Applied egg-rr91.4%
if 3.5000000000000001e-27 < y Initial program 96.5%
sub-neg96.5%
associate-+l+96.5%
distribute-frac-neg96.5%
neg-mul-196.5%
*-commutative96.5%
times-frac96.4%
fma-define96.4%
metadata-eval96.4%
associate-*l*96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in t around 0 90.3%
metadata-eval90.3%
cancel-sign-sub-inv90.3%
associate-*r/90.4%
*-commutative90.4%
Simplified90.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -6.8e+58)
(+ x (/ y (* z -3.0)))
(if (<= y 3.8e-24)
(+ 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 <= -6.8e+58) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.8e-24) {
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 <= (-6.8d+58)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 3.8d-24) 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 <= -6.8e+58) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.8e-24) {
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 <= -6.8e+58: tmp = x + (y / (z * -3.0)) elif y <= 3.8e-24: 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 <= -6.8e+58) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 3.8e-24) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y))); else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -6.8e+58) tmp = x + (y / (z * -3.0)); elseif (y <= 3.8e-24) 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, -6.8e+58], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e-24], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+58}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-24}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -6.8000000000000001e58Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
sub-neg99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
neg-mul-199.9%
times-frac99.9%
distribute-lft-out--99.9%
*-commutative99.9%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 93.7%
*-commutative93.7%
metadata-eval93.7%
times-frac93.8%
*-rgt-identity93.8%
Simplified93.8%
if -6.8000000000000001e58 < y < 3.80000000000000026e-24Initial program 91.2%
sub-neg91.2%
associate-+l+91.2%
remove-double-neg91.2%
distribute-frac-neg91.2%
sub-neg91.2%
distribute-frac-neg91.2%
neg-mul-191.2%
*-commutative91.2%
associate-/l*91.2%
*-commutative91.2%
neg-mul-191.2%
times-frac93.3%
distribute-lft-out--93.3%
*-commutative93.3%
associate-/r*93.3%
metadata-eval93.3%
Simplified93.3%
div-inv93.3%
Applied egg-rr93.3%
Taylor expanded in y around 0 86.2%
*-commutative86.2%
associate-/r*91.4%
Simplified91.4%
if 3.80000000000000026e-24 < y Initial program 96.5%
sub-neg96.5%
associate-+l+96.5%
distribute-frac-neg96.5%
neg-mul-196.5%
*-commutative96.5%
times-frac96.4%
fma-define96.4%
metadata-eval96.4%
associate-*l*96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in t around 0 90.3%
metadata-eval90.3%
cancel-sign-sub-inv90.3%
associate-*r/90.4%
*-commutative90.4%
Simplified90.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -4e+48)
(+ x (/ y (* z -3.0)))
(if (<= y 3.25e-24)
(+ 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 <= -4e+48) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.25e-24) {
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 <= (-4d+48)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 3.25d-24) 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 <= -4e+48) {
tmp = x + (y / (z * -3.0));
} else if (y <= 3.25e-24) {
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 <= -4e+48: tmp = x + (y / (z * -3.0)) elif y <= 3.25e-24: 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 <= -4e+48) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 3.25e-24) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4e+48) tmp = x + (y / (z * -3.0)); elseif (y <= 3.25e-24) 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, -4e+48], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.25e-24], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+48}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 3.25 \cdot 10^{-24}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -4.00000000000000018e48Initial program 98.5%
sub-neg98.5%
associate-+l+98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
sub-neg98.5%
distribute-frac-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.5%
*-commutative98.5%
neg-mul-198.5%
times-frac99.9%
distribute-lft-out--99.9%
*-commutative99.9%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 91.5%
*-commutative91.5%
metadata-eval91.5%
times-frac91.6%
*-rgt-identity91.6%
Simplified91.6%
if -4.00000000000000018e48 < y < 3.25e-24Initial program 91.5%
sub-neg91.5%
associate-+l+91.5%
remove-double-neg91.5%
distribute-frac-neg91.5%
sub-neg91.5%
distribute-frac-neg91.5%
neg-mul-191.5%
*-commutative91.5%
associate-/l*91.5%
*-commutative91.5%
neg-mul-191.5%
times-frac93.0%
distribute-lft-out--93.0%
*-commutative93.0%
associate-/r*93.0%
metadata-eval93.0%
Simplified93.0%
Taylor expanded in y around 0 87.5%
if 3.25e-24 < y Initial program 96.5%
sub-neg96.5%
associate-+l+96.5%
distribute-frac-neg96.5%
neg-mul-196.5%
*-commutative96.5%
times-frac96.4%
fma-define96.4%
metadata-eval96.4%
associate-*l*96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in t around 0 90.3%
metadata-eval90.3%
cancel-sign-sub-inv90.3%
associate-*r/90.4%
*-commutative90.4%
Simplified90.4%
Final simplification89.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.2e-23) (not (<= y 2.55e-57))) (+ x (/ y (* z -3.0))) (* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.2e-23) || !(y <= 2.55e-57)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
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-23)) .or. (.not. (y <= 2.55d-57))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = 0.3333333333333333d0 * (t / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.2e-23) || !(y <= 2.55e-57)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.2e-23) or not (y <= 2.55e-57): tmp = x + (y / (z * -3.0)) else: tmp = 0.3333333333333333 * (t / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.2e-23) || !(y <= 2.55e-57)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.2e-23) || ~((y <= 2.55e-57))) tmp = x + (y / (z * -3.0)); else tmp = 0.3333333333333333 * (t / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.2e-23], N[Not[LessEqual[y, 2.55e-57]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{-23} \lor \neg \left(y \leq 2.55 \cdot 10^{-57}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -2.1999999999999999e-23 or 2.55e-57 < y Initial program 97.8%
sub-neg97.8%
associate-+l+97.8%
remove-double-neg97.8%
distribute-frac-neg97.8%
sub-neg97.8%
distribute-frac-neg97.8%
neg-mul-197.8%
*-commutative97.8%
associate-/l*97.8%
*-commutative97.8%
neg-mul-197.8%
times-frac99.1%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 86.4%
*-commutative86.4%
metadata-eval86.4%
times-frac86.5%
*-rgt-identity86.5%
Simplified86.5%
if -2.1999999999999999e-23 < y < 2.55e-57Initial program 90.2%
Taylor expanded in z around 0 69.7%
Taylor expanded in t around inf 68.6%
Final simplification79.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.8e-23) (not (<= y 3.2e-57))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.8e-23) || !(y <= 3.2e-57)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
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 <= (-3.8d-23)) .or. (.not. (y <= 3.2d-57))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * (t / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.8e-23) || !(y <= 3.2e-57)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.8e-23) or not (y <= 3.2e-57): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * (t / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.8e-23) || !(y <= 3.2e-57)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.8e-23) || ~((y <= 3.2e-57))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * (t / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.8e-23], N[Not[LessEqual[y, 3.2e-57]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{-23} \lor \neg \left(y \leq 3.2 \cdot 10^{-57}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -3.80000000000000011e-23 or 3.2000000000000001e-57 < y Initial program 97.8%
sub-neg97.8%
associate-+l+97.8%
remove-double-neg97.8%
distribute-frac-neg97.8%
sub-neg97.8%
distribute-frac-neg97.8%
neg-mul-197.8%
*-commutative97.8%
associate-/l*97.8%
*-commutative97.8%
neg-mul-197.8%
times-frac99.1%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 86.4%
if -3.80000000000000011e-23 < y < 3.2000000000000001e-57Initial program 90.2%
Taylor expanded in z around 0 69.7%
Taylor expanded in t around inf 68.6%
Final simplification78.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -6.2e-23)
(+ x (/ y (* z -3.0)))
(if (<= y 2.3e-57)
(* 0.3333333333333333 (/ t (* z y)))
(- x (/ (* y 0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.2e-23) {
tmp = x + (y / (z * -3.0));
} else if (y <= 2.3e-57) {
tmp = 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 <= (-6.2d-23)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 2.3d-57) then
tmp = 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 <= -6.2e-23) {
tmp = x + (y / (z * -3.0));
} else if (y <= 2.3e-57) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6.2e-23: tmp = x + (y / (z * -3.0)) elif y <= 2.3e-57: tmp = 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 <= -6.2e-23) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 2.3e-57) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -6.2e-23) tmp = x + (y / (z * -3.0)); elseif (y <= 2.3e-57) tmp = 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, -6.2e-23], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e-57], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-23}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-57}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -6.1999999999999998e-23Initial program 98.7%
sub-neg98.7%
associate-+l+98.7%
remove-double-neg98.7%
distribute-frac-neg98.7%
sub-neg98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
associate-/l*98.7%
*-commutative98.7%
neg-mul-198.7%
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 85.2%
*-commutative85.2%
metadata-eval85.2%
times-frac85.3%
*-rgt-identity85.3%
Simplified85.3%
if -6.1999999999999998e-23 < y < 2.3e-57Initial program 90.2%
Taylor expanded in z around 0 69.7%
Taylor expanded in t around inf 68.6%
if 2.3e-57 < y Initial program 96.7%
sub-neg96.7%
associate-+l+96.7%
distribute-frac-neg96.7%
neg-mul-196.7%
*-commutative96.7%
times-frac96.6%
fma-define96.6%
metadata-eval96.6%
associate-*l*96.6%
*-commutative96.6%
Simplified96.6%
Taylor expanded in t around 0 87.9%
metadata-eval87.9%
cancel-sign-sub-inv87.9%
associate-*r/88.0%
*-commutative88.0%
Simplified88.0%
Final simplification79.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -98000000000.0) (not (<= y 1.95e+56))) (/ (/ y z) -3.0) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -98000000000.0) || !(y <= 1.95e+56)) {
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 ((y <= (-98000000000.0d0)) .or. (.not. (y <= 1.95d+56))) 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 ((y <= -98000000000.0) || !(y <= 1.95e+56)) {
tmp = (y / z) / -3.0;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -98000000000.0) or not (y <= 1.95e+56): tmp = (y / z) / -3.0 else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -98000000000.0) || !(y <= 1.95e+56)) tmp = Float64(Float64(y / z) / -3.0); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -98000000000.0) || ~((y <= 1.95e+56))) tmp = (y / z) / -3.0; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -98000000000.0], N[Not[LessEqual[y, 1.95e+56]], $MachinePrecision]], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -98000000000 \lor \neg \left(y \leq 1.95 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.8e10 or 1.94999999999999997e56 < y Initial program 97.5%
sub-neg97.5%
associate-+l+97.5%
distribute-frac-neg97.5%
neg-mul-197.5%
*-commutative97.5%
times-frac97.4%
fma-define97.4%
metadata-eval97.4%
associate-*l*97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in y around inf 87.8%
Taylor expanded in x around 0 65.7%
clear-num65.6%
div-inv65.7%
metadata-eval65.7%
div-inv65.7%
associate-/r*65.7%
Applied egg-rr65.7%
if -9.8e10 < y < 1.94999999999999997e56Initial program 91.8%
sub-neg91.8%
associate-+l+91.8%
distribute-frac-neg91.8%
neg-mul-191.8%
*-commutative91.8%
times-frac91.8%
fma-define91.8%
metadata-eval91.8%
associate-*l*91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in x around inf 30.3%
Final simplification47.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -280000000000.0) (not (<= y 1.25e+56))) (/ y (* z -3.0)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -280000000000.0) || !(y <= 1.25e+56)) {
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 ((y <= (-280000000000.0d0)) .or. (.not. (y <= 1.25d+56))) 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 ((y <= -280000000000.0) || !(y <= 1.25e+56)) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -280000000000.0) or not (y <= 1.25e+56): tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -280000000000.0) || !(y <= 1.25e+56)) 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 ((y <= -280000000000.0) || ~((y <= 1.25e+56))) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -280000000000.0], N[Not[LessEqual[y, 1.25e+56]], $MachinePrecision]], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -280000000000 \lor \neg \left(y \leq 1.25 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.8e11 or 1.25000000000000006e56 < y Initial program 97.5%
sub-neg97.5%
associate-+l+97.5%
distribute-frac-neg97.5%
neg-mul-197.5%
*-commutative97.5%
times-frac97.4%
fma-define97.4%
metadata-eval97.4%
associate-*l*97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in y around inf 87.8%
Taylor expanded in x around 0 65.7%
clear-num65.6%
div-inv65.7%
metadata-eval65.7%
div-inv65.7%
Applied egg-rr65.7%
if -2.8e11 < y < 1.25000000000000006e56Initial program 91.8%
sub-neg91.8%
associate-+l+91.8%
distribute-frac-neg91.8%
neg-mul-191.8%
*-commutative91.8%
times-frac91.8%
fma-define91.8%
metadata-eval91.8%
associate-*l*91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in x around inf 30.3%
Final simplification47.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1620000000000.0) (not (<= y 6.5e+55))) (* y (/ -0.3333333333333333 z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1620000000000.0) || !(y <= 6.5e+55)) {
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 ((y <= (-1620000000000.0d0)) .or. (.not. (y <= 6.5d+55))) 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 ((y <= -1620000000000.0) || !(y <= 6.5e+55)) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1620000000000.0) or not (y <= 6.5e+55): tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1620000000000.0) || !(y <= 6.5e+55)) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1620000000000.0) || ~((y <= 6.5e+55))) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1620000000000.0], N[Not[LessEqual[y, 6.5e+55]], $MachinePrecision]], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1620000000000 \lor \neg \left(y \leq 6.5 \cdot 10^{+55}\right):\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.62e12 or 6.50000000000000027e55 < y Initial program 97.5%
sub-neg97.5%
associate-+l+97.5%
distribute-frac-neg97.5%
neg-mul-197.5%
*-commutative97.5%
times-frac97.4%
fma-define97.4%
metadata-eval97.4%
associate-*l*97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in y around inf 87.8%
Taylor expanded in x around 0 65.7%
if -1.62e12 < y < 6.50000000000000027e55Initial program 91.8%
sub-neg91.8%
associate-+l+91.8%
distribute-frac-neg91.8%
neg-mul-191.8%
*-commutative91.8%
times-frac91.8%
fma-define91.8%
metadata-eval91.8%
associate-*l*91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in x around inf 30.3%
Final simplification47.7%
(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 94.6%
sub-neg94.6%
associate-+l+94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
sub-neg94.6%
distribute-frac-neg94.6%
neg-mul-194.6%
*-commutative94.6%
associate-/l*94.6%
*-commutative94.6%
neg-mul-194.6%
times-frac96.0%
distribute-lft-out--96.4%
*-commutative96.4%
associate-/r*96.4%
metadata-eval96.4%
Simplified96.4%
div-inv96.4%
Applied egg-rr96.4%
*-commutative96.4%
clear-num96.4%
un-div-inv96.4%
un-div-inv96.4%
div-inv96.5%
metadata-eval96.5%
Applied egg-rr96.5%
(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 94.6%
sub-neg94.6%
associate-+l+94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
sub-neg94.6%
distribute-frac-neg94.6%
neg-mul-194.6%
*-commutative94.6%
associate-/l*94.6%
*-commutative94.6%
neg-mul-194.6%
times-frac96.0%
distribute-lft-out--96.4%
*-commutative96.4%
associate-/r*96.4%
metadata-eval96.4%
Simplified96.4%
Final simplification96.4%
(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 94.6%
sub-neg94.6%
associate-+l+94.6%
distribute-frac-neg94.6%
neg-mul-194.6%
*-commutative94.6%
times-frac94.6%
fma-define94.6%
metadata-eval94.6%
associate-*l*94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in x around inf 26.3%
(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 2024157
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))