
(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 17 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 -2.35e-103)
(+ x (/ (* 0.3333333333333333 t_1) z))
(if (<= y 3.3e-102)
(+ x (* 0.3333333333333333 (/ (/ t z) y)))
(+ x (* 0.3333333333333333 (/ t_1 z)))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -2.35e-103) {
tmp = x + ((0.3333333333333333 * t_1) / z);
} else if (y <= 3.3e-102) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x + (0.3333333333333333 * (t_1 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (t / y) - y
if (y <= (-2.35d-103)) then
tmp = x + ((0.3333333333333333d0 * t_1) / z)
else if (y <= 3.3d-102) then
tmp = x + (0.3333333333333333d0 * ((t / z) / y))
else
tmp = x + (0.3333333333333333d0 * (t_1 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -2.35e-103) {
tmp = x + ((0.3333333333333333 * t_1) / z);
} else if (y <= 3.3e-102) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x + (0.3333333333333333 * (t_1 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / y) - y tmp = 0 if y <= -2.35e-103: tmp = x + ((0.3333333333333333 * t_1) / z) elif y <= 3.3e-102: tmp = x + (0.3333333333333333 * ((t / z) / y)) else: tmp = x + (0.3333333333333333 * (t_1 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / y) - y) tmp = 0.0 if (y <= -2.35e-103) tmp = Float64(x + Float64(Float64(0.3333333333333333 * t_1) / z)); elseif (y <= 3.3e-102) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t_1 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / y) - y; tmp = 0.0; if (y <= -2.35e-103) tmp = x + ((0.3333333333333333 * t_1) / z); elseif (y <= 3.3e-102) tmp = x + (0.3333333333333333 * ((t / z) / y)); else tmp = x + (0.3333333333333333 * (t_1 / 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, -2.35e-103], N[(x + N[(N[(0.3333333333333333 * t$95$1), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e-102], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{y} - y\\
\mathbf{if}\;y \leq -2.35 \cdot 10^{-103}:\\
\;\;\;\;x + \frac{0.3333333333333333 \cdot t\_1}{z}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-102}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t\_1}{z}\\
\end{array}
\end{array}
if y < -2.3500000000000001e-103Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
+-commutative99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
sub-neg99.7%
neg-mul-199.7%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
*-commutative99.6%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
if -2.3500000000000001e-103 < y < 3.3e-102Initial program 86.7%
sub-neg86.7%
associate-+l+86.7%
+-commutative86.7%
remove-double-neg86.7%
distribute-frac-neg86.7%
distribute-neg-in86.7%
remove-double-neg86.7%
sub-neg86.7%
neg-mul-186.7%
times-frac89.2%
distribute-frac-neg89.2%
neg-mul-189.2%
*-commutative89.2%
associate-/l*89.2%
*-commutative89.2%
Simplified89.3%
Taylor expanded in t around inf 87.4%
*-commutative87.4%
metadata-eval87.4%
times-frac87.4%
*-rgt-identity87.4%
*-commutative87.4%
associate-*r*87.6%
associate-/r*98.7%
Simplified98.7%
associate-/r*98.7%
div-inv98.7%
metadata-eval98.7%
Applied egg-rr98.7%
if 3.3e-102 < y Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Final simplification99.4%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 5e-78) (+ x (* 0.3333333333333333 (/ (- (/ t y) y) z))) (+ (+ x (/ t (* 3.0 (* z y)))) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 5e-78) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = (x + (t / (3.0 * (z * 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) <= 5d-78) then
tmp = x + (0.3333333333333333d0 * (((t / y) - y) / z))
else
tmp = (x + (t / (3.0d0 * (z * 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) <= 5e-78) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = (x + (t / (3.0 * (z * y)))) + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 5e-78: tmp = x + (0.3333333333333333 * (((t / y) - y) / z)) else: tmp = (x + (t / (3.0 * (z * y)))) + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 5e-78) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z))); else tmp = Float64(Float64(x + Float64(t / Float64(3.0 * Float64(z * y)))) + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 5e-78) tmp = x + (0.3333333333333333 * (((t / y) - y) / z)); else tmp = (x + (t / (3.0 * (z * y)))) + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 5e-78], N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(t / N[(3.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 5 \cdot 10^{-78}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{t}{3 \cdot \left(z \cdot y\right)}\right) + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < 4.9999999999999996e-78Initial program 93.4%
sub-neg93.4%
associate-+l+93.4%
+-commutative93.4%
remove-double-neg93.4%
distribute-frac-neg93.4%
distribute-neg-in93.4%
remove-double-neg93.4%
sub-neg93.4%
neg-mul-193.4%
times-frac98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
associate-/l*98.0%
*-commutative98.0%
Simplified98.1%
Taylor expanded in z around 0 98.1%
if 4.9999999999999996e-78 < (*.f64 z #s(literal 3 binary64)) Initial program 98.7%
+-commutative98.7%
associate-+r-98.7%
sub-neg98.7%
associate-*l*99.7%
*-commutative99.7%
distribute-frac-neg299.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around 0 99.8%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -6500000.0) (not (<= y 2.7e-101))) (+ x (* 0.3333333333333333 (/ (- (/ t y) y) z))) (+ x (/ (/ t z) (* 3.0 y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6500000.0) || !(y <= 2.7e-101)) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = x + ((t / z) / (3.0 * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-6500000.0d0)) .or. (.not. (y <= 2.7d-101))) then
tmp = x + (0.3333333333333333d0 * (((t / y) - y) / z))
else
tmp = x + ((t / z) / (3.0d0 * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6500000.0) || !(y <= 2.7e-101)) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = x + ((t / z) / (3.0 * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6500000.0) or not (y <= 2.7e-101): tmp = x + (0.3333333333333333 * (((t / y) - y) / z)) else: tmp = x + ((t / z) / (3.0 * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6500000.0) || !(y <= 2.7e-101)) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z))); else tmp = Float64(x + Float64(Float64(t / z) / Float64(3.0 * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6500000.0) || ~((y <= 2.7e-101))) tmp = x + (0.3333333333333333 * (((t / y) - y) / z)); else tmp = x + ((t / z) / (3.0 * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6500000.0], N[Not[LessEqual[y, 2.7e-101]], $MachinePrecision]], N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] / N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6500000 \lor \neg \left(y \leq 2.7 \cdot 10^{-101}\right):\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{3 \cdot y}\\
\end{array}
\end{array}
if y < -6.5e6 or 2.7000000000000002e-101 < y Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
if -6.5e6 < y < 2.7000000000000002e-101Initial program 88.3%
sub-neg88.3%
associate-+l+88.3%
+-commutative88.3%
remove-double-neg88.3%
distribute-frac-neg88.3%
distribute-neg-in88.3%
remove-double-neg88.3%
sub-neg88.3%
neg-mul-188.3%
times-frac90.5%
distribute-frac-neg90.5%
neg-mul-190.5%
*-commutative90.5%
associate-/l*90.5%
*-commutative90.5%
Simplified90.6%
Taylor expanded in t around inf 88.9%
*-commutative88.9%
metadata-eval88.9%
times-frac89.0%
*-rgt-identity89.0%
*-commutative89.0%
associate-*r*89.1%
associate-/r*98.8%
Simplified98.8%
Final simplification99.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ t y) y)))
(if (<= y -1.16e-98)
(+ x (* t_1 (/ 0.3333333333333333 z)))
(if (<= y 1e-102)
(+ x (* 0.3333333333333333 (/ (/ t z) y)))
(+ x (* 0.3333333333333333 (/ t_1 z)))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -1.16e-98) {
tmp = x + (t_1 * (0.3333333333333333 / z));
} else if (y <= 1e-102) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x + (0.3333333333333333 * (t_1 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (t / y) - y
if (y <= (-1.16d-98)) then
tmp = x + (t_1 * (0.3333333333333333d0 / z))
else if (y <= 1d-102) then
tmp = x + (0.3333333333333333d0 * ((t / z) / y))
else
tmp = x + (0.3333333333333333d0 * (t_1 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -1.16e-98) {
tmp = x + (t_1 * (0.3333333333333333 / z));
} else if (y <= 1e-102) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x + (0.3333333333333333 * (t_1 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / y) - y tmp = 0 if y <= -1.16e-98: tmp = x + (t_1 * (0.3333333333333333 / z)) elif y <= 1e-102: tmp = x + (0.3333333333333333 * ((t / z) / y)) else: tmp = x + (0.3333333333333333 * (t_1 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / y) - y) tmp = 0.0 if (y <= -1.16e-98) tmp = Float64(x + Float64(t_1 * Float64(0.3333333333333333 / z))); elseif (y <= 1e-102) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y))); else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t_1 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / y) - y; tmp = 0.0; if (y <= -1.16e-98) tmp = x + (t_1 * (0.3333333333333333 / z)); elseif (y <= 1e-102) tmp = x + (0.3333333333333333 * ((t / z) / y)); else tmp = x + (0.3333333333333333 * (t_1 / 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.16e-98], N[(x + N[(t$95$1 * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-102], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(0.3333333333333333 * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{y} - y\\
\mathbf{if}\;y \leq -1.16 \cdot 10^{-98}:\\
\;\;\;\;x + t\_1 \cdot \frac{0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 10^{-102}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t\_1}{z}\\
\end{array}
\end{array}
if y < -1.15999999999999994e-98Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
+-commutative99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
sub-neg99.7%
neg-mul-199.7%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
*-commutative99.6%
Simplified99.7%
if -1.15999999999999994e-98 < y < 9.99999999999999933e-103Initial program 86.7%
sub-neg86.7%
associate-+l+86.7%
+-commutative86.7%
remove-double-neg86.7%
distribute-frac-neg86.7%
distribute-neg-in86.7%
remove-double-neg86.7%
sub-neg86.7%
neg-mul-186.7%
times-frac89.2%
distribute-frac-neg89.2%
neg-mul-189.2%
*-commutative89.2%
associate-/l*89.2%
*-commutative89.2%
Simplified89.3%
Taylor expanded in t around inf 87.4%
*-commutative87.4%
metadata-eval87.4%
times-frac87.4%
*-rgt-identity87.4%
*-commutative87.4%
associate-*r*87.6%
associate-/r*98.7%
Simplified98.7%
associate-/r*98.7%
div-inv98.7%
metadata-eval98.7%
Applied egg-rr98.7%
if 9.99999999999999933e-103 < y Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in z around 0 99.7%
Final simplification99.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -3.5e+23)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= y 3.3e+23)
(+ x (/ (/ t z) (* 3.0 y)))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.5e+23) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 3.3e+23) {
tmp = x + ((t / z) / (3.0 * y));
} 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 (y <= (-3.5d+23)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (y <= 3.3d+23) then
tmp = x + ((t / z) / (3.0d0 * y))
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 (y <= -3.5e+23) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 3.3e+23) {
tmp = x + ((t / z) / (3.0 * y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.5e+23: tmp = x + ((y * -0.3333333333333333) / z) elif y <= 3.3e+23: tmp = x + ((t / z) / (3.0 * y)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.5e+23) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (y <= 3.3e+23) tmp = Float64(x + Float64(Float64(t / z) / Float64(3.0 * y))); 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 (y <= -3.5e+23) tmp = x + ((y * -0.3333333333333333) / z); elseif (y <= 3.3e+23) tmp = x + ((t / z) / (3.0 * y)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.5e+23], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+23], N[(x + N[(N[(t / z), $MachinePrecision] / N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+23}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+23}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{3 \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -3.5000000000000002e23Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
+-commutative99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
sub-neg99.7%
neg-mul-199.7%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
*-commutative99.6%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 92.7%
if -3.5000000000000002e23 < y < 3.30000000000000029e23Initial program 90.7%
sub-neg90.7%
associate-+l+90.7%
+-commutative90.7%
remove-double-neg90.7%
distribute-frac-neg90.7%
distribute-neg-in90.7%
remove-double-neg90.7%
sub-neg90.7%
neg-mul-190.7%
times-frac92.5%
distribute-frac-neg92.5%
neg-mul-192.5%
*-commutative92.5%
associate-/l*92.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in t around inf 87.3%
*-commutative87.3%
metadata-eval87.3%
times-frac87.3%
*-rgt-identity87.3%
*-commutative87.3%
associate-*r*87.4%
associate-/r*95.1%
Simplified95.1%
if 3.30000000000000029e23 < y Initial program 99.8%
Taylor expanded in t around 0 97.0%
Final simplification95.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.6e+23)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= y 1.45e+24)
(+ x (* 0.3333333333333333 (/ (/ t z) y)))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.6e+23) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 1.45e+24) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} 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 (y <= (-5.6d+23)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (y <= 1.45d+24) then
tmp = x + (0.3333333333333333d0 * ((t / z) / y))
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 (y <= -5.6e+23) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 1.45e+24) {
tmp = x + (0.3333333333333333 * ((t / z) / y));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.6e+23: tmp = x + ((y * -0.3333333333333333) / z) elif y <= 1.45e+24: tmp = x + (0.3333333333333333 * ((t / z) / y)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.6e+23) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (y <= 1.45e+24) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(t / z) / y))); 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 (y <= -5.6e+23) tmp = x + ((y * -0.3333333333333333) / z); elseif (y <= 1.45e+24) tmp = x + (0.3333333333333333 * ((t / z) / y)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.6e+23], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+24], N[(x + N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+23}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+24}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -5.6e23Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
+-commutative99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
sub-neg99.7%
neg-mul-199.7%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
*-commutative99.6%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 92.7%
if -5.6e23 < y < 1.4499999999999999e24Initial program 90.7%
sub-neg90.7%
associate-+l+90.7%
+-commutative90.7%
remove-double-neg90.7%
distribute-frac-neg90.7%
distribute-neg-in90.7%
remove-double-neg90.7%
sub-neg90.7%
neg-mul-190.7%
times-frac92.5%
distribute-frac-neg92.5%
neg-mul-192.5%
*-commutative92.5%
associate-/l*92.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in t around inf 87.3%
*-commutative87.3%
metadata-eval87.3%
times-frac87.3%
*-rgt-identity87.3%
*-commutative87.3%
associate-*r*87.4%
associate-/r*95.1%
Simplified95.1%
associate-/r*95.1%
div-inv95.0%
metadata-eval95.0%
Applied egg-rr95.0%
if 1.4499999999999999e24 < y Initial program 99.8%
Taylor expanded in t around 0 97.0%
Final simplification95.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.45e+24)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= y 4.55e+24)
(+ x (* (/ t y) (/ 0.3333333333333333 z)))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.45e+24) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 4.55e+24) {
tmp = x + ((t / y) * (0.3333333333333333 / 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 (y <= (-1.45d+24)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (y <= 4.55d+24) then
tmp = x + ((t / y) * (0.3333333333333333d0 / 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 (y <= -1.45e+24) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 4.55e+24) {
tmp = x + ((t / y) * (0.3333333333333333 / z));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.45e+24: tmp = x + ((y * -0.3333333333333333) / z) elif y <= 4.55e+24: tmp = x + ((t / y) * (0.3333333333333333 / z)) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.45e+24) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (y <= 4.55e+24) tmp = Float64(x + Float64(Float64(t / y) * Float64(0.3333333333333333 / 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 (y <= -1.45e+24) tmp = x + ((y * -0.3333333333333333) / z); elseif (y <= 4.55e+24) tmp = x + ((t / y) * (0.3333333333333333 / z)); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.45e+24], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.55e+24], N[(x + N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 4.55 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.4499999999999999e24Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
+-commutative99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
sub-neg99.7%
neg-mul-199.7%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
*-commutative99.6%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 92.7%
if -1.4499999999999999e24 < y < 4.5499999999999997e24Initial program 90.7%
sub-neg90.7%
associate-+l+90.7%
+-commutative90.7%
remove-double-neg90.7%
distribute-frac-neg90.7%
distribute-neg-in90.7%
remove-double-neg90.7%
sub-neg90.7%
neg-mul-190.7%
times-frac92.5%
distribute-frac-neg92.5%
neg-mul-192.5%
*-commutative92.5%
associate-/l*92.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in t around inf 88.6%
if 4.5499999999999997e24 < y Initial program 99.8%
Taylor expanded in t around 0 97.0%
Final simplification91.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.1e+24)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= y 4.4e+27)
(+ x (* 0.3333333333333333 (/ t (* z y))))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.1e+24) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 4.4e+27) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} 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 (y <= (-1.1d+24)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (y <= 4.4d+27) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
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 (y <= -1.1e+24) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 4.4e+27) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.1e+24: tmp = x + ((y * -0.3333333333333333) / z) elif y <= 4.4e+27: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.1e+24) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (y <= 4.4e+27) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); 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 (y <= -1.1e+24) tmp = x + ((y * -0.3333333333333333) / z); elseif (y <= 4.4e+27) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.1e+24], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4e+27], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+27}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.10000000000000001e24Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
+-commutative99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
sub-neg99.7%
neg-mul-199.7%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
*-commutative99.6%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 92.7%
if -1.10000000000000001e24 < y < 4.3999999999999997e27Initial program 90.7%
sub-neg90.7%
associate-+l+90.7%
+-commutative90.7%
remove-double-neg90.7%
distribute-frac-neg90.7%
distribute-neg-in90.7%
remove-double-neg90.7%
sub-neg90.7%
neg-mul-190.7%
times-frac92.5%
distribute-frac-neg92.5%
neg-mul-192.5%
*-commutative92.5%
associate-/l*92.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in t around inf 87.3%
if 4.3999999999999997e27 < y Initial program 99.8%
Taylor expanded in t around 0 97.0%
Final simplification91.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -4.1e-10) (not (<= y 3e-7))) (+ x (/ (* y -0.3333333333333333) z)) (* (/ t y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.1e-10) || !(y <= 3e-7)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = (t / y) * (0.3333333333333333 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-4.1d-10)) .or. (.not. (y <= 3d-7))) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else
tmp = (t / y) * (0.3333333333333333d0 / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.1e-10) || !(y <= 3e-7)) {
tmp = x + ((y * -0.3333333333333333) / z);
} else {
tmp = (t / y) * (0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.1e-10) or not (y <= 3e-7): tmp = x + ((y * -0.3333333333333333) / z) else: tmp = (t / y) * (0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.1e-10) || !(y <= 3e-7)) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); else tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.1e-10) || ~((y <= 3e-7))) tmp = x + ((y * -0.3333333333333333) / z); else tmp = (t / y) * (0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.1e-10], N[Not[LessEqual[y, 3e-7]], $MachinePrecision]], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{-10} \lor \neg \left(y \leq 3 \cdot 10^{-7}\right):\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -4.0999999999999998e-10 or 2.9999999999999999e-7 < y Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
+-commutative99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 92.5%
if -4.0999999999999998e-10 < y < 2.9999999999999999e-7Initial program 90.1%
sub-neg90.1%
associate-+l+90.1%
distribute-frac-neg90.1%
neg-mul-190.1%
*-commutative90.1%
times-frac90.0%
fma-define90.0%
metadata-eval90.0%
associate-*l*90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in y around 0 95.3%
Taylor expanded in t around inf 73.2%
associate-*r/73.2%
associate-*l/73.1%
associate-/r/73.2%
Simplified73.2%
associate-/r/73.1%
associate-/l*69.0%
Applied egg-rr69.0%
Final simplification81.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.4e-14)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= y 950000.0)
(/ (* 0.3333333333333333 (/ t z)) y)
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.4e-14) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 950000.0) {
tmp = (0.3333333333333333 * (t / z)) / y;
} 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 (y <= (-5.4d-14)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (y <= 950000.0d0) then
tmp = (0.3333333333333333d0 * (t / z)) / y
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 (y <= -5.4e-14) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 950000.0) {
tmp = (0.3333333333333333 * (t / z)) / y;
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.4e-14: tmp = x + ((y * -0.3333333333333333) / z) elif y <= 950000.0: tmp = (0.3333333333333333 * (t / z)) / y else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.4e-14) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (y <= 950000.0) tmp = Float64(Float64(0.3333333333333333 * Float64(t / z)) / y); 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 (y <= -5.4e-14) tmp = x + ((y * -0.3333333333333333) / z); elseif (y <= 950000.0) tmp = (0.3333333333333333 * (t / z)) / y; else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.4e-14], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 950000.0], N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{-14}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 950000:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -5.3999999999999997e-14Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
+-commutative99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
sub-neg99.7%
neg-mul-199.7%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
*-commutative99.6%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 91.3%
if -5.3999999999999997e-14 < y < 9.5e5Initial program 90.4%
sub-neg90.4%
associate-+l+90.4%
distribute-frac-neg90.4%
neg-mul-190.4%
*-commutative90.4%
times-frac90.3%
fma-define90.4%
metadata-eval90.4%
associate-*l*91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in y around 0 94.8%
Taylor expanded in t around inf 72.5%
if 9.5e5 < y Initial program 99.8%
Taylor expanded in t around 0 95.8%
Final simplification83.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.1e-16)
(+ x (/ (* y -0.3333333333333333) z))
(if (<= y 3.2e-7)
(* (/ t y) (/ 0.3333333333333333 z))
(- x (* 0.3333333333333333 (/ y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.1e-16) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 3.2e-7) {
tmp = (t / y) * (0.3333333333333333 / 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 (y <= (-4.1d-16)) then
tmp = x + ((y * (-0.3333333333333333d0)) / z)
else if (y <= 3.2d-7) then
tmp = (t / y) * (0.3333333333333333d0 / 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 (y <= -4.1e-16) {
tmp = x + ((y * -0.3333333333333333) / z);
} else if (y <= 3.2e-7) {
tmp = (t / y) * (0.3333333333333333 / z);
} else {
tmp = x - (0.3333333333333333 * (y / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.1e-16: tmp = x + ((y * -0.3333333333333333) / z) elif y <= 3.2e-7: tmp = (t / y) * (0.3333333333333333 / z) else: tmp = x - (0.3333333333333333 * (y / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.1e-16) tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); elseif (y <= 3.2e-7) tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / 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 (y <= -4.1e-16) tmp = x + ((y * -0.3333333333333333) / z); elseif (y <= 3.2e-7) tmp = (t / y) * (0.3333333333333333 / z); else tmp = x - (0.3333333333333333 * (y / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.1e-16], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e-7], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{-16}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-7}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -4.10000000000000006e-16Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
+-commutative99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
sub-neg99.7%
neg-mul-199.7%
times-frac99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.6%
*-commutative99.6%
Simplified99.7%
associate-*l/99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 91.3%
if -4.10000000000000006e-16 < y < 3.2000000000000001e-7Initial program 90.1%
sub-neg90.1%
associate-+l+90.1%
distribute-frac-neg90.1%
neg-mul-190.1%
*-commutative90.1%
times-frac90.0%
fma-define90.0%
metadata-eval90.0%
associate-*l*90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in y around 0 95.3%
Taylor expanded in t around inf 73.2%
associate-*r/73.2%
associate-*l/73.1%
associate-/r/73.2%
Simplified73.2%
associate-/r/73.1%
associate-/l*69.0%
Applied egg-rr69.0%
if 3.2000000000000001e-7 < y Initial program 99.8%
Taylor expanded in t around 0 93.4%
Final simplification81.2%
(FPCore (x y z t) :precision binary64 (if (<= y -1.8e+24) (/ (* y -0.3333333333333333) z) (if (<= y 6e+23) (* (/ t y) (/ 0.3333333333333333 z)) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.8e+24) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 6e+23) {
tmp = (t / y) * (0.3333333333333333 / z);
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.8d+24)) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= 6d+23) then
tmp = (t / y) * (0.3333333333333333d0 / z)
else
tmp = y / (z * (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.8e+24) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 6e+23) {
tmp = (t / y) * (0.3333333333333333 / z);
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.8e+24: tmp = (y * -0.3333333333333333) / z elif y <= 6e+23: tmp = (t / y) * (0.3333333333333333 / z) else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.8e+24) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= 6e+23) tmp = Float64(Float64(t / y) * Float64(0.3333333333333333 / z)); else tmp = Float64(y / Float64(z * -3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.8e+24) tmp = (y * -0.3333333333333333) / z; elseif (y <= 6e+23) tmp = (t / y) * (0.3333333333333333 / z); else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.8e+24], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 6e+23], N[(N[(t / y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+24}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+23}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.79999999999999992e24Initial program 99.7%
sub-neg99.7%
associate-+l+99.7%
distribute-frac-neg99.7%
neg-mul-199.7%
*-commutative99.7%
times-frac99.7%
fma-define99.7%
metadata-eval99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 92.6%
associate-*r/92.7%
metadata-eval92.7%
Simplified92.7%
Taylor expanded in x around 0 58.4%
associate-*r/58.5%
Applied egg-rr58.5%
if -1.79999999999999992e24 < y < 6.0000000000000002e23Initial program 90.7%
sub-neg90.7%
associate-+l+90.7%
distribute-frac-neg90.7%
neg-mul-190.7%
*-commutative90.7%
times-frac90.7%
fma-define90.7%
metadata-eval90.7%
associate-*l*91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in y around 0 94.5%
Taylor expanded in t around inf 70.9%
associate-*r/70.9%
associate-*l/70.8%
associate-/r/70.9%
Simplified70.9%
associate-/r/70.8%
associate-/l*67.0%
Applied egg-rr67.0%
if 6.0000000000000002e23 < y Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.7%
fma-define99.7%
metadata-eval99.7%
associate-*l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around inf 96.9%
associate-*r/96.9%
metadata-eval96.9%
Simplified96.9%
Taylor expanded in x around 0 68.0%
clear-num68.0%
un-div-inv68.1%
div-inv68.2%
metadata-eval68.2%
Applied egg-rr68.2%
Final simplification65.5%
(FPCore (x y z t) :precision binary64 (if (<= x -3.65e+108) x (if (<= x 3.6e+107) (/ (* y -0.3333333333333333) z) (* y (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.65e+108) {
tmp = x;
} else if (x <= 3.6e+107) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = y * (x / 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 (x <= (-3.65d+108)) then
tmp = x
else if (x <= 3.6d+107) then
tmp = (y * (-0.3333333333333333d0)) / z
else
tmp = y * (x / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -3.65e+108) {
tmp = x;
} else if (x <= 3.6e+107) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = y * (x / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -3.65e+108: tmp = x elif x <= 3.6e+107: tmp = (y * -0.3333333333333333) / z else: tmp = y * (x / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -3.65e+108) tmp = x; elseif (x <= 3.6e+107) tmp = Float64(Float64(y * -0.3333333333333333) / z); else tmp = Float64(y * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -3.65e+108) tmp = x; elseif (x <= 3.6e+107) tmp = (y * -0.3333333333333333) / z; else tmp = y * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -3.65e+108], x, If[LessEqual[x, 3.6e+107], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.65 \cdot 10^{+108}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+107}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{y}\\
\end{array}
\end{array}
if x < -3.6499999999999999e108Initial program 92.0%
sub-neg92.0%
associate-+l+92.0%
distribute-frac-neg92.0%
neg-mul-192.0%
*-commutative92.0%
times-frac92.0%
fma-define92.0%
metadata-eval92.0%
associate-*l*92.0%
*-commutative92.0%
Simplified92.0%
Taylor expanded in x around inf 63.3%
if -3.6499999999999999e108 < x < 3.5999999999999998e107Initial program 95.1%
sub-neg95.1%
associate-+l+95.1%
distribute-frac-neg95.1%
neg-mul-195.1%
*-commutative95.1%
times-frac95.1%
fma-define95.1%
metadata-eval95.1%
associate-*l*95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in y around inf 54.1%
associate-*r/54.1%
metadata-eval54.1%
Simplified54.1%
Taylor expanded in x around 0 45.0%
associate-*r/45.1%
Applied egg-rr45.1%
if 3.5999999999999998e107 < x Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
times-frac98.1%
fma-define98.1%
metadata-eval98.1%
associate-*l*98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in y around inf 75.9%
associate-*r/75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in x around inf 64.6%
(FPCore (x y z t) :precision binary64 (if (<= x -4.2e+113) x (if (<= x 2.2e+107) (/ y (* z -3.0)) (* y (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.2e+113) {
tmp = x;
} else if (x <= 2.2e+107) {
tmp = y / (z * -3.0);
} else {
tmp = y * (x / 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 (x <= (-4.2d+113)) then
tmp = x
else if (x <= 2.2d+107) then
tmp = y / (z * (-3.0d0))
else
tmp = y * (x / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4.2e+113) {
tmp = x;
} else if (x <= 2.2e+107) {
tmp = y / (z * -3.0);
} else {
tmp = y * (x / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4.2e+113: tmp = x elif x <= 2.2e+107: tmp = y / (z * -3.0) else: tmp = y * (x / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4.2e+113) tmp = x; elseif (x <= 2.2e+107) tmp = Float64(y / Float64(z * -3.0)); else tmp = Float64(y * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -4.2e+113) tmp = x; elseif (x <= 2.2e+107) tmp = y / (z * -3.0); else tmp = y * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4.2e+113], x, If[LessEqual[x, 2.2e+107], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+113}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+107}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{y}\\
\end{array}
\end{array}
if x < -4.1999999999999998e113Initial program 92.0%
sub-neg92.0%
associate-+l+92.0%
distribute-frac-neg92.0%
neg-mul-192.0%
*-commutative92.0%
times-frac92.0%
fma-define92.0%
metadata-eval92.0%
associate-*l*92.0%
*-commutative92.0%
Simplified92.0%
Taylor expanded in x around inf 63.3%
if -4.1999999999999998e113 < x < 2.2e107Initial program 95.1%
sub-neg95.1%
associate-+l+95.1%
distribute-frac-neg95.1%
neg-mul-195.1%
*-commutative95.1%
times-frac95.1%
fma-define95.1%
metadata-eval95.1%
associate-*l*95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in y around inf 54.1%
associate-*r/54.1%
metadata-eval54.1%
Simplified54.1%
Taylor expanded in x around 0 45.0%
clear-num45.0%
un-div-inv45.1%
div-inv45.1%
metadata-eval45.1%
Applied egg-rr45.1%
if 2.2e107 < x Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
times-frac98.1%
fma-define98.1%
metadata-eval98.1%
associate-*l*98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in y around inf 75.9%
associate-*r/75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in x around inf 64.6%
(FPCore (x y z t) :precision binary64 (if (<= x -1.3e+102) x (if (<= x 2e+107) (* y (/ -0.3333333333333333 z)) (* y (/ x y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.3e+102) {
tmp = x;
} else if (x <= 2e+107) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = y * (x / 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 (x <= (-1.3d+102)) then
tmp = x
else if (x <= 2d+107) then
tmp = y * ((-0.3333333333333333d0) / z)
else
tmp = y * (x / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.3e+102) {
tmp = x;
} else if (x <= 2e+107) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = y * (x / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.3e+102: tmp = x elif x <= 2e+107: tmp = y * (-0.3333333333333333 / z) else: tmp = y * (x / y) return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.3e+102) tmp = x; elseif (x <= 2e+107) tmp = Float64(y * Float64(-0.3333333333333333 / z)); else tmp = Float64(y * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.3e+102) tmp = x; elseif (x <= 2e+107) tmp = y * (-0.3333333333333333 / z); else tmp = y * (x / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.3e+102], x, If[LessEqual[x, 2e+107], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+102}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+107}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{y}\\
\end{array}
\end{array}
if x < -1.30000000000000003e102Initial program 92.0%
sub-neg92.0%
associate-+l+92.0%
distribute-frac-neg92.0%
neg-mul-192.0%
*-commutative92.0%
times-frac92.0%
fma-define92.0%
metadata-eval92.0%
associate-*l*92.0%
*-commutative92.0%
Simplified92.0%
Taylor expanded in x around inf 63.3%
if -1.30000000000000003e102 < x < 1.9999999999999999e107Initial program 95.1%
sub-neg95.1%
associate-+l+95.1%
distribute-frac-neg95.1%
neg-mul-195.1%
*-commutative95.1%
times-frac95.1%
fma-define95.1%
metadata-eval95.1%
associate-*l*95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in y around inf 54.1%
associate-*r/54.1%
metadata-eval54.1%
Simplified54.1%
Taylor expanded in x around 0 45.0%
if 1.9999999999999999e107 < x Initial program 98.1%
sub-neg98.1%
associate-+l+98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
times-frac98.1%
fma-define98.1%
metadata-eval98.1%
associate-*l*98.0%
*-commutative98.0%
Simplified98.0%
Taylor expanded in y around inf 75.9%
associate-*r/75.9%
metadata-eval75.9%
Simplified75.9%
Taylor expanded in x around inf 64.6%
(FPCore (x y z t) :precision binary64 (if (<= x -9.6e+113) x (if (<= x 2.9e+107) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -9.6e+113) {
tmp = x;
} else if (x <= 2.9e+107) {
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 <= (-9.6d+113)) then
tmp = x
else if (x <= 2.9d+107) 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 <= -9.6e+113) {
tmp = x;
} else if (x <= 2.9e+107) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -9.6e+113: tmp = x elif x <= 2.9e+107: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -9.6e+113) tmp = x; elseif (x <= 2.9e+107) 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 <= -9.6e+113) tmp = x; elseif (x <= 2.9e+107) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -9.6e+113], x, If[LessEqual[x, 2.9e+107], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.6 \cdot 10^{+113}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+107}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -9.59999999999999933e113 or 2.89999999999999988e107 < x Initial program 95.1%
sub-neg95.1%
associate-+l+95.1%
distribute-frac-neg95.1%
neg-mul-195.1%
*-commutative95.1%
times-frac95.1%
fma-define95.1%
metadata-eval95.1%
associate-*l*95.0%
*-commutative95.0%
Simplified95.0%
Taylor expanded in x around inf 62.9%
if -9.59999999999999933e113 < x < 2.89999999999999988e107Initial program 95.1%
sub-neg95.1%
associate-+l+95.1%
distribute-frac-neg95.1%
neg-mul-195.1%
*-commutative95.1%
times-frac95.1%
fma-define95.1%
metadata-eval95.1%
associate-*l*95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in y around inf 54.1%
associate-*r/54.1%
metadata-eval54.1%
Simplified54.1%
Taylor expanded in x around 0 45.0%
(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 95.1%
sub-neg95.1%
associate-+l+95.1%
distribute-frac-neg95.1%
neg-mul-195.1%
*-commutative95.1%
times-frac95.1%
fma-define95.1%
metadata-eval95.1%
associate-*l*95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in x around inf 29.1%
(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 2024123
(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))))