
(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 15 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 -2e-35) (+ (+ (/ t (* z (* y 3.0))) x) (/ y (* z -3.0))) (+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2e-35) {
tmp = ((t / (z * (y * 3.0))) + x) + (y / (z * -3.0));
} else {
tmp = x + (((t / y) - 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 <= (-2d-35)) then
tmp = ((t / (z * (y * 3.0d0))) + x) + (y / (z * (-3.0d0)))
else
tmp = x + (((t / y) - 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 <= -2e-35) {
tmp = ((t / (z * (y * 3.0))) + x) + (y / (z * -3.0));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -2e-35: tmp = ((t / (z * (y * 3.0))) + x) + (y / (z * -3.0)) else: tmp = x + (((t / y) - y) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -2e-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(Float64(t / y) - y) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -2e-35) tmp = ((t / (z * (y * 3.0))) + x) + (y / (z * -3.0)); else tmp = x + (((t / y) - y) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -2e-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[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-35}:\\
\;\;\;\;\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if t < -2.00000000000000002e-35Initial program 99.1%
+-commutative99.1%
associate-+r-99.1%
sub-neg99.1%
associate-*l*99.2%
*-commutative99.2%
distribute-frac-neg299.2%
distribute-rgt-neg-in99.2%
metadata-eval99.2%
Simplified99.2%
if -2.00000000000000002e-35 < t Initial program 92.9%
sub-neg92.9%
associate-+l+92.9%
+-commutative92.9%
remove-double-neg92.9%
distribute-frac-neg92.9%
distribute-neg-in92.9%
remove-double-neg92.9%
sub-neg92.9%
neg-mul-192.9%
times-frac97.0%
distribute-frac-neg97.0%
neg-mul-197.0%
*-commutative97.0%
associate-/l*96.9%
*-commutative96.9%
Simplified98.6%
*-commutative98.6%
clear-num98.6%
un-div-inv98.7%
div-inv98.7%
metadata-eval98.7%
Applied egg-rr98.7%
(FPCore (x y z t)
:precision binary64
(if (<= y -6.4e+66)
(/ y (* z -3.0))
(if (<= y -1.5e-88)
x
(if (<= y 3.3e+76)
(* 0.3333333333333333 (/ t (* z y)))
(/ (/ y z) -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.4e+66) {
tmp = y / (z * -3.0);
} else if (y <= -1.5e-88) {
tmp = x;
} else if (y <= 3.3e+76) {
tmp = 0.3333333333333333 * (t / (z * y));
} 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 <= (-6.4d+66)) then
tmp = y / (z * (-3.0d0))
else if (y <= (-1.5d-88)) then
tmp = x
else if (y <= 3.3d+76) then
tmp = 0.3333333333333333d0 * (t / (z * y))
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 <= -6.4e+66) {
tmp = y / (z * -3.0);
} else if (y <= -1.5e-88) {
tmp = x;
} else if (y <= 3.3e+76) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = (y / z) / -3.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6.4e+66: tmp = y / (z * -3.0) elif y <= -1.5e-88: tmp = x elif y <= 3.3e+76: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = (y / z) / -3.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6.4e+66) tmp = Float64(y / Float64(z * -3.0)); elseif (y <= -1.5e-88) tmp = x; elseif (y <= 3.3e+76) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); 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 <= -6.4e+66) tmp = y / (z * -3.0); elseif (y <= -1.5e-88) tmp = x; elseif (y <= 3.3e+76) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = (y / z) / -3.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6.4e+66], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.5e-88], x, If[LessEqual[y, 3.3e+76], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.4 \cdot 10^{+66}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-88}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+76}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\end{array}
\end{array}
if y < -6.3999999999999999e66Initial program 97.5%
sub-neg97.5%
associate-+l+97.5%
+-commutative97.5%
remove-double-neg97.5%
distribute-frac-neg97.5%
distribute-neg-in97.5%
remove-double-neg97.5%
sub-neg97.5%
neg-mul-197.5%
times-frac97.5%
distribute-frac-neg97.5%
neg-mul-197.5%
*-commutative97.5%
associate-/l*97.5%
*-commutative97.5%
Simplified99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.8%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 95.1%
metadata-eval95.1%
times-frac95.3%
neg-mul-195.3%
*-commutative95.3%
distribute-frac-neg95.3%
distribute-neg-frac295.3%
distribute-rgt-neg-in95.3%
metadata-eval95.3%
Simplified95.3%
Taylor expanded in x around 0 60.4%
metadata-eval60.4%
times-frac60.6%
*-un-lft-identity60.6%
*-commutative60.6%
Applied egg-rr60.6%
if -6.3999999999999999e66 < y < -1.5e-88Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.8%
Taylor expanded in x around inf 53.0%
if -1.5e-88 < y < 3.3000000000000001e76Initial program 92.3%
sub-neg92.3%
associate-+l+92.3%
+-commutative92.3%
remove-double-neg92.3%
distribute-frac-neg92.3%
distribute-neg-in92.3%
remove-double-neg92.3%
sub-neg92.3%
neg-mul-192.3%
times-frac94.3%
distribute-frac-neg94.3%
neg-mul-194.3%
*-commutative94.3%
associate-/l*94.2%
*-commutative94.2%
Simplified94.3%
*-commutative94.3%
clear-num94.3%
un-div-inv94.3%
div-inv94.3%
metadata-eval94.3%
Applied egg-rr94.3%
Taylor expanded in t around inf 86.1%
*-commutative86.1%
metadata-eval86.1%
associate-/l*86.1%
*-rgt-identity86.1%
associate-/r*86.1%
*-commutative86.1%
associate-*l*86.2%
Simplified86.2%
Taylor expanded in x around 0 60.4%
if 3.3000000000000001e76 < y Initial program 95.8%
sub-neg95.8%
associate-+l+95.8%
+-commutative95.8%
remove-double-neg95.8%
distribute-frac-neg95.8%
distribute-neg-in95.8%
remove-double-neg95.8%
sub-neg95.8%
neg-mul-195.8%
times-frac96.7%
distribute-frac-neg96.7%
neg-mul-196.7%
*-commutative96.7%
associate-/l*96.6%
*-commutative96.6%
Simplified99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.8%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 99.0%
metadata-eval99.0%
times-frac99.0%
neg-mul-199.0%
*-commutative99.0%
distribute-frac-neg99.0%
distribute-neg-frac299.0%
distribute-rgt-neg-in99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in x around 0 82.8%
*-commutative82.8%
metadata-eval82.8%
div-inv82.9%
Applied egg-rr82.9%
Final simplification65.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e+86)
(+ x (/ y (* z -3.0)))
(if (<= y 1.02e+76)
(+ x (/ 0.3333333333333333 (* z (/ y t))))
(+ x (/ (/ y -3.0) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+86) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1.02e+76) {
tmp = x + (0.3333333333333333 / (z * (y / t)));
} else {
tmp = x + ((y / -3.0) / 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 <= (-1d+86)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 1.02d+76) then
tmp = x + (0.3333333333333333d0 / (z * (y / t)))
else
tmp = x + ((y / (-3.0d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+86) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1.02e+76) {
tmp = x + (0.3333333333333333 / (z * (y / t)));
} else {
tmp = x + ((y / -3.0) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e+86: tmp = x + (y / (z * -3.0)) elif y <= 1.02e+76: tmp = x + (0.3333333333333333 / (z * (y / t))) else: tmp = x + ((y / -3.0) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e+86) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 1.02e+76) tmp = Float64(x + Float64(0.3333333333333333 / Float64(z * Float64(y / t)))); else tmp = Float64(x + Float64(Float64(y / -3.0) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1e+86) tmp = x + (y / (z * -3.0)); elseif (y <= 1.02e+76) tmp = x + (0.3333333333333333 / (z * (y / t))); else tmp = x + ((y / -3.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+86], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.02e+76], N[(x + N[(0.3333333333333333 / N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+86}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+76}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\end{array}
\end{array}
if y < -1e86Initial program 97.4%
sub-neg97.4%
associate-+l+97.4%
+-commutative97.4%
remove-double-neg97.4%
distribute-frac-neg97.4%
distribute-neg-in97.4%
remove-double-neg97.4%
sub-neg97.4%
neg-mul-197.4%
times-frac97.4%
distribute-frac-neg97.4%
neg-mul-197.4%
*-commutative97.4%
associate-/l*97.4%
*-commutative97.4%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 97.3%
metadata-eval97.3%
times-frac97.5%
neg-mul-197.5%
*-commutative97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
distribute-rgt-neg-in97.5%
metadata-eval97.5%
Simplified97.5%
if -1e86 < y < 1.02000000000000007e76Initial program 93.9%
sub-neg93.9%
associate-+l+93.9%
+-commutative93.9%
remove-double-neg93.9%
distribute-frac-neg93.9%
distribute-neg-in93.9%
remove-double-neg93.9%
sub-neg93.9%
neg-mul-193.9%
times-frac95.4%
distribute-frac-neg95.4%
neg-mul-195.4%
*-commutative95.4%
associate-/l*95.4%
*-commutative95.4%
Simplified95.5%
Taylor expanded in t around inf 85.3%
*-commutative85.3%
associate-*l/85.3%
frac-times86.3%
clear-num86.3%
frac-times86.4%
metadata-eval86.4%
Applied egg-rr86.4%
if 1.02000000000000007e76 < y Initial program 95.8%
sub-neg95.8%
associate-+l+95.8%
+-commutative95.8%
remove-double-neg95.8%
distribute-frac-neg95.8%
distribute-neg-in95.8%
remove-double-neg95.8%
sub-neg95.8%
neg-mul-195.8%
times-frac96.7%
distribute-frac-neg96.7%
neg-mul-196.7%
*-commutative96.7%
associate-/l*96.6%
*-commutative96.6%
Simplified99.7%
Taylor expanded in t around 0 99.0%
metadata-eval99.0%
times-frac99.0%
neg-mul-199.0%
*-commutative99.0%
distribute-neg-frac99.0%
associate-/r*99.0%
distribute-neg-frac299.0%
*-lft-identity99.0%
associate-*l/99.0%
metadata-eval99.0%
associate-*r/99.0%
associate-*l/99.0%
*-lft-identity99.0%
Simplified99.0%
Final simplification91.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e+86)
(+ x (/ y (* z -3.0)))
(if (<= y 1.02e+76)
(+ x (* (/ t y) (/ 0.3333333333333333 z)))
(+ x (/ (/ y -3.0) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+86) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1.02e+76) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else {
tmp = x + ((y / -3.0) / 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 <= (-1d+86)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 1.02d+76) then
tmp = x + ((t / y) * (0.3333333333333333d0 / z))
else
tmp = x + ((y / (-3.0d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+86) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1.02e+76) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else {
tmp = x + ((y / -3.0) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e+86: tmp = x + (y / (z * -3.0)) elif y <= 1.02e+76: tmp = x + ((t / y) * (0.3333333333333333 / z)) else: tmp = x + ((y / -3.0) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e+86) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 1.02e+76) tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / z))); else tmp = Float64(x + Float64(Float64(y / -3.0) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1e+86) tmp = x + (y / (z * -3.0)); elseif (y <= 1.02e+76) tmp = x + ((t / y) * (0.3333333333333333 / z)); else tmp = x + ((y / -3.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+86], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.02e+76], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+86}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+76}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\end{array}
\end{array}
if y < -1e86Initial program 97.4%
sub-neg97.4%
associate-+l+97.4%
+-commutative97.4%
remove-double-neg97.4%
distribute-frac-neg97.4%
distribute-neg-in97.4%
remove-double-neg97.4%
sub-neg97.4%
neg-mul-197.4%
times-frac97.4%
distribute-frac-neg97.4%
neg-mul-197.4%
*-commutative97.4%
associate-/l*97.4%
*-commutative97.4%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 97.3%
metadata-eval97.3%
times-frac97.5%
neg-mul-197.5%
*-commutative97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
distribute-rgt-neg-in97.5%
metadata-eval97.5%
Simplified97.5%
if -1e86 < y < 1.02000000000000007e76Initial program 93.9%
sub-neg93.9%
associate-+l+93.9%
+-commutative93.9%
remove-double-neg93.9%
distribute-frac-neg93.9%
distribute-neg-in93.9%
remove-double-neg93.9%
sub-neg93.9%
neg-mul-193.9%
times-frac95.4%
distribute-frac-neg95.4%
neg-mul-195.4%
*-commutative95.4%
associate-/l*95.4%
*-commutative95.4%
Simplified95.5%
Taylor expanded in t around inf 86.3%
if 1.02000000000000007e76 < y Initial program 95.8%
sub-neg95.8%
associate-+l+95.8%
+-commutative95.8%
remove-double-neg95.8%
distribute-frac-neg95.8%
distribute-neg-in95.8%
remove-double-neg95.8%
sub-neg95.8%
neg-mul-195.8%
times-frac96.7%
distribute-frac-neg96.7%
neg-mul-196.7%
*-commutative96.7%
associate-/l*96.6%
*-commutative96.6%
Simplified99.7%
Taylor expanded in t around 0 99.0%
metadata-eval99.0%
times-frac99.0%
neg-mul-199.0%
*-commutative99.0%
distribute-neg-frac99.0%
associate-/r*99.0%
distribute-neg-frac299.0%
*-lft-identity99.0%
associate-*l/99.0%
metadata-eval99.0%
associate-*r/99.0%
associate-*l/99.0%
*-lft-identity99.0%
Simplified99.0%
Final simplification91.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e+86)
(+ x (/ y (* z -3.0)))
(if (<= y 1.05e+76)
(+ x (* 0.3333333333333333 (/ t (* z y))))
(+ x (/ (/ y -3.0) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+86) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1.05e+76) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + ((y / -3.0) / 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 <= (-1d+86)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 1.05d+76) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
else
tmp = x + ((y / (-3.0d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+86) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1.05e+76) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + ((y / -3.0) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e+86: tmp = x + (y / (z * -3.0)) elif y <= 1.05e+76: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = x + ((y / -3.0) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e+86) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 1.05e+76) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = Float64(x + Float64(Float64(y / -3.0) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1e+86) tmp = x + (y / (z * -3.0)); elseif (y <= 1.05e+76) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = x + ((y / -3.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+86], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+76], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+86}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+76}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\end{array}
\end{array}
if y < -1e86Initial program 97.4%
sub-neg97.4%
associate-+l+97.4%
+-commutative97.4%
remove-double-neg97.4%
distribute-frac-neg97.4%
distribute-neg-in97.4%
remove-double-neg97.4%
sub-neg97.4%
neg-mul-197.4%
times-frac97.4%
distribute-frac-neg97.4%
neg-mul-197.4%
*-commutative97.4%
associate-/l*97.4%
*-commutative97.4%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in t around 0 97.3%
metadata-eval97.3%
times-frac97.5%
neg-mul-197.5%
*-commutative97.5%
distribute-frac-neg97.5%
distribute-neg-frac297.5%
distribute-rgt-neg-in97.5%
metadata-eval97.5%
Simplified97.5%
if -1e86 < y < 1.05000000000000003e76Initial program 93.9%
sub-neg93.9%
associate-+l+93.9%
+-commutative93.9%
remove-double-neg93.9%
distribute-frac-neg93.9%
distribute-neg-in93.9%
remove-double-neg93.9%
sub-neg93.9%
neg-mul-193.9%
times-frac95.4%
distribute-frac-neg95.4%
neg-mul-195.4%
*-commutative95.4%
associate-/l*95.4%
*-commutative95.4%
Simplified95.5%
Taylor expanded in t around inf 85.3%
if 1.05000000000000003e76 < y Initial program 95.8%
sub-neg95.8%
associate-+l+95.8%
+-commutative95.8%
remove-double-neg95.8%
distribute-frac-neg95.8%
distribute-neg-in95.8%
remove-double-neg95.8%
sub-neg95.8%
neg-mul-195.8%
times-frac96.7%
distribute-frac-neg96.7%
neg-mul-196.7%
*-commutative96.7%
associate-/l*96.6%
*-commutative96.6%
Simplified99.7%
Taylor expanded in t around 0 99.0%
metadata-eval99.0%
times-frac99.0%
neg-mul-199.0%
*-commutative99.0%
distribute-neg-frac99.0%
associate-/r*99.0%
distribute-neg-frac299.0%
*-lft-identity99.0%
associate-*l/99.0%
metadata-eval99.0%
associate-*r/99.0%
associate-*l/99.0%
*-lft-identity99.0%
Simplified99.0%
Final simplification90.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.8e-88) (not (<= y 4.1e-116))) (+ x (/ y (* z -3.0))) (* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.8e-88) || !(y <= 4.1e-116)) {
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 <= (-4.8d-88)) .or. (.not. (y <= 4.1d-116))) 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 <= -4.8e-88) || !(y <= 4.1e-116)) {
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 <= -4.8e-88) or not (y <= 4.1e-116): 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 <= -4.8e-88) || !(y <= 4.1e-116)) 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 <= -4.8e-88) || ~((y <= 4.1e-116))) 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, -4.8e-88], N[Not[LessEqual[y, 4.1e-116]], $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 -4.8 \cdot 10^{-88} \lor \neg \left(y \leq 4.1 \cdot 10^{-116}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -4.7999999999999999e-88 or 4.0999999999999999e-116 < y Initial program 97.4%
sub-neg97.4%
associate-+l+97.4%
+-commutative97.4%
remove-double-neg97.4%
distribute-frac-neg97.4%
distribute-neg-in97.4%
remove-double-neg97.4%
sub-neg97.4%
neg-mul-197.4%
times-frac96.7%
distribute-frac-neg96.7%
neg-mul-196.7%
*-commutative96.7%
associate-/l*96.6%
*-commutative96.6%
Simplified98.2%
*-commutative98.2%
clear-num98.2%
un-div-inv98.2%
div-inv98.3%
metadata-eval98.3%
Applied egg-rr98.3%
Taylor expanded in t around 0 82.9%
metadata-eval82.9%
times-frac83.0%
neg-mul-183.0%
*-commutative83.0%
distribute-frac-neg83.0%
distribute-neg-frac283.0%
distribute-rgt-neg-in83.0%
metadata-eval83.0%
Simplified83.0%
if -4.7999999999999999e-88 < y < 4.0999999999999999e-116Initial program 88.3%
sub-neg88.3%
associate-+l+88.3%
+-commutative88.3%
remove-double-neg88.3%
distribute-frac-neg88.3%
distribute-neg-in88.3%
remove-double-neg88.3%
sub-neg88.3%
neg-mul-188.3%
times-frac94.4%
distribute-frac-neg94.4%
neg-mul-194.4%
*-commutative94.4%
associate-/l*94.4%
*-commutative94.4%
Simplified94.5%
*-commutative94.5%
clear-num94.5%
un-div-inv94.6%
div-inv94.4%
metadata-eval94.4%
Applied egg-rr94.4%
Taylor expanded in t around inf 88.3%
*-commutative88.3%
metadata-eval88.3%
associate-/l*88.3%
*-rgt-identity88.3%
associate-/r*88.3%
*-commutative88.3%
associate-*l*88.4%
Simplified88.4%
Taylor expanded in x around 0 72.9%
Final simplification80.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.65e-88) (not (<= y 1.3e-118))) (+ x (* -0.3333333333333333 (/ y z))) (* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.65e-88) || !(y <= 1.3e-118)) {
tmp = x + (-0.3333333333333333 * (y / 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 <= (-1.65d-88)) .or. (.not. (y <= 1.3d-118))) then
tmp = x + ((-0.3333333333333333d0) * (y / 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 <= -1.65e-88) || !(y <= 1.3e-118)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.65e-88) or not (y <= 1.3e-118): tmp = x + (-0.3333333333333333 * (y / z)) else: tmp = 0.3333333333333333 * (t / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.65e-88) || !(y <= 1.3e-118)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / 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 <= -1.65e-88) || ~((y <= 1.3e-118))) tmp = x + (-0.3333333333333333 * (y / z)); else tmp = 0.3333333333333333 * (t / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.65e-88], N[Not[LessEqual[y, 1.3e-118]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(y / 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 -1.65 \cdot 10^{-88} \lor \neg \left(y \leq 1.3 \cdot 10^{-118}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -1.64999999999999997e-88 or 1.3e-118 < y Initial program 97.4%
sub-neg97.4%
associate-+l+97.4%
+-commutative97.4%
remove-double-neg97.4%
distribute-frac-neg97.4%
distribute-neg-in97.4%
remove-double-neg97.4%
sub-neg97.4%
neg-mul-197.4%
times-frac96.7%
distribute-frac-neg96.7%
neg-mul-196.7%
*-commutative96.7%
associate-/l*96.6%
*-commutative96.6%
Simplified98.2%
Taylor expanded in t around 0 82.9%
if -1.64999999999999997e-88 < y < 1.3e-118Initial program 88.3%
sub-neg88.3%
associate-+l+88.3%
+-commutative88.3%
remove-double-neg88.3%
distribute-frac-neg88.3%
distribute-neg-in88.3%
remove-double-neg88.3%
sub-neg88.3%
neg-mul-188.3%
times-frac94.4%
distribute-frac-neg94.4%
neg-mul-194.4%
*-commutative94.4%
associate-/l*94.4%
*-commutative94.4%
Simplified94.5%
*-commutative94.5%
clear-num94.5%
un-div-inv94.6%
div-inv94.4%
metadata-eval94.4%
Applied egg-rr94.4%
Taylor expanded in t around inf 88.3%
*-commutative88.3%
metadata-eval88.3%
associate-/l*88.3%
*-rgt-identity88.3%
associate-/r*88.3%
*-commutative88.3%
associate-*l*88.4%
Simplified88.4%
Taylor expanded in x around 0 72.9%
Final simplification80.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.95e-88)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 2.2e-116)
(* 0.3333333333333333 (/ t (* z y)))
(+ x (* -0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.95e-88) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 2.2e-116) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x + (-0.3333333333333333 * (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 <= (-1.95d-88)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 2.2d-116) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else
tmp = x + ((-0.3333333333333333d0) * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.95e-88) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 2.2e-116) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x + (-0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.95e-88: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 2.2e-116: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = x + (-0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.95e-88) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 2.2e-116) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); else tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.95e-88) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 2.2e-116) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = x + (-0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.95e-88], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e-116], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{-88}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-116}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.94999999999999996e-88Initial program 98.5%
sub-neg98.5%
associate-+l+98.5%
+-commutative98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
distribute-neg-in98.5%
remove-double-neg98.5%
sub-neg98.5%
neg-mul-198.5%
times-frac98.5%
distribute-frac-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.4%
*-commutative98.4%
Simplified99.8%
Taylor expanded in t around 0 85.2%
*-commutative85.2%
associate-*l/85.2%
associate-*r/85.2%
Simplified85.2%
if -1.94999999999999996e-88 < y < 2.2000000000000001e-116Initial program 88.3%
sub-neg88.3%
associate-+l+88.3%
+-commutative88.3%
remove-double-neg88.3%
distribute-frac-neg88.3%
distribute-neg-in88.3%
remove-double-neg88.3%
sub-neg88.3%
neg-mul-188.3%
times-frac94.4%
distribute-frac-neg94.4%
neg-mul-194.4%
*-commutative94.4%
associate-/l*94.4%
*-commutative94.4%
Simplified94.5%
*-commutative94.5%
clear-num94.5%
un-div-inv94.6%
div-inv94.4%
metadata-eval94.4%
Applied egg-rr94.4%
Taylor expanded in t around inf 88.3%
*-commutative88.3%
metadata-eval88.3%
associate-/l*88.3%
*-rgt-identity88.3%
associate-/r*88.3%
*-commutative88.3%
associate-*l*88.4%
Simplified88.4%
Taylor expanded in x around 0 72.9%
if 2.2000000000000001e-116 < y Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
+-commutative96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
distribute-neg-in96.8%
remove-double-neg96.8%
sub-neg96.8%
neg-mul-196.8%
times-frac95.5%
distribute-frac-neg95.5%
neg-mul-195.5%
*-commutative95.5%
associate-/l*95.5%
*-commutative95.5%
Simplified97.2%
Taylor expanded in t around 0 81.4%
Final simplification80.2%
(FPCore (x y z t) :precision binary64 (if (<= z -3.3e+39) x (if (<= z 1.95e+42) (/ (/ y z) -3.0) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.3e+39) {
tmp = x;
} else if (z <= 1.95e+42) {
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 (z <= (-3.3d+39)) then
tmp = x
else if (z <= 1.95d+42) 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 (z <= -3.3e+39) {
tmp = x;
} else if (z <= 1.95e+42) {
tmp = (y / z) / -3.0;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.3e+39: tmp = x elif z <= 1.95e+42: tmp = (y / z) / -3.0 else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.3e+39) tmp = x; elseif (z <= 1.95e+42) 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 (z <= -3.3e+39) tmp = x; elseif (z <= 1.95e+42) tmp = (y / z) / -3.0; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.3e+39], x, If[LessEqual[z, 1.95e+42], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+39}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+42}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.30000000000000021e39 or 1.94999999999999985e42 < z Initial program 99.3%
sub-neg99.3%
associate-+l+99.3%
+-commutative99.3%
remove-double-neg99.3%
distribute-frac-neg99.3%
distribute-neg-in99.3%
remove-double-neg99.3%
sub-neg99.3%
neg-mul-199.3%
times-frac93.7%
distribute-frac-neg93.7%
neg-mul-193.7%
*-commutative93.7%
associate-/l*93.7%
*-commutative93.7%
Simplified93.7%
Taylor expanded in x around inf 56.5%
if -3.30000000000000021e39 < z < 1.94999999999999985e42Initial program 91.7%
sub-neg91.7%
associate-+l+91.7%
+-commutative91.7%
remove-double-neg91.7%
distribute-frac-neg91.7%
distribute-neg-in91.7%
remove-double-neg91.7%
sub-neg91.7%
neg-mul-191.7%
times-frac97.8%
distribute-frac-neg97.8%
neg-mul-197.8%
*-commutative97.8%
associate-/l*97.7%
*-commutative97.7%
Simplified99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 60.6%
metadata-eval60.6%
times-frac60.7%
neg-mul-160.7%
*-commutative60.7%
distribute-frac-neg60.7%
distribute-neg-frac260.7%
distribute-rgt-neg-in60.7%
metadata-eval60.7%
Simplified60.7%
Taylor expanded in x around 0 50.3%
*-commutative50.3%
metadata-eval50.3%
div-inv50.4%
Applied egg-rr50.4%
(FPCore (x y z t) :precision binary64 (if (<= z -1.3e+39) x (if (<= z 1.6e+42) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.3e+39) {
tmp = x;
} else if (z <= 1.6e+42) {
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 (z <= (-1.3d+39)) then
tmp = x
else if (z <= 1.6d+42) 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 (z <= -1.3e+39) {
tmp = x;
} else if (z <= 1.6e+42) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.3e+39: tmp = x elif z <= 1.6e+42: tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.3e+39) tmp = x; elseif (z <= 1.6e+42) 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 (z <= -1.3e+39) tmp = x; elseif (z <= 1.6e+42) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.3e+39], x, If[LessEqual[z, 1.6e+42], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+39}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+42}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.3e39 or 1.60000000000000001e42 < z Initial program 99.3%
sub-neg99.3%
associate-+l+99.3%
+-commutative99.3%
remove-double-neg99.3%
distribute-frac-neg99.3%
distribute-neg-in99.3%
remove-double-neg99.3%
sub-neg99.3%
neg-mul-199.3%
times-frac93.7%
distribute-frac-neg93.7%
neg-mul-193.7%
*-commutative93.7%
associate-/l*93.7%
*-commutative93.7%
Simplified93.7%
Taylor expanded in x around inf 56.5%
if -1.3e39 < z < 1.60000000000000001e42Initial program 91.7%
sub-neg91.7%
associate-+l+91.7%
+-commutative91.7%
remove-double-neg91.7%
distribute-frac-neg91.7%
distribute-neg-in91.7%
remove-double-neg91.7%
sub-neg91.7%
neg-mul-191.7%
times-frac97.8%
distribute-frac-neg97.8%
neg-mul-197.8%
*-commutative97.8%
associate-/l*97.7%
*-commutative97.7%
Simplified99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 60.6%
metadata-eval60.6%
times-frac60.7%
neg-mul-160.7%
*-commutative60.7%
distribute-frac-neg60.7%
distribute-neg-frac260.7%
distribute-rgt-neg-in60.7%
metadata-eval60.7%
Simplified60.7%
Taylor expanded in x around 0 50.3%
metadata-eval50.3%
times-frac50.4%
*-un-lft-identity50.4%
*-commutative50.4%
Applied egg-rr50.4%
(FPCore (x y z t) :precision binary64 (if (<= z -2.8e+39) x (if (<= z 7.4e+42) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.8e+39) {
tmp = x;
} else if (z <= 7.4e+42) {
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 (z <= (-2.8d+39)) then
tmp = x
else if (z <= 7.4d+42) 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 (z <= -2.8e+39) {
tmp = x;
} else if (z <= 7.4e+42) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.8e+39: tmp = x elif z <= 7.4e+42: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.8e+39) tmp = x; elseif (z <= 7.4e+42) 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 (z <= -2.8e+39) tmp = x; elseif (z <= 7.4e+42) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.8e+39], x, If[LessEqual[z, 7.4e+42], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+39}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{+42}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.80000000000000001e39 or 7.39999999999999993e42 < z Initial program 99.3%
sub-neg99.3%
associate-+l+99.3%
+-commutative99.3%
remove-double-neg99.3%
distribute-frac-neg99.3%
distribute-neg-in99.3%
remove-double-neg99.3%
sub-neg99.3%
neg-mul-199.3%
times-frac93.7%
distribute-frac-neg93.7%
neg-mul-193.7%
*-commutative93.7%
associate-/l*93.7%
*-commutative93.7%
Simplified93.7%
Taylor expanded in x around inf 56.5%
if -2.80000000000000001e39 < z < 7.39999999999999993e42Initial program 91.7%
sub-neg91.7%
associate-+l+91.7%
+-commutative91.7%
remove-double-neg91.7%
distribute-frac-neg91.7%
distribute-neg-in91.7%
remove-double-neg91.7%
sub-neg91.7%
neg-mul-191.7%
times-frac97.8%
distribute-frac-neg97.8%
neg-mul-197.8%
*-commutative97.8%
associate-/l*97.7%
*-commutative97.7%
Simplified99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 60.6%
metadata-eval60.6%
times-frac60.7%
neg-mul-160.7%
*-commutative60.7%
distribute-frac-neg60.7%
distribute-neg-frac260.7%
distribute-rgt-neg-in60.7%
metadata-eval60.7%
Simplified60.7%
Taylor expanded in x around 0 50.3%
(FPCore (x y z t) :precision binary64 (+ x (/ (- (/ t y) y) (* z 3.0))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - 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 + (((t / y) - y) / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
def code(x, y, z, t): return x + (((t / y) - y) / (z * 3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Initial program 94.9%
sub-neg94.9%
associate-+l+94.9%
+-commutative94.9%
remove-double-neg94.9%
distribute-frac-neg94.9%
distribute-neg-in94.9%
remove-double-neg94.9%
sub-neg94.9%
neg-mul-194.9%
times-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.0%
*-commutative96.0%
Simplified97.2%
*-commutative97.2%
clear-num97.2%
un-div-inv97.2%
div-inv97.2%
metadata-eval97.2%
Applied egg-rr97.2%
(FPCore (x y z t) :precision binary64 (+ x (* (- (/ t y) y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - 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 + (((t / y) - y) * (0.3333333333333333d0 / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) * (0.3333333333333333 / z));
}
def code(x, y, z, t): return x + (((t / y) - y) * (0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) * (0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}
\end{array}
Initial program 94.9%
sub-neg94.9%
associate-+l+94.9%
+-commutative94.9%
remove-double-neg94.9%
distribute-frac-neg94.9%
distribute-neg-in94.9%
remove-double-neg94.9%
sub-neg94.9%
neg-mul-194.9%
times-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.0%
*-commutative96.0%
Simplified97.2%
Final simplification97.2%
(FPCore (x y z t) :precision binary64 (+ x (* 0.3333333333333333 (/ (- (/ t y) y) z))))
double code(double x, double y, double z, double t) {
return x + (0.3333333333333333 * (((t / y) - y) / 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 + (0.3333333333333333d0 * (((t / y) - y) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (0.3333333333333333 * (((t / y) - y) / z));
}
def code(x, y, z, t): return x + (0.3333333333333333 * (((t / y) - y) / z))
function code(x, y, z, t) return Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z))) end
function tmp = code(x, y, z, t) tmp = x + (0.3333333333333333 * (((t / y) - y) / z)); end
code[x_, y_, z_, t_] := N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}
\end{array}
Initial program 94.9%
sub-neg94.9%
associate-+l+94.9%
+-commutative94.9%
remove-double-neg94.9%
distribute-frac-neg94.9%
distribute-neg-in94.9%
remove-double-neg94.9%
sub-neg94.9%
neg-mul-194.9%
times-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.0%
*-commutative96.0%
Simplified97.2%
Taylor expanded in z around 0 97.2%
(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.9%
sub-neg94.9%
associate-+l+94.9%
+-commutative94.9%
remove-double-neg94.9%
distribute-frac-neg94.9%
distribute-neg-in94.9%
remove-double-neg94.9%
sub-neg94.9%
neg-mul-194.9%
times-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.0%
*-commutative96.0%
Simplified97.2%
Taylor expanded in x around inf 30.9%
(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 2024148
(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))))