
(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) 2e-94) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ x (- (* t (/ (/ 0.3333333333333333 y) z)) (/ y (* z 3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 2e-94) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = x + ((t * ((0.3333333333333333 / y) / z)) - (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 ((z * 3.0d0) <= 2d-94) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = x + ((t * ((0.3333333333333333d0 / y) / z)) - (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 ((z * 3.0) <= 2e-94) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = x + ((t * ((0.3333333333333333 / y) / z)) - (y / (z * 3.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 2e-94: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = x + ((t * ((0.3333333333333333 / y) / z)) - (y / (z * 3.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 2e-94) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(t * Float64(Float64(0.3333333333333333 / y) / z)) - Float64(y / Float64(z * 3.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 2e-94) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = x + ((t * ((0.3333333333333333 / y) / z)) - (y / (z * 3.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-94], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * N[(N[(0.3333333333333333 / y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 2 \cdot 10^{-94}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot \frac{\frac{0.3333333333333333}{y}}{z} - \frac{y}{z \cdot 3}\right)\\
\end{array}
\end{array}
if (*.f64 z 3) < 1.9999999999999999e-94Initial program 91.1%
associate-+l-91.1%
sub-neg91.1%
distribute-frac-neg91.1%
associate-/r*94.0%
neg-mul-194.0%
*-commutative94.0%
times-frac94.0%
metadata-eval94.0%
Simplified94.0%
Taylor expanded in y around 0 90.9%
+-commutative90.9%
metadata-eval90.9%
associate-/l/93.9%
cancel-sign-sub-inv93.9%
*-commutative93.9%
metadata-eval93.9%
times-frac93.9%
*-rgt-identity93.9%
*-commutative93.9%
associate-/l/91.0%
associate-/r*98.1%
metadata-eval98.1%
times-frac98.1%
*-rgt-identity98.1%
div-sub98.6%
Simplified98.6%
if 1.9999999999999999e-94 < (*.f64 z 3) Initial program 99.0%
associate-+l-99.0%
*-commutative99.0%
Simplified99.0%
*-un-lft-identity99.0%
associate-*r*98.9%
times-frac98.9%
Applied egg-rr98.9%
Taylor expanded in y around 0 98.9%
associate-*r/98.9%
associate-*l/99.0%
*-commutative99.0%
associate-/r*99.0%
Simplified99.0%
Final simplification98.8%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 2e-94) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 2e-94) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.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) <= 2d-94) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = (x - (y / (z * 3.0d0))) + (t / ((z * 3.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) <= 2e-94) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 2e-94: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 2e-94) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 2e-94) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-94], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 2 \cdot 10^{-94}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\end{array}
\end{array}
if (*.f64 z 3) < 1.9999999999999999e-94Initial program 91.1%
associate-+l-91.1%
sub-neg91.1%
distribute-frac-neg91.1%
associate-/r*94.0%
neg-mul-194.0%
*-commutative94.0%
times-frac94.0%
metadata-eval94.0%
Simplified94.0%
Taylor expanded in y around 0 90.9%
+-commutative90.9%
metadata-eval90.9%
associate-/l/93.9%
cancel-sign-sub-inv93.9%
*-commutative93.9%
metadata-eval93.9%
times-frac93.9%
*-rgt-identity93.9%
*-commutative93.9%
associate-/l/91.0%
associate-/r*98.1%
metadata-eval98.1%
times-frac98.1%
*-rgt-identity98.1%
div-sub98.6%
Simplified98.6%
if 1.9999999999999999e-94 < (*.f64 z 3) Initial program 99.0%
Final simplification98.8%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z 3.0) -4e-63) (not (<= (* z 3.0) 8e+40))) (- x (/ y (* z 3.0))) (* -0.3333333333333333 (/ (- y (/ t y)) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -4e-63) || !((z * 3.0) <= 8e+40)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((z * 3.0d0) <= (-4d-63)) .or. (.not. ((z * 3.0d0) <= 8d+40))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = (-0.3333333333333333d0) * ((y - (t / y)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -4e-63) || !((z * 3.0) <= 8e+40)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = -0.3333333333333333 * ((y - (t / y)) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * 3.0) <= -4e-63) or not ((z * 3.0) <= 8e+40): tmp = x - (y / (z * 3.0)) else: tmp = -0.3333333333333333 * ((y - (t / y)) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * 3.0) <= -4e-63) || !(Float64(z * 3.0) <= 8e+40)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * 3.0) <= -4e-63) || ~(((z * 3.0) <= 8e+40))) tmp = x - (y / (z * 3.0)); else tmp = -0.3333333333333333 * ((y - (t / y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * 3.0), $MachinePrecision], -4e-63], N[Not[LessEqual[N[(z * 3.0), $MachinePrecision], 8e+40]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -4 \cdot 10^{-63} \lor \neg \left(z \cdot 3 \leq 8 \cdot 10^{+40}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}\\
\end{array}
\end{array}
if (*.f64 z 3) < -4.00000000000000027e-63 or 8.00000000000000024e40 < (*.f64 z 3) Initial program 98.8%
associate-+l-98.8%
sub-neg98.8%
distribute-frac-neg98.8%
associate-/r*98.3%
neg-mul-198.3%
*-commutative98.3%
times-frac98.2%
metadata-eval98.2%
Simplified98.2%
Taylor expanded in y around 0 98.6%
+-commutative98.6%
metadata-eval98.6%
associate-/l/98.1%
cancel-sign-sub-inv98.1%
*-commutative98.1%
metadata-eval98.1%
times-frac98.2%
*-rgt-identity98.2%
*-commutative98.2%
associate-/l/98.7%
associate-/r*94.2%
metadata-eval94.2%
times-frac94.2%
*-rgt-identity94.2%
div-sub94.2%
Simplified94.2%
Taylor expanded in y around inf 76.6%
if -4.00000000000000027e-63 < (*.f64 z 3) < 8.00000000000000024e40Initial program 88.3%
associate-+l-88.3%
sub-neg88.3%
distribute-frac-neg88.3%
associate-/r*92.0%
neg-mul-192.0%
*-commutative92.0%
times-frac92.0%
metadata-eval92.0%
Simplified92.0%
Taylor expanded in y around 0 88.3%
+-commutative88.3%
metadata-eval88.3%
associate-/l/91.9%
cancel-sign-sub-inv91.9%
*-commutative91.9%
metadata-eval91.9%
times-frac92.0%
*-rgt-identity92.0%
*-commutative92.0%
associate-/l/88.3%
associate-/r*98.3%
metadata-eval98.3%
times-frac98.2%
*-rgt-identity98.2%
div-sub99.0%
Simplified99.0%
Taylor expanded in x around 0 93.2%
Final simplification84.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (* z -3.0))))
(if (<= y -3.7e+38)
t_1
(if (<= y -6.6e-14)
x
(if (or (<= y -1.96e-29) (not (<= y 4.7e+66)))
t_1
(* (/ 0.3333333333333333 y) (/ t z)))))))
double code(double x, double y, double z, double t) {
double t_1 = y / (z * -3.0);
double tmp;
if (y <= -3.7e+38) {
tmp = t_1;
} else if (y <= -6.6e-14) {
tmp = x;
} else if ((y <= -1.96e-29) || !(y <= 4.7e+66)) {
tmp = t_1;
} else {
tmp = (0.3333333333333333 / y) * (t / 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 / (z * (-3.0d0))
if (y <= (-3.7d+38)) then
tmp = t_1
else if (y <= (-6.6d-14)) then
tmp = x
else if ((y <= (-1.96d-29)) .or. (.not. (y <= 4.7d+66))) then
tmp = t_1
else
tmp = (0.3333333333333333d0 / y) * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y / (z * -3.0);
double tmp;
if (y <= -3.7e+38) {
tmp = t_1;
} else if (y <= -6.6e-14) {
tmp = x;
} else if ((y <= -1.96e-29) || !(y <= 4.7e+66)) {
tmp = t_1;
} else {
tmp = (0.3333333333333333 / y) * (t / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (z * -3.0) tmp = 0 if y <= -3.7e+38: tmp = t_1 elif y <= -6.6e-14: tmp = x elif (y <= -1.96e-29) or not (y <= 4.7e+66): tmp = t_1 else: tmp = (0.3333333333333333 / y) * (t / z) return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(z * -3.0)) tmp = 0.0 if (y <= -3.7e+38) tmp = t_1; elseif (y <= -6.6e-14) tmp = x; elseif ((y <= -1.96e-29) || !(y <= 4.7e+66)) tmp = t_1; else tmp = Float64(Float64(0.3333333333333333 / y) * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (z * -3.0); tmp = 0.0; if (y <= -3.7e+38) tmp = t_1; elseif (y <= -6.6e-14) tmp = x; elseif ((y <= -1.96e-29) || ~((y <= 4.7e+66))) tmp = t_1; else tmp = (0.3333333333333333 / y) * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.7e+38], t$95$1, If[LessEqual[y, -6.6e-14], x, If[Or[LessEqual[y, -1.96e-29], N[Not[LessEqual[y, 4.7e+66]], $MachinePrecision]], t$95$1, N[(N[(0.3333333333333333 / y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z \cdot -3}\\
\mathbf{if}\;y \leq -3.7 \cdot 10^{+38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -6.6 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.96 \cdot 10^{-29} \lor \neg \left(y \leq 4.7 \cdot 10^{+66}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{y} \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -3.7000000000000001e38 or -6.5999999999999996e-14 < y < -1.95999999999999988e-29 or 4.7000000000000002e66 < y Initial program 97.6%
associate-+l-97.6%
sub-neg97.6%
distribute-frac-neg97.6%
associate-/r*92.5%
neg-mul-192.5%
*-commutative92.5%
times-frac92.5%
metadata-eval92.5%
Simplified92.5%
Taylor expanded in y around 0 97.5%
+-commutative97.5%
metadata-eval97.5%
associate-/l/92.4%
cancel-sign-sub-inv92.4%
*-commutative92.4%
metadata-eval92.4%
times-frac92.5%
*-rgt-identity92.5%
*-commutative92.5%
associate-/l/97.6%
associate-/r*99.0%
metadata-eval99.0%
times-frac99.0%
*-rgt-identity99.0%
div-sub99.9%
Simplified99.9%
Taylor expanded in y around inf 95.5%
Taylor expanded in x around 0 70.4%
associate-*r/70.3%
associate-*l/70.3%
*-commutative70.3%
Simplified70.3%
Taylor expanded in y around 0 70.4%
associate-*r/70.3%
*-commutative70.3%
*-rgt-identity70.3%
associate-*r/70.3%
/-rgt-identity70.3%
associate-/l*70.4%
metadata-eval70.4%
associate-*l/70.5%
associate-*r/70.5%
*-rgt-identity70.5%
associate-/r*70.5%
Simplified70.5%
if -3.7000000000000001e38 < y < -6.5999999999999996e-14Initial program 99.6%
Simplified99.6%
Taylor expanded in x around inf 59.7%
if -1.95999999999999988e-29 < y < 4.7000000000000002e66Initial program 89.6%
associate-+l-89.6%
sub-neg89.6%
distribute-frac-neg89.6%
associate-/r*97.4%
neg-mul-197.4%
*-commutative97.4%
times-frac97.4%
metadata-eval97.4%
Simplified97.4%
Taylor expanded in y around 0 89.4%
+-commutative89.4%
metadata-eval89.4%
associate-/l/97.3%
cancel-sign-sub-inv97.3%
*-commutative97.3%
metadata-eval97.3%
times-frac97.3%
*-rgt-identity97.3%
*-commutative97.3%
associate-/l/89.4%
associate-/r*93.1%
metadata-eval93.1%
times-frac93.1%
*-rgt-identity93.1%
div-sub93.1%
Simplified93.1%
Taylor expanded in y around 0 57.0%
associate-*r/57.1%
associate-/r*59.9%
associate-*l/59.9%
associate-/l*63.5%
Simplified63.5%
div-inv63.4%
clear-num63.5%
Applied egg-rr63.5%
Final simplification66.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6.5e-26) (not (<= y 4.7e+66))) (- x (/ y (* z 3.0))) (+ x (* (/ 0.3333333333333333 y) (/ t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.5e-26) || !(y <= 4.7e+66)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((0.3333333333333333 / y) * (t / 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 <= (-6.5d-26)) .or. (.not. (y <= 4.7d+66))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + ((0.3333333333333333d0 / y) * (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.5e-26) || !(y <= 4.7e+66)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((0.3333333333333333 / y) * (t / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6.5e-26) or not (y <= 4.7e+66): tmp = x - (y / (z * 3.0)) else: tmp = x + ((0.3333333333333333 / y) * (t / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6.5e-26) || !(y <= 4.7e+66)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(0.3333333333333333 / y) * Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6.5e-26) || ~((y <= 4.7e+66))) tmp = x - (y / (z * 3.0)); else tmp = x + ((0.3333333333333333 / y) * (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6.5e-26], N[Not[LessEqual[y, 4.7e+66]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(0.3333333333333333 / y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{-26} \lor \neg \left(y \leq 4.7 \cdot 10^{+66}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{y} \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -6.5e-26 or 4.7000000000000002e66 < y Initial program 98.5%
associate-+l-98.5%
sub-neg98.5%
distribute-frac-neg98.5%
associate-/r*93.0%
neg-mul-193.0%
*-commutative93.0%
times-frac93.0%
metadata-eval93.0%
Simplified93.0%
Taylor expanded in y around 0 98.4%
+-commutative98.4%
metadata-eval98.4%
associate-/l/92.9%
cancel-sign-sub-inv92.9%
*-commutative92.9%
metadata-eval92.9%
times-frac93.0%
*-rgt-identity93.0%
*-commutative93.0%
associate-/l/98.5%
associate-/r*99.1%
metadata-eval99.1%
times-frac99.1%
*-rgt-identity99.1%
div-sub99.9%
Simplified99.9%
Taylor expanded in y around inf 94.3%
if -6.5e-26 < y < 4.7000000000000002e66Initial program 89.1%
Simplified93.3%
Taylor expanded in y around 0 85.3%
associate-*r/85.4%
times-frac91.5%
Simplified91.5%
Final simplification92.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.4e-74) (not (<= y 3.25e-74))) (+ x (* y (/ -0.3333333333333333 z))) (* (/ 0.3333333333333333 y) (/ t z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.4e-74) || !(y <= 3.25e-74)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = (0.3333333333333333 / y) * (t / 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 <= (-4.4d-74)) .or. (.not. (y <= 3.25d-74))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = (0.3333333333333333d0 / y) * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.4e-74) || !(y <= 3.25e-74)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = (0.3333333333333333 / y) * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.4e-74) or not (y <= 3.25e-74): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = (0.3333333333333333 / y) * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.4e-74) || !(y <= 3.25e-74)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(Float64(0.3333333333333333 / y) * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.4e-74) || ~((y <= 3.25e-74))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = (0.3333333333333333 / y) * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.4e-74], N[Not[LessEqual[y, 3.25e-74]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 / y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{-74} \lor \neg \left(y \leq 3.25 \cdot 10^{-74}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{y} \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -4.40000000000000021e-74 or 3.2500000000000001e-74 < y Initial program 97.6%
Simplified99.6%
Taylor expanded in y around inf 85.9%
if -4.40000000000000021e-74 < y < 3.2500000000000001e-74Initial program 87.0%
associate-+l-87.0%
sub-neg87.0%
distribute-frac-neg87.0%
associate-/r*97.5%
neg-mul-197.5%
*-commutative97.5%
times-frac97.5%
metadata-eval97.5%
Simplified97.5%
Taylor expanded in y around 0 86.9%
+-commutative86.9%
metadata-eval86.9%
associate-/l/97.4%
cancel-sign-sub-inv97.4%
*-commutative97.4%
metadata-eval97.4%
times-frac97.4%
*-rgt-identity97.4%
*-commutative97.4%
associate-/l/86.9%
associate-/r*90.8%
metadata-eval90.8%
times-frac90.7%
*-rgt-identity90.7%
div-sub90.7%
Simplified90.7%
Taylor expanded in y around 0 60.7%
associate-*r/60.8%
associate-/r*64.6%
associate-*l/64.6%
associate-/l*70.4%
Simplified70.4%
div-inv70.3%
clear-num70.4%
Applied egg-rr70.4%
Final simplification80.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.5e-74) (not (<= y 1.72e-75))) (+ x (/ (* y -0.3333333333333333) z)) (* (/ 0.3333333333333333 y) (/ t z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.5e-74) || !(y <= 1.72e-75)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = (0.3333333333333333 / y) * (t / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-3.5d-74)) .or. (.not. (y <= 1.72d-75))) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else
tmp = (0.3333333333333333d0 / y) * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.5e-74) || !(y <= 1.72e-75)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = (0.3333333333333333 / y) * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.5e-74) or not (y <= 1.72e-75): tmp = x + ((y * -0.3333333333333333) / z) else: tmp = (0.3333333333333333 / y) * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.5e-74) || !(y <= 1.72e-75)) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); else tmp = Float64(Float64(0.3333333333333333 / y) * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.5e-74) || ~((y <= 1.72e-75))) tmp = x + ((y * -0.3333333333333333) / z); else tmp = (0.3333333333333333 / y) * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.5e-74], N[Not[LessEqual[y, 1.72e-75]], $MachinePrecision]], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 / y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{-74} \lor \neg \left(y \leq 1.72 \cdot 10^{-75}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{y} \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -3.50000000000000015e-74 or 1.72e-75 < y Initial program 97.6%
Simplified99.6%
Taylor expanded in y around inf 85.9%
associate-*l/85.9%
Applied egg-rr85.9%
if -3.50000000000000015e-74 < y < 1.72e-75Initial program 87.0%
associate-+l-87.0%
sub-neg87.0%
distribute-frac-neg87.0%
associate-/r*97.5%
neg-mul-197.5%
*-commutative97.5%
times-frac97.5%
metadata-eval97.5%
Simplified97.5%
Taylor expanded in y around 0 86.9%
+-commutative86.9%
metadata-eval86.9%
associate-/l/97.4%
cancel-sign-sub-inv97.4%
*-commutative97.4%
metadata-eval97.4%
times-frac97.4%
*-rgt-identity97.4%
*-commutative97.4%
associate-/l/86.9%
associate-/r*90.8%
metadata-eval90.8%
times-frac90.7%
*-rgt-identity90.7%
div-sub90.7%
Simplified90.7%
Taylor expanded in y around 0 60.7%
associate-*r/60.8%
associate-/r*64.6%
associate-*l/64.6%
associate-/l*70.4%
Simplified70.4%
div-inv70.3%
clear-num70.4%
Applied egg-rr70.4%
Final simplification80.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5e-74) (not (<= y 1e-75))) (- x (/ y (* z 3.0))) (* (/ 0.3333333333333333 y) (/ t z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5e-74) || !(y <= 1e-75)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = (0.3333333333333333 / y) * (t / 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 <= (-5d-74)) .or. (.not. (y <= 1d-75))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = (0.3333333333333333d0 / y) * (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5e-74) || !(y <= 1e-75)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = (0.3333333333333333 / y) * (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5e-74) or not (y <= 1e-75): tmp = x - (y / (z * 3.0)) else: tmp = (0.3333333333333333 / y) * (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5e-74) || !(y <= 1e-75)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(Float64(0.3333333333333333 / y) * Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -5e-74) || ~((y <= 1e-75))) tmp = x - (y / (z * 3.0)); else tmp = (0.3333333333333333 / y) * (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5e-74], N[Not[LessEqual[y, 1e-75]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 / y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{-74} \lor \neg \left(y \leq 10^{-75}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{y} \cdot \frac{t}{z}\\
\end{array}
\end{array}
if y < -4.99999999999999998e-74 or 9.9999999999999996e-76 < y Initial program 97.6%
associate-+l-97.6%
sub-neg97.6%
distribute-frac-neg97.6%
associate-/r*94.0%
neg-mul-194.0%
*-commutative94.0%
times-frac93.9%
metadata-eval93.9%
Simplified93.9%
Taylor expanded in y around 0 97.5%
+-commutative97.5%
metadata-eval97.5%
associate-/l/93.9%
cancel-sign-sub-inv93.9%
*-commutative93.9%
metadata-eval93.9%
times-frac93.9%
*-rgt-identity93.9%
*-commutative93.9%
associate-/l/97.6%
associate-/r*99.2%
metadata-eval99.2%
times-frac99.2%
*-rgt-identity99.2%
div-sub99.8%
Simplified99.8%
Taylor expanded in y around inf 86.1%
if -4.99999999999999998e-74 < y < 9.9999999999999996e-76Initial program 87.0%
associate-+l-87.0%
sub-neg87.0%
distribute-frac-neg87.0%
associate-/r*97.5%
neg-mul-197.5%
*-commutative97.5%
times-frac97.5%
metadata-eval97.5%
Simplified97.5%
Taylor expanded in y around 0 86.9%
+-commutative86.9%
metadata-eval86.9%
associate-/l/97.4%
cancel-sign-sub-inv97.4%
*-commutative97.4%
metadata-eval97.4%
times-frac97.4%
*-rgt-identity97.4%
*-commutative97.4%
associate-/l/86.9%
associate-/r*90.8%
metadata-eval90.8%
times-frac90.7%
*-rgt-identity90.7%
div-sub90.7%
Simplified90.7%
Taylor expanded in y around 0 60.7%
associate-*r/60.8%
associate-/r*64.6%
associate-*l/64.6%
associate-/l*70.4%
Simplified70.4%
div-inv70.3%
clear-num70.4%
Applied egg-rr70.4%
Final simplification80.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4e-74) (not (<= y 2.45e-74))) (- x (/ y (* z 3.0))) (/ (/ 0.3333333333333333 y) (/ z t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4e-74) || !(y <= 2.45e-74)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = (0.3333333333333333 / y) / (z / t);
}
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-74)) .or. (.not. (y <= 2.45d-74))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = (0.3333333333333333d0 / y) / (z / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4e-74) || !(y <= 2.45e-74)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = (0.3333333333333333 / y) / (z / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4e-74) or not (y <= 2.45e-74): tmp = x - (y / (z * 3.0)) else: tmp = (0.3333333333333333 / y) / (z / t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4e-74) || !(y <= 2.45e-74)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(Float64(0.3333333333333333 / y) / Float64(z / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4e-74) || ~((y <= 2.45e-74))) tmp = x - (y / (z * 3.0)); else tmp = (0.3333333333333333 / y) / (z / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4e-74], N[Not[LessEqual[y, 2.45e-74]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 / y), $MachinePrecision] / N[(z / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4 \cdot 10^{-74} \lor \neg \left(y \leq 2.45 \cdot 10^{-74}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{0.3333333333333333}{y}}{\frac{z}{t}}\\
\end{array}
\end{array}
if y < -3.99999999999999983e-74 or 2.4500000000000001e-74 < y Initial program 97.6%
associate-+l-97.6%
sub-neg97.6%
distribute-frac-neg97.6%
associate-/r*94.0%
neg-mul-194.0%
*-commutative94.0%
times-frac93.9%
metadata-eval93.9%
Simplified93.9%
Taylor expanded in y around 0 97.5%
+-commutative97.5%
metadata-eval97.5%
associate-/l/93.9%
cancel-sign-sub-inv93.9%
*-commutative93.9%
metadata-eval93.9%
times-frac93.9%
*-rgt-identity93.9%
*-commutative93.9%
associate-/l/97.6%
associate-/r*99.2%
metadata-eval99.2%
times-frac99.2%
*-rgt-identity99.2%
div-sub99.8%
Simplified99.8%
Taylor expanded in y around inf 86.1%
if -3.99999999999999983e-74 < y < 2.4500000000000001e-74Initial program 87.0%
associate-+l-87.0%
sub-neg87.0%
distribute-frac-neg87.0%
associate-/r*97.5%
neg-mul-197.5%
*-commutative97.5%
times-frac97.5%
metadata-eval97.5%
Simplified97.5%
Taylor expanded in y around 0 86.9%
+-commutative86.9%
metadata-eval86.9%
associate-/l/97.4%
cancel-sign-sub-inv97.4%
*-commutative97.4%
metadata-eval97.4%
times-frac97.4%
*-rgt-identity97.4%
*-commutative97.4%
associate-/l/86.9%
associate-/r*90.8%
metadata-eval90.8%
times-frac90.7%
*-rgt-identity90.7%
div-sub90.7%
Simplified90.7%
Taylor expanded in y around 0 60.7%
associate-*r/60.8%
associate-/r*64.6%
associate-*l/64.6%
associate-/l*70.4%
Simplified70.4%
Final simplification80.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.4e-74)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 7.2e-75)
(* (/ 0.3333333333333333 y) (/ t z))
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.4e-74) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 7.2e-75) {
tmp = (0.3333333333333333 / y) * (t / 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 (y <= (-4.4d-74)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 7.2d-75) then
tmp = (0.3333333333333333d0 / y) * (t / 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 (y <= -4.4e-74) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 7.2e-75) {
tmp = (0.3333333333333333 / y) * (t / z);
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.4e-74: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 7.2e-75: tmp = (0.3333333333333333 / y) * (t / z) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.4e-74) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 7.2e-75) tmp = Float64(Float64(0.3333333333333333 / y) * Float64(t / 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 (y <= -4.4e-74) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 7.2e-75) tmp = (0.3333333333333333 / y) * (t / z); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.4e-74], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-75], N[(N[(0.3333333333333333 / y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{-74}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-75}:\\
\;\;\;\;\frac{0.3333333333333333}{y} \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -4.40000000000000021e-74Initial program 97.0%
associate-+l-97.0%
sub-neg97.0%
distribute-frac-neg97.0%
associate-/r*94.1%
neg-mul-194.1%
*-commutative94.1%
times-frac94.1%
metadata-eval94.1%
Simplified94.1%
Taylor expanded in y around inf 88.5%
if -4.40000000000000021e-74 < y < 7.2000000000000001e-75Initial program 87.0%
associate-+l-87.0%
sub-neg87.0%
distribute-frac-neg87.0%
associate-/r*97.5%
neg-mul-197.5%
*-commutative97.5%
times-frac97.5%
metadata-eval97.5%
Simplified97.5%
Taylor expanded in y around 0 86.9%
+-commutative86.9%
metadata-eval86.9%
associate-/l/97.4%
cancel-sign-sub-inv97.4%
*-commutative97.4%
metadata-eval97.4%
times-frac97.4%
*-rgt-identity97.4%
*-commutative97.4%
associate-/l/86.9%
associate-/r*90.8%
metadata-eval90.8%
times-frac90.7%
*-rgt-identity90.7%
div-sub90.7%
Simplified90.7%
Taylor expanded in y around 0 60.7%
associate-*r/60.8%
associate-/r*64.6%
associate-*l/64.6%
associate-/l*70.4%
Simplified70.4%
div-inv70.3%
clear-num70.4%
Applied egg-rr70.4%
if 7.2000000000000001e-75 < y Initial program 98.3%
Simplified99.6%
Taylor expanded in y around inf 83.0%
associate-*l/83.1%
Applied egg-rr83.1%
Final simplification80.3%
(FPCore (x y z t) :precision binary64 (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) * (-0.3333333333333333 / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) * (-0.3333333333333333 / z));
}
def code(x, y, z, t): return x + ((y - (t / y)) * (-0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}
\end{array}
Initial program 93.8%
Simplified96.4%
Final simplification96.4%
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y (/ t y)) -0.3333333333333333) z)))
double code(double x, double y, double z, double t) {
return x + (((y - (t / y)) * -0.3333333333333333) / z);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((y - (t / y)) * (-0.3333333333333333d0)) / z)
end function
public static double code(double x, double y, double z, double t) {
return x + (((y - (t / y)) * -0.3333333333333333) / z);
}
def code(x, y, z, t): return x + (((y - (t / y)) * -0.3333333333333333) / z)
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(y - Float64(t / y)) * -0.3333333333333333) / z)) end
function tmp = code(x, y, z, t) tmp = x + (((y - (t / y)) * -0.3333333333333333) / z); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - \frac{t}{y}\right) \cdot -0.3333333333333333}{z}
\end{array}
Initial program 93.8%
Simplified96.4%
associate-*l/96.4%
Applied egg-rr96.4%
Final simplification96.4%
(FPCore (x y z t) :precision binary64 (+ x (/ (- (/ t y) y) (* z 3.0))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((t / y) - y) / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
def code(x, y, z, t): return x + (((t / y) - y) / (z * 3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Initial program 93.8%
associate-+l-93.8%
sub-neg93.8%
distribute-frac-neg93.8%
associate-/r*95.3%
neg-mul-195.3%
*-commutative95.3%
times-frac95.2%
metadata-eval95.2%
Simplified95.2%
Taylor expanded in y around 0 93.6%
+-commutative93.6%
metadata-eval93.6%
associate-/l/95.1%
cancel-sign-sub-inv95.1%
*-commutative95.1%
metadata-eval95.1%
times-frac95.2%
*-rgt-identity95.2%
*-commutative95.2%
associate-/l/93.7%
associate-/r*96.2%
metadata-eval96.2%
times-frac96.1%
*-rgt-identity96.1%
div-sub96.5%
Simplified96.5%
Final simplification96.5%
(FPCore (x y z t) :precision binary64 (if (<= z -2.25e+136) x (if (<= z 1.06e-10) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.25e+136) {
tmp = x;
} else if (z <= 1.06e-10) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-2.25d+136)) then
tmp = x
else if (z <= 1.06d-10) then
tmp = (-0.3333333333333333d0) * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.25e+136) {
tmp = x;
} else if (z <= 1.06e-10) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.25e+136: tmp = x elif z <= 1.06e-10: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.25e+136) tmp = x; elseif (z <= 1.06e-10) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.25e+136) tmp = x; elseif (z <= 1.06e-10) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.25e+136], x, If[LessEqual[z, 1.06e-10], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+136}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{-10}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.25e136 or 1.06e-10 < z Initial program 99.1%
Simplified91.5%
Taylor expanded in x around inf 56.8%
if -2.25e136 < z < 1.06e-10Initial program 90.2%
associate-+l-90.2%
sub-neg90.2%
distribute-frac-neg90.2%
associate-/r*93.6%
neg-mul-193.6%
*-commutative93.6%
times-frac93.6%
metadata-eval93.6%
Simplified93.6%
Taylor expanded in y around 0 90.1%
+-commutative90.1%
metadata-eval90.1%
associate-/l/93.5%
cancel-sign-sub-inv93.5%
*-commutative93.5%
metadata-eval93.5%
times-frac93.5%
*-rgt-identity93.5%
*-commutative93.5%
associate-/l/90.2%
associate-/r*99.2%
metadata-eval99.2%
times-frac99.1%
*-rgt-identity99.1%
div-sub99.8%
Simplified99.8%
Taylor expanded in y around inf 47.6%
Final simplification51.3%
(FPCore (x y z t) :precision binary64 (if (<= z -2.1e+136) x (if (<= z 1.2e-5) (/ y (* z -3.0)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e+136) {
tmp = x;
} else if (z <= 1.2e-5) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-2.1d+136)) then
tmp = x
else if (z <= 1.2d-5) then
tmp = y / (z * (-3.0d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.1e+136) {
tmp = x;
} else if (z <= 1.2e-5) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.1e+136: tmp = x elif z <= 1.2e-5: tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.1e+136) tmp = x; elseif (z <= 1.2e-5) tmp = Float64(y / Float64(z * -3.0)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.1e+136) tmp = x; elseif (z <= 1.2e-5) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.1e+136], x, If[LessEqual[z, 1.2e-5], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+136}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-5}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.0999999999999999e136 or 1.2e-5 < z Initial program 99.1%
Simplified91.5%
Taylor expanded in x around inf 56.8%
if -2.0999999999999999e136 < z < 1.2e-5Initial program 90.2%
associate-+l-90.2%
sub-neg90.2%
distribute-frac-neg90.2%
associate-/r*93.6%
neg-mul-193.6%
*-commutative93.6%
times-frac93.6%
metadata-eval93.6%
Simplified93.6%
Taylor expanded in y around 0 90.1%
+-commutative90.1%
metadata-eval90.1%
associate-/l/93.5%
cancel-sign-sub-inv93.5%
*-commutative93.5%
metadata-eval93.5%
times-frac93.5%
*-rgt-identity93.5%
*-commutative93.5%
associate-/l/90.2%
associate-/r*99.2%
metadata-eval99.2%
times-frac99.1%
*-rgt-identity99.1%
div-sub99.8%
Simplified99.8%
Taylor expanded in y around inf 59.6%
Taylor expanded in x around 0 47.6%
associate-*r/47.6%
associate-*l/47.6%
*-commutative47.6%
Simplified47.6%
Taylor expanded in y around 0 47.6%
associate-*r/47.6%
*-commutative47.6%
*-rgt-identity47.6%
associate-*r/47.6%
/-rgt-identity47.6%
associate-/l*47.7%
metadata-eval47.7%
associate-*l/47.7%
associate-*r/47.7%
*-rgt-identity47.7%
associate-/r*47.7%
Simplified47.7%
Final simplification51.3%
(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.8%
Simplified96.4%
Taylor expanded in x around inf 29.9%
Final simplification29.9%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2023308
(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))))