
(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 22 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 (or (<= z -2.8e+76) (not (<= z 7.5e-5)))
(+
(+ x (* -0.3333333333333333 (/ y z)))
(/ (* 0.3333333333333333 (/ t z)) y))
(+ x (/ (* -0.3333333333333333 (- y (/ t y))) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.8e+76) || !(z <= 7.5e-5)) {
tmp = (x + (-0.3333333333333333 * (y / z))) + ((0.3333333333333333 * (t / z)) / y);
} else {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-2.8d+76)) .or. (.not. (z <= 7.5d-5))) then
tmp = (x + ((-0.3333333333333333d0) * (y / z))) + ((0.3333333333333333d0 * (t / z)) / y)
else
tmp = x + (((-0.3333333333333333d0) * (y - (t / y))) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.8e+76) || !(z <= 7.5e-5)) {
tmp = (x + (-0.3333333333333333 * (y / z))) + ((0.3333333333333333 * (t / z)) / y);
} else {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.8e+76) or not (z <= 7.5e-5): tmp = (x + (-0.3333333333333333 * (y / z))) + ((0.3333333333333333 * (t / z)) / y) else: tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.8e+76) || !(z <= 7.5e-5)) tmp = Float64(Float64(x + Float64(-0.3333333333333333 * Float64(y / z))) + Float64(Float64(0.3333333333333333 * Float64(t / z)) / y)); else tmp = Float64(x + Float64(Float64(-0.3333333333333333 * Float64(y - Float64(t / y))) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.8e+76) || ~((z <= 7.5e-5))) tmp = (x + (-0.3333333333333333 * (y / z))) + ((0.3333333333333333 * (t / z)) / y); else tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.8e+76], N[Not[LessEqual[z, 7.5e-5]], $MachinePrecision]], N[(N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-0.3333333333333333 * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+76} \lor \neg \left(z \leq 7.5 \cdot 10^{-5}\right):\\
\;\;\;\;\left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\
\end{array}
\end{array}
if z < -2.7999999999999999e76 or 7.49999999999999934e-5 < z Initial program 99.0%
sub-neg99.0%
distribute-frac-neg99.0%
neg-mul-199.0%
*-commutative99.0%
times-frac99.0%
metadata-eval99.0%
associate-/l/88.9%
associate-/l/88.9%
Simplified88.9%
associate-/l/88.9%
*-un-lft-identity88.9%
times-frac88.9%
associate-/l/88.9%
times-frac99.0%
associate-*l*99.0%
*-commutative99.0%
times-frac97.3%
*-un-lft-identity97.3%
*-commutative97.3%
times-frac97.3%
metadata-eval97.3%
Applied egg-rr97.3%
associate-*l/97.4%
*-lft-identity97.4%
Simplified97.4%
if -2.7999999999999999e76 < z < 7.49999999999999934e-5Initial program 91.3%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))))) (if (<= t_1 2e+306) t_1 (/ 0.3333333333333333 (/ z (- (/ t y) y))))))
double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
double tmp;
if (t_1 <= 2e+306) {
tmp = t_1;
} else {
tmp = 0.3333333333333333 / (z / ((t / y) - 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) :: t_1
real(8) :: tmp
t_1 = (x - (y / (z * 3.0d0))) + (t / (y * (z * 3.0d0)))
if (t_1 <= 2d+306) then
tmp = t_1
else
tmp = 0.3333333333333333d0 / (z / ((t / y) - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0)));
double tmp;
if (t_1 <= 2e+306) {
tmp = t_1;
} else {
tmp = 0.3333333333333333 / (z / ((t / y) - y));
}
return tmp;
}
def code(x, y, z, t): t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))) tmp = 0 if t_1 <= 2e+306: tmp = t_1 else: tmp = 0.3333333333333333 / (z / ((t / y) - y)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) tmp = 0.0 if (t_1 <= 2e+306) tmp = t_1; else tmp = Float64(0.3333333333333333 / Float64(z / Float64(Float64(t / y) - y))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x - (y / (z * 3.0))) + (t / (y * (z * 3.0))); tmp = 0.0; if (t_1 <= 2e+306) tmp = t_1; else tmp = 0.3333333333333333 / (z / ((t / y) - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+306], t$95$1, N[(0.3333333333333333 / N[(z / N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{z}{\frac{t}{y} - y}}\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y))) < 2.00000000000000003e306Initial program 97.9%
if 2.00000000000000003e306 < (+.f64 (-.f64 x (/.f64 y (*.f64 z 3))) (/.f64 t (*.f64 (*.f64 z 3) y))) Initial program 79.8%
clear-num79.8%
inv-pow79.8%
*-commutative79.8%
*-un-lft-identity79.8%
times-frac79.8%
metadata-eval79.8%
Applied egg-rr79.8%
unpow-179.8%
Simplified79.8%
Taylor expanded in x around 0 79.8%
associate-/r*90.6%
associate-*r/90.6%
associate-*r/90.6%
div-sub99.9%
distribute-lft-out--99.9%
associate-/l*99.9%
Simplified99.9%
Final simplification98.2%
(FPCore (x y z t)
:precision binary64
(if (or (<= z -6.3e+75) (not (<= z 3.2e-5)))
(+
(+ x (* -0.3333333333333333 (/ y z)))
(* (/ t z) (/ 0.3333333333333333 y)))
(+ x (/ (* -0.3333333333333333 (- y (/ t y))) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.3e+75) || !(z <= 3.2e-5)) {
tmp = (x + (-0.3333333333333333 * (y / z))) + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z <= (-6.3d+75)) .or. (.not. (z <= 3.2d-5))) then
tmp = (x + ((-0.3333333333333333d0) * (y / z))) + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x + (((-0.3333333333333333d0) * (y - (t / y))) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -6.3e+75) || !(z <= 3.2e-5)) {
tmp = (x + (-0.3333333333333333 * (y / z))) + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -6.3e+75) or not (z <= 3.2e-5): tmp = (x + (-0.3333333333333333 * (y / z))) + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -6.3e+75) || !(z <= 3.2e-5)) tmp = Float64(Float64(x + Float64(-0.3333333333333333 * Float64(y / z))) + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x + Float64(Float64(-0.3333333333333333 * Float64(y - Float64(t / y))) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -6.3e+75) || ~((z <= 3.2e-5))) tmp = (x + (-0.3333333333333333 * (y / z))) + ((t / z) * (0.3333333333333333 / y)); else tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -6.3e+75], N[Not[LessEqual[z, 3.2e-5]], $MachinePrecision]], N[(N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-0.3333333333333333 * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.3 \cdot 10^{+75} \lor \neg \left(z \leq 3.2 \cdot 10^{-5}\right):\\
\;\;\;\;\left(x + -0.3333333333333333 \cdot \frac{y}{z}\right) + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}\\
\end{array}
\end{array}
if z < -6.30000000000000036e75 or 3.19999999999999986e-5 < z Initial program 99.0%
sub-neg99.0%
distribute-frac-neg99.0%
neg-mul-199.0%
*-commutative99.0%
times-frac99.0%
metadata-eval99.0%
associate-/l/88.9%
associate-/l/88.9%
Simplified88.9%
associate-/l/88.9%
div-inv88.9%
times-frac97.4%
Applied egg-rr97.4%
Taylor expanded in y around 0 97.3%
if -6.30000000000000036e75 < z < 3.19999999999999986e-5Initial program 91.3%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Final simplification98.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.3e-24)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 5.5e+26)
(+ x (/ (* t (/ 0.3333333333333333 z)) y))
(if (<= y 4.5e+130)
(* 0.3333333333333333 (/ (- (/ t y) y) z))
(+ x (* y (/ 1.0 (/ z -0.3333333333333333))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.3e-24) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 5.5e+26) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else if (y <= 4.5e+130) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} else {
tmp = x + (y * (1.0 / (z / -0.3333333333333333)));
}
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.3d-24)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 5.5d+26) then
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
else if (y <= 4.5d+130) then
tmp = 0.3333333333333333d0 * (((t / y) - y) / z)
else
tmp = x + (y * (1.0d0 / (z / (-0.3333333333333333d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.3e-24) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 5.5e+26) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else if (y <= 4.5e+130) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} else {
tmp = x + (y * (1.0 / (z / -0.3333333333333333)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.3e-24: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 5.5e+26: tmp = x + ((t * (0.3333333333333333 / z)) / y) elif y <= 4.5e+130: tmp = 0.3333333333333333 * (((t / y) - y) / z) else: tmp = x + (y * (1.0 / (z / -0.3333333333333333))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.3e-24) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 5.5e+26) tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); elseif (y <= 4.5e+130) tmp = Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z)); else tmp = Float64(x + Float64(y * Float64(1.0 / Float64(z / -0.3333333333333333)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.3e-24) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 5.5e+26) tmp = x + ((t * (0.3333333333333333 / z)) / y); elseif (y <= 4.5e+130) tmp = 0.3333333333333333 * (((t / y) - y) / z); else tmp = x + (y * (1.0 / (z / -0.3333333333333333))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.3e-24], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+26], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+130], N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-24}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+130}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{1}{\frac{z}{-0.3333333333333333}}\\
\end{array}
\end{array}
if y < -3.29999999999999984e-24Initial program 98.6%
Taylor expanded in t around 0 91.3%
if -3.29999999999999984e-24 < y < 5.4999999999999997e26Initial program 93.4%
Simplified89.2%
Taylor expanded in y around 0 87.2%
associate-/r*83.7%
associate-*r/83.7%
*-commutative83.7%
associate-*r/83.7%
Simplified83.7%
associate-*l/91.9%
Applied egg-rr91.9%
if 5.4999999999999997e26 < y < 4.50000000000000039e130Initial program 87.1%
clear-num86.9%
inv-pow86.9%
*-commutative86.9%
*-un-lft-identity86.9%
times-frac87.1%
metadata-eval87.1%
Applied egg-rr87.1%
unpow-187.1%
Simplified87.1%
expm1-log1p-u69.3%
expm1-udef9.4%
Applied egg-rr9.4%
expm1-def69.3%
expm1-log1p87.1%
*-commutative87.1%
associate-/r/87.1%
Simplified87.1%
Taylor expanded in x around 0 74.3%
distribute-lft-out--74.3%
associate-/r*78.0%
div-sub86.6%
Simplified86.6%
if 4.50000000000000039e130 < y Initial program 96.6%
Simplified99.7%
Taylor expanded in y around inf 99.7%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Final simplification92.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.3e-24)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 1.5e+25)
(+ x (/ (* t (/ 0.3333333333333333 z)) y))
(if (<= y 4.5e+134)
(/ 0.3333333333333333 (/ z (- (/ t y) y)))
(+ x (* y (/ 1.0 (/ z -0.3333333333333333))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.3e-24) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.5e+25) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else if (y <= 4.5e+134) {
tmp = 0.3333333333333333 / (z / ((t / y) - y));
} else {
tmp = x + (y * (1.0 / (z / -0.3333333333333333)));
}
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.3d-24)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 1.5d+25) then
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
else if (y <= 4.5d+134) then
tmp = 0.3333333333333333d0 / (z / ((t / y) - y))
else
tmp = x + (y * (1.0d0 / (z / (-0.3333333333333333d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.3e-24) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.5e+25) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else if (y <= 4.5e+134) {
tmp = 0.3333333333333333 / (z / ((t / y) - y));
} else {
tmp = x + (y * (1.0 / (z / -0.3333333333333333)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.3e-24: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 1.5e+25: tmp = x + ((t * (0.3333333333333333 / z)) / y) elif y <= 4.5e+134: tmp = 0.3333333333333333 / (z / ((t / y) - y)) else: tmp = x + (y * (1.0 / (z / -0.3333333333333333))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.3e-24) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 1.5e+25) tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); elseif (y <= 4.5e+134) tmp = Float64(0.3333333333333333 / Float64(z / Float64(Float64(t / y) - y))); else tmp = Float64(x + Float64(y * Float64(1.0 / Float64(z / -0.3333333333333333)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.3e-24) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 1.5e+25) tmp = x + ((t * (0.3333333333333333 / z)) / y); elseif (y <= 4.5e+134) tmp = 0.3333333333333333 / (z / ((t / y) - y)); else tmp = x + (y * (1.0 / (z / -0.3333333333333333))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.3e-24], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+25], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+134], N[(0.3333333333333333 / N[(z / N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(1.0 / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-24}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+25}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+134}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{z}{\frac{t}{y} - y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{1}{\frac{z}{-0.3333333333333333}}\\
\end{array}
\end{array}
if y < -3.29999999999999984e-24Initial program 98.6%
Taylor expanded in t around 0 91.3%
if -3.29999999999999984e-24 < y < 1.50000000000000003e25Initial program 93.4%
Simplified89.2%
Taylor expanded in y around 0 87.2%
associate-/r*83.7%
associate-*r/83.7%
*-commutative83.7%
associate-*r/83.7%
Simplified83.7%
associate-*l/91.9%
Applied egg-rr91.9%
if 1.50000000000000003e25 < y < 4.4999999999999997e134Initial program 87.1%
clear-num86.9%
inv-pow86.9%
*-commutative86.9%
*-un-lft-identity86.9%
times-frac87.1%
metadata-eval87.1%
Applied egg-rr87.1%
unpow-187.1%
Simplified87.1%
Taylor expanded in x around 0 74.3%
associate-/r*78.0%
associate-*r/78.0%
associate-*r/78.1%
div-sub86.8%
distribute-lft-out--86.8%
associate-/l*86.7%
Simplified86.7%
if 4.4999999999999997e134 < y Initial program 96.6%
Simplified99.7%
Taylor expanded in y around inf 99.7%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Final simplification92.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -7e-26)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 1.55e+26)
(+ x (/ (* t (/ 0.3333333333333333 z)) y))
(if (<= y 3.5e+130)
(/ (* 0.3333333333333333 (- (/ t y) y)) z)
(+ x (* y (/ 1.0 (/ z -0.3333333333333333))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e-26) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.55e+26) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else if (y <= 3.5e+130) {
tmp = (0.3333333333333333 * ((t / y) - y)) / z;
} else {
tmp = x + (y * (1.0 / (z / -0.3333333333333333)));
}
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 <= (-7d-26)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 1.55d+26) then
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
else if (y <= 3.5d+130) then
tmp = (0.3333333333333333d0 * ((t / y) - y)) / z
else
tmp = x + (y * (1.0d0 / (z / (-0.3333333333333333d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7e-26) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.55e+26) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else if (y <= 3.5e+130) {
tmp = (0.3333333333333333 * ((t / y) - y)) / z;
} else {
tmp = x + (y * (1.0 / (z / -0.3333333333333333)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7e-26: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 1.55e+26: tmp = x + ((t * (0.3333333333333333 / z)) / y) elif y <= 3.5e+130: tmp = (0.3333333333333333 * ((t / y) - y)) / z else: tmp = x + (y * (1.0 / (z / -0.3333333333333333))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7e-26) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 1.55e+26) tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); elseif (y <= 3.5e+130) tmp = Float64(Float64(0.3333333333333333 * Float64(Float64(t / y) - y)) / z); else tmp = Float64(x + Float64(y * Float64(1.0 / Float64(z / -0.3333333333333333)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7e-26) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 1.55e+26) tmp = x + ((t * (0.3333333333333333 / z)) / y); elseif (y <= 3.5e+130) tmp = (0.3333333333333333 * ((t / y) - y)) / z; else tmp = x + (y * (1.0 / (z / -0.3333333333333333))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7e-26], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e+26], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.5e+130], N[(N[(0.3333333333333333 * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x + N[(y * N[(1.0 / N[(z / -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-26}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+130}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \left(\frac{t}{y} - y\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{1}{\frac{z}{-0.3333333333333333}}\\
\end{array}
\end{array}
if y < -6.9999999999999997e-26Initial program 98.6%
Taylor expanded in t around 0 91.3%
if -6.9999999999999997e-26 < y < 1.55e26Initial program 93.4%
Simplified89.2%
Taylor expanded in y around 0 87.2%
associate-/r*83.7%
associate-*r/83.7%
*-commutative83.7%
associate-*r/83.7%
Simplified83.7%
associate-*l/91.9%
Applied egg-rr91.9%
if 1.55e26 < y < 3.5000000000000001e130Initial program 87.1%
clear-num86.9%
inv-pow86.9%
*-commutative86.9%
*-un-lft-identity86.9%
times-frac87.1%
metadata-eval87.1%
Applied egg-rr87.1%
unpow-187.1%
Simplified87.1%
Taylor expanded in x around 0 74.3%
associate-/r*78.0%
associate-*r/78.0%
associate-*r/78.1%
div-sub86.8%
distribute-lft-out--86.8%
Simplified86.8%
if 3.5000000000000001e130 < y Initial program 96.6%
Simplified99.7%
Taylor expanded in y around inf 99.7%
clear-num99.8%
inv-pow99.8%
Applied egg-rr99.8%
unpow-199.8%
Simplified99.8%
Final simplification92.2%
(FPCore (x y z t)
:precision binary64
(if (<= z -1.42e-61)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= z 8.6e+116)
(* 0.3333333333333333 (/ (- (/ t y) y) z))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.42e-61) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (z <= 8.6e+116) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1.42d-61)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (z <= 8.6d+116) then
tmp = 0.3333333333333333d0 * (((t / y) - y) / z)
else
tmp = x - (0.3333333333333333d0 * (y / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.42e-61) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (z <= 8.6e+116) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1.42e-61: tmp = x + ((y * -0.3333333333333333) / z) elif z <= 8.6e+116: tmp = 0.3333333333333333 * (((t / y) - y) / z) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1.42e-61) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (z <= 8.6e+116) tmp = Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z)); else tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1.42e-61) tmp = x + ((y * -0.3333333333333333) / z); elseif (z <= 8.6e+116) tmp = 0.3333333333333333 * (((t / y) - y) / z); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.42e-61], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.6e+116], N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.42 \cdot 10^{-61}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;z \leq 8.6 \cdot 10^{+116}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < -1.42e-61Initial program 98.8%
Simplified90.9%
Taylor expanded in y around inf 77.8%
associate-*l/77.8%
Applied egg-rr77.8%
if -1.42e-61 < z < 8.6e116Initial program 91.0%
clear-num91.0%
inv-pow91.0%
*-commutative91.0%
*-un-lft-identity91.0%
times-frac91.0%
metadata-eval91.0%
Applied egg-rr91.0%
unpow-191.0%
Simplified91.0%
expm1-log1p-u77.5%
expm1-udef29.9%
Applied egg-rr29.9%
expm1-def77.5%
expm1-log1p91.0%
*-commutative91.0%
associate-/r/91.0%
Simplified91.0%
Taylor expanded in x around 0 82.4%
distribute-lft-out--82.4%
associate-/r*87.1%
div-sub90.1%
Simplified90.1%
if 8.6e116 < z Initial program 99.8%
Taylor expanded in t around 0 80.5%
Final simplification84.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.3e-34)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 1.5e+28)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.3e-34) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.5e+28) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.3d-34)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 1.5d+28) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
else
tmp = x + ((y * (-0.3333333333333333d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.3e-34) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.5e+28) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.3e-34: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 1.5e+28: tmp = x + (0.3333333333333333 * (t / (y * z))) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.3e-34) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 1.5e+28) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); else tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.3e-34) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 1.5e+28) tmp = x + (0.3333333333333333 * (t / (y * z))); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.3e-34], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+28], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-34}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+28}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.30000000000000011e-34Initial program 98.6%
Taylor expanded in t around 0 91.3%
if -2.30000000000000011e-34 < y < 1.5e28Initial program 93.4%
Simplified89.3%
Taylor expanded in y around 0 87.3%
if 1.5e28 < y Initial program 92.4%
Simplified99.7%
Taylor expanded in y around inf 87.5%
associate-*l/87.5%
Applied egg-rr87.5%
Final simplification88.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.1e-24)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 2e+28)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(+ x (* y (* -0.3333333333333333 (/ 1.0 z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.1e-24) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 2e+28) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + (y * (-0.3333333333333333 * (1.0 / z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-3.1d-24)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 2d+28) then
tmp = x + (0.3333333333333333d0 * (t / (y * z)))
else
tmp = x + (y * ((-0.3333333333333333d0) * (1.0d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.1e-24) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 2e+28) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x + (y * (-0.3333333333333333 * (1.0 / z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.1e-24: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 2e+28: tmp = x + (0.3333333333333333 * (t / (y * z))) else: tmp = x + (y * (-0.3333333333333333 * (1.0 / z))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.1e-24) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 2e+28) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * z)))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 * Float64(1.0 / z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.1e-24) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 2e+28) tmp = x + (0.3333333333333333 * (t / (y * z))); else tmp = x + (y * (-0.3333333333333333 * (1.0 / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.1e-24], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+28], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{-24}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+28}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(-0.3333333333333333 \cdot \frac{1}{z}\right)\\
\end{array}
\end{array}
if y < -3.1e-24Initial program 98.6%
Taylor expanded in t around 0 91.3%
if -3.1e-24 < y < 1.99999999999999992e28Initial program 93.4%
Simplified89.3%
Taylor expanded in y around 0 87.3%
if 1.99999999999999992e28 < y Initial program 92.4%
Simplified99.7%
Taylor expanded in y around inf 87.5%
div-inv87.5%
Applied egg-rr87.5%
Final simplification88.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.2e-24)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 2.4e+28)
(+ x (/ (* t 0.3333333333333333) (* y z)))
(+ x (* y (* -0.3333333333333333 (/ 1.0 z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.2e-24) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 2.4e+28) {
tmp = x + ((t * 0.3333333333333333) / (y * z));
} else {
tmp = x + (y * (-0.3333333333333333 * (1.0 / z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-3.2d-24)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 2.4d+28) then
tmp = x + ((t * 0.3333333333333333d0) / (y * z))
else
tmp = x + (y * ((-0.3333333333333333d0) * (1.0d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.2e-24) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 2.4e+28) {
tmp = x + ((t * 0.3333333333333333) / (y * z));
} else {
tmp = x + (y * (-0.3333333333333333 * (1.0 / z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.2e-24: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 2.4e+28: tmp = x + ((t * 0.3333333333333333) / (y * z)) else: tmp = x + (y * (-0.3333333333333333 * (1.0 / z))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.2e-24) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 2.4e+28) tmp = Float64(x + Float64(Float64(t * 0.3333333333333333) / Float64(y * z))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 * Float64(1.0 / z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.2e-24) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 2.4e+28) tmp = x + ((t * 0.3333333333333333) / (y * z)); else tmp = x + (y * (-0.3333333333333333 * (1.0 / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.2e-24], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+28], N[(x + N[(N[(t * 0.3333333333333333), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 * N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-24}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+28}:\\
\;\;\;\;x + \frac{t \cdot 0.3333333333333333}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(-0.3333333333333333 \cdot \frac{1}{z}\right)\\
\end{array}
\end{array}
if y < -3.20000000000000012e-24Initial program 98.6%
Taylor expanded in t around 0 91.3%
if -3.20000000000000012e-24 < y < 2.39999999999999981e28Initial program 93.4%
Simplified89.3%
Taylor expanded in y around 0 87.3%
associate-/r*83.9%
associate-*r/83.9%
*-commutative83.9%
associate-*r/83.9%
Simplified83.9%
frac-times88.0%
Applied egg-rr88.0%
if 2.39999999999999981e28 < y Initial program 92.4%
Simplified99.7%
Taylor expanded in y around inf 87.5%
div-inv87.5%
Applied egg-rr87.5%
Final simplification89.0%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.4e-114) (not (<= y 2.75e-38))) (+ x (* y (/ -0.3333333333333333 z))) (* (/ t z) (/ 0.3333333333333333 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.4e-114) || !(y <= 2.75e-38)) {
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 <= (-3.4d-114)) .or. (.not. (y <= 2.75d-38))) 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 <= -3.4e-114) || !(y <= 2.75e-38)) {
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 <= -3.4e-114) or not (y <= 2.75e-38): 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 <= -3.4e-114) || !(y <= 2.75e-38)) 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 <= -3.4e-114) || ~((y <= 2.75e-38))) 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, -3.4e-114], N[Not[LessEqual[y, 2.75e-38]], $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 -3.4 \cdot 10^{-114} \lor \neg \left(y \leq 2.75 \cdot 10^{-38}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -3.39999999999999981e-114 or 2.75000000000000003e-38 < y Initial program 96.7%
Simplified99.1%
Taylor expanded in y around inf 86.3%
if -3.39999999999999981e-114 < y < 2.75000000000000003e-38Initial program 92.1%
clear-num92.1%
inv-pow92.1%
*-commutative92.1%
*-un-lft-identity92.1%
times-frac92.1%
metadata-eval92.1%
Applied egg-rr92.1%
unpow-192.1%
Simplified92.1%
expm1-log1p-u58.0%
expm1-udef47.0%
Applied egg-rr47.0%
expm1-def58.0%
expm1-log1p92.1%
*-commutative92.1%
associate-/r/92.0%
Simplified92.0%
Taylor expanded in y around 0 61.1%
associate-*r/61.9%
times-frac65.9%
*-commutative65.9%
Simplified65.9%
Final simplification78.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.8e-112) (not (<= y 7.9e-35))) (+ x (/ (* y -0.3333333333333333) z)) (* (/ t z) (/ 0.3333333333333333 y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.8e-112) || !(y <= 7.9e-35)) {
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 <= (-2.8d-112)) .or. (.not. (y <= 7.9d-35))) 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 <= -2.8e-112) || !(y <= 7.9e-35)) {
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 <= -2.8e-112) or not (y <= 7.9e-35): 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 <= -2.8e-112) || !(y <= 7.9e-35)) tmp = Float64(x + Float64(Float64(y * -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 <= -2.8e-112) || ~((y <= 7.9e-35))) 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, -2.8e-112], N[Not[LessEqual[y, 7.9e-35]], $MachinePrecision]], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{-112} \lor \neg \left(y \leq 7.9 \cdot 10^{-35}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -2.80000000000000023e-112 or 7.89999999999999983e-35 < y Initial program 96.7%
Simplified99.1%
Taylor expanded in y around inf 86.3%
associate-*l/86.3%
Applied egg-rr86.3%
if -2.80000000000000023e-112 < y < 7.89999999999999983e-35Initial program 92.1%
clear-num92.1%
inv-pow92.1%
*-commutative92.1%
*-un-lft-identity92.1%
times-frac92.1%
metadata-eval92.1%
Applied egg-rr92.1%
unpow-192.1%
Simplified92.1%
expm1-log1p-u58.0%
expm1-udef47.0%
Applied egg-rr47.0%
expm1-def58.0%
expm1-log1p92.1%
*-commutative92.1%
associate-/r/92.0%
Simplified92.0%
Taylor expanded in y around 0 61.1%
associate-*r/61.9%
times-frac65.9%
*-commutative65.9%
Simplified65.9%
Final simplification78.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.8e-25)
(* -0.3333333333333333 (/ y z))
(if (<= y 1.7e+28)
(* 0.3333333333333333 (/ t (* y z)))
(* y (/ -0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e-25) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 1.7e+28) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = 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.8d-25)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= 1.7d+28) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else
tmp = 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.8e-25) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 1.7e+28) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.8e-25: tmp = -0.3333333333333333 * (y / z) elif y <= 1.7e+28: tmp = 0.3333333333333333 * (t / (y * z)) else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.8e-25) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= 1.7e+28) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.8e-25) tmp = -0.3333333333333333 * (y / z); elseif (y <= 1.7e+28) tmp = 0.3333333333333333 * (t / (y * z)); else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.8e-25], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e+28], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-25}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+28}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -4.80000000000000018e-25Initial program 98.6%
clear-num98.5%
inv-pow98.5%
*-commutative98.5%
*-un-lft-identity98.5%
times-frac98.5%
metadata-eval98.5%
Applied egg-rr98.5%
unpow-198.5%
Simplified98.5%
Taylor expanded in y around inf 61.1%
*-commutative61.1%
Simplified61.1%
if -4.80000000000000018e-25 < y < 1.7e28Initial program 93.4%
clear-num93.4%
inv-pow93.4%
*-commutative93.4%
*-un-lft-identity93.4%
times-frac93.4%
metadata-eval93.4%
Applied egg-rr93.4%
unpow-193.4%
Simplified93.4%
expm1-log1p-u56.5%
expm1-udef43.5%
Applied egg-rr43.5%
expm1-def56.5%
expm1-log1p93.4%
*-commutative93.4%
associate-/r/93.4%
Simplified93.4%
Taylor expanded in y around 0 57.1%
if 1.7e28 < y Initial program 92.4%
clear-num92.2%
inv-pow92.2%
*-commutative92.2%
*-un-lft-identity92.2%
times-frac92.3%
metadata-eval92.3%
Applied egg-rr92.3%
unpow-192.3%
Simplified92.3%
Taylor expanded in x around 0 92.1%
associate--l+92.1%
associate-/r*93.8%
associate-*r/93.8%
associate-*r/94.0%
div-sub99.7%
distribute-lft-out--99.7%
Simplified99.7%
Taylor expanded in y around inf 69.2%
*-commutative69.2%
associate-*l/69.4%
associate-*r/69.4%
Simplified69.4%
Final simplification60.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.3e-24)
(* -0.3333333333333333 (/ y z))
(if (<= y 1.5e+28)
(* 0.3333333333333333 (/ (/ t z) y))
(* y (/ -0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.3e-24) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 1.5e+28) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = 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 <= (-3.3d-24)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= 1.5d+28) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else
tmp = 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 <= -3.3e-24) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 1.5e+28) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.3e-24: tmp = -0.3333333333333333 * (y / z) elif y <= 1.5e+28: tmp = 0.3333333333333333 * ((t / z) / y) else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.3e-24) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= 1.5e+28) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.3e-24) tmp = -0.3333333333333333 * (y / z); elseif (y <= 1.5e+28) tmp = 0.3333333333333333 * ((t / z) / y); else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.3e-24], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+28], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{-24}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+28}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -3.29999999999999984e-24Initial program 98.6%
clear-num98.5%
inv-pow98.5%
*-commutative98.5%
*-un-lft-identity98.5%
times-frac98.5%
metadata-eval98.5%
Applied egg-rr98.5%
unpow-198.5%
Simplified98.5%
Taylor expanded in y around inf 61.1%
*-commutative61.1%
Simplified61.1%
if -3.29999999999999984e-24 < y < 1.5e28Initial program 93.4%
clear-num93.4%
inv-pow93.4%
*-commutative93.4%
*-un-lft-identity93.4%
times-frac93.4%
metadata-eval93.4%
Applied egg-rr93.4%
unpow-193.4%
Simplified93.4%
Taylor expanded in x around 0 92.7%
associate--l+92.7%
associate-/r*89.2%
associate-*r/89.2%
associate-*r/89.2%
div-sub89.2%
distribute-lft-out--89.2%
Simplified89.2%
Taylor expanded in t around inf 57.1%
*-commutative57.1%
associate-/r*59.7%
Simplified59.7%
if 1.5e28 < y Initial program 92.4%
clear-num92.2%
inv-pow92.2%
*-commutative92.2%
*-un-lft-identity92.2%
times-frac92.3%
metadata-eval92.3%
Applied egg-rr92.3%
unpow-192.3%
Simplified92.3%
Taylor expanded in x around 0 92.1%
associate--l+92.1%
associate-/r*93.8%
associate-*r/93.8%
associate-*r/94.0%
div-sub99.7%
distribute-lft-out--99.7%
Simplified99.7%
Taylor expanded in y around inf 69.2%
*-commutative69.2%
associate-*l/69.4%
associate-*r/69.4%
Simplified69.4%
Final simplification62.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.8e-31)
(* -0.3333333333333333 (/ y z))
(if (<= y 1.5e+28)
(* (/ t z) (/ 0.3333333333333333 y))
(* y (/ -0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.8e-31) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 1.5e+28) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = 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 <= (-5.8d-31)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= 1.5d+28) then
tmp = (t / z) * (0.3333333333333333d0 / y)
else
tmp = 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 <= -5.8e-31) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 1.5e+28) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.8e-31: tmp = -0.3333333333333333 * (y / z) elif y <= 1.5e+28: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.8e-31) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= 1.5e+28) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.8e-31) tmp = -0.3333333333333333 * (y / z); elseif (y <= 1.5e+28) tmp = (t / z) * (0.3333333333333333 / y); else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.8e-31], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+28], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{-31}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+28}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.8000000000000001e-31Initial program 98.6%
clear-num98.5%
inv-pow98.5%
*-commutative98.5%
*-un-lft-identity98.5%
times-frac98.5%
metadata-eval98.5%
Applied egg-rr98.5%
unpow-198.5%
Simplified98.5%
Taylor expanded in y around inf 61.1%
*-commutative61.1%
Simplified61.1%
if -5.8000000000000001e-31 < y < 1.5e28Initial program 93.4%
clear-num93.4%
inv-pow93.4%
*-commutative93.4%
*-un-lft-identity93.4%
times-frac93.4%
metadata-eval93.4%
Applied egg-rr93.4%
unpow-193.4%
Simplified93.4%
expm1-log1p-u56.5%
expm1-udef43.5%
Applied egg-rr43.5%
expm1-def56.5%
expm1-log1p93.4%
*-commutative93.4%
associate-/r/93.4%
Simplified93.4%
Taylor expanded in y around 0 57.1%
associate-*r/57.7%
times-frac60.3%
*-commutative60.3%
Simplified60.3%
if 1.5e28 < y Initial program 92.4%
clear-num92.2%
inv-pow92.2%
*-commutative92.2%
*-un-lft-identity92.2%
times-frac92.3%
metadata-eval92.3%
Applied egg-rr92.3%
unpow-192.3%
Simplified92.3%
Taylor expanded in x around 0 92.1%
associate--l+92.1%
associate-/r*93.8%
associate-*r/93.8%
associate-*r/94.0%
div-sub99.7%
distribute-lft-out--99.7%
Simplified99.7%
Taylor expanded in y around inf 69.2%
*-commutative69.2%
associate-*l/69.4%
associate-*r/69.4%
Simplified69.4%
Final simplification62.4%
(FPCore (x y z t)
:precision binary64
(if (<= y -9.6e-105)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 1.75e-33)
(* (/ t z) (/ 0.3333333333333333 y))
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.6e-105) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.75e-33) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-9.6d-105)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 1.75d-33) then
tmp = (t / z) * (0.3333333333333333d0 / y)
else
tmp = x + ((y * (-0.3333333333333333d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -9.6e-105) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.75e-33) {
tmp = (t / z) * (0.3333333333333333 / y);
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -9.6e-105: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 1.75e-33: tmp = (t / z) * (0.3333333333333333 / y) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -9.6e-105) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 1.75e-33) tmp = Float64(Float64(t / z) * Float64(0.3333333333333333 / y)); else tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -9.6e-105) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 1.75e-33) tmp = (t / z) * (0.3333333333333333 / y); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -9.6e-105], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-33], N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{-105}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-33}:\\
\;\;\;\;\frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -9.6000000000000006e-105Initial program 98.7%
Taylor expanded in t around 0 88.0%
if -9.6000000000000006e-105 < y < 1.7499999999999999e-33Initial program 92.1%
clear-num92.1%
inv-pow92.1%
*-commutative92.1%
*-un-lft-identity92.1%
times-frac92.1%
metadata-eval92.1%
Applied egg-rr92.1%
unpow-192.1%
Simplified92.1%
expm1-log1p-u58.0%
expm1-udef47.0%
Applied egg-rr47.0%
expm1-def58.0%
expm1-log1p92.1%
*-commutative92.1%
associate-/r/92.0%
Simplified92.0%
Taylor expanded in y around 0 61.1%
associate-*r/61.9%
times-frac65.9%
*-commutative65.9%
Simplified65.9%
if 1.7499999999999999e-33 < y Initial program 93.7%
Simplified99.8%
Taylor expanded in y around inf 83.9%
associate-*l/83.9%
Applied egg-rr83.9%
Final simplification78.4%
(FPCore (x y z t) :precision binary64 (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))))
double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((-0.3333333333333333d0) * ((y - (t / y)) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
def code(x, y, z, t): return x + (-0.3333333333333333 * ((y - (t / y)) / z))
function code(x, y, z, t) return Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))) end
function tmp = code(x, y, z, t) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); end
code[x_, y_, z_, t_] := N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}
\end{array}
Initial program 94.9%
Simplified94.7%
Taylor expanded in z around 0 94.7%
Final simplification94.7%
(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 94.9%
Simplified94.7%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (+ x (/ (* -0.3333333333333333 (- y (/ t y))) z)))
double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 * (y - (t / y))) / z);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (((-0.3333333333333333d0) * (y - (t / y))) / z)
end function
public static double code(double x, double y, double z, double t) {
return x + ((-0.3333333333333333 * (y - (t / y))) / z);
}
def code(x, y, z, t): return x + ((-0.3333333333333333 * (y - (t / y))) / z)
function code(x, y, z, t) return Float64(x + Float64(Float64(-0.3333333333333333 * Float64(y - Float64(t / y))) / z)) end
function tmp = code(x, y, z, t) tmp = x + ((-0.3333333333333333 * (y - (t / y))) / z); end
code[x_, y_, z_, t_] := N[(x + N[(N[(-0.3333333333333333 * N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{-0.3333333333333333 \cdot \left(y - \frac{t}{y}\right)}{z}
\end{array}
Initial program 94.9%
Simplified94.7%
associate-*l/94.7%
Applied egg-rr94.7%
Final simplification94.7%
(FPCore (x y z t) :precision binary64 (if (<= z -9.4e+89) x (if (<= z 4e+15) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -9.4e+89) {
tmp = x;
} else if (z <= 4e+15) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-9.4d+89)) then
tmp = x
else if (z <= 4d+15) then
tmp = y * ((-0.3333333333333333d0) / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -9.4e+89) {
tmp = x;
} else if (z <= 4e+15) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -9.4e+89: tmp = x elif z <= 4e+15: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -9.4e+89) tmp = x; elseif (z <= 4e+15) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -9.4e+89) tmp = x; elseif (z <= 4e+15) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -9.4e+89], x, If[LessEqual[z, 4e+15], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.4 \cdot 10^{+89}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+15}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -9.40000000000000043e89 or 4e15 < z Initial program 98.9%
Simplified88.2%
Taylor expanded in x around inf 57.4%
if -9.40000000000000043e89 < z < 4e15Initial program 92.1%
clear-num92.0%
inv-pow92.0%
*-commutative92.0%
*-un-lft-identity92.0%
times-frac92.1%
metadata-eval92.1%
Applied egg-rr92.1%
unpow-192.1%
Simplified92.1%
Taylor expanded in x around 0 91.4%
associate--l+91.4%
associate-/r*96.5%
associate-*r/96.5%
associate-*r/96.6%
div-sub99.2%
distribute-lft-out--99.2%
Simplified99.2%
Taylor expanded in y around inf 49.8%
*-commutative49.8%
associate-*l/49.9%
associate-*r/49.8%
Simplified49.8%
Final simplification52.9%
(FPCore (x y z t) :precision binary64 (if (<= z -1e+92) x (if (<= z 1.16e+21) (/ (* y -0.3333333333333333) z) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1e+92) {
tmp = x;
} else if (z <= 1.16e+21) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (z <= (-1d+92)) then
tmp = x
else if (z <= 1.16d+21) then
tmp = (y * (-0.3333333333333333d0)) / z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1e+92) {
tmp = x;
} else if (z <= 1.16e+21) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1e+92: tmp = x elif z <= 1.16e+21: tmp = (y * -0.3333333333333333) / z else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1e+92) tmp = x; elseif (z <= 1.16e+21) tmp = Float64(Float64(y * -0.3333333333333333) / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1e+92) tmp = x; elseif (z <= 1.16e+21) tmp = (y * -0.3333333333333333) / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1e+92], x, If[LessEqual[z, 1.16e+21], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+92}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.16 \cdot 10^{+21}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1e92 or 1.16e21 < z Initial program 98.9%
Simplified88.2%
Taylor expanded in x around inf 57.4%
if -1e92 < z < 1.16e21Initial program 92.1%
clear-num92.0%
inv-pow92.0%
*-commutative92.0%
*-un-lft-identity92.0%
times-frac92.1%
metadata-eval92.1%
Applied egg-rr92.1%
unpow-192.1%
Simplified92.1%
Taylor expanded in x around 0 82.0%
associate-/r*86.5%
associate-*r/86.5%
associate-*r/86.6%
div-sub89.2%
distribute-lft-out--89.2%
Simplified89.2%
Taylor expanded in t around 0 49.9%
*-commutative49.9%
Simplified49.9%
Final simplification52.9%
(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 94.9%
Simplified94.7%
Taylor expanded in x around inf 29.8%
Final simplification29.8%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2023290
(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))))