
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -1e+49) (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))) (+ x (* (/ -0.3333333333333333 z) (+ y (* t (/ -1.0 y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -1e+49) {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
} else {
tmp = x + ((-0.3333333333333333 / z) * (y + (t * (-1.0 / 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 ((z * 3.0d0) <= (-1d+49)) then
tmp = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
else
tmp = x + (((-0.3333333333333333d0) / z) * (y + (t * ((-1.0d0) / y))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -1e+49) {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
} else {
tmp = x + ((-0.3333333333333333 / z) * (y + (t * (-1.0 / y))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -1e+49: tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)) else: tmp = x + ((-0.3333333333333333 / z) * (y + (t * (-1.0 / y)))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -1e+49) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))); else tmp = Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y + Float64(t * Float64(-1.0 / y))))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -1e+49) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); else tmp = x + ((-0.3333333333333333 / z) * (y + (t * (-1.0 / y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -1e+49], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y + N[(t * N[(-1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{+49}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{z} \cdot \left(y + t \cdot \frac{-1}{y}\right)\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -9.99999999999999946e48Initial program 99.9%
if -9.99999999999999946e48 < (*.f64 z #s(literal 3 binary64)) Initial program 91.9%
sub-neg91.9%
associate-+l+91.9%
remove-double-neg91.9%
distribute-frac-neg91.9%
sub-neg91.9%
distribute-frac-neg91.9%
neg-mul-191.9%
*-commutative91.9%
associate-/l*91.9%
*-commutative91.9%
neg-mul-191.9%
times-frac96.9%
distribute-lft-out--98.4%
*-commutative98.4%
associate-/r*98.4%
metadata-eval98.4%
Simplified98.4%
div-inv98.4%
Applied egg-rr98.4%
Final simplification98.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.95e+76)
(* y (/ -0.3333333333333333 z))
(if (<= y -3.7e-57)
x
(if (<= y 16000.0)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 3.4e+70) (/ (* x y) y) (* -0.3333333333333333 (/ y z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.95e+76) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -3.7e-57) {
tmp = x;
} else if (y <= 16000.0) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 3.4e+70) {
tmp = (x * y) / y;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.95d+76)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= (-3.7d-57)) then
tmp = x
else if (y <= 16000.0d0) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 3.4d+70) then
tmp = (x * y) / y
else
tmp = (-0.3333333333333333d0) * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.95e+76) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -3.7e-57) {
tmp = x;
} else if (y <= 16000.0) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 3.4e+70) {
tmp = (x * y) / y;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.95e+76: tmp = y * (-0.3333333333333333 / z) elif y <= -3.7e-57: tmp = x elif y <= 16000.0: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 3.4e+70: tmp = (x * y) / y else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.95e+76) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= -3.7e-57) tmp = x; elseif (y <= 16000.0) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 3.4e+70) tmp = Float64(Float64(x * y) / y); else tmp = Float64(-0.3333333333333333 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.95e+76) tmp = y * (-0.3333333333333333 / z); elseif (y <= -3.7e-57) tmp = x; elseif (y <= 16000.0) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 3.4e+70) tmp = (x * y) / y; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.95e+76], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.7e-57], x, If[LessEqual[y, 16000.0], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e+70], N[(N[(x * y), $MachinePrecision] / y), $MachinePrecision], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+76}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-57}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 16000:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+70}:\\
\;\;\;\;\frac{x \cdot y}{y}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.94999999999999995e76Initial program 97.8%
sub-neg97.8%
associate-+l+97.8%
remove-double-neg97.8%
distribute-frac-neg97.8%
sub-neg97.8%
distribute-frac-neg97.8%
neg-mul-197.8%
*-commutative97.8%
associate-/l*97.8%
*-commutative97.8%
neg-mul-197.8%
times-frac97.8%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.7%
un-div-inv99.6%
div-inv99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in z around 0 83.2%
Taylor expanded in y around inf 81.4%
*-commutative81.4%
metadata-eval81.4%
distribute-rgt-neg-in81.4%
associate-*l/81.4%
associate-*r/81.5%
metadata-eval81.5%
associate-*r/81.4%
distribute-rgt-neg-in81.4%
associate-*r/81.5%
metadata-eval81.5%
distribute-neg-frac81.5%
metadata-eval81.5%
Simplified81.5%
if -1.94999999999999995e76 < y < -3.7e-57Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
times-frac99.8%
fma-define99.8%
metadata-eval99.8%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 56.9%
if -3.7e-57 < y < 16000Initial program 88.3%
sub-neg88.3%
associate-+l+88.3%
remove-double-neg88.3%
distribute-frac-neg88.3%
sub-neg88.3%
distribute-frac-neg88.3%
neg-mul-188.3%
*-commutative88.3%
associate-/l*88.2%
*-commutative88.2%
neg-mul-188.2%
times-frac92.4%
distribute-lft-out--92.4%
*-commutative92.4%
associate-/r*92.4%
metadata-eval92.4%
Simplified92.4%
*-commutative92.4%
clear-num92.3%
un-div-inv92.3%
div-inv92.4%
metadata-eval92.4%
Applied egg-rr92.4%
Taylor expanded in x around 0 92.4%
+-commutative92.4%
Simplified92.4%
Taylor expanded in z around 0 63.1%
Taylor expanded in y around 0 60.6%
if 16000 < y < 3.4000000000000001e70Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
times-frac99.9%
fma-define99.9%
metadata-eval99.9%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 77.2%
Taylor expanded in t around 0 65.4%
*-commutative65.4%
Simplified65.4%
if 3.4000000000000001e70 < y Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
remove-double-neg95.9%
distribute-frac-neg95.9%
sub-neg95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
associate-/l*95.8%
*-commutative95.8%
neg-mul-195.8%
times-frac95.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.8%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in z around 0 79.5%
Taylor expanded in y around inf 75.7%
Final simplification67.7%
(FPCore (x y z t) :precision binary64 (if (<= y -9.5e-24) (+ x (* y (/ -0.3333333333333333 z))) (if (<= y 1.8e+14) (+ x (/ (/ t y) (* z 3.0))) (+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.5e-24) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.8e+14) {
tmp = x + ((t / y) / (z * 3.0));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-9.5d-24)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 1.8d+14) then
tmp = x + ((t / y) / (z * 3.0d0))
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.5e-24) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 1.8e+14) {
tmp = x + ((t / y) / (z * 3.0));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.5e-24: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 1.8e+14: tmp = x + ((t / y) / (z * 3.0)) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.5e-24) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 1.8e+14) tmp = Float64(x + Float64(Float64(t / y) / Float64(z * 3.0))); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9.5e-24) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 1.8e+14) tmp = x + ((t / y) / (z * 3.0)); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.5e-24], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+14], N[(x + N[(N[(t / y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{-24}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+14}:\\
\;\;\;\;x + \frac{\frac{t}{y}}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -9.50000000000000029e-24Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
sub-neg98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.5%
*-commutative98.5%
neg-mul-198.5%
times-frac98.4%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 94.5%
if -9.50000000000000029e-24 < y < 1.8e14Initial program 88.9%
sub-neg88.9%
associate-+l+88.9%
remove-double-neg88.9%
distribute-frac-neg88.9%
sub-neg88.9%
distribute-frac-neg88.9%
neg-mul-188.9%
*-commutative88.9%
associate-/l*88.9%
*-commutative88.9%
neg-mul-188.9%
times-frac92.8%
distribute-lft-out--92.8%
*-commutative92.8%
associate-/r*92.8%
metadata-eval92.8%
Simplified92.8%
Taylor expanded in y around 0 90.6%
mul-1-neg90.6%
distribute-frac-neg90.6%
Simplified90.6%
*-commutative90.6%
clear-num90.5%
div-inv90.6%
metadata-eval90.6%
un-div-inv90.6%
add-sqr-sqrt41.4%
sqrt-unprod52.9%
sqr-neg52.9%
sqrt-unprod16.2%
add-sqr-sqrt32.3%
frac-2neg32.3%
distribute-frac-neg32.3%
add-sqr-sqrt16.1%
sqrt-unprod58.9%
sqr-neg58.9%
sqrt-unprod49.1%
add-sqr-sqrt90.6%
distribute-rgt-neg-in90.6%
metadata-eval90.6%
Applied egg-rr90.6%
if 1.8e14 < y Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
sub-neg96.8%
distribute-frac-neg96.8%
neg-mul-196.8%
*-commutative96.8%
associate-/l*96.7%
*-commutative96.7%
neg-mul-196.7%
times-frac96.7%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 95.2%
Final simplification92.9%
(FPCore (x y z t) :precision binary64 (if (<= y -8.2e-22) (+ x (* y (/ -0.3333333333333333 z))) (if (<= y 2.1e+14) (+ x (/ t (* 3.0 (* z y)))) (+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.2e-22) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 2.1e+14) {
tmp = x + (t / (3.0 * (z * y)));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-8.2d-22)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 2.1d+14) then
tmp = x + (t / (3.0d0 * (z * y)))
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -8.2e-22) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 2.1e+14) {
tmp = x + (t / (3.0 * (z * y)));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -8.2e-22: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 2.1e+14: tmp = x + (t / (3.0 * (z * y))) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -8.2e-22) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 2.1e+14) tmp = Float64(x + Float64(t / Float64(3.0 * Float64(z * y)))); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -8.2e-22) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 2.1e+14) tmp = x + (t / (3.0 * (z * y))); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -8.2e-22], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+14], N[(x + N[(t / N[(3.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{-22}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+14}:\\
\;\;\;\;x + \frac{t}{3 \cdot \left(z \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -8.1999999999999999e-22Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
sub-neg98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.5%
*-commutative98.5%
neg-mul-198.5%
times-frac98.4%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 94.5%
if -8.1999999999999999e-22 < y < 2.1e14Initial program 88.9%
sub-neg88.9%
associate-+l+88.9%
remove-double-neg88.9%
distribute-frac-neg88.9%
sub-neg88.9%
distribute-frac-neg88.9%
neg-mul-188.9%
*-commutative88.9%
associate-/l*88.9%
*-commutative88.9%
neg-mul-188.9%
times-frac92.8%
distribute-lft-out--92.8%
*-commutative92.8%
associate-/r*92.8%
metadata-eval92.8%
Simplified92.8%
Taylor expanded in y around 0 90.6%
mul-1-neg90.6%
distribute-frac-neg90.6%
Simplified90.6%
clear-num90.5%
frac-2neg90.5%
frac-times87.6%
*-un-lft-identity87.6%
remove-double-neg87.6%
div-inv87.7%
metadata-eval87.7%
Applied egg-rr87.7%
Taylor expanded in z around 0 87.7%
*-commutative87.7%
Simplified87.7%
if 2.1e14 < y Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
sub-neg96.8%
distribute-frac-neg96.8%
neg-mul-196.8%
*-commutative96.8%
associate-/l*96.7%
*-commutative96.7%
neg-mul-196.7%
times-frac96.7%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 95.2%
Final simplification91.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -9.5e-22)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 2.22e+14)
(+ x (* 0.3333333333333333 (/ t (* z y))))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.5e-22) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 2.22e+14) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-9.5d-22)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 2.22d+14) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.5e-22) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 2.22e+14) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.5e-22: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 2.22e+14: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.5e-22) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 2.22e+14) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9.5e-22) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 2.22e+14) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.5e-22], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.22e+14], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{-22}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.22 \cdot 10^{+14}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -9.4999999999999994e-22Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
sub-neg98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.5%
*-commutative98.5%
neg-mul-198.5%
times-frac98.4%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 94.5%
if -9.4999999999999994e-22 < y < 2.22e14Initial program 88.9%
sub-neg88.9%
associate-+l+88.9%
remove-double-neg88.9%
distribute-frac-neg88.9%
sub-neg88.9%
distribute-frac-neg88.9%
neg-mul-188.9%
*-commutative88.9%
associate-/l*88.9%
*-commutative88.9%
neg-mul-188.9%
times-frac92.8%
distribute-lft-out--92.8%
*-commutative92.8%
associate-/r*92.8%
metadata-eval92.8%
Simplified92.8%
Taylor expanded in y around 0 87.6%
if 2.22e14 < y Initial program 96.8%
sub-neg96.8%
associate-+l+96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
sub-neg96.8%
distribute-frac-neg96.8%
neg-mul-196.8%
*-commutative96.8%
associate-/l*96.7%
*-commutative96.7%
neg-mul-196.7%
times-frac96.7%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 95.2%
Final simplification91.5%
(FPCore (x y z t)
:precision binary64
(if (<= z -3.8e+93)
(+ x (/ y (* z -3.0)))
(if (<= z 7e+87)
(* -0.3333333333333333 (/ (- y (/ t y)) z))
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.8e+93) {
tmp = x + (y / (z * -3.0));
} else if (z <= 7e+87) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-3.8d+93)) then
tmp = x + (y / (z * (-3.0d0)))
else if (z <= 7d+87) then
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
else
tmp = x + ((y * (-0.3333333333333333d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.8e+93) {
tmp = x + (y / (z * -3.0));
} else if (z <= 7e+87) {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.8e+93: tmp = x + (y / (z * -3.0)) elif z <= 7e+87: tmp = -0.3333333333333333 * ((y - (t / y)) / z) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.8e+93) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (z <= 7e+87) tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); 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 (z <= -3.8e+93) tmp = x + (y / (z * -3.0)); elseif (z <= 7e+87) tmp = -0.3333333333333333 * ((y - (t / y)) / z); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.8e+93], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+87], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+93}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+87}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if z < -3.7999999999999998e93Initial program 100.0%
sub-neg100.0%
associate-+l+100.0%
remove-double-neg100.0%
distribute-frac-neg100.0%
sub-neg100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*99.9%
*-commutative99.9%
neg-mul-199.9%
times-frac91.7%
distribute-lft-out--91.7%
*-commutative91.7%
associate-/r*91.6%
metadata-eval91.6%
Simplified91.6%
*-commutative91.6%
clear-num91.6%
un-div-inv91.6%
div-inv91.8%
metadata-eval91.8%
Applied egg-rr91.8%
Taylor expanded in y around inf 83.2%
if -3.7999999999999998e93 < z < 6.99999999999999972e87Initial program 90.1%
sub-neg90.1%
associate-+l+90.1%
remove-double-neg90.1%
distribute-frac-neg90.1%
sub-neg90.1%
distribute-frac-neg90.1%
neg-mul-190.1%
*-commutative90.1%
associate-/l*90.1%
*-commutative90.1%
neg-mul-190.1%
times-frac96.9%
distribute-lft-out--98.7%
*-commutative98.7%
associate-/r*98.7%
metadata-eval98.7%
Simplified98.7%
*-commutative98.7%
clear-num98.6%
un-div-inv98.6%
div-inv98.7%
metadata-eval98.7%
Applied egg-rr98.7%
Taylor expanded in x around 0 98.6%
+-commutative98.6%
Simplified98.6%
Taylor expanded in z around 0 85.5%
if 6.99999999999999972e87 < z Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
sub-neg99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.9%
*-commutative99.9%
neg-mul-199.9%
times-frac93.8%
distribute-lft-out--93.8%
*-commutative93.8%
associate-/r*93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in y around inf 78.5%
associate-*r/78.6%
Simplified78.6%
Final simplification83.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6.2e-60) (not (<= y 12200.0))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e-60) || !(y <= 12200.0)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-6.2d-60)) .or. (.not. (y <= 12200.0d0))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * (t / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e-60) || !(y <= 12200.0)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6.2e-60) or not (y <= 12200.0): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * (t / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6.2e-60) || !(y <= 12200.0)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6.2e-60) || ~((y <= 12200.0))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * (t / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6.2e-60], N[Not[LessEqual[y, 12200.0]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{-60} \lor \neg \left(y \leq 12200\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -6.19999999999999976e-60 or 12200 < y Initial program 97.1%
sub-neg97.1%
associate-+l+97.1%
remove-double-neg97.1%
distribute-frac-neg97.1%
sub-neg97.1%
distribute-frac-neg97.1%
neg-mul-197.1%
*-commutative97.1%
associate-/l*97.1%
*-commutative97.1%
neg-mul-197.1%
times-frac97.7%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 93.1%
if -6.19999999999999976e-60 < y < 12200Initial program 89.0%
sub-neg89.0%
associate-+l+89.0%
remove-double-neg89.0%
distribute-frac-neg89.0%
sub-neg89.0%
distribute-frac-neg89.0%
neg-mul-189.0%
*-commutative89.0%
associate-/l*89.0%
*-commutative89.0%
neg-mul-189.0%
times-frac92.3%
distribute-lft-out--92.3%
*-commutative92.3%
associate-/r*92.3%
metadata-eval92.3%
Simplified92.3%
*-commutative92.3%
clear-num92.3%
un-div-inv92.3%
div-inv92.3%
metadata-eval92.3%
Applied egg-rr92.3%
Taylor expanded in x around 0 92.3%
+-commutative92.3%
Simplified92.3%
Taylor expanded in z around 0 62.7%
Taylor expanded in y around 0 61.1%
Final simplification79.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.55e-59)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 12200.0)
(/ (* t (/ 0.3333333333333333 z)) y)
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.55e-59) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 12200.0) {
tmp = (t * (0.3333333333333333 / z)) / y;
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.55d-59)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 12200.0d0) then
tmp = (t * (0.3333333333333333d0 / z)) / y
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.55e-59) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 12200.0) {
tmp = (t * (0.3333333333333333 / z)) / y;
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.55e-59: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 12200.0: tmp = (t * (0.3333333333333333 / z)) / y else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.55e-59) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 12200.0) tmp = Float64(Float64(t * Float64(0.3333333333333333 / z)) / y); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.55e-59) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 12200.0) tmp = (t * (0.3333333333333333 / z)) / y; else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.55e-59], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 12200.0], N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{-59}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 12200:\\
\;\;\;\;\frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.55e-59Initial program 98.5%
sub-neg98.5%
associate-+l+98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
sub-neg98.5%
distribute-frac-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.5%
*-commutative98.5%
neg-mul-198.5%
times-frac98.5%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 93.6%
if -1.55e-59 < y < 12200Initial program 88.3%
sub-neg88.3%
associate-+l+88.3%
distribute-frac-neg88.3%
neg-mul-188.3%
*-commutative88.3%
times-frac88.2%
fma-define88.2%
metadata-eval88.2%
associate-*l*88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in y around 0 93.6%
Taylor expanded in t around inf 65.5%
*-commutative65.5%
*-rgt-identity65.5%
associate-*r/65.4%
associate-*r*65.5%
*-commutative65.5%
associate-*r/65.5%
metadata-eval65.5%
Simplified65.5%
if 12200 < y Initial program 96.9%
sub-neg96.9%
associate-+l+96.9%
remove-double-neg96.9%
distribute-frac-neg96.9%
sub-neg96.9%
distribute-frac-neg96.9%
neg-mul-196.9%
*-commutative96.9%
associate-/l*96.9%
*-commutative96.9%
neg-mul-196.9%
times-frac96.9%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.8%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 94.0%
Final simplification81.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.12e-59)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 12200.0)
(/ (* 0.3333333333333333 (/ t z)) y)
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.12e-59) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 12200.0) {
tmp = (0.3333333333333333 * (t / z)) / y;
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.12d-59)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 12200.0d0) then
tmp = (0.3333333333333333d0 * (t / z)) / y
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.12e-59) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 12200.0) {
tmp = (0.3333333333333333 * (t / z)) / y;
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.12e-59: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 12200.0: tmp = (0.3333333333333333 * (t / z)) / y else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.12e-59) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 12200.0) tmp = Float64(Float64(0.3333333333333333 * Float64(t / z)) / y); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.12e-59) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 12200.0) tmp = (0.3333333333333333 * (t / z)) / y; else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.12e-59], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 12200.0], N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.12 \cdot 10^{-59}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 12200:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.1200000000000001e-59Initial program 98.5%
sub-neg98.5%
associate-+l+98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
sub-neg98.5%
distribute-frac-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.5%
*-commutative98.5%
neg-mul-198.5%
times-frac98.5%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 93.6%
if -1.1200000000000001e-59 < y < 12200Initial program 88.3%
sub-neg88.3%
associate-+l+88.3%
distribute-frac-neg88.3%
neg-mul-188.3%
*-commutative88.3%
times-frac88.2%
fma-define88.2%
metadata-eval88.2%
associate-*l*88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in y around 0 93.6%
Taylor expanded in t around inf 65.5%
if 12200 < y Initial program 96.9%
sub-neg96.9%
associate-+l+96.9%
remove-double-neg96.9%
distribute-frac-neg96.9%
sub-neg96.9%
distribute-frac-neg96.9%
neg-mul-196.9%
*-commutative96.9%
associate-/l*96.9%
*-commutative96.9%
neg-mul-196.9%
times-frac96.9%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.8%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 94.0%
Final simplification81.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.8e-60)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 12200.0)
(* 0.3333333333333333 (/ t (* z y)))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.8e-60) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 12200.0) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.8d-60)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 12200.0d0) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else
tmp = x + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.8e-60) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 12200.0) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.8e-60: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 12200.0: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.8e-60) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 12200.0) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); else tmp = Float64(x + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.8e-60) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 12200.0) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.8e-60], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 12200.0], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{-60}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 12200:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -5.7999999999999999e-60Initial program 97.3%
sub-neg97.3%
associate-+l+97.3%
remove-double-neg97.3%
distribute-frac-neg97.3%
sub-neg97.3%
distribute-frac-neg97.3%
neg-mul-197.3%
*-commutative97.3%
associate-/l*97.3%
*-commutative97.3%
neg-mul-197.3%
times-frac98.5%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 92.5%
if -5.7999999999999999e-60 < y < 12200Initial program 89.0%
sub-neg89.0%
associate-+l+89.0%
remove-double-neg89.0%
distribute-frac-neg89.0%
sub-neg89.0%
distribute-frac-neg89.0%
neg-mul-189.0%
*-commutative89.0%
associate-/l*89.0%
*-commutative89.0%
neg-mul-189.0%
times-frac92.3%
distribute-lft-out--92.3%
*-commutative92.3%
associate-/r*92.3%
metadata-eval92.3%
Simplified92.3%
*-commutative92.3%
clear-num92.3%
un-div-inv92.3%
div-inv92.3%
metadata-eval92.3%
Applied egg-rr92.3%
Taylor expanded in x around 0 92.3%
+-commutative92.3%
Simplified92.3%
Taylor expanded in z around 0 62.7%
Taylor expanded in y around 0 61.1%
if 12200 < y Initial program 96.9%
sub-neg96.9%
associate-+l+96.9%
remove-double-neg96.9%
distribute-frac-neg96.9%
sub-neg96.9%
distribute-frac-neg96.9%
neg-mul-196.9%
*-commutative96.9%
associate-/l*96.9%
*-commutative96.9%
neg-mul-196.9%
times-frac96.9%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.8%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 94.0%
Final simplification79.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.8e+78) (not (<= y 9.5e+70))) (* -0.3333333333333333 (/ y z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.8e+78) || !(y <= 9.5e+70)) {
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 ((y <= (-1.8d+78)) .or. (.not. (y <= 9.5d+70))) 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 ((y <= -1.8e+78) || !(y <= 9.5e+70)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.8e+78) or not (y <= 9.5e+70): tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.8e+78) || !(y <= 9.5e+70)) 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 ((y <= -1.8e+78) || ~((y <= 9.5e+70))) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.8e+78], N[Not[LessEqual[y, 9.5e+70]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+78} \lor \neg \left(y \leq 9.5 \cdot 10^{+70}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.8000000000000001e78 or 9.5000000000000002e70 < y Initial program 96.9%
sub-neg96.9%
associate-+l+96.9%
remove-double-neg96.9%
distribute-frac-neg96.9%
sub-neg96.9%
distribute-frac-neg96.9%
neg-mul-196.9%
*-commutative96.9%
associate-/l*96.9%
*-commutative96.9%
neg-mul-196.9%
times-frac96.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.7%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in z around 0 81.4%
Taylor expanded in y around inf 78.6%
if -1.8000000000000001e78 < y < 9.5000000000000002e70Initial program 91.4%
sub-neg91.4%
associate-+l+91.4%
distribute-frac-neg91.4%
neg-mul-191.4%
*-commutative91.4%
times-frac91.4%
fma-define91.4%
metadata-eval91.4%
associate-*l*91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in x around inf 39.4%
Final simplification55.0%
(FPCore (x y z t) :precision binary64 (if (<= y -1.02e+77) (* y (/ -0.3333333333333333 z)) (if (<= y 4.4e+71) x (* -0.3333333333333333 (/ y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.02e+77) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 4.4e+71) {
tmp = x;
} else {
tmp = -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.02d+77)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= 4.4d+71) then
tmp = x
else
tmp = (-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.02e+77) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 4.4e+71) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.02e+77: tmp = y * (-0.3333333333333333 / z) elif y <= 4.4e+71: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.02e+77) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= 4.4e+71) tmp = x; else tmp = Float64(-0.3333333333333333 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.02e+77) tmp = y * (-0.3333333333333333 / z); elseif (y <= 4.4e+71) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.02e+77], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+71], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.02 \cdot 10^{+77}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+71}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.02e77Initial program 97.8%
sub-neg97.8%
associate-+l+97.8%
remove-double-neg97.8%
distribute-frac-neg97.8%
sub-neg97.8%
distribute-frac-neg97.8%
neg-mul-197.8%
*-commutative97.8%
associate-/l*97.8%
*-commutative97.8%
neg-mul-197.8%
times-frac97.8%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.7%
un-div-inv99.6%
div-inv99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in z around 0 83.2%
Taylor expanded in y around inf 81.4%
*-commutative81.4%
metadata-eval81.4%
distribute-rgt-neg-in81.4%
associate-*l/81.4%
associate-*r/81.5%
metadata-eval81.5%
associate-*r/81.4%
distribute-rgt-neg-in81.4%
associate-*r/81.5%
metadata-eval81.5%
distribute-neg-frac81.5%
metadata-eval81.5%
Simplified81.5%
if -1.02e77 < y < 4.39999999999999989e71Initial program 91.4%
sub-neg91.4%
associate-+l+91.4%
distribute-frac-neg91.4%
neg-mul-191.4%
*-commutative91.4%
times-frac91.4%
fma-define91.4%
metadata-eval91.4%
associate-*l*91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in x around inf 39.4%
if 4.39999999999999989e71 < y Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
remove-double-neg95.9%
distribute-frac-neg95.9%
sub-neg95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
associate-/l*95.8%
*-commutative95.8%
neg-mul-195.8%
times-frac95.8%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.6%
un-div-inv99.8%
div-inv99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in z around 0 79.5%
Taylor expanded in y around inf 75.7%
(FPCore (x y z t) :precision binary64 (+ x (/ (- y (/ t y)) (* z -3.0))))
double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) / (z * -3.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - (t / y)) / (z * (-3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) / (z * -3.0));
}
def code(x, y, z, t): return x + ((y - (t / y)) / (z * -3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))) end
function tmp = code(x, y, z, t) tmp = x + ((y - (t / y)) / (z * -3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - \frac{t}{y}}{z \cdot -3}
\end{array}
Initial program 93.6%
sub-neg93.6%
associate-+l+93.6%
remove-double-neg93.6%
distribute-frac-neg93.6%
sub-neg93.6%
distribute-frac-neg93.6%
neg-mul-193.6%
*-commutative93.6%
associate-/l*93.6%
*-commutative93.6%
neg-mul-193.6%
times-frac95.4%
distribute-lft-out--96.6%
*-commutative96.6%
associate-/r*96.5%
metadata-eval96.5%
Simplified96.5%
*-commutative96.5%
clear-num96.5%
un-div-inv96.5%
div-inv96.6%
metadata-eval96.6%
Applied egg-rr96.6%
(FPCore (x y z t) :precision binary64 (+ x (* (/ -0.3333333333333333 z) (- y (/ t y)))))
double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 / z) * (y - (t / 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 + (((-0.3333333333333333d0) / z) * (y - (t / y)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 / z) * (y - (t / y)));
}
def code(x, y, z, t): return x + ((-0.3333333333333333 / z) * (y - (t / y)))
function code(x, y, z, t) return Float64(x + Float64(Float64(-0.3333333333333333 / z) * Float64(y - Float64(t / y)))) end
function tmp = code(x, y, z, t) tmp = x + ((-0.3333333333333333 / z) * (y - (t / y))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(-0.3333333333333333 / z), $MachinePrecision] * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{-0.3333333333333333}{z} \cdot \left(y - \frac{t}{y}\right)
\end{array}
Initial program 93.6%
sub-neg93.6%
associate-+l+93.6%
remove-double-neg93.6%
distribute-frac-neg93.6%
sub-neg93.6%
distribute-frac-neg93.6%
neg-mul-193.6%
*-commutative93.6%
associate-/l*93.6%
*-commutative93.6%
neg-mul-193.6%
times-frac95.4%
distribute-lft-out--96.6%
*-commutative96.6%
associate-/r*96.5%
metadata-eval96.5%
Simplified96.5%
(FPCore (x y z t) :precision binary64 (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))))
double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * ((y - (t / 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 - (t / y)) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
def code(x, y, z, t): return x + (-0.3333333333333333 * ((y - (t / y)) / z))
function code(x, y, z, t) return Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))) end
function tmp = code(x, y, z, t) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); end
code[x_, y_, z_, t_] := N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}
\end{array}
Initial program 93.6%
sub-neg93.6%
associate-+l+93.6%
remove-double-neg93.6%
distribute-frac-neg93.6%
sub-neg93.6%
distribute-frac-neg93.6%
neg-mul-193.6%
*-commutative93.6%
associate-/l*93.6%
*-commutative93.6%
neg-mul-193.6%
times-frac95.4%
distribute-lft-out--96.6%
*-commutative96.6%
associate-/r*96.5%
metadata-eval96.5%
Simplified96.5%
Taylor expanded in z around 0 96.5%
(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 93.6%
sub-neg93.6%
associate-+l+93.6%
distribute-frac-neg93.6%
neg-mul-193.6%
*-commutative93.6%
times-frac93.5%
fma-define93.5%
metadata-eval93.5%
associate-*l*93.5%
*-commutative93.5%
Simplified93.5%
Taylor expanded in x around inf 31.2%
(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 2024163
(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))))