
(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 13 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
(let* ((t_1 (- y (/ t y))))
(if (<= y -4.1e-222)
(+ x (* -0.3333333333333333 (/ t_1 z)))
(if (<= y 4.4e-81)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(+ x (/ (* -0.3333333333333333 t_1) z))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -4.1e-222) {
tmp = x + (-0.3333333333333333 * (t_1 / z));
} else if (y <= 4.4e-81) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((-0.3333333333333333 * t_1) / 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) :: t_1
real(8) :: tmp
t_1 = y - (t / y)
if (y <= (-4.1d-222)) then
tmp = x + ((-0.3333333333333333d0) * (t_1 / z))
else if (y <= 4.4d-81) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x + (((-0.3333333333333333d0) * t_1) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -4.1e-222) {
tmp = x + (-0.3333333333333333 * (t_1 / z));
} else if (y <= 4.4e-81) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((-0.3333333333333333 * t_1) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -4.1e-222: tmp = x + (-0.3333333333333333 * (t_1 / z)) elif y <= 4.4e-81: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + ((-0.3333333333333333 * t_1) / z) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -4.1e-222) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(t_1 / z))); elseif (y <= 4.4e-81) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x + Float64(Float64(-0.3333333333333333 * t_1) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -4.1e-222) tmp = x + (-0.3333333333333333 * (t_1 / z)); elseif (y <= 4.4e-81) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x + ((-0.3333333333333333 * t_1) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.1e-222], N[(x + N[(-0.3333333333333333 * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e-81], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-0.3333333333333333 * t$95$1), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -4.1 \cdot 10^{-222}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{t_1}{z}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-81}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot t_1}{z}\\
\end{array}
\end{array}
if y < -4.1000000000000003e-222Initial program 98.9%
associate-+l-98.9%
sub-neg98.9%
sub-neg98.9%
distribute-neg-in98.9%
unsub-neg98.9%
neg-mul-198.9%
associate-*r/98.9%
associate-*l/98.9%
distribute-neg-frac98.9%
neg-mul-198.9%
times-frac98.9%
distribute-lft-out--98.9%
*-commutative98.9%
associate-/r*98.9%
metadata-eval98.9%
Simplified98.9%
div-inv98.9%
Applied egg-rr98.9%
Taylor expanded in x around 0 98.9%
if -4.1000000000000003e-222 < y < 4.3999999999999998e-81Initial program 91.2%
associate-+l-91.2%
sub-neg91.2%
sub-neg91.2%
distribute-neg-in91.2%
unsub-neg91.2%
neg-mul-191.2%
associate-*r/91.2%
associate-*l/91.2%
distribute-neg-frac91.2%
neg-mul-191.2%
times-frac81.4%
distribute-lft-out--81.4%
*-commutative81.4%
associate-/r*81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in y around 0 91.2%
*-commutative91.2%
associate-*l/91.1%
*-commutative91.1%
times-frac99.8%
Simplified99.8%
if 4.3999999999999998e-81 < y Initial program 98.7%
associate-+l-98.7%
sub-neg98.7%
sub-neg98.7%
distribute-neg-in98.7%
unsub-neg98.7%
neg-mul-198.7%
associate-*r/98.7%
associate-*l/98.5%
distribute-neg-frac98.5%
neg-mul-198.5%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Final simplification99.5%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))))) (if (<= t_1 1e+303) t_1 (+ x (/ (* -0.3333333333333333 (- y (/ t y))) z)))))
double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
double tmp;
if (t_1 <= 1e+303) {
tmp = t_1;
} else {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (x - (y / (z * 3.0d0))) + (t / (y * (z * 3.0d0)))
if (t_1 <= 1d+303) then
tmp = t_1
else
tmp = x + (((-0.3333333333333333d0) * (y - (t / y))) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
double tmp;
if (t_1 <= 1e+303) {
tmp = t_1;
} else {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))) tmp = 0 if t_1 <= 1e+303: tmp = t_1 else: tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) tmp = 0.0 if (t_1 <= 1e+303) tmp = t_1; else tmp = Float64(x + Float64(Float64(-0.3333333333333333 * Float64(y - Float64(t / y))) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); tmp = 0.0; if (t_1 <= 1e+303) tmp = t_1; else tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+303], t$95$1, N[(x + N[(N[(-0.3333333333333333 * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{if}\;t_1 \leq 10^{+303}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y))) < 1e303Initial program 98.1%
if 1e303 < (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y))) Initial program 86.5%
associate-+l-86.5%
sub-neg86.5%
sub-neg86.5%
distribute-neg-in86.5%
unsub-neg86.5%
neg-mul-186.5%
associate-*r/86.5%
associate-*l/86.5%
distribute-neg-frac86.5%
neg-mul-186.5%
times-frac99.9%
distribute-lft-out--99.9%
*-commutative99.9%
associate-/r*100.0%
metadata-eval100.0%
Simplified100.0%
associate-*l/100.0%
Applied egg-rr100.0%
Final simplification98.4%
(FPCore (x y z t)
:precision binary64
(if (<= z -7.5e+264)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= z -1.65e+252)
(* t (/ 0.3333333333333333 (* y z)))
(if (<= z -3.5e+33)
(+ x (/ y (/ z -0.3333333333333333)))
(if (<= z 3.5e+47)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(+ x (* -0.3333333333333333 (/ y z))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.5e+264) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (z <= -1.65e+252) {
tmp = t * (0.3333333333333333 / (y * z));
} else if (z <= -3.5e+33) {
tmp = x + (y / (z / -0.3333333333333333));
} else if (z <= 3.5e+47) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} 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 (z <= (-7.5d+264)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (z <= (-1.65d+252)) then
tmp = t * (0.3333333333333333d0 / (y * z))
else if (z <= (-3.5d+33)) then
tmp = x + (y / (z / (-0.3333333333333333d0)))
else if (z <= 3.5d+47) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
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 (z <= -7.5e+264) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (z <= -1.65e+252) {
tmp = t * (0.3333333333333333 / (y * z));
} else if (z <= -3.5e+33) {
tmp = x + (y / (z / -0.3333333333333333));
} else if (z <= 3.5e+47) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = x + (-0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7.5e+264: tmp = x + (y * (-0.3333333333333333 / z)) elif z <= -1.65e+252: tmp = t * (0.3333333333333333 / (y * z)) elif z <= -3.5e+33: tmp = x + (y / (z / -0.3333333333333333)) elif z <= 3.5e+47: tmp = -0.3333333333333333 * ((y - (t / y)) / z) else: tmp = x + (-0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7.5e+264) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (z <= -1.65e+252) tmp = Float64(t * Float64(0.3333333333333333 / Float64(y * z))); elseif (z <= -3.5e+33) tmp = Float64(x + Float64(y / Float64(z / -0.3333333333333333))); elseif (z <= 3.5e+47) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); 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 (z <= -7.5e+264) tmp = x + (y * (-0.3333333333333333 / z)); elseif (z <= -1.65e+252) tmp = t * (0.3333333333333333 / (y * z)); elseif (z <= -3.5e+33) tmp = x + (y / (z / -0.3333333333333333)); elseif (z <= 3.5e+47) tmp = -0.3333333333333333 * ((y - (t / y)) / z); else tmp = x + (-0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.5e+264], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.65e+252], N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.5e+33], N[(x + N[(y / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+47], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+264}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{+252}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{+33}:\\
\;\;\;\;x + \frac{y}{\frac{z}{-0.3333333333333333}}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+47}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < -7.50000000000000005e264Initial program 84.6%
associate-+l-84.6%
sub-neg84.6%
sub-neg84.6%
distribute-neg-in84.6%
unsub-neg84.6%
neg-mul-184.6%
associate-*r/84.6%
associate-*l/84.6%
distribute-neg-frac84.6%
neg-mul-184.6%
times-frac100.0%
distribute-lft-out--100.0%
*-commutative100.0%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 84.6%
if -7.50000000000000005e264 < z < -1.65e252Initial program 99.4%
associate-+l-99.4%
sub-neg99.4%
sub-neg99.4%
distribute-neg-in99.4%
unsub-neg99.4%
neg-mul-199.4%
associate-*r/99.4%
associate-*l/99.4%
distribute-neg-frac99.4%
neg-mul-199.4%
times-frac23.7%
distribute-lft-out--23.7%
*-commutative23.7%
associate-/r*23.4%
metadata-eval23.4%
Simplified23.4%
div-inv23.4%
Applied egg-rr23.4%
Taylor expanded in x around 0 23.4%
Taylor expanded in z around 0 23.4%
Taylor expanded in y around 0 99.4%
*-commutative99.4%
*-commutative99.4%
metadata-eval99.4%
times-frac99.7%
associate-*r*98.8%
associate-*r/99.1%
associate-*r*100.0%
*-commutative100.0%
associate-/r*99.7%
metadata-eval99.7%
*-commutative99.7%
Simplified99.7%
if -1.65e252 < z < -3.5000000000000001e33Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
distribute-neg-in99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.7%
distribute-neg-frac99.7%
neg-mul-199.7%
times-frac86.6%
distribute-lft-out--86.6%
*-commutative86.6%
associate-/r*86.5%
metadata-eval86.5%
Simplified86.5%
div-inv86.5%
Applied egg-rr86.5%
Taylor expanded in x around 0 86.7%
Taylor expanded in y around inf 77.8%
*-commutative27.2%
Simplified77.8%
associate-*l/77.8%
associate-/l*77.8%
Applied egg-rr77.8%
if -3.5000000000000001e33 < z < 3.50000000000000015e47Initial program 94.4%
associate-+l-94.4%
sub-neg94.4%
sub-neg94.4%
distribute-neg-in94.4%
unsub-neg94.4%
neg-mul-194.4%
associate-*r/94.4%
associate-*l/94.3%
distribute-neg-frac94.3%
neg-mul-194.3%
times-frac99.0%
distribute-lft-out--99.0%
*-commutative99.0%
associate-/r*99.1%
metadata-eval99.1%
Simplified99.1%
div-inv99.0%
Applied egg-rr99.0%
Taylor expanded in x around 0 99.1%
Taylor expanded in z around 0 88.4%
if 3.50000000000000015e47 < z Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
sub-neg99.8%
distribute-neg-in99.8%
unsub-neg99.8%
neg-mul-199.8%
associate-*r/99.8%
associate-*l/99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
times-frac93.4%
distribute-lft-out--93.4%
*-commutative93.4%
associate-/r*93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in y around inf 84.9%
Final simplification85.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* y (/ -0.3333333333333333 z)))))
(if (<= y -2.55e-46)
t_1
(if (<= y -2e-98)
(* 0.3333333333333333 (/ t (* y z)))
(if (or (<= y -1.1e-141) (not (<= y 3.2e-58)))
t_1
(* t (/ 0.3333333333333333 (* y z))))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y * (-0.3333333333333333 / z));
double tmp;
if (y <= -2.55e-46) {
tmp = t_1;
} else if (y <= -2e-98) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if ((y <= -1.1e-141) || !(y <= 3.2e-58)) {
tmp = t_1;
} else {
tmp = t * (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) :: t_1
real(8) :: tmp
t_1 = x + (y * ((-0.3333333333333333d0) / z))
if (y <= (-2.55d-46)) then
tmp = t_1
else if (y <= (-2d-98)) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if ((y <= (-1.1d-141)) .or. (.not. (y <= 3.2d-58))) then
tmp = t_1
else
tmp = t * (0.3333333333333333d0 / (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (y * (-0.3333333333333333 / z));
double tmp;
if (y <= -2.55e-46) {
tmp = t_1;
} else if (y <= -2e-98) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if ((y <= -1.1e-141) || !(y <= 3.2e-58)) {
tmp = t_1;
} else {
tmp = t * (0.3333333333333333 / (y * z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y * (-0.3333333333333333 / z)) tmp = 0 if y <= -2.55e-46: tmp = t_1 elif y <= -2e-98: tmp = 0.3333333333333333 * (t / (y * z)) elif (y <= -1.1e-141) or not (y <= 3.2e-58): tmp = t_1 else: tmp = t * (0.3333333333333333 / (y * z)) return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))) tmp = 0.0 if (y <= -2.55e-46) tmp = t_1; elseif (y <= -2e-98) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif ((y <= -1.1e-141) || !(y <= 3.2e-58)) tmp = t_1; else tmp = Float64(t * Float64(0.3333333333333333 / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y * (-0.3333333333333333 / z)); tmp = 0.0; if (y <= -2.55e-46) tmp = t_1; elseif (y <= -2e-98) tmp = 0.3333333333333333 * (t / (y * z)); elseif ((y <= -1.1e-141) || ~((y <= 3.2e-58))) tmp = t_1; else tmp = t * (0.3333333333333333 / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.55e-46], t$95$1, If[LessEqual[y, -2e-98], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.1e-141], N[Not[LessEqual[y, 3.2e-58]], $MachinePrecision]], t$95$1, N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{if}\;y \leq -2.55 \cdot 10^{-46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-98}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-141} \lor \neg \left(y \leq 3.2 \cdot 10^{-58}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\
\end{array}
\end{array}
if y < -2.5499999999999999e-46 or -1.99999999999999988e-98 < y < -1.10000000000000005e-141 or 3.2000000000000001e-58 < y Initial program 99.2%
associate-+l-99.2%
sub-neg99.2%
sub-neg99.2%
distribute-neg-in99.2%
unsub-neg99.2%
neg-mul-199.2%
associate-*r/99.2%
associate-*l/99.1%
distribute-neg-frac99.1%
neg-mul-199.1%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 94.4%
if -2.5499999999999999e-46 < y < -1.99999999999999988e-98Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
sub-neg99.7%
distribute-neg-in99.7%
unsub-neg99.7%
neg-mul-199.7%
associate-*r/99.7%
associate-*l/99.7%
distribute-neg-frac99.7%
neg-mul-199.7%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 99.8%
Taylor expanded in z around 0 66.0%
Taylor expanded in y around 0 66.0%
*-commutative66.0%
Simplified66.0%
if -1.10000000000000005e-141 < y < 3.2000000000000001e-58Initial program 92.0%
associate-+l-92.0%
sub-neg92.0%
sub-neg92.0%
distribute-neg-in92.0%
unsub-neg92.0%
neg-mul-192.0%
associate-*r/92.0%
associate-*l/92.0%
distribute-neg-frac92.0%
neg-mul-192.0%
times-frac84.3%
distribute-lft-out--84.3%
*-commutative84.3%
associate-/r*84.3%
metadata-eval84.3%
Simplified84.3%
div-inv84.2%
Applied egg-rr84.2%
Taylor expanded in x around 0 84.3%
Taylor expanded in z around 0 61.8%
Taylor expanded in y around 0 69.7%
*-commutative69.7%
*-commutative69.7%
metadata-eval69.7%
times-frac69.8%
associate-*r*69.7%
associate-*r/69.7%
associate-*r*69.7%
*-commutative69.7%
associate-/r*69.7%
metadata-eval69.7%
*-commutative69.7%
Simplified69.7%
Final simplification83.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.55e-46)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y -3e-98)
(* 0.3333333333333333 (/ t (* y z)))
(if (or (<= y -1.04e-144) (not (<= y 5.5e-57)))
(+ x (/ (* y -0.3333333333333333) z))
(* t (/ 0.3333333333333333 (* y z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.55e-46) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -3e-98) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if ((y <= -1.04e-144) || !(y <= 5.5e-57)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = t * (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.55d-46)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= (-3d-98)) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if ((y <= (-1.04d-144)) .or. (.not. (y <= 5.5d-57))) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else
tmp = t * (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.55e-46) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= -3e-98) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if ((y <= -1.04e-144) || !(y <= 5.5e-57)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = t * (0.3333333333333333 / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.55e-46: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= -3e-98: tmp = 0.3333333333333333 * (t / (y * z)) elif (y <= -1.04e-144) or not (y <= 5.5e-57): tmp = x + ((y * -0.3333333333333333) / z) else: tmp = t * (0.3333333333333333 / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.55e-46) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= -3e-98) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif ((y <= -1.04e-144) || !(y <= 5.5e-57)) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); else tmp = Float64(t * Float64(0.3333333333333333 / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.55e-46) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= -3e-98) tmp = 0.3333333333333333 * (t / (y * z)); elseif ((y <= -1.04e-144) || ~((y <= 5.5e-57))) tmp = x + ((y * -0.3333333333333333) / z); else tmp = t * (0.3333333333333333 / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.55e-46], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3e-98], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.04e-144], N[Not[LessEqual[y, 5.5e-57]], $MachinePrecision]], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{-46}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-98}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq -1.04 \cdot 10^{-144} \lor \neg \left(y \leq 5.5 \cdot 10^{-57}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\
\end{array}
\end{array}
if y < -1.55e-46Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
unsub-neg99.9%
neg-mul-199.9%
associate-*r/99.9%
associate-*l/99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
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%
if -1.55e-46 < y < -3e-98Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
sub-neg99.7%
distribute-neg-in99.7%
unsub-neg99.7%
neg-mul-199.7%
associate-*r/99.7%
associate-*l/99.7%
distribute-neg-frac99.7%
neg-mul-199.7%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 99.8%
Taylor expanded in z around 0 66.0%
Taylor expanded in y around 0 66.0%
*-commutative66.0%
Simplified66.0%
if -3e-98 < y < -1.04e-144 or 5.50000000000000011e-57 < y Initial program 98.7%
associate-+l-98.7%
sub-neg98.7%
sub-neg98.7%
distribute-neg-in98.7%
unsub-neg98.7%
neg-mul-198.7%
associate-*r/98.7%
associate-*l/98.5%
distribute-neg-frac98.5%
neg-mul-198.5%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.9%
associate-*l/94.9%
Applied egg-rr94.9%
if -1.04e-144 < y < 5.50000000000000011e-57Initial program 92.0%
associate-+l-92.0%
sub-neg92.0%
sub-neg92.0%
distribute-neg-in92.0%
unsub-neg92.0%
neg-mul-192.0%
associate-*r/92.0%
associate-*l/92.0%
distribute-neg-frac92.0%
neg-mul-192.0%
times-frac84.3%
distribute-lft-out--84.3%
*-commutative84.3%
associate-/r*84.3%
metadata-eval84.3%
Simplified84.3%
div-inv84.2%
Applied egg-rr84.2%
Taylor expanded in x around 0 84.3%
Taylor expanded in z around 0 61.8%
Taylor expanded in y around 0 69.7%
*-commutative69.7%
*-commutative69.7%
metadata-eval69.7%
times-frac69.8%
associate-*r*69.7%
associate-*r/69.7%
associate-*r*69.7%
*-commutative69.7%
associate-/r*69.7%
metadata-eval69.7%
*-commutative69.7%
Simplified69.7%
Final simplification83.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -8e-47)
(+ x (* -0.3333333333333333 (/ y z)))
(if (<= y -1.6e-98)
(* 0.3333333333333333 (/ t (* y z)))
(if (or (<= y -1.7e-143) (not (<= y 6.8e-59)))
(+ x (/ (* y -0.3333333333333333) z))
(* t (/ 0.3333333333333333 (* y z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8e-47) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= -1.6e-98) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if ((y <= -1.7e-143) || !(y <= 6.8e-59)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = t * (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 <= (-8d-47)) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else if (y <= (-1.6d-98)) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if ((y <= (-1.7d-143)) .or. (.not. (y <= 6.8d-59))) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else
tmp = t * (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 <= -8e-47) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= -1.6e-98) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if ((y <= -1.7e-143) || !(y <= 6.8e-59)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = t * (0.3333333333333333 / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8e-47: tmp = x + (-0.3333333333333333 * (y / z)) elif y <= -1.6e-98: tmp = 0.3333333333333333 * (t / (y * z)) elif (y <= -1.7e-143) or not (y <= 6.8e-59): tmp = x + ((y * -0.3333333333333333) / z) else: tmp = t * (0.3333333333333333 / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8e-47) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); elseif (y <= -1.6e-98) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif ((y <= -1.7e-143) || !(y <= 6.8e-59)) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); else tmp = Float64(t * Float64(0.3333333333333333 / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8e-47) tmp = x + (-0.3333333333333333 * (y / z)); elseif (y <= -1.6e-98) tmp = 0.3333333333333333 * (t / (y * z)); elseif ((y <= -1.7e-143) || ~((y <= 6.8e-59))) tmp = x + ((y * -0.3333333333333333) / z); else tmp = t * (0.3333333333333333 / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8e-47], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.6e-98], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.7e-143], N[Not[LessEqual[y, 6.8e-59]], $MachinePrecision]], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-47}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-98}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-143} \lor \neg \left(y \leq 6.8 \cdot 10^{-59}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\
\end{array}
\end{array}
if y < -7.9999999999999998e-47Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
unsub-neg99.9%
neg-mul-199.9%
associate-*r/99.9%
associate-*l/99.8%
distribute-neg-frac99.8%
neg-mul-199.8%
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.8%
if -7.9999999999999998e-47 < y < -1.6e-98Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
sub-neg99.7%
distribute-neg-in99.7%
unsub-neg99.7%
neg-mul-199.7%
associate-*r/99.7%
associate-*l/99.7%
distribute-neg-frac99.7%
neg-mul-199.7%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.5%
metadata-eval99.5%
Simplified99.5%
div-inv99.5%
Applied egg-rr99.5%
Taylor expanded in x around 0 99.8%
Taylor expanded in z around 0 66.0%
Taylor expanded in y around 0 66.0%
*-commutative66.0%
Simplified66.0%
if -1.6e-98 < y < -1.69999999999999992e-143 or 6.80000000000000035e-59 < y Initial program 98.7%
associate-+l-98.7%
sub-neg98.7%
sub-neg98.7%
distribute-neg-in98.7%
unsub-neg98.7%
neg-mul-198.7%
associate-*r/98.7%
associate-*l/98.5%
distribute-neg-frac98.5%
neg-mul-198.5%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 94.9%
associate-*l/94.9%
Applied egg-rr94.9%
if -1.69999999999999992e-143 < y < 6.80000000000000035e-59Initial program 92.0%
associate-+l-92.0%
sub-neg92.0%
sub-neg92.0%
distribute-neg-in92.0%
unsub-neg92.0%
neg-mul-192.0%
associate-*r/92.0%
associate-*l/92.0%
distribute-neg-frac92.0%
neg-mul-192.0%
times-frac84.3%
distribute-lft-out--84.3%
*-commutative84.3%
associate-/r*84.3%
metadata-eval84.3%
Simplified84.3%
div-inv84.2%
Applied egg-rr84.2%
Taylor expanded in x around 0 84.3%
Taylor expanded in z around 0 61.8%
Taylor expanded in y around 0 69.7%
*-commutative69.7%
*-commutative69.7%
metadata-eval69.7%
times-frac69.8%
associate-*r*69.7%
associate-*r/69.7%
associate-*r*69.7%
*-commutative69.7%
associate-/r*69.7%
metadata-eval69.7%
*-commutative69.7%
Simplified69.7%
Final simplification83.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.1e-223) (not (<= y 4.1e-81))) (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))) (+ x (* (/ t z) (/ 0.3333333333333333 y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.1e-223) || !(y <= 4.1e-81)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / 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.1d-223)) .or. (.not. (y <= 4.1d-81))) then
tmp = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
else
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.1e-223) || !(y <= 4.1e-81)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.1e-223) or not (y <= 4.1e-81): tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)) else: tmp = x + ((t / z) * (0.3333333333333333 / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.1e-223) || !(y <= 4.1e-81)) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))); else tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.1e-223) || ~((y <= 4.1e-81))) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); else tmp = x + ((t / z) * (0.3333333333333333 / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.1e-223], N[Not[LessEqual[y, 4.1e-81]], $MachinePrecision]], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-223} \lor \neg \left(y \leq 4.1 \cdot 10^{-81}\right):\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -1.10000000000000004e-223 or 4.09999999999999984e-81 < y Initial program 98.8%
associate-+l-98.8%
sub-neg98.8%
sub-neg98.8%
distribute-neg-in98.8%
unsub-neg98.8%
neg-mul-198.8%
associate-*r/98.8%
associate-*l/98.7%
distribute-neg-frac98.7%
neg-mul-198.7%
times-frac99.2%
distribute-lft-out--99.2%
*-commutative99.2%
associate-/r*99.3%
metadata-eval99.3%
Simplified99.3%
if -1.10000000000000004e-223 < y < 4.09999999999999984e-81Initial program 91.2%
associate-+l-91.2%
sub-neg91.2%
sub-neg91.2%
distribute-neg-in91.2%
unsub-neg91.2%
neg-mul-191.2%
associate-*r/91.2%
associate-*l/91.2%
distribute-neg-frac91.2%
neg-mul-191.2%
times-frac81.4%
distribute-lft-out--81.4%
*-commutative81.4%
associate-/r*81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in y around 0 91.2%
*-commutative91.2%
associate-*l/91.1%
*-commutative91.1%
times-frac99.8%
Simplified99.8%
Final simplification99.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- y (/ t y))))
(if (<= y -3.7e-222)
(+ x (* t_1 (/ -0.3333333333333333 z)))
(if (<= y 4.1e-81)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(+ x (/ (* -0.3333333333333333 t_1) z))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -3.7e-222) {
tmp = x + (t_1 * (-0.3333333333333333 / z));
} else if (y <= 4.1e-81) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((-0.3333333333333333 * t_1) / 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) :: t_1
real(8) :: tmp
t_1 = y - (t / y)
if (y <= (-3.7d-222)) then
tmp = x + (t_1 * ((-0.3333333333333333d0) / z))
else if (y <= 4.1d-81) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x + (((-0.3333333333333333d0) * t_1) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -3.7e-222) {
tmp = x + (t_1 * (-0.3333333333333333 / z));
} else if (y <= 4.1e-81) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((-0.3333333333333333 * t_1) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -3.7e-222: tmp = x + (t_1 * (-0.3333333333333333 / z)) elif y <= 4.1e-81: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + ((-0.3333333333333333 * t_1) / z) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -3.7e-222) tmp = Float64(x + Float64(t_1 * Float64(-0.3333333333333333 / z))); elseif (y <= 4.1e-81) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x + Float64(Float64(-0.3333333333333333 * t_1) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -3.7e-222) tmp = x + (t_1 * (-0.3333333333333333 / z)); elseif (y <= 4.1e-81) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x + ((-0.3333333333333333 * t_1) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.7e-222], N[(x + N[(t$95$1 * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e-81], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-0.3333333333333333 * t$95$1), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -3.7 \cdot 10^{-222}:\\
\;\;\;\;x + t_1 \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{-81}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot t_1}{z}\\
\end{array}
\end{array}
if y < -3.6999999999999999e-222Initial program 98.9%
associate-+l-98.9%
sub-neg98.9%
sub-neg98.9%
distribute-neg-in98.9%
unsub-neg98.9%
neg-mul-198.9%
associate-*r/98.9%
associate-*l/98.9%
distribute-neg-frac98.9%
neg-mul-198.9%
times-frac98.9%
distribute-lft-out--98.9%
*-commutative98.9%
associate-/r*98.9%
metadata-eval98.9%
Simplified98.9%
if -3.6999999999999999e-222 < y < 4.09999999999999984e-81Initial program 91.2%
associate-+l-91.2%
sub-neg91.2%
sub-neg91.2%
distribute-neg-in91.2%
unsub-neg91.2%
neg-mul-191.2%
associate-*r/91.2%
associate-*l/91.2%
distribute-neg-frac91.2%
neg-mul-191.2%
times-frac81.4%
distribute-lft-out--81.4%
*-commutative81.4%
associate-/r*81.3%
metadata-eval81.3%
Simplified81.3%
Taylor expanded in y around 0 91.2%
*-commutative91.2%
associate-*l/91.1%
*-commutative91.1%
times-frac99.8%
Simplified99.8%
if 4.09999999999999984e-81 < y Initial program 98.7%
associate-+l-98.7%
sub-neg98.7%
sub-neg98.7%
distribute-neg-in98.7%
unsub-neg98.7%
neg-mul-198.7%
associate-*r/98.7%
associate-*l/98.5%
distribute-neg-frac98.5%
neg-mul-198.5%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Final simplification99.4%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
Initial program 96.5%
associate-/r*98.7%
Simplified98.7%
Final simplification98.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* -0.3333333333333333 (/ y z))))
(if (<= y -1e+169)
t_1
(if (<= y -5.2e-43)
x
(if (<= y 6.6e-58)
(* t (/ 0.3333333333333333 (* y z)))
(if (<= y 1.35e+29) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 * (y / z);
double tmp;
if (y <= -1e+169) {
tmp = t_1;
} else if (y <= -5.2e-43) {
tmp = x;
} else if (y <= 6.6e-58) {
tmp = t * (0.3333333333333333 / (y * z));
} else if (y <= 1.35e+29) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (-0.3333333333333333d0) * (y / z)
if (y <= (-1d+169)) then
tmp = t_1
else if (y <= (-5.2d-43)) then
tmp = x
else if (y <= 6.6d-58) then
tmp = t * (0.3333333333333333d0 / (y * z))
else if (y <= 1.35d+29) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 * (y / z);
double tmp;
if (y <= -1e+169) {
tmp = t_1;
} else if (y <= -5.2e-43) {
tmp = x;
} else if (y <= 6.6e-58) {
tmp = t * (0.3333333333333333 / (y * z));
} else if (y <= 1.35e+29) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -0.3333333333333333 * (y / z) tmp = 0 if y <= -1e+169: tmp = t_1 elif y <= -5.2e-43: tmp = x elif y <= 6.6e-58: tmp = t * (0.3333333333333333 / (y * z)) elif y <= 1.35e+29: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-0.3333333333333333 * Float64(y / z)) tmp = 0.0 if (y <= -1e+169) tmp = t_1; elseif (y <= -5.2e-43) tmp = x; elseif (y <= 6.6e-58) tmp = Float64(t * Float64(0.3333333333333333 / Float64(y * z))); elseif (y <= 1.35e+29) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -0.3333333333333333 * (y / z); tmp = 0.0; if (y <= -1e+169) tmp = t_1; elseif (y <= -5.2e-43) tmp = x; elseif (y <= 6.6e-58) tmp = t * (0.3333333333333333 / (y * z)); elseif (y <= 1.35e+29) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1e+169], t$95$1, If[LessEqual[y, -5.2e-43], x, If[LessEqual[y, 6.6e-58], N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+29], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -1 \cdot 10^{+169}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-43}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-58}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+29}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -9.99999999999999934e168 or 1.35e29 < y Initial program 98.6%
associate-+l-98.6%
sub-neg98.6%
sub-neg98.6%
distribute-neg-in98.6%
unsub-neg98.6%
neg-mul-198.6%
associate-*r/98.6%
associate-*l/98.5%
distribute-neg-frac98.5%
neg-mul-198.5%
times-frac99.7%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 99.8%
Taylor expanded in z around 0 77.8%
Taylor expanded in y around inf 74.2%
*-commutative74.2%
Simplified74.2%
if -9.99999999999999934e168 < y < -5.2e-43 or 6.60000000000000052e-58 < y < 1.35e29Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
unsub-neg99.9%
neg-mul-199.9%
associate-*r/99.9%
associate-*l/99.7%
distribute-neg-frac99.7%
neg-mul-199.7%
times-frac99.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 63.0%
if -5.2e-43 < y < 6.60000000000000052e-58Initial program 93.5%
associate-+l-93.5%
sub-neg93.5%
sub-neg93.5%
distribute-neg-in93.5%
unsub-neg93.5%
neg-mul-193.5%
associate-*r/93.5%
associate-*l/93.5%
distribute-neg-frac93.5%
neg-mul-193.5%
times-frac87.2%
distribute-lft-out--87.2%
*-commutative87.2%
associate-/r*87.1%
metadata-eval87.1%
Simplified87.1%
div-inv87.1%
Applied egg-rr87.1%
Taylor expanded in x around 0 87.2%
Taylor expanded in z around 0 60.7%
Taylor expanded in y around 0 66.4%
*-commutative66.4%
*-commutative66.4%
metadata-eval66.4%
times-frac66.4%
associate-*r*66.4%
associate-*r/66.4%
associate-*r*66.4%
*-commutative66.4%
associate-/r*66.4%
metadata-eval66.4%
*-commutative66.4%
Simplified66.4%
Final simplification68.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.6e+38)
(+ x (* -0.3333333333333333 (/ y z)))
(if (<= y 4.5e-51)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.6e+38) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 4.5e-51) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.6d+38)) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else if (y <= 4.5d-51) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x + ((y * (-0.3333333333333333d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.6e+38) {
tmp = x + (-0.3333333333333333 * (y / z));
} else if (y <= 4.5e-51) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.6e+38: tmp = x + (-0.3333333333333333 * (y / z)) elif y <= 4.5e-51: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.6e+38) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); elseif (y <= 4.5e-51) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / 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 <= -2.6e+38) tmp = x + (-0.3333333333333333 * (y / z)); elseif (y <= 4.5e-51) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.6e+38], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e-51], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / 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 -2.6 \cdot 10^{+38}:\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{-51}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.5999999999999999e38Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
sub-neg99.9%
distribute-neg-in99.9%
unsub-neg99.9%
neg-mul-199.9%
associate-*r/99.9%
associate-*l/99.9%
distribute-neg-frac99.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 99.8%
if -2.5999999999999999e38 < y < 4.49999999999999974e-51Initial program 94.2%
associate-+l-94.2%
sub-neg94.2%
sub-neg94.2%
distribute-neg-in94.2%
unsub-neg94.2%
neg-mul-194.2%
associate-*r/94.2%
associate-*l/94.2%
distribute-neg-frac94.2%
neg-mul-194.2%
times-frac88.7%
distribute-lft-out--88.7%
*-commutative88.7%
associate-/r*88.6%
metadata-eval88.6%
Simplified88.6%
Taylor expanded in y around 0 92.9%
*-commutative92.9%
associate-*l/92.8%
*-commutative92.8%
times-frac97.7%
Simplified97.7%
if 4.49999999999999974e-51 < y Initial program 98.6%
associate-+l-98.6%
sub-neg98.6%
sub-neg98.6%
distribute-neg-in98.6%
unsub-neg98.6%
neg-mul-198.6%
associate-*r/98.6%
associate-*l/98.3%
distribute-neg-frac98.3%
neg-mul-198.3%
times-frac99.6%
distribute-lft-out--99.6%
*-commutative99.6%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around inf 95.7%
associate-*l/95.7%
Applied egg-rr95.7%
Final simplification97.5%
(FPCore (x y z t) :precision binary64 (if (<= z -4.3e+33) x (if (<= z 1.75e+39) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -4.3e+33) {
tmp = x;
} else if (z <= 1.75e+39) {
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 (z <= (-4.3d+33)) then
tmp = x
else if (z <= 1.75d+39) 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 (z <= -4.3e+33) {
tmp = x;
} else if (z <= 1.75e+39) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -4.3e+33: tmp = x elif z <= 1.75e+39: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -4.3e+33) tmp = x; elseif (z <= 1.75e+39) 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 (z <= -4.3e+33) tmp = x; elseif (z <= 1.75e+39) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -4.3e+33], x, If[LessEqual[z, 1.75e+39], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+33}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+39}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.30000000000000028e33 or 1.7500000000000001e39 < z Initial program 99.0%
associate-+l-99.0%
sub-neg99.0%
sub-neg99.0%
distribute-neg-in99.0%
unsub-neg99.0%
neg-mul-199.0%
associate-*r/99.0%
associate-*l/99.0%
distribute-neg-frac99.0%
neg-mul-199.0%
times-frac88.0%
distribute-lft-out--88.0%
*-commutative88.0%
associate-/r*87.9%
metadata-eval87.9%
Simplified87.9%
Taylor expanded in x around inf 61.8%
if -4.30000000000000028e33 < z < 1.7500000000000001e39Initial program 94.4%
associate-+l-94.4%
sub-neg94.4%
sub-neg94.4%
distribute-neg-in94.4%
unsub-neg94.4%
neg-mul-194.4%
associate-*r/94.4%
associate-*l/94.3%
distribute-neg-frac94.3%
neg-mul-194.3%
times-frac99.0%
distribute-lft-out--99.0%
*-commutative99.0%
associate-/r*99.1%
metadata-eval99.1%
Simplified99.1%
div-inv99.0%
Applied egg-rr99.0%
Taylor expanded in x around 0 99.1%
Taylor expanded in z around 0 88.4%
Taylor expanded in y around inf 41.7%
associate-*r/41.7%
*-commutative41.7%
associate-*r/41.7%
Simplified41.7%
Final simplification51.0%
(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 96.5%
associate-+l-96.5%
sub-neg96.5%
sub-neg96.5%
distribute-neg-in96.5%
unsub-neg96.5%
neg-mul-196.5%
associate-*r/96.5%
associate-*l/96.5%
distribute-neg-frac96.5%
neg-mul-196.5%
times-frac93.9%
distribute-lft-out--93.9%
*-commutative93.9%
associate-/r*93.9%
metadata-eval93.9%
Simplified93.9%
Taylor expanded in x around inf 34.8%
Final simplification34.8%
(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 2023175
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))