
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ t y) y)))
(if (<= y -1.8e-5)
(+ x (/ (* t_1 0.3333333333333333) z))
(if (<= y 3.3e-132)
(+ x (/ (/ (/ t 3.0) z) y))
(+ x (* t_1 (/ 0.3333333333333333 z)))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -1.8e-5) {
tmp = x + ((t_1 * 0.3333333333333333) / z);
} else if (y <= 3.3e-132) {
tmp = x + (((t / 3.0) / z) / y);
} else {
tmp = x + (t_1 * (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) :: t_1
real(8) :: tmp
t_1 = (t / y) - y
if (y <= (-1.8d-5)) then
tmp = x + ((t_1 * 0.3333333333333333d0) / z)
else if (y <= 3.3d-132) then
tmp = x + (((t / 3.0d0) / z) / y)
else
tmp = x + (t_1 * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -1.8e-5) {
tmp = x + ((t_1 * 0.3333333333333333) / z);
} else if (y <= 3.3e-132) {
tmp = x + (((t / 3.0) / z) / y);
} else {
tmp = x + (t_1 * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / y) - y tmp = 0 if y <= -1.8e-5: tmp = x + ((t_1 * 0.3333333333333333) / z) elif y <= 3.3e-132: tmp = x + (((t / 3.0) / z) / y) else: tmp = x + (t_1 * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / y) - y) tmp = 0.0 if (y <= -1.8e-5) tmp = Float64(x + Float64(Float64(t_1 * 0.3333333333333333) / z)); elseif (y <= 3.3e-132) tmp = Float64(x + Float64(Float64(Float64(t / 3.0) / z) / y)); else tmp = Float64(x + Float64(t_1 * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / y) - y; tmp = 0.0; if (y <= -1.8e-5) tmp = x + ((t_1 * 0.3333333333333333) / z); elseif (y <= 3.3e-132) tmp = x + (((t / 3.0) / z) / y); else tmp = x + (t_1 * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[y, -1.8e-5], N[(x + N[(N[(t$95$1 * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e-132], N[(x + N[(N[(N[(t / 3.0), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{y} - y\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{-5}:\\
\;\;\;\;x + \frac{t\_1 \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-132}:\\
\;\;\;\;x + \frac{\frac{\frac{t}{3}}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1 \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.80000000000000005e-5Initial program 96.4%
sub-neg96.4%
associate-+l+96.4%
+-commutative96.4%
remove-double-neg96.4%
distribute-frac-neg96.4%
distribute-neg-in96.4%
remove-double-neg96.4%
sub-neg96.4%
neg-mul-196.4%
times-frac96.4%
distribute-frac-neg96.4%
neg-mul-196.4%
*-commutative96.4%
associate-/l*96.3%
*-commutative96.3%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
if -1.80000000000000005e-5 < y < 3.2999999999999997e-132Initial program 94.0%
sub-neg94.0%
associate-+l+94.0%
+-commutative94.0%
remove-double-neg94.0%
distribute-frac-neg94.0%
distribute-neg-in94.0%
remove-double-neg94.0%
sub-neg94.0%
neg-mul-194.0%
times-frac90.3%
distribute-frac-neg90.3%
neg-mul-190.3%
*-commutative90.3%
associate-/l*90.3%
*-commutative90.3%
Simplified90.2%
Taylor expanded in t around inf 94.0%
clear-num94.0%
inv-pow94.0%
Applied egg-rr94.0%
unpow-194.0%
associate-/l*98.7%
Simplified98.7%
associate-*r/94.0%
clear-num94.0%
associate-/l*94.0%
*-commutative94.0%
frac-times90.2%
associate-*l/98.8%
Applied egg-rr98.8%
metadata-eval98.8%
associate-/r*98.8%
*-commutative98.8%
un-div-inv98.7%
Applied egg-rr98.7%
*-commutative98.7%
associate-/r*98.9%
Simplified98.9%
if 3.2999999999999997e-132 < y Initial program 98.8%
sub-neg98.8%
associate-+l+98.8%
+-commutative98.8%
remove-double-neg98.8%
distribute-frac-neg98.8%
distribute-neg-in98.8%
remove-double-neg98.8%
sub-neg98.8%
neg-mul-198.8%
times-frac98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.7%
*-commutative98.7%
Simplified99.8%
Final simplification99.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ -0.3333333333333333 (/ z y))))
(if (<= y -2.1e+71)
t_1
(if (<= y -4.2e-8)
x
(if (<= y 2.9e-91)
(* 0.3333333333333333 (/ (/ t z) y))
(if (<= y 68000000000000.0) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 / (z / y);
double tmp;
if (y <= -2.1e+71) {
tmp = t_1;
} else if (y <= -4.2e-8) {
tmp = x;
} else if (y <= 2.9e-91) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 68000000000000.0) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (-0.3333333333333333d0) / (z / y)
if (y <= (-2.1d+71)) then
tmp = t_1
else if (y <= (-4.2d-8)) then
tmp = x
else if (y <= 2.9d-91) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else if (y <= 68000000000000.0d0) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 / (z / y);
double tmp;
if (y <= -2.1e+71) {
tmp = t_1;
} else if (y <= -4.2e-8) {
tmp = x;
} else if (y <= 2.9e-91) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 68000000000000.0) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -0.3333333333333333 / (z / y) tmp = 0 if y <= -2.1e+71: tmp = t_1 elif y <= -4.2e-8: tmp = x elif y <= 2.9e-91: tmp = 0.3333333333333333 * ((t / z) / y) elif y <= 68000000000000.0: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-0.3333333333333333 / Float64(z / y)) tmp = 0.0 if (y <= -2.1e+71) tmp = t_1; elseif (y <= -4.2e-8) tmp = x; elseif (y <= 2.9e-91) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); elseif (y <= 68000000000000.0) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -0.3333333333333333 / (z / y); tmp = 0.0; if (y <= -2.1e+71) tmp = t_1; elseif (y <= -4.2e-8) tmp = x; elseif (y <= 2.9e-91) tmp = 0.3333333333333333 * ((t / z) / y); elseif (y <= 68000000000000.0) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+71], t$95$1, If[LessEqual[y, -4.2e-8], x, If[LessEqual[y, 2.9e-91], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 68000000000000.0], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-8}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-91}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{elif}\;y \leq 68000000000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.09999999999999989e71 or 6.8e13 < y Initial program 97.1%
Taylor expanded in t around 0 96.0%
Taylor expanded in x around 0 67.8%
clear-num67.8%
un-div-inv68.0%
Applied egg-rr68.0%
if -2.09999999999999989e71 < y < -4.19999999999999989e-8 or 2.9000000000000001e-91 < y < 6.8e13Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
+-commutative99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
sub-neg99.9%
neg-mul-199.9%
times-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 67.7%
if -4.19999999999999989e-8 < y < 2.9000000000000001e-91Initial program 94.6%
sub-neg94.6%
associate-+l+94.6%
+-commutative94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
distribute-neg-in94.6%
remove-double-neg94.6%
sub-neg94.6%
neg-mul-194.6%
times-frac91.3%
distribute-frac-neg91.3%
neg-mul-191.3%
*-commutative91.3%
associate-/l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in t around inf 93.7%
Taylor expanded in x around 0 71.4%
*-lft-identity71.4%
times-frac74.8%
associate-*l/74.8%
*-lft-identity74.8%
Simplified74.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ -0.3333333333333333 (/ z y))))
(if (<= y -2.6e+71)
t_1
(if (<= y -2.6e-7)
x
(if (<= y 4.8e-90)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 1.9e+14) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 / (z / y);
double tmp;
if (y <= -2.6e+71) {
tmp = t_1;
} else if (y <= -2.6e-7) {
tmp = x;
} else if (y <= 4.8e-90) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.9e+14) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (-0.3333333333333333d0) / (z / y)
if (y <= (-2.6d+71)) then
tmp = t_1
else if (y <= (-2.6d-7)) then
tmp = x
else if (y <= 4.8d-90) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 1.9d+14) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -0.3333333333333333 / (z / y);
double tmp;
if (y <= -2.6e+71) {
tmp = t_1;
} else if (y <= -2.6e-7) {
tmp = x;
} else if (y <= 4.8e-90) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.9e+14) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -0.3333333333333333 / (z / y) tmp = 0 if y <= -2.6e+71: tmp = t_1 elif y <= -2.6e-7: tmp = x elif y <= 4.8e-90: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 1.9e+14: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-0.3333333333333333 / Float64(z / y)) tmp = 0.0 if (y <= -2.6e+71) tmp = t_1; elseif (y <= -2.6e-7) tmp = x; elseif (y <= 4.8e-90) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 1.9e+14) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -0.3333333333333333 / (z / y); tmp = 0.0; if (y <= -2.6e+71) tmp = t_1; elseif (y <= -2.6e-7) tmp = x; elseif (y <= 4.8e-90) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 1.9e+14) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e+71], t$95$1, If[LessEqual[y, -2.6e-7], x, If[LessEqual[y, 4.8e-90], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+14], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.6 \cdot 10^{-7}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-90}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.59999999999999991e71 or 1.9e14 < y Initial program 97.1%
Taylor expanded in t around 0 96.0%
Taylor expanded in x around 0 67.8%
clear-num67.8%
un-div-inv68.0%
Applied egg-rr68.0%
if -2.59999999999999991e71 < y < -2.59999999999999999e-7 or 4.8000000000000003e-90 < y < 1.9e14Initial program 99.9%
sub-neg99.9%
associate-+l+99.9%
+-commutative99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
sub-neg99.9%
neg-mul-199.9%
times-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 67.7%
if -2.59999999999999999e-7 < y < 4.8000000000000003e-90Initial program 94.6%
sub-neg94.6%
associate-+l+94.6%
+-commutative94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
distribute-neg-in94.6%
remove-double-neg94.6%
sub-neg94.6%
neg-mul-194.6%
times-frac91.3%
distribute-frac-neg91.3%
neg-mul-191.3%
*-commutative91.3%
associate-/l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in t around inf 93.7%
Taylor expanded in x around 0 71.4%
Final simplification69.4%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -1e-126) (+ (+ (/ t (* z (* 3.0 y))) x) (/ (/ y -3.0) z)) (+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -1e-126) {
tmp = ((t / (z * (3.0 * y))) + x) + ((y / -3.0) / z);
} else {
tmp = x + (((t / y) - 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) <= (-1d-126)) then
tmp = ((t / (z * (3.0d0 * y))) + x) + ((y / (-3.0d0)) / z)
else
tmp = x + (((t / y) - 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) <= -1e-126) {
tmp = ((t / (z * (3.0 * y))) + x) + ((y / -3.0) / z);
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -1e-126: tmp = ((t / (z * (3.0 * y))) + x) + ((y / -3.0) / z) else: tmp = x + (((t / y) - y) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -1e-126) tmp = Float64(Float64(Float64(t / Float64(z * Float64(3.0 * y))) + x) + Float64(Float64(y / -3.0) / z)); else tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -1e-126) tmp = ((t / (z * (3.0 * y))) + x) + ((y / -3.0) / z); else tmp = x + (((t / y) - y) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -1e-126], N[(N[(N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{-126}:\\
\;\;\;\;\left(\frac{t}{z \cdot \left(3 \cdot y\right)} + x\right) + \frac{\frac{y}{-3}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -9.9999999999999995e-127Initial program 99.6%
+-commutative99.6%
associate-+r-99.6%
sub-neg99.6%
associate-*l*99.7%
*-commutative99.7%
distribute-frac-neg299.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
*-un-lft-identity99.7%
times-frac99.7%
Applied egg-rr99.7%
associate-*l/99.8%
*-lft-identity99.8%
Simplified99.8%
if -9.9999999999999995e-127 < (*.f64 z #s(literal 3 binary64)) Initial program 94.8%
sub-neg94.8%
associate-+l+94.8%
+-commutative94.8%
remove-double-neg94.8%
distribute-frac-neg94.8%
distribute-neg-in94.8%
remove-double-neg94.8%
sub-neg94.8%
neg-mul-194.8%
times-frac97.0%
distribute-frac-neg97.0%
neg-mul-197.0%
*-commutative97.0%
associate-/l*97.0%
*-commutative97.0%
Simplified98.7%
*-commutative98.7%
clear-num98.7%
div-inv98.7%
metadata-eval98.7%
un-div-inv98.7%
Applied egg-rr98.7%
Final simplification99.1%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) -2e+80) (+ (+ x (/ t (* 3.0 (* z y)))) (/ y (* z -3.0))) (+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -2e+80) {
tmp = (x + (t / (3.0 * (z * y)))) + (y / (z * -3.0));
} else {
tmp = x + (((t / y) - 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+80)) then
tmp = (x + (t / (3.0d0 * (z * y)))) + (y / (z * (-3.0d0)))
else
tmp = x + (((t / y) - 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+80) {
tmp = (x + (t / (3.0 * (z * y)))) + (y / (z * -3.0));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -2e+80: tmp = (x + (t / (3.0 * (z * y)))) + (y / (z * -3.0)) else: tmp = x + (((t / y) - y) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -2e+80) tmp = Float64(Float64(x + Float64(t / Float64(3.0 * Float64(z * y)))) + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(Float64(Float64(t / y) - 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+80) tmp = (x + (t / (3.0 * (z * y)))) + (y / (z * -3.0)); else tmp = x + (((t / y) - y) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+80], N[(N[(x + N[(t / N[(3.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{+80}:\\
\;\;\;\;\left(x + \frac{t}{3 \cdot \left(z \cdot y\right)}\right) + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -2e80Initial program 99.6%
+-commutative99.6%
associate-+r-99.6%
sub-neg99.6%
associate-*l*99.8%
*-commutative99.8%
distribute-frac-neg299.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
if -2e80 < (*.f64 z #s(literal 3 binary64)) Initial program 95.6%
sub-neg95.6%
associate-+l+95.6%
+-commutative95.6%
remove-double-neg95.6%
distribute-frac-neg95.6%
distribute-neg-in95.6%
remove-double-neg95.6%
sub-neg95.6%
neg-mul-195.6%
times-frac97.5%
distribute-frac-neg97.5%
neg-mul-197.5%
*-commutative97.5%
associate-/l*97.4%
*-commutative97.4%
Simplified98.8%
*-commutative98.8%
clear-num98.8%
div-inv98.9%
metadata-eval98.9%
un-div-inv98.9%
Applied egg-rr98.9%
Final simplification99.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.8e-5) (not (<= y 3e-132))) (+ x (* (- (/ t y) y) (/ 0.3333333333333333 z))) (+ x (/ (/ (/ t 3.0) z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.8e-5) || !(y <= 3e-132)) {
tmp = x + (((t / y) - y) * (0.3333333333333333 / z));
} else {
tmp = x + (((t / 3.0) / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.8d-5)) .or. (.not. (y <= 3d-132))) then
tmp = x + (((t / y) - y) * (0.3333333333333333d0 / z))
else
tmp = x + (((t / 3.0d0) / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.8e-5) || !(y <= 3e-132)) {
tmp = x + (((t / y) - y) * (0.3333333333333333 / z));
} else {
tmp = x + (((t / 3.0) / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.8e-5) or not (y <= 3e-132): tmp = x + (((t / y) - y) * (0.3333333333333333 / z)) else: tmp = x + (((t / 3.0) / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.8e-5) || !(y <= 3e-132)) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z))); else tmp = Float64(x + Float64(Float64(Float64(t / 3.0) / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.8e-5) || ~((y <= 3e-132))) tmp = x + (((t / y) - y) * (0.3333333333333333 / z)); else tmp = x + (((t / 3.0) / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.8e-5], N[Not[LessEqual[y, 3e-132]], $MachinePrecision]], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / 3.0), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{-5} \lor \neg \left(y \leq 3 \cdot 10^{-132}\right):\\
\;\;\;\;x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{\frac{t}{3}}{z}}{y}\\
\end{array}
\end{array}
if y < -1.80000000000000005e-5 or 3e-132 < y Initial program 97.9%
sub-neg97.9%
associate-+l+97.9%
+-commutative97.9%
remove-double-neg97.9%
distribute-frac-neg97.9%
distribute-neg-in97.9%
remove-double-neg97.9%
sub-neg97.9%
neg-mul-197.9%
times-frac97.9%
distribute-frac-neg97.9%
neg-mul-197.9%
*-commutative97.9%
associate-/l*97.8%
*-commutative97.8%
Simplified99.8%
if -1.80000000000000005e-5 < y < 3e-132Initial program 94.0%
sub-neg94.0%
associate-+l+94.0%
+-commutative94.0%
remove-double-neg94.0%
distribute-frac-neg94.0%
distribute-neg-in94.0%
remove-double-neg94.0%
sub-neg94.0%
neg-mul-194.0%
times-frac90.3%
distribute-frac-neg90.3%
neg-mul-190.3%
*-commutative90.3%
associate-/l*90.3%
*-commutative90.3%
Simplified90.2%
Taylor expanded in t around inf 94.0%
clear-num94.0%
inv-pow94.0%
Applied egg-rr94.0%
unpow-194.0%
associate-/l*98.7%
Simplified98.7%
associate-*r/94.0%
clear-num94.0%
associate-/l*94.0%
*-commutative94.0%
frac-times90.2%
associate-*l/98.8%
Applied egg-rr98.8%
metadata-eval98.8%
associate-/r*98.8%
*-commutative98.8%
un-div-inv98.7%
Applied egg-rr98.7%
*-commutative98.7%
associate-/r*98.9%
Simplified98.9%
Final simplification99.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -9.6e+39) (not (<= y 1.45e-17))) (- x (/ 0.3333333333333333 (/ z y))) (+ x (/ 0.3333333333333333 (/ (* z y) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.6e+39) || !(y <= 1.45e-17)) {
tmp = x - (0.3333333333333333 / (z / y));
} else {
tmp = x + (0.3333333333333333 / ((z * y) / 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 <= (-9.6d+39)) .or. (.not. (y <= 1.45d-17))) then
tmp = x - (0.3333333333333333d0 / (z / y))
else
tmp = x + (0.3333333333333333d0 / ((z * y) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.6e+39) || !(y <= 1.45e-17)) {
tmp = x - (0.3333333333333333 / (z / y));
} else {
tmp = x + (0.3333333333333333 / ((z * y) / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9.6e+39) or not (y <= 1.45e-17): tmp = x - (0.3333333333333333 / (z / y)) else: tmp = x + (0.3333333333333333 / ((z * y) / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9.6e+39) || !(y <= 1.45e-17)) tmp = Float64(x - Float64(0.3333333333333333 / Float64(z / y))); else tmp = Float64(x + Float64(0.3333333333333333 / Float64(Float64(z * y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9.6e+39) || ~((y <= 1.45e-17))) tmp = x - (0.3333333333333333 / (z / y)); else tmp = x + (0.3333333333333333 / ((z * y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9.6e+39], N[Not[LessEqual[y, 1.45e-17]], $MachinePrecision]], N[(x - N[(0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 / N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.6 \cdot 10^{+39} \lor \neg \left(y \leq 1.45 \cdot 10^{-17}\right):\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{\frac{z \cdot y}{t}}\\
\end{array}
\end{array}
if y < -9.6000000000000004e39 or 1.4500000000000001e-17 < y Initial program 97.4%
Taylor expanded in t around 0 95.7%
clear-num95.7%
un-div-inv95.8%
Applied egg-rr95.8%
if -9.6000000000000004e39 < y < 1.4500000000000001e-17Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
+-commutative95.4%
remove-double-neg95.4%
distribute-frac-neg95.4%
distribute-neg-in95.4%
remove-double-neg95.4%
sub-neg95.4%
neg-mul-195.4%
times-frac92.6%
distribute-frac-neg92.6%
neg-mul-192.6%
*-commutative92.6%
associate-/l*92.6%
*-commutative92.6%
Simplified92.5%
Taylor expanded in t around inf 92.7%
clear-num92.7%
un-div-inv92.8%
Applied egg-rr92.8%
Final simplification94.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.7e+37) (not (<= y 1.2e-17))) (- x (/ 0.3333333333333333 (/ z y))) (+ x (* 0.3333333333333333 (/ t (* z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.7e+37) || !(y <= 1.2e-17)) {
tmp = x - (0.3333333333333333 / (z / y));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.7d+37)) .or. (.not. (y <= 1.2d-17))) then
tmp = x - (0.3333333333333333d0 / (z / y))
else
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.7e+37) || !(y <= 1.2e-17)) {
tmp = x - (0.3333333333333333 / (z / y));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.7e+37) or not (y <= 1.2e-17): tmp = x - (0.3333333333333333 / (z / y)) else: tmp = x + (0.3333333333333333 * (t / (z * y))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.7e+37) || !(y <= 1.2e-17)) tmp = Float64(x - Float64(0.3333333333333333 / Float64(z / y))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.7e+37) || ~((y <= 1.2e-17))) tmp = x - (0.3333333333333333 / (z / y)); else tmp = x + (0.3333333333333333 * (t / (z * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.7e+37], N[Not[LessEqual[y, 1.2e-17]], $MachinePrecision]], N[(x - N[(0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+37} \lor \neg \left(y \leq 1.2 \cdot 10^{-17}\right):\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -1.70000000000000003e37 or 1.19999999999999993e-17 < y Initial program 97.4%
Taylor expanded in t around 0 95.7%
clear-num95.7%
un-div-inv95.8%
Applied egg-rr95.8%
if -1.70000000000000003e37 < y < 1.19999999999999993e-17Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
+-commutative95.4%
remove-double-neg95.4%
distribute-frac-neg95.4%
distribute-neg-in95.4%
remove-double-neg95.4%
sub-neg95.4%
neg-mul-195.4%
times-frac92.6%
distribute-frac-neg92.6%
neg-mul-192.6%
*-commutative92.6%
associate-/l*92.6%
*-commutative92.6%
Simplified92.5%
Taylor expanded in t around inf 92.7%
Final simplification94.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.05e+38)
(- x (/ 0.3333333333333333 (/ z y)))
(if (<= y 1.9e-17)
(+ x (/ (/ (/ t 3.0) z) y))
(+ x (/ 1.0 (* -3.0 (/ z y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.05e+38) {
tmp = x - (0.3333333333333333 / (z / y));
} else if (y <= 1.9e-17) {
tmp = x + (((t / 3.0) / z) / y);
} else {
tmp = x + (1.0 / (-3.0 * (z / y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.05d+38)) then
tmp = x - (0.3333333333333333d0 / (z / y))
else if (y <= 1.9d-17) then
tmp = x + (((t / 3.0d0) / z) / y)
else
tmp = x + (1.0d0 / ((-3.0d0) * (z / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.05e+38) {
tmp = x - (0.3333333333333333 / (z / y));
} else if (y <= 1.9e-17) {
tmp = x + (((t / 3.0) / z) / y);
} else {
tmp = x + (1.0 / (-3.0 * (z / y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.05e+38: tmp = x - (0.3333333333333333 / (z / y)) elif y <= 1.9e-17: tmp = x + (((t / 3.0) / z) / y) else: tmp = x + (1.0 / (-3.0 * (z / y))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.05e+38) tmp = Float64(x - Float64(0.3333333333333333 / Float64(z / y))); elseif (y <= 1.9e-17) tmp = Float64(x + Float64(Float64(Float64(t / 3.0) / z) / y)); else tmp = Float64(x + Float64(1.0 / Float64(-3.0 * Float64(z / y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.05e+38) tmp = x - (0.3333333333333333 / (z / y)); elseif (y <= 1.9e-17) tmp = x + (((t / 3.0) / z) / y); else tmp = x + (1.0 / (-3.0 * (z / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.05e+38], N[(x - N[(0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-17], N[(x + N[(N[(N[(t / 3.0), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.0 / N[(-3.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+38}:\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-17}:\\
\;\;\;\;x + \frac{\frac{\frac{t}{3}}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{-3 \cdot \frac{z}{y}}\\
\end{array}
\end{array}
if y < -1.05e38Initial program 95.9%
Taylor expanded in t around 0 97.8%
clear-num97.8%
un-div-inv98.0%
Applied egg-rr98.0%
if -1.05e38 < y < 1.9000000000000001e-17Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
+-commutative95.4%
remove-double-neg95.4%
distribute-frac-neg95.4%
distribute-neg-in95.4%
remove-double-neg95.4%
sub-neg95.4%
neg-mul-195.4%
times-frac92.6%
distribute-frac-neg92.6%
neg-mul-192.6%
*-commutative92.6%
associate-/l*92.6%
*-commutative92.6%
Simplified92.5%
Taylor expanded in t around inf 92.7%
clear-num92.7%
inv-pow92.7%
Applied egg-rr92.7%
unpow-192.7%
associate-/l*96.3%
Simplified96.3%
associate-*r/92.7%
clear-num92.7%
associate-/l*92.8%
*-commutative92.8%
frac-times89.9%
associate-*l/96.4%
Applied egg-rr96.4%
metadata-eval96.4%
associate-/r*96.4%
*-commutative96.4%
un-div-inv96.4%
Applied egg-rr96.4%
*-commutative96.4%
associate-/r*96.4%
Simplified96.4%
if 1.9000000000000001e-17 < y Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
+-commutative98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
distribute-neg-in98.4%
remove-double-neg98.4%
sub-neg98.4%
neg-mul-198.4%
times-frac98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.3%
*-commutative98.3%
Simplified99.8%
associate-*l/99.7%
clear-num99.7%
Applied egg-rr99.7%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in t around 0 94.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.8e+41)
(- x (/ 0.3333333333333333 (/ z y)))
(if (<= y 1.08e-17)
(+ x (/ (* t (/ 0.3333333333333333 z)) y))
(+ x (/ 1.0 (* -3.0 (/ z y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.8e+41) {
tmp = x - (0.3333333333333333 / (z / y));
} else if (y <= 1.08e-17) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x + (1.0 / (-3.0 * (z / y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7.8d+41)) then
tmp = x - (0.3333333333333333d0 / (z / y))
else if (y <= 1.08d-17) then
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
else
tmp = x + (1.0d0 / ((-3.0d0) * (z / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.8e+41) {
tmp = x - (0.3333333333333333 / (z / y));
} else if (y <= 1.08e-17) {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
} else {
tmp = x + (1.0 / (-3.0 * (z / y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.8e+41: tmp = x - (0.3333333333333333 / (z / y)) elif y <= 1.08e-17: tmp = x + ((t * (0.3333333333333333 / z)) / y) else: tmp = x + (1.0 / (-3.0 * (z / y))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.8e+41) tmp = Float64(x - Float64(0.3333333333333333 / Float64(z / y))); elseif (y <= 1.08e-17) tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); else tmp = Float64(x + Float64(1.0 / Float64(-3.0 * Float64(z / y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.8e+41) tmp = x - (0.3333333333333333 / (z / y)); elseif (y <= 1.08e-17) tmp = x + ((t * (0.3333333333333333 / z)) / y); else tmp = x + (1.0 / (-3.0 * (z / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.8e+41], N[(x - N[(0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.08e-17], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.0 / N[(-3.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{+41}:\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 1.08 \cdot 10^{-17}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{-3 \cdot \frac{z}{y}}\\
\end{array}
\end{array}
if y < -7.7999999999999994e41Initial program 95.9%
Taylor expanded in t around 0 97.8%
clear-num97.8%
un-div-inv98.0%
Applied egg-rr98.0%
if -7.7999999999999994e41 < y < 1.07999999999999995e-17Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
+-commutative95.4%
remove-double-neg95.4%
distribute-frac-neg95.4%
distribute-neg-in95.4%
remove-double-neg95.4%
sub-neg95.4%
neg-mul-195.4%
times-frac92.6%
distribute-frac-neg92.6%
neg-mul-192.6%
*-commutative92.6%
associate-/l*92.6%
*-commutative92.6%
Simplified92.5%
Taylor expanded in t around inf 92.7%
clear-num92.7%
inv-pow92.7%
Applied egg-rr92.7%
unpow-192.7%
associate-/l*96.3%
Simplified96.3%
associate-*r/92.7%
clear-num92.7%
associate-/l*92.8%
*-commutative92.8%
frac-times89.9%
associate-*l/96.4%
Applied egg-rr96.4%
if 1.07999999999999995e-17 < y Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
+-commutative98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
distribute-neg-in98.4%
remove-double-neg98.4%
sub-neg98.4%
neg-mul-198.4%
times-frac98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.3%
*-commutative98.3%
Simplified99.8%
associate-*l/99.7%
clear-num99.7%
Applied egg-rr99.7%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in t around 0 94.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.75e+40)
(- x (/ 0.3333333333333333 (/ z y)))
(if (<= y 7.2e-18)
(+ x (/ (* t 0.3333333333333333) (* z y)))
(+ x (/ 1.0 (* -3.0 (/ z y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.75e+40) {
tmp = x - (0.3333333333333333 / (z / y));
} else if (y <= 7.2e-18) {
tmp = x + ((t * 0.3333333333333333) / (z * y));
} else {
tmp = x + (1.0 / (-3.0 * (z / y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.75d+40)) then
tmp = x - (0.3333333333333333d0 / (z / y))
else if (y <= 7.2d-18) then
tmp = x + ((t * 0.3333333333333333d0) / (z * y))
else
tmp = x + (1.0d0 / ((-3.0d0) * (z / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.75e+40) {
tmp = x - (0.3333333333333333 / (z / y));
} else if (y <= 7.2e-18) {
tmp = x + ((t * 0.3333333333333333) / (z * y));
} else {
tmp = x + (1.0 / (-3.0 * (z / y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.75e+40: tmp = x - (0.3333333333333333 / (z / y)) elif y <= 7.2e-18: tmp = x + ((t * 0.3333333333333333) / (z * y)) else: tmp = x + (1.0 / (-3.0 * (z / y))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.75e+40) tmp = Float64(x - Float64(0.3333333333333333 / Float64(z / y))); elseif (y <= 7.2e-18) tmp = Float64(x + Float64(Float64(t * 0.3333333333333333) / Float64(z * y))); else tmp = Float64(x + Float64(1.0 / Float64(-3.0 * Float64(z / y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.75e+40) tmp = x - (0.3333333333333333 / (z / y)); elseif (y <= 7.2e-18) tmp = x + ((t * 0.3333333333333333) / (z * y)); else tmp = x + (1.0 / (-3.0 * (z / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.75e+40], N[(x - N[(0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-18], N[(x + N[(N[(t * 0.3333333333333333), $MachinePrecision] / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.0 / N[(-3.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.75 \cdot 10^{+40}:\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-18}:\\
\;\;\;\;x + \frac{t \cdot 0.3333333333333333}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{-3 \cdot \frac{z}{y}}\\
\end{array}
\end{array}
if y < -2.74999999999999987e40Initial program 95.9%
Taylor expanded in t around 0 97.8%
clear-num97.8%
un-div-inv98.0%
Applied egg-rr98.0%
if -2.74999999999999987e40 < y < 7.20000000000000021e-18Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
+-commutative95.4%
remove-double-neg95.4%
distribute-frac-neg95.4%
distribute-neg-in95.4%
remove-double-neg95.4%
sub-neg95.4%
neg-mul-195.4%
times-frac92.6%
distribute-frac-neg92.6%
neg-mul-192.6%
*-commutative92.6%
associate-/l*92.6%
*-commutative92.6%
Simplified92.5%
Taylor expanded in t around inf 92.7%
associate-*r/92.8%
Applied egg-rr92.8%
if 7.20000000000000021e-18 < y Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
+-commutative98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
distribute-neg-in98.4%
remove-double-neg98.4%
sub-neg98.4%
neg-mul-198.4%
times-frac98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.3%
*-commutative98.3%
Simplified99.8%
associate-*l/99.7%
clear-num99.7%
Applied egg-rr99.7%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in t around 0 94.3%
Final simplification94.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.4e+36)
(- x (/ 0.3333333333333333 (/ z y)))
(if (<= y 1.7e-17)
(+ x (/ 0.3333333333333333 (/ (* z y) t)))
(+ x (/ 1.0 (* -3.0 (/ z y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.4e+36) {
tmp = x - (0.3333333333333333 / (z / y));
} else if (y <= 1.7e-17) {
tmp = x + (0.3333333333333333 / ((z * y) / t));
} else {
tmp = x + (1.0 / (-3.0 * (z / y)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-7.4d+36)) then
tmp = x - (0.3333333333333333d0 / (z / y))
else if (y <= 1.7d-17) then
tmp = x + (0.3333333333333333d0 / ((z * y) / t))
else
tmp = x + (1.0d0 / ((-3.0d0) * (z / y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.4e+36) {
tmp = x - (0.3333333333333333 / (z / y));
} else if (y <= 1.7e-17) {
tmp = x + (0.3333333333333333 / ((z * y) / t));
} else {
tmp = x + (1.0 / (-3.0 * (z / y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.4e+36: tmp = x - (0.3333333333333333 / (z / y)) elif y <= 1.7e-17: tmp = x + (0.3333333333333333 / ((z * y) / t)) else: tmp = x + (1.0 / (-3.0 * (z / y))) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.4e+36) tmp = Float64(x - Float64(0.3333333333333333 / Float64(z / y))); elseif (y <= 1.7e-17) tmp = Float64(x + Float64(0.3333333333333333 / Float64(Float64(z * y) / t))); else tmp = Float64(x + Float64(1.0 / Float64(-3.0 * Float64(z / y)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.4e+36) tmp = x - (0.3333333333333333 / (z / y)); elseif (y <= 1.7e-17) tmp = x + (0.3333333333333333 / ((z * y) / t)); else tmp = x + (1.0 / (-3.0 * (z / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.4e+36], N[(x - N[(0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.7e-17], N[(x + N[(0.3333333333333333 / N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.0 / N[(-3.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+36}:\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{-17}:\\
\;\;\;\;x + \frac{0.3333333333333333}{\frac{z \cdot y}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{-3 \cdot \frac{z}{y}}\\
\end{array}
\end{array}
if y < -7.40000000000000058e36Initial program 95.9%
Taylor expanded in t around 0 97.8%
clear-num97.8%
un-div-inv98.0%
Applied egg-rr98.0%
if -7.40000000000000058e36 < y < 1.6999999999999999e-17Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
+-commutative95.4%
remove-double-neg95.4%
distribute-frac-neg95.4%
distribute-neg-in95.4%
remove-double-neg95.4%
sub-neg95.4%
neg-mul-195.4%
times-frac92.6%
distribute-frac-neg92.6%
neg-mul-192.6%
*-commutative92.6%
associate-/l*92.6%
*-commutative92.6%
Simplified92.5%
Taylor expanded in t around inf 92.7%
clear-num92.7%
un-div-inv92.8%
Applied egg-rr92.8%
if 1.6999999999999999e-17 < y Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
+-commutative98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
distribute-neg-in98.4%
remove-double-neg98.4%
sub-neg98.4%
neg-mul-198.4%
times-frac98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.3%
*-commutative98.3%
Simplified99.8%
associate-*l/99.7%
clear-num99.7%
Applied egg-rr99.7%
associate-/r*99.6%
Simplified99.6%
Taylor expanded in t around 0 94.3%
Final simplification94.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.25e-8) (not (<= y 2.9e-90))) (- x (/ 0.3333333333333333 (/ z y))) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.25e-8) || !(y <= 2.9e-90)) {
tmp = x - (0.3333333333333333 / (z / y));
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.25d-8)) .or. (.not. (y <= 2.9d-90))) then
tmp = x - (0.3333333333333333d0 / (z / y))
else
tmp = 0.3333333333333333d0 * ((t / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.25e-8) || !(y <= 2.9e-90)) {
tmp = x - (0.3333333333333333 / (z / y));
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.25e-8) or not (y <= 2.9e-90): tmp = x - (0.3333333333333333 / (z / y)) else: tmp = 0.3333333333333333 * ((t / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.25e-8) || !(y <= 2.9e-90)) tmp = Float64(x - Float64(0.3333333333333333 / Float64(z / y))); else tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.25e-8) || ~((y <= 2.9e-90))) tmp = x - (0.3333333333333333 / (z / y)); else tmp = 0.3333333333333333 * ((t / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.25e-8], N[Not[LessEqual[y, 2.9e-90]], $MachinePrecision]], N[(x - N[(0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{-8} \lor \neg \left(y \leq 2.9 \cdot 10^{-90}\right):\\
\;\;\;\;x - \frac{0.3333333333333333}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -1.2499999999999999e-8 or 2.89999999999999983e-90 < y Initial program 97.7%
Taylor expanded in t around 0 92.9%
clear-num92.9%
un-div-inv93.0%
Applied egg-rr93.0%
if -1.2499999999999999e-8 < y < 2.89999999999999983e-90Initial program 94.6%
sub-neg94.6%
associate-+l+94.6%
+-commutative94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
distribute-neg-in94.6%
remove-double-neg94.6%
sub-neg94.6%
neg-mul-194.6%
times-frac91.3%
distribute-frac-neg91.3%
neg-mul-191.3%
*-commutative91.3%
associate-/l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in t around inf 93.7%
Taylor expanded in x around 0 71.4%
*-lft-identity71.4%
times-frac74.8%
associate-*l/74.8%
*-lft-identity74.8%
Simplified74.8%
Final simplification85.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1e-8) (not (<= y 1.75e-91))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1e-8) || !(y <= 1.75e-91)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1d-8)) .or. (.not. (y <= 1.75d-91))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * ((t / z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1e-8) || !(y <= 1.75e-91)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1e-8) or not (y <= 1.75e-91): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * ((t / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1e-8) || !(y <= 1.75e-91)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1e-8) || ~((y <= 1.75e-91))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * ((t / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1e-8], N[Not[LessEqual[y, 1.75e-91]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-8} \lor \neg \left(y \leq 1.75 \cdot 10^{-91}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -1e-8 or 1.7499999999999999e-91 < y Initial program 97.7%
sub-neg97.7%
associate-+l+97.7%
+-commutative97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.7%
*-commutative97.7%
Simplified99.8%
Taylor expanded in t around 0 92.9%
metadata-eval92.9%
distribute-lft-neg-in92.9%
*-commutative92.9%
associate-*l/93.0%
associate-*r/93.0%
distribute-rgt-neg-out93.0%
distribute-neg-frac93.0%
metadata-eval93.0%
Simplified93.0%
if -1e-8 < y < 1.7499999999999999e-91Initial program 94.6%
sub-neg94.6%
associate-+l+94.6%
+-commutative94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
distribute-neg-in94.6%
remove-double-neg94.6%
sub-neg94.6%
neg-mul-194.6%
times-frac91.3%
distribute-frac-neg91.3%
neg-mul-191.3%
*-commutative91.3%
associate-/l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in t around inf 93.7%
Taylor expanded in x around 0 71.4%
*-lft-identity71.4%
times-frac74.8%
associate-*l/74.8%
*-lft-identity74.8%
Simplified74.8%
Final simplification85.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.1e-7)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 1.55e-90)
(* 0.3333333333333333 (/ (/ t z) y))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.1e-7) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.55e-90) {
tmp = 0.3333333333333333 * ((t / z) / 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 <= (-4.1d-7)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 1.55d-90) then
tmp = 0.3333333333333333d0 * ((t / z) / 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 <= -4.1e-7) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 1.55e-90) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.1e-7: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 1.55e-90: tmp = 0.3333333333333333 * ((t / z) / y) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.1e-7) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 1.55e-90) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.1e-7) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 1.55e-90) tmp = 0.3333333333333333 * ((t / z) / y); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.1e-7], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.55e-90], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{-7}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{-90}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -4.0999999999999999e-7Initial program 96.4%
Taylor expanded in t around 0 96.4%
if -4.0999999999999999e-7 < y < 1.5500000000000001e-90Initial program 94.6%
sub-neg94.6%
associate-+l+94.6%
+-commutative94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
distribute-neg-in94.6%
remove-double-neg94.6%
sub-neg94.6%
neg-mul-194.6%
times-frac91.3%
distribute-frac-neg91.3%
neg-mul-191.3%
*-commutative91.3%
associate-/l*91.2%
*-commutative91.2%
Simplified91.2%
Taylor expanded in t around inf 93.7%
Taylor expanded in x around 0 71.4%
*-lft-identity71.4%
times-frac74.8%
associate-*l/74.8%
*-lft-identity74.8%
Simplified74.8%
if 1.5500000000000001e-90 < y Initial program 98.6%
sub-neg98.6%
associate-+l+98.6%
+-commutative98.6%
remove-double-neg98.6%
distribute-frac-neg98.6%
distribute-neg-in98.6%
remove-double-neg98.6%
sub-neg98.6%
neg-mul-198.6%
times-frac98.6%
distribute-frac-neg98.6%
neg-mul-198.6%
*-commutative98.6%
associate-/l*98.6%
*-commutative98.6%
Simplified99.8%
Taylor expanded in t around 0 90.6%
metadata-eval90.6%
distribute-lft-neg-in90.6%
*-commutative90.6%
associate-*l/90.6%
associate-*r/90.7%
distribute-rgt-neg-out90.7%
distribute-neg-frac90.7%
metadata-eval90.7%
Simplified90.7%
(FPCore (x y z t) :precision binary64 (if (<= x -2.1e+88) x (if (<= x 2.9e+64) (/ -0.3333333333333333 (/ z y)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.1e+88) {
tmp = x;
} else if (x <= 2.9e+64) {
tmp = -0.3333333333333333 / (z / y);
} 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 (x <= (-2.1d+88)) then
tmp = x
else if (x <= 2.9d+64) then
tmp = (-0.3333333333333333d0) / (z / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -2.1e+88) {
tmp = x;
} else if (x <= 2.9e+64) {
tmp = -0.3333333333333333 / (z / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -2.1e+88: tmp = x elif x <= 2.9e+64: tmp = -0.3333333333333333 / (z / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -2.1e+88) tmp = x; elseif (x <= 2.9e+64) tmp = Float64(-0.3333333333333333 / Float64(z / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -2.1e+88) tmp = x; elseif (x <= 2.9e+64) tmp = -0.3333333333333333 / (z / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -2.1e+88], x, If[LessEqual[x, 2.9e+64], N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+88}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+64}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.1e88 or 2.89999999999999993e64 < x Initial program 96.0%
sub-neg96.0%
associate-+l+96.0%
+-commutative96.0%
remove-double-neg96.0%
distribute-frac-neg96.0%
distribute-neg-in96.0%
remove-double-neg96.0%
sub-neg96.0%
neg-mul-196.0%
times-frac97.0%
distribute-frac-neg97.0%
neg-mul-197.0%
*-commutative97.0%
associate-/l*97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in x around inf 63.6%
if -2.1e88 < x < 2.89999999999999993e64Initial program 96.7%
Taylor expanded in t around 0 55.8%
Taylor expanded in x around 0 44.2%
clear-num44.2%
un-div-inv44.3%
Applied egg-rr44.3%
(FPCore (x y z t) :precision binary64 (if (<= x -4.7e+83) x (if (<= x 2.25e+64) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.7e+83) {
tmp = x;
} else if (x <= 2.25e+64) {
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 (x <= (-4.7d+83)) then
tmp = x
else if (x <= 2.25d+64) 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 (x <= -4.7e+83) {
tmp = x;
} else if (x <= 2.25e+64) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4.7e+83: tmp = x elif x <= 2.25e+64: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4.7e+83) tmp = x; elseif (x <= 2.25e+64) 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 (x <= -4.7e+83) tmp = x; elseif (x <= 2.25e+64) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.7e+83], x, If[LessEqual[x, 2.25e+64], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.7 \cdot 10^{+83}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{+64}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.6999999999999999e83 or 2.24999999999999987e64 < x Initial program 96.0%
sub-neg96.0%
associate-+l+96.0%
+-commutative96.0%
remove-double-neg96.0%
distribute-frac-neg96.0%
distribute-neg-in96.0%
remove-double-neg96.0%
sub-neg96.0%
neg-mul-196.0%
times-frac97.0%
distribute-frac-neg97.0%
neg-mul-197.0%
*-commutative97.0%
associate-/l*97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in x around inf 63.6%
if -4.6999999999999999e83 < x < 2.24999999999999987e64Initial program 96.7%
Taylor expanded in t around 0 55.8%
Taylor expanded in x around 0 44.2%
associate-*r/44.2%
*-commutative44.2%
associate-/l*44.2%
Simplified44.2%
(FPCore (x y z t) :precision binary64 (if (<= x -1.75e+83) x (if (<= x 7.5e+64) (* (/ y z) -0.3333333333333333) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.75e+83) {
tmp = x;
} else if (x <= 7.5e+64) {
tmp = (y / z) * -0.3333333333333333;
} 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 (x <= (-1.75d+83)) then
tmp = x
else if (x <= 7.5d+64) then
tmp = (y / z) * (-0.3333333333333333d0)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.75e+83) {
tmp = x;
} else if (x <= 7.5e+64) {
tmp = (y / z) * -0.3333333333333333;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.75e+83: tmp = x elif x <= 7.5e+64: tmp = (y / z) * -0.3333333333333333 else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.75e+83) tmp = x; elseif (x <= 7.5e+64) tmp = Float64(Float64(y / z) * -0.3333333333333333); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.75e+83) tmp = x; elseif (x <= 7.5e+64) tmp = (y / z) * -0.3333333333333333; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.75e+83], x, If[LessEqual[x, 7.5e+64], N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.75 \cdot 10^{+83}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+64}:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.74999999999999989e83 or 7.5000000000000005e64 < x Initial program 96.0%
sub-neg96.0%
associate-+l+96.0%
+-commutative96.0%
remove-double-neg96.0%
distribute-frac-neg96.0%
distribute-neg-in96.0%
remove-double-neg96.0%
sub-neg96.0%
neg-mul-196.0%
times-frac97.0%
distribute-frac-neg97.0%
neg-mul-197.0%
*-commutative97.0%
associate-/l*97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in x around inf 63.6%
if -1.74999999999999989e83 < x < 7.5000000000000005e64Initial program 96.7%
Taylor expanded in t around 0 55.8%
Taylor expanded in x around 0 44.2%
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 96.4%
sub-neg96.4%
associate-+l+96.4%
+-commutative96.4%
remove-double-neg96.4%
distribute-frac-neg96.4%
distribute-neg-in96.4%
remove-double-neg96.4%
sub-neg96.4%
neg-mul-196.4%
times-frac95.0%
distribute-frac-neg95.0%
neg-mul-195.0%
*-commutative95.0%
associate-/l*94.9%
*-commutative94.9%
Simplified96.1%
Taylor expanded in x around inf 32.0%
(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 2024130
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(! :herbie-platform default (+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y)))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))