
(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
(let* ((t_1 (/ y (* 3.0 z))))
(if (<= (* 3.0 z) -5e-87)
(+ (- x t_1) (/ t (* y (* 3.0 z))))
(if (<= (* 3.0 z) 5e-17)
(- x (/ (- y (/ t y)) (* 3.0 z)))
(- x (+ (/ (* -0.3333333333333333 (/ t z)) y) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y / (3.0 * z);
double tmp;
if ((3.0 * z) <= -5e-87) {
tmp = (x - t_1) + (t / (y * (3.0 * z)));
} else if ((3.0 * z) <= 5e-17) {
tmp = x - ((y - (t / y)) / (3.0 * z));
} else {
tmp = x - (((-0.3333333333333333 * (t / z)) / y) + t_1);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y / (3.0d0 * z)
if ((3.0d0 * z) <= (-5d-87)) then
tmp = (x - t_1) + (t / (y * (3.0d0 * z)))
else if ((3.0d0 * z) <= 5d-17) then
tmp = x - ((y - (t / y)) / (3.0d0 * z))
else
tmp = x - ((((-0.3333333333333333d0) * (t / z)) / y) + t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y / (3.0 * z);
double tmp;
if ((3.0 * z) <= -5e-87) {
tmp = (x - t_1) + (t / (y * (3.0 * z)));
} else if ((3.0 * z) <= 5e-17) {
tmp = x - ((y - (t / y)) / (3.0 * z));
} else {
tmp = x - (((-0.3333333333333333 * (t / z)) / y) + t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (3.0 * z) tmp = 0 if (3.0 * z) <= -5e-87: tmp = (x - t_1) + (t / (y * (3.0 * z))) elif (3.0 * z) <= 5e-17: tmp = x - ((y - (t / y)) / (3.0 * z)) else: tmp = x - (((-0.3333333333333333 * (t / z)) / y) + t_1) return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(3.0 * z)) tmp = 0.0 if (Float64(3.0 * z) <= -5e-87) tmp = Float64(Float64(x - t_1) + Float64(t / Float64(y * Float64(3.0 * z)))); elseif (Float64(3.0 * z) <= 5e-17) tmp = Float64(x - Float64(Float64(y - Float64(t / y)) / Float64(3.0 * z))); else tmp = Float64(x - Float64(Float64(Float64(-0.3333333333333333 * Float64(t / z)) / y) + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (3.0 * z); tmp = 0.0; if ((3.0 * z) <= -5e-87) tmp = (x - t_1) + (t / (y * (3.0 * z))); elseif ((3.0 * z) <= 5e-17) tmp = x - ((y - (t / y)) / (3.0 * z)); else tmp = x - (((-0.3333333333333333 * (t / z)) / y) + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(3.0 * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(3.0 * z), $MachinePrecision], -5e-87], N[(N[(x - t$95$1), $MachinePrecision] + N[(t / N[(y * N[(3.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(3.0 * z), $MachinePrecision], 5e-17], N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(3.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(-0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{3 \cdot z}\\
\mathbf{if}\;3 \cdot z \leq -5 \cdot 10^{-87}:\\
\;\;\;\;\left(x - t_1\right) + \frac{t}{y \cdot \left(3 \cdot z\right)}\\
\mathbf{elif}\;3 \cdot z \leq 5 \cdot 10^{-17}:\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{3 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x - \left(\frac{-0.3333333333333333 \cdot \frac{t}{z}}{y} + t_1\right)\\
\end{array}
\end{array}
if (*.f64 z 3) < -5.00000000000000042e-87Initial program 99.8%
if -5.00000000000000042e-87 < (*.f64 z 3) < 4.9999999999999999e-17Initial program 91.6%
associate-+l-91.6%
sub-neg91.6%
distribute-frac-neg91.6%
associate-/r*89.9%
neg-mul-189.9%
*-commutative89.9%
times-frac89.9%
metadata-eval89.9%
Simplified89.9%
Taylor expanded in y around 0 91.6%
+-commutative91.6%
metadata-eval91.6%
associate-/l/89.8%
cancel-sign-sub-inv89.8%
*-commutative89.8%
metadata-eval89.8%
times-frac89.9%
*-rgt-identity89.9%
*-commutative89.9%
associate-/l/91.6%
associate-/r*97.8%
metadata-eval97.8%
times-frac97.9%
*-rgt-identity97.9%
div-sub99.8%
Simplified99.8%
if 4.9999999999999999e-17 < (*.f64 z 3) Initial program 98.5%
associate-+l-98.5%
sub-neg98.5%
distribute-frac-neg98.5%
associate-/r*99.4%
neg-mul-199.4%
*-commutative99.4%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
Final simplification99.7%
(FPCore (x y z t) :precision binary64 (if (or (<= (* 3.0 z) -2e+71) (not (<= (* 3.0 z) 5e+36))) (- x (/ y (* 3.0 z))) (* (- y (/ t y)) (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
double tmp;
if (((3.0 * z) <= -2e+71) || !((3.0 * z) <= 5e+36)) {
tmp = x - (y / (3.0 * z));
} else {
tmp = (y - (t / 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 (((3.0d0 * z) <= (-2d+71)) .or. (.not. ((3.0d0 * z) <= 5d+36))) then
tmp = x - (y / (3.0d0 * z))
else
tmp = (y - (t / 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 (((3.0 * z) <= -2e+71) || !((3.0 * z) <= 5e+36)) {
tmp = x - (y / (3.0 * z));
} else {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((3.0 * z) <= -2e+71) or not ((3.0 * z) <= 5e+36): tmp = x - (y / (3.0 * z)) else: tmp = (y - (t / y)) * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(3.0 * z) <= -2e+71) || !(Float64(3.0 * z) <= 5e+36)) tmp = Float64(x - Float64(y / Float64(3.0 * z))); else tmp = Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((3.0 * z) <= -2e+71) || ~(((3.0 * z) <= 5e+36))) tmp = x - (y / (3.0 * z)); else tmp = (y - (t / y)) * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(3.0 * z), $MachinePrecision], -2e+71], N[Not[LessEqual[N[(3.0 * z), $MachinePrecision], 5e+36]], $MachinePrecision]], N[(x - N[(y / N[(3.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;3 \cdot z \leq -2 \cdot 10^{+71} \lor \neg \left(3 \cdot z \leq 5 \cdot 10^{+36}\right):\\
\;\;\;\;x - \frac{y}{3 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if (*.f64 z 3) < -2.0000000000000001e71 or 4.99999999999999977e36 < (*.f64 z 3) Initial program 99.0%
associate-+l-99.0%
sub-neg99.0%
distribute-frac-neg99.0%
associate-/r*99.5%
neg-mul-199.5%
*-commutative99.5%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 98.8%
+-commutative98.8%
metadata-eval98.8%
associate-/l/99.4%
cancel-sign-sub-inv99.4%
*-commutative99.4%
metadata-eval99.4%
times-frac99.6%
*-rgt-identity99.6%
*-commutative99.6%
associate-/l/99.0%
associate-/r*91.3%
metadata-eval91.3%
times-frac91.3%
*-rgt-identity91.3%
div-sub91.3%
Simplified91.3%
Taylor expanded in y around inf 78.9%
if -2.0000000000000001e71 < (*.f64 z 3) < 4.99999999999999977e36Initial program 93.9%
associate-+l-93.9%
sub-neg93.9%
distribute-frac-neg93.9%
associate-/r*92.6%
neg-mul-192.6%
*-commutative92.6%
times-frac92.6%
metadata-eval92.6%
Simplified92.6%
Taylor expanded in y around 0 93.8%
+-commutative93.8%
metadata-eval93.8%
associate-/l/92.6%
cancel-sign-sub-inv92.6%
*-commutative92.6%
metadata-eval92.6%
times-frac92.6%
*-rgt-identity92.6%
*-commutative92.6%
associate-/l/93.8%
associate-/r*97.1%
metadata-eval97.1%
times-frac97.2%
*-rgt-identity97.2%
div-sub98.5%
Simplified98.5%
Taylor expanded in x around 0 89.3%
associate-*r/89.2%
distribute-lft-out--89.2%
div-sub87.9%
*-commutative87.9%
associate-*r/87.8%
associate-*r/87.9%
*-commutative87.9%
associate-/r*85.3%
times-frac87.9%
distribute-rgt-out--89.3%
Simplified89.3%
Final simplification84.8%
(FPCore (x y z t) :precision binary64 (if (<= t -4.3e+98) (+ (- x (/ y (* 3.0 z))) (/ t (* y (* 3.0 z)))) (- x (/ (- y (/ t y)) (* 3.0 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.3e+98) {
tmp = (x - (y / (3.0 * z))) + (t / (y * (3.0 * z)));
} else {
tmp = x - ((y - (t / 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 (t <= (-4.3d+98)) then
tmp = (x - (y / (3.0d0 * z))) + (t / (y * (3.0d0 * z)))
else
tmp = x - ((y - (t / 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 (t <= -4.3e+98) {
tmp = (x - (y / (3.0 * z))) + (t / (y * (3.0 * z)));
} else {
tmp = x - ((y - (t / y)) / (3.0 * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -4.3e+98: tmp = (x - (y / (3.0 * z))) + (t / (y * (3.0 * z))) else: tmp = x - ((y - (t / y)) / (3.0 * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -4.3e+98) tmp = Float64(Float64(x - Float64(y / Float64(3.0 * z))) + Float64(t / Float64(y * Float64(3.0 * z)))); else tmp = Float64(x - Float64(Float64(y - Float64(t / y)) / Float64(3.0 * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -4.3e+98) tmp = (x - (y / (3.0 * z))) + (t / (y * (3.0 * z))); else tmp = x - ((y - (t / y)) / (3.0 * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -4.3e+98], N[(N[(x - N[(y / N[(3.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(3.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(3.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.3 \cdot 10^{+98}:\\
\;\;\;\;\left(x - \frac{y}{3 \cdot z}\right) + \frac{t}{y \cdot \left(3 \cdot z\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{3 \cdot z}\\
\end{array}
\end{array}
if t < -4.3000000000000001e98Initial program 99.8%
if -4.3000000000000001e98 < t Initial program 95.1%
associate-+l-95.1%
sub-neg95.1%
distribute-frac-neg95.1%
associate-/r*96.8%
neg-mul-196.8%
*-commutative96.8%
times-frac96.8%
metadata-eval96.8%
Simplified96.8%
Taylor expanded in y around 0 95.0%
+-commutative95.0%
metadata-eval95.0%
associate-/l/96.7%
cancel-sign-sub-inv96.7%
*-commutative96.7%
metadata-eval96.7%
times-frac96.8%
*-rgt-identity96.8%
*-commutative96.8%
associate-/l/95.1%
associate-/r*96.5%
metadata-eval96.5%
times-frac96.6%
*-rgt-identity96.6%
div-sub97.6%
Simplified97.6%
Final simplification98.0%
(FPCore (x y z t) :precision binary64 (if (<= y 10000000000.0) (- x (+ (* -0.3333333333333333 (/ (/ t z) y)) (/ (/ y 3.0) z))) (- x (/ (- y (/ t y)) (* 3.0 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 10000000000.0) {
tmp = x - ((-0.3333333333333333 * ((t / z) / y)) + ((y / 3.0) / z));
} else {
tmp = x - ((y - (t / 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 <= 10000000000.0d0) then
tmp = x - (((-0.3333333333333333d0) * ((t / z) / y)) + ((y / 3.0d0) / z))
else
tmp = x - ((y - (t / 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 <= 10000000000.0) {
tmp = x - ((-0.3333333333333333 * ((t / z) / y)) + ((y / 3.0) / z));
} else {
tmp = x - ((y - (t / y)) / (3.0 * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 10000000000.0: tmp = x - ((-0.3333333333333333 * ((t / z) / y)) + ((y / 3.0) / z)) else: tmp = x - ((y - (t / y)) / (3.0 * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 10000000000.0) tmp = Float64(x - Float64(Float64(-0.3333333333333333 * Float64(Float64(t / z) / y)) + Float64(Float64(y / 3.0) / z))); else tmp = Float64(x - Float64(Float64(y - Float64(t / y)) / Float64(3.0 * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 10000000000.0) tmp = x - ((-0.3333333333333333 * ((t / z) / y)) + ((y / 3.0) / z)); else tmp = x - ((y - (t / y)) / (3.0 * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 10000000000.0], N[(x - N[(N[(-0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(3.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 10000000000:\\
\;\;\;\;x - \left(-0.3333333333333333 \cdot \frac{\frac{t}{z}}{y} + \frac{\frac{y}{3}}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{3 \cdot z}\\
\end{array}
\end{array}
if y < 1e10Initial program 95.9%
associate-+l-95.9%
sub-neg95.9%
distribute-frac-neg95.9%
associate-/r*97.6%
neg-mul-197.6%
*-commutative97.6%
times-frac97.6%
metadata-eval97.6%
Simplified97.6%
Taylor expanded in y around 0 95.8%
+-commutative95.8%
metadata-eval95.8%
associate-/l/97.6%
cancel-sign-sub-inv97.6%
*-commutative97.6%
metadata-eval97.6%
times-frac97.6%
*-rgt-identity97.6%
*-commutative97.6%
associate-/l/95.8%
associate-/r*93.4%
metadata-eval93.4%
times-frac93.5%
*-rgt-identity93.5%
div-sub94.0%
Simplified94.0%
div-sub93.5%
*-commutative93.5%
associate-/r*95.9%
*-commutative95.9%
Applied egg-rr95.9%
*-rgt-identity95.9%
times-frac93.5%
associate-/r*93.5%
metadata-eval93.5%
times-frac95.8%
*-commutative95.8%
times-frac97.6%
sub-neg97.6%
associate-/r*97.6%
times-frac95.8%
distribute-frac-neg95.8%
distribute-lft-neg-in95.8%
metadata-eval95.8%
*-commutative95.8%
remove-double-neg95.8%
distribute-rgt-neg-in95.8%
*-commutative95.8%
distribute-rgt-neg-out95.8%
associate-/r*97.7%
Simplified97.6%
if 1e10 < y Initial program 96.7%
associate-+l-96.7%
sub-neg96.7%
distribute-frac-neg96.7%
associate-/r*89.5%
neg-mul-189.5%
*-commutative89.5%
times-frac89.6%
metadata-eval89.6%
Simplified89.6%
Taylor expanded in y around 0 96.6%
+-commutative96.6%
metadata-eval96.6%
associate-/l/89.5%
cancel-sign-sub-inv89.5%
*-commutative89.5%
metadata-eval89.5%
times-frac89.5%
*-rgt-identity89.5%
*-commutative89.5%
associate-/l/96.7%
associate-/r*98.2%
metadata-eval98.2%
times-frac98.2%
*-rgt-identity98.2%
div-sub99.8%
Simplified99.8%
Final simplification98.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2e-136) (not (<= y 5.4e-129))) (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))) (+ x (* (/ t z) (/ 0.3333333333333333 y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2e-136) || !(y <= 5.4e-129)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2d-136)) .or. (.not. (y <= 5.4d-129))) then
tmp = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
else
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2e-136) || !(y <= 5.4e-129)) {
tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2e-136) or not (y <= 5.4e-129): tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)) else: tmp = x + ((t / z) * (0.3333333333333333 / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2e-136) || !(y <= 5.4e-129)) tmp = Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))); else tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2e-136) || ~((y <= 5.4e-129))) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); else tmp = x + ((t / z) * (0.3333333333333333 / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2e-136], N[Not[LessEqual[y, 5.4e-129]], $MachinePrecision]], N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-136} \lor \neg \left(y \leq 5.4 \cdot 10^{-129}\right):\\
\;\;\;\;x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -2e-136 or 5.39999999999999998e-129 < y Initial program 98.2%
Simplified98.6%
if -2e-136 < y < 5.39999999999999998e-129Initial program 91.3%
Simplified87.8%
Taylor expanded in y around 0 91.3%
associate-*r/68.7%
times-frac75.5%
Simplified99.3%
Final simplification98.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.8e-138) (not (<= y 2.1e-128))) (- x (/ (- y (/ t y)) (* 3.0 z))) (+ x (* (/ t z) (/ 0.3333333333333333 y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.8e-138) || !(y <= 2.1e-128)) {
tmp = x - ((y - (t / y)) / (3.0 * z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-4.8d-138)) .or. (.not. (y <= 2.1d-128))) then
tmp = x - ((y - (t / y)) / (3.0d0 * z))
else
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.8e-138) || !(y <= 2.1e-128)) {
tmp = x - ((y - (t / y)) / (3.0 * z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.8e-138) or not (y <= 2.1e-128): tmp = x - ((y - (t / y)) / (3.0 * z)) else: tmp = x + ((t / z) * (0.3333333333333333 / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.8e-138) || !(y <= 2.1e-128)) tmp = Float64(x - Float64(Float64(y - Float64(t / y)) / Float64(3.0 * z))); else tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.8e-138) || ~((y <= 2.1e-128))) tmp = x - ((y - (t / y)) / (3.0 * z)); else tmp = x + ((t / z) * (0.3333333333333333 / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.8e-138], N[Not[LessEqual[y, 2.1e-128]], $MachinePrecision]], N[(x - N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(3.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-138} \lor \neg \left(y \leq 2.1 \cdot 10^{-128}\right):\\
\;\;\;\;x - \frac{y - \frac{t}{y}}{3 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -4.7999999999999998e-138 or 2.1000000000000001e-128 < y Initial program 98.2%
associate-+l-98.2%
sub-neg98.2%
distribute-frac-neg98.2%
associate-/r*93.8%
neg-mul-193.8%
*-commutative93.8%
times-frac93.8%
metadata-eval93.8%
Simplified93.8%
Taylor expanded in y around 0 98.0%
+-commutative98.0%
metadata-eval98.0%
associate-/l/93.7%
cancel-sign-sub-inv93.7%
*-commutative93.7%
metadata-eval93.7%
times-frac93.8%
*-rgt-identity93.8%
*-commutative93.8%
associate-/l/98.1%
associate-/r*97.6%
metadata-eval97.6%
times-frac97.6%
*-rgt-identity97.6%
div-sub98.7%
Simplified98.7%
if -4.7999999999999998e-138 < y < 2.1000000000000001e-128Initial program 91.3%
Simplified87.8%
Taylor expanded in y around 0 91.3%
associate-*r/68.7%
times-frac75.5%
Simplified99.3%
Final simplification98.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- y (/ t y))))
(if (<= y -7e-136)
(+ x (* t_1 (/ -0.3333333333333333 z)))
(if (<= y 3.2e-129)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(+ x (/ (* -0.3333333333333333 t_1) z))))))
double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -7e-136) {
tmp = x + (t_1 * (-0.3333333333333333 / z));
} else if (y <= 3.2e-129) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((-0.3333333333333333 * t_1) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y - (t / y)
if (y <= (-7d-136)) then
tmp = x + (t_1 * ((-0.3333333333333333d0) / z))
else if (y <= 3.2d-129) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x + (((-0.3333333333333333d0) * t_1) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y - (t / y);
double tmp;
if (y <= -7e-136) {
tmp = x + (t_1 * (-0.3333333333333333 / z));
} else if (y <= 3.2e-129) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((-0.3333333333333333 * t_1) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = y - (t / y) tmp = 0 if y <= -7e-136: tmp = x + (t_1 * (-0.3333333333333333 / z)) elif y <= 3.2e-129: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + ((-0.3333333333333333 * t_1) / z) return tmp
function code(x, y, z, t) t_1 = Float64(y - Float64(t / y)) tmp = 0.0 if (y <= -7e-136) tmp = Float64(x + Float64(t_1 * Float64(-0.3333333333333333 / z))); elseif (y <= 3.2e-129) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x + Float64(Float64(-0.3333333333333333 * t_1) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y - (t / y); tmp = 0.0; if (y <= -7e-136) tmp = x + (t_1 * (-0.3333333333333333 / z)); elseif (y <= 3.2e-129) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x + ((-0.3333333333333333 * t_1) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e-136], N[(x + N[(t$95$1 * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e-129], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-0.3333333333333333 * t$95$1), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - \frac{t}{y}\\
\mathbf{if}\;y \leq -7 \cdot 10^{-136}:\\
\;\;\;\;x + t_1 \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-129}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot t_1}{z}\\
\end{array}
\end{array}
if y < -7.00000000000000058e-136Initial program 98.7%
Simplified99.7%
if -7.00000000000000058e-136 < y < 3.2000000000000003e-129Initial program 91.3%
Simplified87.8%
Taylor expanded in y around 0 91.3%
associate-*r/68.7%
times-frac75.5%
Simplified99.3%
if 3.2000000000000003e-129 < y Initial program 97.7%
Simplified97.6%
associate-*l/97.7%
Applied egg-rr97.7%
Final simplification98.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* -0.3333333333333333 (/ y z))))
(if (<= y -9.5e+39)
t_1
(if (<= y -3.6e-122)
x
(if (<= y 4.4e-10) (* 0.3333333333333333 (/ t (* y z))) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 * (y / z);
double tmp;
if (y <= -9.5e+39) {
tmp = t_1;
} else if (y <= -3.6e-122) {
tmp = x;
} else if (y <= 4.4e-10) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (-0.3333333333333333d0) * (y / z)
if (y <= (-9.5d+39)) then
tmp = t_1
else if (y <= (-3.6d-122)) then
tmp = x
else if (y <= 4.4d-10) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 * (y / z);
double tmp;
if (y <= -9.5e+39) {
tmp = t_1;
} else if (y <= -3.6e-122) {
tmp = x;
} else if (y <= 4.4e-10) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -0.3333333333333333 * (y / z) tmp = 0 if y <= -9.5e+39: tmp = t_1 elif y <= -3.6e-122: tmp = x elif y <= 4.4e-10: tmp = 0.3333333333333333 * (t / (y * z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-0.3333333333333333 * Float64(y / z)) tmp = 0.0 if (y <= -9.5e+39) tmp = t_1; elseif (y <= -3.6e-122) tmp = x; elseif (y <= 4.4e-10) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -0.3333333333333333 * (y / z); tmp = 0.0; if (y <= -9.5e+39) tmp = t_1; elseif (y <= -3.6e-122) tmp = x; elseif (y <= 4.4e-10) tmp = 0.3333333333333333 * (t / (y * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.5e+39], t$95$1, If[LessEqual[y, -3.6e-122], x, If[LessEqual[y, 4.4e-10], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-122}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-10}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -9.50000000000000011e39 or 4.3999999999999998e-10 < y Initial program 97.3%
associate-+l-97.3%
sub-neg97.3%
distribute-frac-neg97.3%
associate-/r*91.0%
neg-mul-191.0%
*-commutative91.0%
times-frac91.0%
metadata-eval91.0%
Simplified91.0%
Taylor expanded in y around 0 97.1%
+-commutative97.1%
metadata-eval97.1%
associate-/l/90.8%
cancel-sign-sub-inv90.8%
*-commutative90.8%
metadata-eval90.8%
times-frac91.0%
*-rgt-identity91.0%
*-commutative91.0%
associate-/l/97.3%
associate-/r*98.1%
metadata-eval98.1%
times-frac98.1%
*-rgt-identity98.1%
div-sub99.8%
Simplified99.8%
Taylor expanded in x around 0 73.0%
associate-*r/73.0%
distribute-lft-out--73.0%
div-sub71.3%
*-commutative71.3%
associate-*r/71.3%
associate-*r/71.2%
*-commutative71.2%
associate-/r*70.5%
times-frac71.3%
distribute-rgt-out--73.0%
Simplified73.0%
Taylor expanded in y around inf 64.9%
if -9.50000000000000011e39 < y < -3.59999999999999994e-122Initial program 99.8%
Simplified99.9%
Taylor expanded in x around inf 53.0%
if -3.59999999999999994e-122 < y < 4.3999999999999998e-10Initial program 93.8%
associate-+l-93.8%
sub-neg93.8%
distribute-frac-neg93.8%
associate-/r*99.4%
neg-mul-199.4%
*-commutative99.4%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around 0 93.7%
+-commutative93.7%
metadata-eval93.7%
associate-/l/99.5%
cancel-sign-sub-inv99.5%
*-commutative99.5%
metadata-eval99.5%
times-frac99.4%
*-rgt-identity99.4%
*-commutative99.4%
associate-/l/93.7%
associate-/r*89.5%
metadata-eval89.5%
times-frac89.5%
*-rgt-identity89.5%
div-sub89.5%
Simplified89.5%
Taylor expanded in x around 0 64.5%
associate-*r/64.5%
distribute-lft-out--64.5%
div-sub64.5%
*-commutative64.5%
associate-*r/64.4%
associate-*r/64.5%
*-commutative64.5%
associate-/r*68.7%
times-frac64.5%
distribute-rgt-out--64.5%
Simplified64.5%
Taylor expanded in y around 0 66.2%
Final simplification64.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* -0.3333333333333333 (/ y z))))
(if (<= y -9.5e+38)
t_1
(if (<= y -4.1e-122)
x
(if (<= y 8e-8) (* (/ t z) (/ 0.3333333333333333 y)) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 * (y / z);
double tmp;
if (y <= -9.5e+38) {
tmp = t_1;
} else if (y <= -4.1e-122) {
tmp = x;
} else if (y <= 8e-8) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (-0.3333333333333333d0) * (y / z)
if (y <= (-9.5d+38)) then
tmp = t_1
else if (y <= (-4.1d-122)) then
tmp = x
else if (y <= 8d-8) then
tmp = (t / z) * (0.3333333333333333d0 / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 * (y / z);
double tmp;
if (y <= -9.5e+38) {
tmp = t_1;
} else if (y <= -4.1e-122) {
tmp = x;
} else if (y <= 8e-8) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -0.3333333333333333 * (y / z) tmp = 0 if y <= -9.5e+38: tmp = t_1 elif y <= -4.1e-122: tmp = x elif y <= 8e-8: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-0.3333333333333333 * Float64(y / z)) tmp = 0.0 if (y <= -9.5e+38) tmp = t_1; elseif (y <= -4.1e-122) tmp = x; elseif (y <= 8e-8) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -0.3333333333333333 * (y / z); tmp = 0.0; if (y <= -9.5e+38) tmp = t_1; elseif (y <= -4.1e-122) tmp = x; elseif (y <= 8e-8) tmp = (t / z) * (0.3333333333333333 / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.5e+38], t$95$1, If[LessEqual[y, -4.1e-122], x, If[LessEqual[y, 8e-8], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -9.5 \cdot 10^{+38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{-122}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-8}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -9.4999999999999995e38 or 8.0000000000000002e-8 < y Initial program 97.3%
associate-+l-97.3%
sub-neg97.3%
distribute-frac-neg97.3%
associate-/r*91.0%
neg-mul-191.0%
*-commutative91.0%
times-frac91.0%
metadata-eval91.0%
Simplified91.0%
Taylor expanded in y around 0 97.1%
+-commutative97.1%
metadata-eval97.1%
associate-/l/90.8%
cancel-sign-sub-inv90.8%
*-commutative90.8%
metadata-eval90.8%
times-frac91.0%
*-rgt-identity91.0%
*-commutative91.0%
associate-/l/97.3%
associate-/r*98.1%
metadata-eval98.1%
times-frac98.1%
*-rgt-identity98.1%
div-sub99.8%
Simplified99.8%
Taylor expanded in x around 0 73.0%
associate-*r/73.0%
distribute-lft-out--73.0%
div-sub71.3%
*-commutative71.3%
associate-*r/71.3%
associate-*r/71.2%
*-commutative71.2%
associate-/r*70.5%
times-frac71.3%
distribute-rgt-out--73.0%
Simplified73.0%
Taylor expanded in y around inf 64.9%
if -9.4999999999999995e38 < y < -4.1e-122Initial program 99.8%
Simplified99.9%
Taylor expanded in x around inf 53.0%
if -4.1e-122 < y < 8.0000000000000002e-8Initial program 93.8%
associate-+l-93.8%
sub-neg93.8%
distribute-frac-neg93.8%
associate-/r*99.4%
neg-mul-199.4%
*-commutative99.4%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around 0 93.7%
+-commutative93.7%
metadata-eval93.7%
associate-/l/99.5%
cancel-sign-sub-inv99.5%
*-commutative99.5%
metadata-eval99.5%
times-frac99.4%
*-rgt-identity99.4%
*-commutative99.4%
associate-/l/93.7%
associate-/r*89.5%
metadata-eval89.5%
times-frac89.5%
*-rgt-identity89.5%
div-sub89.5%
Simplified89.5%
Taylor expanded in x around 0 64.5%
associate-*r/64.5%
distribute-lft-out--64.5%
div-sub64.5%
*-commutative64.5%
associate-*r/64.4%
associate-*r/64.5%
*-commutative64.5%
associate-/r*68.7%
times-frac64.5%
distribute-rgt-out--64.5%
Simplified64.5%
Taylor expanded in y around 0 66.2%
associate-*r/66.1%
times-frac70.8%
Simplified70.8%
Final simplification66.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.7e-55) (not (<= y 8e-8))) (- x (/ y (* 3.0 z))) (+ x (* (/ t z) (/ 0.3333333333333333 y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.7e-55) || !(y <= 8e-8)) {
tmp = x - (y / (3.0 * z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-4.7d-55)) .or. (.not. (y <= 8d-8))) then
tmp = x - (y / (3.0d0 * z))
else
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.7e-55) || !(y <= 8e-8)) {
tmp = x - (y / (3.0 * z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.7e-55) or not (y <= 8e-8): tmp = x - (y / (3.0 * z)) else: tmp = x + ((t / z) * (0.3333333333333333 / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.7e-55) || !(y <= 8e-8)) tmp = Float64(x - Float64(y / Float64(3.0 * z))); else tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.7e-55) || ~((y <= 8e-8))) tmp = x - (y / (3.0 * z)); else tmp = x + ((t / z) * (0.3333333333333333 / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.7e-55], N[Not[LessEqual[y, 8e-8]], $MachinePrecision]], N[(x - N[(y / N[(3.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{-55} \lor \neg \left(y \leq 8 \cdot 10^{-8}\right):\\
\;\;\;\;x - \frac{y}{3 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -4.7e-55 or 8.0000000000000002e-8 < y Initial program 97.6%
associate-+l-97.6%
sub-neg97.6%
distribute-frac-neg97.6%
associate-/r*92.2%
neg-mul-192.2%
*-commutative92.2%
times-frac92.2%
metadata-eval92.2%
Simplified92.2%
Taylor expanded in y around 0 97.5%
+-commutative97.5%
metadata-eval97.5%
associate-/l/92.1%
cancel-sign-sub-inv92.1%
*-commutative92.1%
metadata-eval92.1%
times-frac92.2%
*-rgt-identity92.2%
*-commutative92.2%
associate-/l/97.6%
associate-/r*98.3%
metadata-eval98.3%
times-frac98.3%
*-rgt-identity98.3%
div-sub99.8%
Simplified99.8%
Taylor expanded in y around inf 90.0%
if -4.7e-55 < y < 8.0000000000000002e-8Initial program 94.3%
Simplified90.4%
Taylor expanded in y around 0 91.9%
associate-*r/63.2%
times-frac67.5%
Simplified97.0%
Final simplification93.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2e-122) (not (<= y 2.35e-11))) (+ x (* y (/ -0.3333333333333333 z))) (* (/ t z) (/ 0.3333333333333333 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2e-122) || !(y <= 2.35e-11)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-2d-122)) .or. (.not. (y <= 2.35d-11))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = (t / z) * (0.3333333333333333d0 / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2e-122) || !(y <= 2.35e-11)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2e-122) or not (y <= 2.35e-11): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = (t / z) * (0.3333333333333333 / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2e-122) || !(y <= 2.35e-11)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2e-122) || ~((y <= 2.35e-11))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = (t / z) * (0.3333333333333333 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2e-122], N[Not[LessEqual[y, 2.35e-11]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-122} \lor \neg \left(y \leq 2.35 \cdot 10^{-11}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -2.00000000000000012e-122 or 2.34999999999999996e-11 < y Initial program 97.8%
Simplified99.7%
Taylor expanded in y around inf 88.5%
if -2.00000000000000012e-122 < y < 2.34999999999999996e-11Initial program 93.8%
associate-+l-93.8%
sub-neg93.8%
distribute-frac-neg93.8%
associate-/r*99.4%
neg-mul-199.4%
*-commutative99.4%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around 0 93.7%
+-commutative93.7%
metadata-eval93.7%
associate-/l/99.5%
cancel-sign-sub-inv99.5%
*-commutative99.5%
metadata-eval99.5%
times-frac99.4%
*-rgt-identity99.4%
*-commutative99.4%
associate-/l/93.7%
associate-/r*89.5%
metadata-eval89.5%
times-frac89.5%
*-rgt-identity89.5%
div-sub89.5%
Simplified89.5%
Taylor expanded in x around 0 64.5%
associate-*r/64.5%
distribute-lft-out--64.5%
div-sub64.5%
*-commutative64.5%
associate-*r/64.4%
associate-*r/64.5%
*-commutative64.5%
associate-/r*68.7%
times-frac64.5%
distribute-rgt-out--64.5%
Simplified64.5%
Taylor expanded in y around 0 66.2%
associate-*r/66.1%
times-frac70.8%
Simplified70.8%
Final simplification81.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4e-122) (not (<= y 1.06e-14))) (- x (/ y (* 3.0 z))) (* (/ t z) (/ 0.3333333333333333 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4e-122) || !(y <= 1.06e-14)) {
tmp = x - (y / (3.0 * z));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-4d-122)) .or. (.not. (y <= 1.06d-14))) then
tmp = x - (y / (3.0d0 * z))
else
tmp = (t / z) * (0.3333333333333333d0 / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4e-122) || !(y <= 1.06e-14)) {
tmp = x - (y / (3.0 * z));
} else {
tmp = (t / z) * (0.3333333333333333 / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4e-122) or not (y <= 1.06e-14): tmp = x - (y / (3.0 * z)) else: tmp = (t / z) * (0.3333333333333333 / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4e-122) || !(y <= 1.06e-14)) tmp = Float64(x - Float64(y / Float64(3.0 * z))); else tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4e-122) || ~((y <= 1.06e-14))) tmp = x - (y / (3.0 * z)); else tmp = (t / z) * (0.3333333333333333 / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4e-122], N[Not[LessEqual[y, 1.06e-14]], $MachinePrecision]], N[(x - N[(y / N[(3.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{-122} \lor \neg \left(y \leq 1.06 \cdot 10^{-14}\right):\\
\;\;\;\;x - \frac{y}{3 \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -4.00000000000000024e-122 or 1.06e-14 < y Initial program 97.8%
associate-+l-97.8%
sub-neg97.8%
distribute-frac-neg97.8%
associate-/r*92.7%
neg-mul-192.7%
*-commutative92.7%
times-frac92.7%
metadata-eval92.7%
Simplified92.7%
Taylor expanded in y around 0 97.6%
+-commutative97.6%
metadata-eval97.6%
associate-/l/92.6%
cancel-sign-sub-inv92.6%
*-commutative92.6%
metadata-eval92.6%
times-frac92.7%
*-rgt-identity92.7%
*-commutative92.7%
associate-/l/97.8%
associate-/r*98.4%
metadata-eval98.4%
times-frac98.5%
*-rgt-identity98.5%
div-sub99.8%
Simplified99.8%
Taylor expanded in y around inf 88.7%
if -4.00000000000000024e-122 < y < 1.06e-14Initial program 93.8%
associate-+l-93.8%
sub-neg93.8%
distribute-frac-neg93.8%
associate-/r*99.4%
neg-mul-199.4%
*-commutative99.4%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around 0 93.7%
+-commutative93.7%
metadata-eval93.7%
associate-/l/99.5%
cancel-sign-sub-inv99.5%
*-commutative99.5%
metadata-eval99.5%
times-frac99.4%
*-rgt-identity99.4%
*-commutative99.4%
associate-/l/93.7%
associate-/r*89.5%
metadata-eval89.5%
times-frac89.5%
*-rgt-identity89.5%
div-sub89.5%
Simplified89.5%
Taylor expanded in x around 0 64.5%
associate-*r/64.5%
distribute-lft-out--64.5%
div-sub64.5%
*-commutative64.5%
associate-*r/64.4%
associate-*r/64.5%
*-commutative64.5%
associate-/r*68.7%
times-frac64.5%
distribute-rgt-out--64.5%
Simplified64.5%
Taylor expanded in y around 0 66.2%
associate-*r/66.1%
times-frac70.8%
Simplified70.8%
Final simplification81.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.9e-122)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 6.3e-15)
(* (/ t z) (/ 0.3333333333333333 y))
(+ x (/ -0.3333333333333333 (/ z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.9e-122) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 6.3e-15) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x + (-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 <= (-3.9d-122)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 6.3d-15) then
tmp = (t / z) * (0.3333333333333333d0 / y)
else
tmp = x + ((-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 <= -3.9e-122) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 6.3e-15) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x + (-0.3333333333333333 / (z / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.9e-122: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 6.3e-15: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = x + (-0.3333333333333333 / (z / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.9e-122) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 6.3e-15) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); else tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.9e-122) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 6.3e-15) tmp = (t / z) * (0.3333333333333333 / y); else tmp = x + (-0.3333333333333333 / (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.9e-122], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.3e-15], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{-122}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 6.3 \cdot 10^{-15}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\end{array}
\end{array}
if y < -3.8999999999999999e-122Initial program 98.6%
Simplified99.7%
Taylor expanded in y around inf 86.5%
if -3.8999999999999999e-122 < y < 6.29999999999999982e-15Initial program 93.8%
associate-+l-93.8%
sub-neg93.8%
distribute-frac-neg93.8%
associate-/r*99.4%
neg-mul-199.4%
*-commutative99.4%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around 0 93.7%
+-commutative93.7%
metadata-eval93.7%
associate-/l/99.5%
cancel-sign-sub-inv99.5%
*-commutative99.5%
metadata-eval99.5%
times-frac99.4%
*-rgt-identity99.4%
*-commutative99.4%
associate-/l/93.7%
associate-/r*89.5%
metadata-eval89.5%
times-frac89.5%
*-rgt-identity89.5%
div-sub89.5%
Simplified89.5%
Taylor expanded in x around 0 64.5%
associate-*r/64.5%
distribute-lft-out--64.5%
div-sub64.5%
*-commutative64.5%
associate-*r/64.4%
associate-*r/64.5%
*-commutative64.5%
associate-/r*68.7%
times-frac64.5%
distribute-rgt-out--64.5%
Simplified64.5%
Taylor expanded in y around 0 66.2%
associate-*r/66.1%
times-frac70.8%
Simplified70.8%
if 6.29999999999999982e-15 < y Initial program 96.8%
Simplified99.6%
Taylor expanded in y around inf 90.9%
clear-num90.9%
inv-pow90.9%
Applied egg-rr90.9%
unpow-190.9%
Simplified90.9%
associate-*l/91.0%
*-un-lft-identity91.0%
add-sqr-sqrt48.3%
sqrt-unprod56.5%
div-inv56.5%
metadata-eval56.5%
metadata-eval56.5%
div-inv56.5%
metadata-eval56.5%
metadata-eval56.5%
swap-sqr56.5%
metadata-eval56.5%
metadata-eval56.5%
metadata-eval56.5%
metadata-eval56.5%
swap-sqr56.5%
sqrt-unprod15.0%
add-sqr-sqrt25.2%
associate-/l/25.2%
Applied egg-rr91.0%
Final simplification81.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.6e-122)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= y 1.15e-14)
(* (/ t z) (/ 0.3333333333333333 y))
(+ x (/ -0.3333333333333333 (/ z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.6e-122) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 1.15e-14) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x + (-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 <= (-3.6d-122)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (y <= 1.15d-14) then
tmp = (t / z) * (0.3333333333333333d0 / y)
else
tmp = x + ((-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 <= -3.6e-122) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 1.15e-14) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x + (-0.3333333333333333 / (z / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.6e-122: tmp = x + ((y * -0.3333333333333333) / z) elif y <= 1.15e-14: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = x + (-0.3333333333333333 / (z / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.6e-122) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (y <= 1.15e-14) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); else tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.6e-122) tmp = x + ((y * -0.3333333333333333) / z); elseif (y <= 1.15e-14) tmp = (t / z) * (0.3333333333333333 / y); else tmp = x + (-0.3333333333333333 / (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.6e-122], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e-14], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{-122}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-14}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\end{array}
\end{array}
if y < -3.59999999999999994e-122Initial program 98.6%
Simplified99.7%
Taylor expanded in y around inf 86.5%
associate-*l/86.6%
Applied egg-rr86.6%
if -3.59999999999999994e-122 < y < 1.14999999999999999e-14Initial program 93.8%
associate-+l-93.8%
sub-neg93.8%
distribute-frac-neg93.8%
associate-/r*99.4%
neg-mul-199.4%
*-commutative99.4%
times-frac99.4%
metadata-eval99.4%
Simplified99.4%
Taylor expanded in y around 0 93.7%
+-commutative93.7%
metadata-eval93.7%
associate-/l/99.5%
cancel-sign-sub-inv99.5%
*-commutative99.5%
metadata-eval99.5%
times-frac99.4%
*-rgt-identity99.4%
*-commutative99.4%
associate-/l/93.7%
associate-/r*89.5%
metadata-eval89.5%
times-frac89.5%
*-rgt-identity89.5%
div-sub89.5%
Simplified89.5%
Taylor expanded in x around 0 64.5%
associate-*r/64.5%
distribute-lft-out--64.5%
div-sub64.5%
*-commutative64.5%
associate-*r/64.4%
associate-*r/64.5%
*-commutative64.5%
associate-/r*68.7%
times-frac64.5%
distribute-rgt-out--64.5%
Simplified64.5%
Taylor expanded in y around 0 66.2%
associate-*r/66.1%
times-frac70.8%
Simplified70.8%
if 1.14999999999999999e-14 < y Initial program 96.8%
Simplified99.6%
Taylor expanded in y around inf 90.9%
clear-num90.9%
inv-pow90.9%
Applied egg-rr90.9%
unpow-190.9%
Simplified90.9%
associate-*l/91.0%
*-un-lft-identity91.0%
add-sqr-sqrt48.3%
sqrt-unprod56.5%
div-inv56.5%
metadata-eval56.5%
metadata-eval56.5%
div-inv56.5%
metadata-eval56.5%
metadata-eval56.5%
swap-sqr56.5%
metadata-eval56.5%
metadata-eval56.5%
metadata-eval56.5%
metadata-eval56.5%
swap-sqr56.5%
sqrt-unprod15.0%
add-sqr-sqrt25.2%
associate-/l/25.2%
Applied egg-rr91.0%
Final simplification81.0%
(FPCore (x y z t) :precision binary64 (if (<= z -9.2e+59) x (if (<= z 8.5e+56) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -9.2e+59) {
tmp = x;
} else if (z <= 8.5e+56) {
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 <= (-9.2d+59)) then
tmp = x
else if (z <= 8.5d+56) 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 <= -9.2e+59) {
tmp = x;
} else if (z <= 8.5e+56) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -9.2e+59: tmp = x elif z <= 8.5e+56: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -9.2e+59) tmp = x; elseif (z <= 8.5e+56) 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 <= -9.2e+59) tmp = x; elseif (z <= 8.5e+56) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -9.2e+59], x, If[LessEqual[z, 8.5e+56], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+59}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+56}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.20000000000000032e59 or 8.4999999999999998e56 < z Initial program 99.0%
Simplified90.2%
Taylor expanded in x around inf 57.5%
if -9.20000000000000032e59 < z < 8.4999999999999998e56Initial program 94.0%
associate-+l-94.0%
sub-neg94.0%
distribute-frac-neg94.0%
associate-/r*92.7%
neg-mul-192.7%
*-commutative92.7%
times-frac92.7%
metadata-eval92.7%
Simplified92.7%
Taylor expanded in y around 0 93.9%
+-commutative93.9%
metadata-eval93.9%
associate-/l/92.7%
cancel-sign-sub-inv92.7%
*-commutative92.7%
metadata-eval92.7%
times-frac92.7%
*-rgt-identity92.7%
*-commutative92.7%
associate-/l/93.9%
associate-/r*97.8%
metadata-eval97.8%
times-frac97.8%
*-rgt-identity97.8%
div-sub99.2%
Simplified99.2%
Taylor expanded in x around 0 89.3%
associate-*r/89.3%
distribute-lft-out--89.3%
div-sub88.0%
*-commutative88.0%
associate-*r/87.9%
associate-*r/88.0%
*-commutative88.0%
associate-/r*84.8%
times-frac88.0%
distribute-rgt-out--89.4%
Simplified89.4%
Taylor expanded in y around inf 44.7%
Final simplification50.1%
(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.1%
Simplified95.3%
Taylor expanded in x around inf 31.2%
Final simplification31.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 2023336
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))