
(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 (- (/ t y) y)))
(if (<= y -9.5e-219)
(+ x (* (/ 0.3333333333333333 z) t_1))
(if (<= y 4.2e-152)
(+ x (/ (* t (/ 0.3333333333333333 z)) y))
(+ x (/ t_1 (* z 3.0)))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -9.5e-219) {
tmp = x + ((0.3333333333333333 / z) * t_1);
} else if (y <= 4.2e-152) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x + (t_1 / (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) :: t_1
real(8) :: tmp
t_1 = (t / y) - y
if (y <= (-9.5d-219)) then
tmp = x + ((0.3333333333333333d0 / z) * t_1)
else if (y <= 4.2d-152) then
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
else
tmp = x + (t_1 / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -9.5e-219) {
tmp = x + ((0.3333333333333333 / z) * t_1);
} else if (y <= 4.2e-152) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x + (t_1 / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / y) - y tmp = 0 if y <= -9.5e-219: tmp = x + ((0.3333333333333333 / z) * t_1) elif y <= 4.2e-152: tmp = x + ((t * (0.3333333333333333 / z)) / y) else: tmp = x + (t_1 / (z * 3.0)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / y) - y) tmp = 0.0 if (y <= -9.5e-219) tmp = Float64(x + Float64(Float64(0.3333333333333333 / z) * t_1)); elseif (y <= 4.2e-152) tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); else tmp = Float64(x + Float64(t_1 / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / y) - y; tmp = 0.0; if (y <= -9.5e-219) tmp = x + ((0.3333333333333333 / z) * t_1); elseif (y <= 4.2e-152) tmp = x + ((t * (0.3333333333333333 / z)) / y); else tmp = x + (t_1 / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[y, -9.5e-219], N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e-152], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{y} - y\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{-219}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot t\_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-152}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t\_1}{z \cdot 3}\\
\end{array}
\end{array}
if y < -9.4999999999999997e-219Initial program 96.3%
sub-neg96.3%
associate-+l+96.3%
+-commutative96.3%
remove-double-neg96.3%
distribute-frac-neg96.3%
distribute-neg-in96.3%
remove-double-neg96.3%
sub-neg96.3%
neg-mul-196.3%
times-frac97.9%
distribute-frac-neg97.9%
neg-mul-197.9%
*-commutative97.9%
associate-/l*97.9%
*-commutative97.9%
Simplified99.9%
if -9.4999999999999997e-219 < y < 4.19999999999999998e-152Initial 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-frac79.3%
distribute-frac-neg79.3%
neg-mul-179.3%
*-commutative79.3%
associate-/l*79.3%
*-commutative79.3%
Simplified79.2%
Taylor expanded in t around inf 95.9%
associate-*r/95.9%
*-commutative95.9%
times-frac79.2%
*-commutative79.2%
associate-*l/98.1%
Simplified98.1%
if 4.19999999999999998e-152 < y Initial program 96.7%
sub-neg96.7%
associate-+l+96.7%
+-commutative96.7%
remove-double-neg96.7%
distribute-frac-neg96.7%
distribute-neg-in96.7%
remove-double-neg96.7%
sub-neg96.7%
neg-mul-196.7%
times-frac98.7%
distribute-frac-neg98.7%
neg-mul-198.7%
*-commutative98.7%
associate-/l*98.6%
*-commutative98.6%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
(FPCore (x y z t) :precision binary64 (if (<= (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))) INFINITY) (+ (+ x (/ t (* z (* y 3.0)))) (/ y (* z -3.0))) (+ x (* (/ 0.3333333333333333 z) (- (/ t y) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= ((double) INFINITY)) {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
} else {
tmp = x + ((0.3333333333333333 / z) * ((t / y) - y));
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= Double.POSITIVE_INFINITY) {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
} else {
tmp = x + ((0.3333333333333333 / z) * ((t / y) - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= math.inf: tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)) else: tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) <= Inf) tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= Inf) tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)); else tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)} \leq \infty:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) < +inf.0Initial program 97.5%
+-commutative97.5%
associate-+r-97.5%
sub-neg97.5%
associate-*l*97.5%
*-commutative97.5%
distribute-frac-neg297.5%
distribute-rgt-neg-in97.5%
metadata-eval97.5%
Simplified97.5%
if +inf.0 < (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) Initial program 0.0%
sub-neg0.0%
associate-+l+0.0%
+-commutative0.0%
remove-double-neg0.0%
distribute-frac-neg0.0%
distribute-neg-in0.0%
remove-double-neg0.0%
sub-neg0.0%
neg-mul-10.0%
times-frac0.0%
distribute-frac-neg0.0%
neg-mul-10.0%
*-commutative0.0%
associate-/l*0.0%
*-commutative0.0%
Simplified100.0%
Final simplification97.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1e-220) (not (<= y 2.4e-128))) (+ x (* (/ 0.3333333333333333 z) (- (/ t y) y))) (+ x (/ (* t (/ 0.3333333333333333 z)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1e-220) || !(y <= 2.4e-128)) {
tmp = x + ((0.3333333333333333 / z) * ((t / y) - y));
} else {
tmp = x + ((t * (0.3333333333333333 / 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 <= (-1d-220)) .or. (.not. (y <= 2.4d-128))) then
tmp = x + ((0.3333333333333333d0 / z) * ((t / y) - y))
else
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1e-220) || !(y <= 2.4e-128)) {
tmp = x + ((0.3333333333333333 / z) * ((t / y) - y));
} else {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1e-220) or not (y <= 2.4e-128): tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)) else: tmp = x + ((t * (0.3333333333333333 / z)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1e-220) || !(y <= 2.4e-128)) tmp = Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y))); else tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1e-220) || ~((y <= 2.4e-128))) tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)); else tmp = x + ((t * (0.3333333333333333 / z)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1e-220], N[Not[LessEqual[y, 2.4e-128]], $MachinePrecision]], N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-220} \lor \neg \left(y \leq 2.4 \cdot 10^{-128}\right):\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -9.99999999999999992e-221 or 2.3999999999999998e-128 < y Initial program 96.4%
sub-neg96.4%
associate-+l+96.4%
+-commutative96.4%
remove-double-neg96.4%
distribute-frac-neg96.4%
distribute-neg-in96.4%
remove-double-neg96.4%
sub-neg96.4%
neg-mul-196.4%
times-frac98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
associate-/l*98.2%
*-commutative98.2%
Simplified99.8%
if -9.99999999999999992e-221 < y < 2.3999999999999998e-128Initial program 96.0%
sub-neg96.0%
associate-+l+96.0%
+-commutative96.0%
remove-double-neg96.0%
distribute-frac-neg96.0%
distribute-neg-in96.0%
remove-double-neg96.0%
sub-neg96.0%
neg-mul-196.0%
times-frac80.6%
distribute-frac-neg80.6%
neg-mul-180.6%
*-commutative80.6%
associate-/l*80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in t around inf 96.1%
associate-*r/96.1%
*-commutative96.1%
times-frac80.6%
*-commutative80.6%
associate-*l/98.2%
Simplified98.2%
Final simplification99.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -4e+63)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 5.2e-48)
(+ x (/ (* t (/ 0.3333333333333333 z)) y))
(+ x (/ (/ y -3.0) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4e+63) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 5.2e-48) {
tmp = x + ((t * (0.3333333333333333 / 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 <= (-4d+63)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 5.2d-48) then
tmp = x + ((t * (0.3333333333333333d0 / 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 <= -4e+63) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 5.2e-48) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x + ((y / -3.0) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4e+63: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 5.2e-48: tmp = x + ((t * (0.3333333333333333 / z)) / y) else: tmp = x + ((y / -3.0) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4e+63) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 5.2e-48) tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / 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 <= -4e+63) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 5.2e-48) tmp = x + ((t * (0.3333333333333333 / z)) / y); else tmp = x + ((y / -3.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4e+63], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e-48], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{+63}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-48}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\end{array}
\end{array}
if y < -4.00000000000000023e63Initial program 98.0%
sub-neg98.0%
associate-+l+98.0%
+-commutative98.0%
remove-double-neg98.0%
distribute-frac-neg98.0%
distribute-neg-in98.0%
remove-double-neg98.0%
sub-neg98.0%
neg-mul-198.0%
times-frac98.0%
distribute-frac-neg98.0%
neg-mul-198.0%
*-commutative98.0%
associate-/l*98.0%
*-commutative98.0%
Simplified99.9%
Taylor expanded in t around 0 98.1%
associate-*r/98.2%
associate-*l/98.3%
*-commutative98.3%
Simplified98.3%
if -4.00000000000000023e63 < y < 5.19999999999999975e-48Initial program 95.0%
sub-neg95.0%
associate-+l+95.0%
+-commutative95.0%
remove-double-neg95.0%
distribute-frac-neg95.0%
distribute-neg-in95.0%
remove-double-neg95.0%
sub-neg95.0%
neg-mul-195.0%
times-frac90.0%
distribute-frac-neg90.0%
neg-mul-190.0%
*-commutative90.0%
associate-/l*90.0%
*-commutative90.0%
Simplified90.7%
Taylor expanded in t around inf 92.7%
associate-*r/92.7%
*-commutative92.7%
times-frac86.7%
*-commutative86.7%
associate-*l/94.3%
Simplified94.3%
if 5.19999999999999975e-48 < y Initial program 97.3%
sub-neg97.3%
associate-+l+97.3%
+-commutative97.3%
remove-double-neg97.3%
distribute-frac-neg97.3%
distribute-neg-in97.3%
remove-double-neg97.3%
sub-neg97.3%
neg-mul-197.3%
times-frac98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.3%
*-commutative98.3%
Simplified99.7%
Taylor expanded in t around 0 97.4%
*-commutative97.4%
metadata-eval97.4%
associate-/l*97.4%
*-rgt-identity97.4%
associate-/l/97.4%
associate-/r*97.4%
Simplified97.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.6e+65)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 1.95e-42)
(+ x (/ 0.3333333333333333 (/ (* y z) t)))
(+ x (/ (/ y -3.0) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.6e+65) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.95e-42) {
tmp = x + (0.3333333333333333 / ((y * z) / 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 <= (-3.6d+65)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 1.95d-42) then
tmp = x + (0.3333333333333333d0 / ((y * z) / 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 <= -3.6e+65) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.95e-42) {
tmp = x + (0.3333333333333333 / ((y * z) / t));
} else {
tmp = x + ((y / -3.0) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.6e+65: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 1.95e-42: tmp = x + (0.3333333333333333 / ((y * z) / t)) else: tmp = x + ((y / -3.0) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.6e+65) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 1.95e-42) tmp = Float64(x + Float64(0.3333333333333333 / Float64(Float64(y * z) / 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 <= -3.6e+65) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 1.95e-42) tmp = x + (0.3333333333333333 / ((y * z) / t)); else tmp = x + ((y / -3.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.6e+65], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e-42], N[(x + N[(0.3333333333333333 / N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+65}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-42}:\\
\;\;\;\;x + \frac{0.3333333333333333}{\frac{y \cdot z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\end{array}
\end{array}
if y < -3.59999999999999978e65Initial program 98.0%
sub-neg98.0%
associate-+l+98.0%
+-commutative98.0%
remove-double-neg98.0%
distribute-frac-neg98.0%
distribute-neg-in98.0%
remove-double-neg98.0%
sub-neg98.0%
neg-mul-198.0%
times-frac98.0%
distribute-frac-neg98.0%
neg-mul-198.0%
*-commutative98.0%
associate-/l*98.0%
*-commutative98.0%
Simplified99.9%
Taylor expanded in t around 0 98.1%
associate-*r/98.2%
associate-*l/98.3%
*-commutative98.3%
Simplified98.3%
if -3.59999999999999978e65 < y < 1.9500000000000001e-42Initial program 95.0%
sub-neg95.0%
associate-+l+95.0%
+-commutative95.0%
remove-double-neg95.0%
distribute-frac-neg95.0%
distribute-neg-in95.0%
remove-double-neg95.0%
sub-neg95.0%
neg-mul-195.0%
times-frac90.0%
distribute-frac-neg90.0%
neg-mul-190.0%
*-commutative90.0%
associate-/l*90.0%
*-commutative90.0%
Simplified90.7%
Taylor expanded in t around inf 92.7%
clear-num92.7%
un-div-inv92.8%
Applied egg-rr92.8%
if 1.9500000000000001e-42 < y Initial program 97.3%
sub-neg97.3%
associate-+l+97.3%
+-commutative97.3%
remove-double-neg97.3%
distribute-frac-neg97.3%
distribute-neg-in97.3%
remove-double-neg97.3%
sub-neg97.3%
neg-mul-197.3%
times-frac98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.3%
*-commutative98.3%
Simplified99.7%
Taylor expanded in t around 0 97.4%
*-commutative97.4%
metadata-eval97.4%
associate-/l*97.4%
*-rgt-identity97.4%
associate-/l/97.4%
associate-/r*97.4%
Simplified97.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.2e+64)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 1.2e-40)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(+ x (/ (/ y -3.0) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.2e+64) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.2e-40) {
tmp = x + (0.3333333333333333 * (t / (y * 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 <= (-1.2d+64)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 1.2d-40) then
tmp = x + (0.3333333333333333d0 * (t / (y * 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 <= -1.2e+64) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.2e-40) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + ((y / -3.0) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.2e+64: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 1.2e-40: tmp = x + (0.3333333333333333 * (t / (y * z))) else: tmp = x + ((y / -3.0) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.2e+64) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 1.2e-40) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * 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 <= -1.2e+64) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 1.2e-40) tmp = x + (0.3333333333333333 * (t / (y * z))); else tmp = x + ((y / -3.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.2e+64], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e-40], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $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.2 \cdot 10^{+64}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-40}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\end{array}
\end{array}
if y < -1.2e64Initial program 98.0%
sub-neg98.0%
associate-+l+98.0%
+-commutative98.0%
remove-double-neg98.0%
distribute-frac-neg98.0%
distribute-neg-in98.0%
remove-double-neg98.0%
sub-neg98.0%
neg-mul-198.0%
times-frac98.0%
distribute-frac-neg98.0%
neg-mul-198.0%
*-commutative98.0%
associate-/l*98.0%
*-commutative98.0%
Simplified99.9%
Taylor expanded in t around 0 98.1%
associate-*r/98.2%
associate-*l/98.3%
*-commutative98.3%
Simplified98.3%
if -1.2e64 < y < 1.19999999999999996e-40Initial program 95.0%
sub-neg95.0%
associate-+l+95.0%
+-commutative95.0%
remove-double-neg95.0%
distribute-frac-neg95.0%
distribute-neg-in95.0%
remove-double-neg95.0%
sub-neg95.0%
neg-mul-195.0%
times-frac90.0%
distribute-frac-neg90.0%
neg-mul-190.0%
*-commutative90.0%
associate-/l*90.0%
*-commutative90.0%
Simplified90.7%
Taylor expanded in t around inf 92.7%
if 1.19999999999999996e-40 < y Initial program 97.3%
sub-neg97.3%
associate-+l+97.3%
+-commutative97.3%
remove-double-neg97.3%
distribute-frac-neg97.3%
distribute-neg-in97.3%
remove-double-neg97.3%
sub-neg97.3%
neg-mul-197.3%
times-frac98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.3%
*-commutative98.3%
Simplified99.7%
Taylor expanded in t around 0 97.4%
*-commutative97.4%
metadata-eval97.4%
associate-/l*97.4%
*-rgt-identity97.4%
associate-/l/97.4%
associate-/r*97.4%
Simplified97.4%
(FPCore (x y z t) :precision binary64 (if (<= z -8.2e+107) x (if (<= z 4.2e+78) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -8.2e+107) {
tmp = x;
} else if (z <= 4.2e+78) {
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 <= (-8.2d+107)) then
tmp = x
else if (z <= 4.2d+78) 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 <= -8.2e+107) {
tmp = x;
} else if (z <= 4.2e+78) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -8.2e+107: tmp = x elif z <= 4.2e+78: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -8.2e+107) tmp = x; elseif (z <= 4.2e+78) 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 <= -8.2e+107) tmp = x; elseif (z <= 4.2e+78) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -8.2e+107], x, If[LessEqual[z, 4.2e+78], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+107}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+78}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -8.1999999999999998e107 or 4.2000000000000002e78 < z Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 65.1%
if -8.1999999999999998e107 < z < 4.2000000000000002e78Initial program 94.5%
sub-neg94.5%
associate-+l+94.5%
+-commutative94.5%
remove-double-neg94.5%
distribute-frac-neg94.5%
distribute-neg-in94.5%
remove-double-neg94.5%
sub-neg94.5%
neg-mul-194.5%
times-frac98.0%
distribute-frac-neg98.0%
neg-mul-198.0%
*-commutative98.0%
associate-/l*97.9%
*-commutative97.9%
Simplified99.8%
Taylor expanded in t around 0 62.1%
associate-*r/62.1%
metadata-eval62.1%
associate-/r/62.2%
clear-num62.2%
associate-/l/62.1%
associate-/r*62.2%
Applied egg-rr62.2%
Taylor expanded in x around 0 52.9%
associate-*r/52.9%
*-commutative52.9%
associate-*r/52.9%
Simplified52.9%
(FPCore (x y z t) :precision binary64 (if (<= z -1.12e+107) x (if (<= z 4.2e+78) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.12e+107) {
tmp = x;
} else if (z <= 4.2e+78) {
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 <= (-1.12d+107)) then
tmp = x
else if (z <= 4.2d+78) 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 <= -1.12e+107) {
tmp = x;
} else if (z <= 4.2e+78) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.12e+107: tmp = x elif z <= 4.2e+78: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.12e+107) tmp = x; elseif (z <= 4.2e+78) 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 <= -1.12e+107) tmp = x; elseif (z <= 4.2e+78) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.12e+107], x, If[LessEqual[z, 4.2e+78], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{+107}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+78}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.11999999999999997e107 or 4.2000000000000002e78 < z Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 65.1%
if -1.11999999999999997e107 < z < 4.2000000000000002e78Initial program 94.5%
sub-neg94.5%
associate-+l+94.5%
+-commutative94.5%
remove-double-neg94.5%
distribute-frac-neg94.5%
distribute-neg-in94.5%
remove-double-neg94.5%
sub-neg94.5%
neg-mul-194.5%
times-frac98.0%
distribute-frac-neg98.0%
neg-mul-198.0%
*-commutative98.0%
associate-/l*97.9%
*-commutative97.9%
Simplified99.8%
Taylor expanded in t around 0 62.1%
associate-*r/62.1%
metadata-eval62.1%
associate-/r/62.2%
clear-num62.2%
associate-/l/62.1%
associate-/r*62.2%
Applied egg-rr62.2%
Taylor expanded in x around 0 52.9%
(FPCore (x y z t) :precision binary64 (+ x (/ (/ y -3.0) z)))
double code(double x, double y, double z, double t) {
return x + ((y / -3.0) / z);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y / (-3.0d0)) / z)
end function
public static double code(double x, double y, double z, double t) {
return x + ((y / -3.0) / z);
}
def code(x, y, z, t): return x + ((y / -3.0) / z)
function code(x, y, z, t) return Float64(x + Float64(Float64(y / -3.0) / z)) end
function tmp = code(x, y, z, t) tmp = x + ((y / -3.0) / z); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{y}{-3}}{z}
\end{array}
Initial program 96.3%
sub-neg96.3%
associate-+l+96.3%
+-commutative96.3%
remove-double-neg96.3%
distribute-frac-neg96.3%
distribute-neg-in96.3%
remove-double-neg96.3%
sub-neg96.3%
neg-mul-196.3%
times-frac94.2%
distribute-frac-neg94.2%
neg-mul-194.2%
*-commutative94.2%
associate-/l*94.2%
*-commutative94.2%
Simplified95.4%
Taylor expanded in t around 0 67.8%
*-commutative67.8%
metadata-eval67.8%
associate-/l*67.8%
*-rgt-identity67.8%
associate-/l/67.8%
associate-/r*67.8%
Simplified67.8%
(FPCore (x y z t) :precision binary64 (+ x (/ y (* z -3.0))))
double code(double x, double y, double z, double t) {
return x + (y / (z * -3.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (y / (z * (-3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return x + (y / (z * -3.0));
}
def code(x, y, z, t): return x + (y / (z * -3.0))
function code(x, y, z, t) return Float64(x + Float64(y / Float64(z * -3.0))) end
function tmp = code(x, y, z, t) tmp = x + (y / (z * -3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{z \cdot -3}
\end{array}
Initial program 96.3%
sub-neg96.3%
associate-+l+96.3%
+-commutative96.3%
remove-double-neg96.3%
distribute-frac-neg96.3%
distribute-neg-in96.3%
remove-double-neg96.3%
sub-neg96.3%
neg-mul-196.3%
times-frac94.2%
distribute-frac-neg94.2%
neg-mul-194.2%
*-commutative94.2%
associate-/l*94.2%
*-commutative94.2%
Simplified95.4%
Taylor expanded in t around 0 67.8%
div-inv67.8%
associate-*r*67.7%
metadata-eval67.7%
associate-/r/67.8%
clear-num67.8%
frac-times67.8%
*-commutative67.8%
*-un-lft-identity67.8%
Applied egg-rr67.8%
Final simplification67.8%
(FPCore (x y z t) :precision binary64 (+ x (* y (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + (y * (-0.3333333333333333 / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (y * ((-0.3333333333333333d0) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (y * (-0.3333333333333333 / z));
}
def code(x, y, z, t): return x + (y * (-0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(y * Float64(-0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + (y * (-0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{-0.3333333333333333}{z}
\end{array}
Initial program 96.3%
sub-neg96.3%
associate-+l+96.3%
+-commutative96.3%
remove-double-neg96.3%
distribute-frac-neg96.3%
distribute-neg-in96.3%
remove-double-neg96.3%
sub-neg96.3%
neg-mul-196.3%
times-frac94.2%
distribute-frac-neg94.2%
neg-mul-194.2%
*-commutative94.2%
associate-/l*94.2%
*-commutative94.2%
Simplified95.4%
Taylor expanded in t around 0 67.8%
associate-*r/67.8%
associate-*l/67.8%
*-commutative67.8%
Simplified67.8%
(FPCore (x y z t) :precision binary64 (+ x (* -0.3333333333333333 (/ y z))))
double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * (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) * (y / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * (y / z));
}
def code(x, y, z, t): return x + (-0.3333333333333333 * (y / z))
function code(x, y, z, t) return Float64(x + Float64(-0.3333333333333333 * Float64(y / z))) end
function tmp = code(x, y, z, t) tmp = x + (-0.3333333333333333 * (y / z)); end
code[x_, y_, z_, t_] := N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + -0.3333333333333333 \cdot \frac{y}{z}
\end{array}
Initial program 96.3%
sub-neg96.3%
associate-+l+96.3%
+-commutative96.3%
remove-double-neg96.3%
distribute-frac-neg96.3%
distribute-neg-in96.3%
remove-double-neg96.3%
sub-neg96.3%
neg-mul-196.3%
times-frac94.2%
distribute-frac-neg94.2%
neg-mul-194.2%
*-commutative94.2%
associate-/l*94.2%
*-commutative94.2%
Simplified95.4%
Taylor expanded in t around 0 67.8%
(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.3%
sub-neg96.3%
associate-+l+96.3%
distribute-frac-neg96.3%
neg-mul-196.3%
*-commutative96.3%
times-frac96.3%
fma-define96.3%
metadata-eval96.3%
associate-*l*96.3%
*-commutative96.3%
Simplified96.3%
Taylor expanded in x around inf 29.6%
(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 2024144
(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))))