
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 2e-5) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ (+ x (/ t (* z (* 3.0 y)))) (/ (/ y -3.0) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 2e-5) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x + (t / (z * (3.0 * y)))) + ((y / -3.0) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= 2d-5) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = (x + (t / (z * (3.0d0 * y)))) + ((y / (-3.0d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 2e-5) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x + (t / (z * (3.0 * y)))) + ((y / -3.0) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 2e-5: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = (x + (t / (z * (3.0 * y)))) + ((y / -3.0) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 2e-5) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(3.0 * y)))) + Float64(Float64(y / -3.0) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 2e-5) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = (x + (t / (z * (3.0 * y)))) + ((y / -3.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-5], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 2 \cdot 10^{-5}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(3 \cdot y\right)}\right) + \frac{\frac{y}{-3}}{z}\\
\end{array}
\end{array}
if (*.f64 z 3) < 2.00000000000000016e-5Initial program 93.0%
+-commutative93.0%
associate-+r-93.0%
+-commutative93.0%
associate--l+93.0%
sub-neg93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
sub-neg93.0%
neg-mul-193.0%
times-frac98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
associate-/l*98.2%
*-commutative98.2%
Simplified99.2%
*-commutative99.2%
clear-num99.2%
div-inv99.2%
metadata-eval99.2%
un-div-inv99.3%
Applied egg-rr99.3%
if 2.00000000000000016e-5 < (*.f64 z 3) Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
sub-neg99.9%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
*-un-lft-identity99.9%
times-frac99.9%
Applied egg-rr99.9%
associate-*l/100.0%
*-lft-identity100.0%
Simplified100.0%
Final simplification99.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (/ y (* z 3.0)))))
(if (<= (* z 3.0) -4e-40)
t_1
(if (<= (* z 3.0) 2e-5)
(* 0.3333333333333333 (/ (- (/ t y) y) z))
(if (<= (* z 3.0) 1e+172)
t_1
(+ x (* 0.3333333333333333 (/ t (* z y)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (y / (z * 3.0));
double tmp;
if ((z * 3.0) <= -4e-40) {
tmp = t_1;
} else if ((z * 3.0) <= 2e-5) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} else if ((z * 3.0) <= 1e+172) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x - (y / (z * 3.0d0))
if ((z * 3.0d0) <= (-4d-40)) then
tmp = t_1
else if ((z * 3.0d0) <= 2d-5) then
tmp = 0.3333333333333333d0 * (((t / y) - y) / z)
else if ((z * 3.0d0) <= 1d+172) then
tmp = t_1
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 t_1 = x - (y / (z * 3.0));
double tmp;
if ((z * 3.0) <= -4e-40) {
tmp = t_1;
} else if ((z * 3.0) <= 2e-5) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} else if ((z * 3.0) <= 1e+172) {
tmp = t_1;
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (y / (z * 3.0)) tmp = 0 if (z * 3.0) <= -4e-40: tmp = t_1 elif (z * 3.0) <= 2e-5: tmp = 0.3333333333333333 * (((t / y) - y) / z) elif (z * 3.0) <= 1e+172: tmp = t_1 else: tmp = x + (0.3333333333333333 * (t / (z * y))) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(y / Float64(z * 3.0))) tmp = 0.0 if (Float64(z * 3.0) <= -4e-40) tmp = t_1; elseif (Float64(z * 3.0) <= 2e-5) tmp = Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z)); elseif (Float64(z * 3.0) <= 1e+172) tmp = t_1; else tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (y / (z * 3.0)); tmp = 0.0; if ((z * 3.0) <= -4e-40) tmp = t_1; elseif ((z * 3.0) <= 2e-5) tmp = 0.3333333333333333 * (((t / y) - y) / z); elseif ((z * 3.0) <= 1e+172) tmp = t_1; else tmp = x + (0.3333333333333333 * (t / (z * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * 3.0), $MachinePrecision], -4e-40], t$95$1, If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-5], N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e+172], t$95$1, N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{z \cdot 3}\\
\mathbf{if}\;z \cdot 3 \leq -4 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot 3 \leq 2 \cdot 10^{-5}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{elif}\;z \cdot 3 \leq 10^{+172}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if (*.f64 z 3) < -3.9999999999999997e-40 or 2.00000000000000016e-5 < (*.f64 z 3) < 1.0000000000000001e172Initial program 99.8%
Taylor expanded in t around 0 84.8%
associate-*r/84.8%
*-commutative84.8%
Applied egg-rr84.8%
associate-/l*84.8%
metadata-eval84.8%
associate-/r*84.9%
*-commutative84.9%
div-inv84.9%
add-cube-cbrt84.3%
associate-/l*84.3%
pow284.3%
Applied egg-rr84.3%
associate-*r/84.3%
unpow284.3%
rem-3cbrt-lft84.9%
Simplified84.9%
if -3.9999999999999997e-40 < (*.f64 z 3) < 2.00000000000000016e-5Initial program 89.9%
+-commutative89.9%
associate-+r-89.9%
sub-neg89.9%
associate-*l*89.9%
*-commutative89.9%
distribute-frac-neg289.9%
distribute-rgt-neg-in89.9%
metadata-eval89.9%
Simplified89.9%
clear-num89.9%
inv-pow89.9%
Applied egg-rr89.9%
unpow-189.9%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in z around 0 88.9%
associate-*r/88.9%
+-commutative88.9%
metadata-eval88.9%
cancel-sign-sub-inv88.9%
*-commutative88.9%
div-sub87.3%
*-commutative87.3%
associate-*r/87.4%
associate-/l/80.4%
*-commutative80.4%
associate-*r/80.4%
distribute-lft-out--80.4%
associate-/r*87.4%
div-sub88.9%
Simplified88.9%
if 1.0000000000000001e172 < (*.f64 z 3) Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.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-frac75.4%
distribute-frac-neg75.4%
neg-mul-175.4%
*-commutative75.4%
associate-/l*75.4%
*-commutative75.4%
Simplified75.3%
Taylor expanded in t around inf 95.5%
Final simplification87.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (* z -3.0))))
(if (<= y -2.8e-6)
t_1
(if (<= y -1.44e-142)
x
(if (<= y 3.8e-130)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 1.65e+127) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y / (z * -3.0);
double tmp;
if (y <= -2.8e-6) {
tmp = t_1;
} else if (y <= -1.44e-142) {
tmp = x;
} else if (y <= 3.8e-130) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.65e+127) {
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 = y / (z * (-3.0d0))
if (y <= (-2.8d-6)) then
tmp = t_1
else if (y <= (-1.44d-142)) then
tmp = x
else if (y <= 3.8d-130) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 1.65d+127) 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 = y / (z * -3.0);
double tmp;
if (y <= -2.8e-6) {
tmp = t_1;
} else if (y <= -1.44e-142) {
tmp = x;
} else if (y <= 3.8e-130) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 1.65e+127) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (z * -3.0) tmp = 0 if y <= -2.8e-6: tmp = t_1 elif y <= -1.44e-142: tmp = x elif y <= 3.8e-130: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 1.65e+127: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(z * -3.0)) tmp = 0.0 if (y <= -2.8e-6) tmp = t_1; elseif (y <= -1.44e-142) tmp = x; elseif (y <= 3.8e-130) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 1.65e+127) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (z * -3.0); tmp = 0.0; if (y <= -2.8e-6) tmp = t_1; elseif (y <= -1.44e-142) tmp = x; elseif (y <= 3.8e-130) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 1.65e+127) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e-6], t$95$1, If[LessEqual[y, -1.44e-142], x, If[LessEqual[y, 3.8e-130], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+127], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z \cdot -3}\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{-6}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.44 \cdot 10^{-142}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-130}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+127}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.79999999999999987e-6 or 1.64999999999999988e127 < y Initial program 99.0%
+-commutative99.0%
associate-+r-99.0%
+-commutative99.0%
associate--l+99.0%
sub-neg99.0%
remove-double-neg99.0%
distribute-frac-neg99.0%
distribute-neg-in99.0%
remove-double-neg99.0%
sub-neg99.0%
neg-mul-199.0%
times-frac99.0%
distribute-frac-neg99.0%
neg-mul-199.0%
*-commutative99.0%
associate-/l*98.8%
*-commutative98.8%
Simplified99.7%
Taylor expanded in y around inf 90.1%
Taylor expanded in x around 0 70.7%
associate-*r/70.7%
metadata-eval70.7%
div-inv70.9%
associate-/l/70.9%
Applied egg-rr70.9%
if -2.79999999999999987e-6 < y < -1.4399999999999999e-142 or 3.7999999999999998e-130 < y < 1.64999999999999988e127Initial program 97.8%
+-commutative97.8%
associate-+r-97.8%
+-commutative97.8%
associate--l+97.8%
sub-neg97.8%
remove-double-neg97.8%
distribute-frac-neg97.8%
distribute-neg-in97.8%
remove-double-neg97.8%
sub-neg97.8%
neg-mul-197.8%
times-frac94.7%
distribute-frac-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.6%
*-commutative94.6%
Simplified95.7%
Taylor expanded in x around inf 54.5%
if -1.4399999999999999e-142 < y < 3.7999999999999998e-130Initial program 81.1%
+-commutative81.1%
associate-+r-81.1%
sub-neg81.1%
associate-*l*81.2%
*-commutative81.2%
distribute-frac-neg281.2%
distribute-rgt-neg-in81.2%
metadata-eval81.2%
Simplified81.2%
clear-num81.2%
inv-pow81.2%
Applied egg-rr81.2%
unpow-181.2%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in z around 0 74.6%
associate-*r/74.6%
+-commutative74.6%
metadata-eval74.6%
cancel-sign-sub-inv74.6%
*-commutative74.6%
div-sub74.6%
*-commutative74.6%
associate-*r/74.6%
associate-/l/64.6%
*-commutative64.6%
associate-*r/64.6%
distribute-lft-out--64.6%
associate-/r*74.6%
div-sub74.6%
Simplified74.6%
Taylor expanded in t around inf 64.6%
Final simplification63.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (* z -3.0))))
(if (<= y -1.2e-5)
t_1
(if (<= y -1.6e-147)
x
(if (<= y 1.02e-131)
(* 0.3333333333333333 (/ (/ t z) y))
(if (<= y 7.5e+127) x t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y / (z * -3.0);
double tmp;
if (y <= -1.2e-5) {
tmp = t_1;
} else if (y <= -1.6e-147) {
tmp = x;
} else if (y <= 1.02e-131) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 7.5e+127) {
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 = y / (z * (-3.0d0))
if (y <= (-1.2d-5)) then
tmp = t_1
else if (y <= (-1.6d-147)) then
tmp = x
else if (y <= 1.02d-131) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else if (y <= 7.5d+127) 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 = y / (z * -3.0);
double tmp;
if (y <= -1.2e-5) {
tmp = t_1;
} else if (y <= -1.6e-147) {
tmp = x;
} else if (y <= 1.02e-131) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 7.5e+127) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (z * -3.0) tmp = 0 if y <= -1.2e-5: tmp = t_1 elif y <= -1.6e-147: tmp = x elif y <= 1.02e-131: tmp = 0.3333333333333333 * ((t / z) / y) elif y <= 7.5e+127: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(z * -3.0)) tmp = 0.0 if (y <= -1.2e-5) tmp = t_1; elseif (y <= -1.6e-147) tmp = x; elseif (y <= 1.02e-131) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); elseif (y <= 7.5e+127) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (z * -3.0); tmp = 0.0; if (y <= -1.2e-5) tmp = t_1; elseif (y <= -1.6e-147) tmp = x; elseif (y <= 1.02e-131) tmp = 0.3333333333333333 * ((t / z) / y); elseif (y <= 7.5e+127) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.2e-5], t$95$1, If[LessEqual[y, -1.6e-147], x, If[LessEqual[y, 1.02e-131], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+127], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z \cdot -3}\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.6 \cdot 10^{-147}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{-131}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+127}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.2e-5 or 7.4999999999999996e127 < y Initial program 99.0%
+-commutative99.0%
associate-+r-99.0%
+-commutative99.0%
associate--l+99.0%
sub-neg99.0%
remove-double-neg99.0%
distribute-frac-neg99.0%
distribute-neg-in99.0%
remove-double-neg99.0%
sub-neg99.0%
neg-mul-199.0%
times-frac99.0%
distribute-frac-neg99.0%
neg-mul-199.0%
*-commutative99.0%
associate-/l*98.8%
*-commutative98.8%
Simplified99.7%
Taylor expanded in y around inf 90.1%
Taylor expanded in x around 0 70.7%
associate-*r/70.7%
metadata-eval70.7%
div-inv70.9%
associate-/l/70.9%
Applied egg-rr70.9%
if -1.2e-5 < y < -1.5999999999999999e-147 or 1.02000000000000001e-131 < y < 7.4999999999999996e127Initial program 97.8%
+-commutative97.8%
associate-+r-97.8%
+-commutative97.8%
associate--l+97.8%
sub-neg97.8%
remove-double-neg97.8%
distribute-frac-neg97.8%
distribute-neg-in97.8%
remove-double-neg97.8%
sub-neg97.8%
neg-mul-197.8%
times-frac94.7%
distribute-frac-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.6%
*-commutative94.6%
Simplified95.7%
Taylor expanded in x around inf 54.5%
if -1.5999999999999999e-147 < y < 1.02000000000000001e-131Initial program 81.1%
+-commutative81.1%
associate-+r-81.1%
sub-neg81.1%
associate-*l*81.2%
*-commutative81.2%
distribute-frac-neg281.2%
distribute-rgt-neg-in81.2%
metadata-eval81.2%
Simplified81.2%
clear-num81.2%
inv-pow81.2%
Applied egg-rr81.2%
unpow-181.2%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in z around 0 74.6%
associate-*r/74.6%
+-commutative74.6%
metadata-eval74.6%
cancel-sign-sub-inv74.6%
*-commutative74.6%
div-sub74.6%
*-commutative74.6%
associate-*r/74.6%
associate-/l/64.6%
*-commutative64.6%
associate-*r/64.6%
distribute-lft-out--64.6%
associate-/r*74.6%
div-sub74.6%
Simplified74.6%
Taylor expanded in t around inf 64.6%
associate-/l/76.2%
Simplified76.2%
Final simplification66.1%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z 3.0) -4e-40) (not (<= (* z 3.0) 2e-5))) (- x (/ y (* z 3.0))) (* 0.3333333333333333 (/ (- (/ t y) y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -4e-40) || !((z * 3.0) <= 2e-5)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((z * 3.0d0) <= (-4d-40)) .or. (.not. ((z * 3.0d0) <= 2d-5))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = 0.3333333333333333d0 * (((t / y) - y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -4e-40) || !((z * 3.0) <= 2e-5)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * 3.0) <= -4e-40) or not ((z * 3.0) <= 2e-5): tmp = x - (y / (z * 3.0)) else: tmp = 0.3333333333333333 * (((t / y) - y) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * 3.0) <= -4e-40) || !(Float64(z * 3.0) <= 2e-5)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * 3.0) <= -4e-40) || ~(((z * 3.0) <= 2e-5))) tmp = x - (y / (z * 3.0)); else tmp = 0.3333333333333333 * (((t / y) - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * 3.0), $MachinePrecision], -4e-40], N[Not[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-5]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -4 \cdot 10^{-40} \lor \neg \left(z \cdot 3 \leq 2 \cdot 10^{-5}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\end{array}
\end{array}
if (*.f64 z 3) < -3.9999999999999997e-40 or 2.00000000000000016e-5 < (*.f64 z 3) Initial program 99.8%
Taylor expanded in t around 0 82.1%
associate-*r/82.2%
*-commutative82.2%
Applied egg-rr82.2%
associate-/l*82.1%
metadata-eval82.1%
associate-/r*82.2%
*-commutative82.2%
div-inv82.2%
add-cube-cbrt81.7%
associate-/l*81.7%
pow281.7%
Applied egg-rr81.7%
associate-*r/81.7%
unpow281.7%
rem-3cbrt-lft82.2%
Simplified82.2%
if -3.9999999999999997e-40 < (*.f64 z 3) < 2.00000000000000016e-5Initial program 89.9%
+-commutative89.9%
associate-+r-89.9%
sub-neg89.9%
associate-*l*89.9%
*-commutative89.9%
distribute-frac-neg289.9%
distribute-rgt-neg-in89.9%
metadata-eval89.9%
Simplified89.9%
clear-num89.9%
inv-pow89.9%
Applied egg-rr89.9%
unpow-189.9%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in z around 0 88.9%
associate-*r/88.9%
+-commutative88.9%
metadata-eval88.9%
cancel-sign-sub-inv88.9%
*-commutative88.9%
div-sub87.3%
*-commutative87.3%
associate-*r/87.4%
associate-/l/80.4%
*-commutative80.4%
associate-*r/80.4%
distribute-lft-out--80.4%
associate-/r*87.4%
div-sub88.9%
Simplified88.9%
Final simplification85.7%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 2e-5) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ (/ y (* z -3.0)) (+ x (/ t (* 3.0 (* z y)))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 2e-5) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (y / (z * -3.0)) + (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 ((z * 3.0d0) <= 2d-5) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = (y / (z * (-3.0d0))) + (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 ((z * 3.0) <= 2e-5) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (y / (z * -3.0)) + (x + (t / (3.0 * (z * y))));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 2e-5: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = (y / (z * -3.0)) + (x + (t / (3.0 * (z * y)))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 2e-5) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(Float64(y / Float64(z * -3.0)) + Float64(x + Float64(t / Float64(3.0 * Float64(z * y))))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 2e-5) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = (y / (z * -3.0)) + (x + (t / (3.0 * (z * y)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-5], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t / N[(3.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 2 \cdot 10^{-5}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3} + \left(x + \frac{t}{3 \cdot \left(z \cdot y\right)}\right)\\
\end{array}
\end{array}
if (*.f64 z 3) < 2.00000000000000016e-5Initial program 93.0%
+-commutative93.0%
associate-+r-93.0%
+-commutative93.0%
associate--l+93.0%
sub-neg93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
sub-neg93.0%
neg-mul-193.0%
times-frac98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
associate-/l*98.2%
*-commutative98.2%
Simplified99.2%
*-commutative99.2%
clear-num99.2%
div-inv99.2%
metadata-eval99.2%
un-div-inv99.3%
Applied egg-rr99.3%
if 2.00000000000000016e-5 < (*.f64 z 3) Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
sub-neg99.9%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Final simplification99.5%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 2e-5) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ (+ x (/ t (* z (* 3.0 y)))) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 2e-5) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x + (t / (z * (3.0 * 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-5) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
else
tmp = (x + (t / (z * (3.0d0 * 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-5) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 2e-5: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 2e-5) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); else tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(3.0 * 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) <= 2e-5) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-5], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(t / N[(z * N[(3.0 * 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 2 \cdot 10^{-5}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(3 \cdot y\right)}\right) + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if (*.f64 z 3) < 2.00000000000000016e-5Initial program 93.0%
+-commutative93.0%
associate-+r-93.0%
+-commutative93.0%
associate--l+93.0%
sub-neg93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
sub-neg93.0%
neg-mul-193.0%
times-frac98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
associate-/l*98.2%
*-commutative98.2%
Simplified99.2%
*-commutative99.2%
clear-num99.2%
div-inv99.2%
metadata-eval99.2%
un-div-inv99.3%
Applied egg-rr99.3%
if 2.00000000000000016e-5 < (*.f64 z 3) Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
sub-neg99.9%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -0.102) (not (<= y 1.22e+98))) (- x (/ y (* z 3.0))) (+ x (/ (* t (/ 0.3333333333333333 z)) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.102) || !(y <= 1.22e+98)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-0.102d0)) .or. (.not. (y <= 1.22d+98))) then
tmp = x - (y / (z * 3.0d0))
else
tmp = x + ((t * (0.3333333333333333d0 / z)) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.102) || !(y <= 1.22e+98)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = x + ((t * (0.3333333333333333 / z)) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -0.102) or not (y <= 1.22e+98): tmp = x - (y / (z * 3.0)) else: tmp = x + ((t * (0.3333333333333333 / z)) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -0.102) || !(y <= 1.22e+98)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); else tmp = Float64(x + Float64(Float64(t * Float64(0.3333333333333333 / z)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -0.102) || ~((y <= 1.22e+98))) tmp = x - (y / (z * 3.0)); else tmp = x + ((t * (0.3333333333333333 / z)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -0.102], N[Not[LessEqual[y, 1.22e+98]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.102 \lor \neg \left(y \leq 1.22 \cdot 10^{+98}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -0.101999999999999993 or 1.22e98 < y Initial program 99.1%
Taylor expanded in t around 0 90.9%
associate-*r/90.9%
*-commutative90.9%
Applied egg-rr90.9%
associate-/l*90.9%
metadata-eval90.9%
associate-/r*90.9%
*-commutative90.9%
div-inv91.1%
add-cube-cbrt90.2%
associate-/l*90.2%
pow290.2%
Applied egg-rr90.2%
associate-*r/90.2%
unpow290.2%
rem-3cbrt-lft91.1%
Simplified91.1%
if -0.101999999999999993 < y < 1.22e98Initial program 91.1%
+-commutative91.1%
associate-+r-91.1%
+-commutative91.1%
associate--l+91.1%
sub-neg91.1%
remove-double-neg91.1%
distribute-frac-neg91.1%
distribute-neg-in91.1%
remove-double-neg91.1%
sub-neg91.1%
neg-mul-191.1%
times-frac93.6%
distribute-frac-neg93.6%
neg-mul-193.6%
*-commutative93.6%
associate-/l*93.5%
*-commutative93.5%
Simplified94.3%
*-commutative94.3%
clear-num94.3%
div-inv94.3%
metadata-eval94.3%
un-div-inv94.4%
Applied egg-rr94.4%
Taylor expanded in t around inf 84.0%
associate-*r/84.1%
*-commutative84.1%
times-frac85.9%
*-commutative85.9%
associate-*l/90.0%
Simplified90.0%
Final simplification90.5%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 1e+172) (+ x (* (- (/ t y) y) (/ 0.3333333333333333 z))) (+ x (* 0.3333333333333333 (/ t (* z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 1e+172) {
tmp = x + (((t / y) - y) * (0.3333333333333333 / z));
} 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 ((z * 3.0d0) <= 1d+172) then
tmp = x + (((t / y) - y) * (0.3333333333333333d0 / z))
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 ((z * 3.0) <= 1e+172) {
tmp = x + (((t / y) - y) * (0.3333333333333333 / z));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 1e+172: tmp = x + (((t / y) - y) * (0.3333333333333333 / z)) else: tmp = x + (0.3333333333333333 * (t / (z * y))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 1e+172) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z))); 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 ((z * 3.0) <= 1e+172) tmp = x + (((t / y) - y) * (0.3333333333333333 / z)); else tmp = x + (0.3333333333333333 * (t / (z * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e+172], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $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}\;z \cdot 3 \leq 10^{+172}:\\
\;\;\;\;x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if (*.f64 z 3) < 1.0000000000000001e172Initial program 94.3%
+-commutative94.3%
associate-+r-94.3%
+-commutative94.3%
associate--l+94.3%
sub-neg94.3%
remove-double-neg94.3%
distribute-frac-neg94.3%
distribute-neg-in94.3%
remove-double-neg94.3%
sub-neg94.3%
neg-mul-194.3%
times-frac98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
associate-/l*98.0%
*-commutative98.0%
Simplified98.9%
if 1.0000000000000001e172 < (*.f64 z 3) Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.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-frac75.4%
distribute-frac-neg75.4%
neg-mul-175.4%
*-commutative75.4%
associate-/l*75.4%
*-commutative75.4%
Simplified75.3%
Taylor expanded in t around inf 95.5%
Final simplification98.6%
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 1e+172) (+ x (/ (- (/ t y) y) (* z 3.0))) (+ x (* 0.3333333333333333 (/ t (* z y))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 1e+172) {
tmp = x + (((t / y) - y) / (z * 3.0));
} 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 ((z * 3.0d0) <= 1d+172) then
tmp = x + (((t / y) - y) / (z * 3.0d0))
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 ((z * 3.0) <= 1e+172) {
tmp = x + (((t / y) - y) / (z * 3.0));
} else {
tmp = x + (0.3333333333333333 * (t / (z * y)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 1e+172: tmp = x + (((t / y) - y) / (z * 3.0)) else: tmp = x + (0.3333333333333333 * (t / (z * y))) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 1e+172) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); 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 ((z * 3.0) <= 1e+172) tmp = x + (((t / y) - y) / (z * 3.0)); else tmp = x + (0.3333333333333333 * (t / (z * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e+172], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $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}\;z \cdot 3 \leq 10^{+172}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if (*.f64 z 3) < 1.0000000000000001e172Initial program 94.3%
+-commutative94.3%
associate-+r-94.3%
+-commutative94.3%
associate--l+94.3%
sub-neg94.3%
remove-double-neg94.3%
distribute-frac-neg94.3%
distribute-neg-in94.3%
remove-double-neg94.3%
sub-neg94.3%
neg-mul-194.3%
times-frac98.1%
distribute-frac-neg98.1%
neg-mul-198.1%
*-commutative98.1%
associate-/l*98.0%
*-commutative98.0%
Simplified98.9%
*-commutative98.9%
clear-num98.9%
div-inv98.9%
metadata-eval98.9%
un-div-inv99.0%
Applied egg-rr99.0%
if 1.0000000000000001e172 < (*.f64 z 3) Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.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-frac75.4%
distribute-frac-neg75.4%
neg-mul-175.4%
*-commutative75.4%
associate-/l*75.4%
*-commutative75.4%
Simplified75.3%
Taylor expanded in t around inf 95.5%
Final simplification98.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.44e-142) (not (<= y 6.5e-132))) (+ x (* y (/ -0.3333333333333333 z))) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.44e-142) || !(y <= 6.5e-132)) {
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 <= (-1.44d-142)) .or. (.not. (y <= 6.5d-132))) 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 <= -1.44e-142) || !(y <= 6.5e-132)) {
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 <= -1.44e-142) or not (y <= 6.5e-132): 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 <= -1.44e-142) || !(y <= 6.5e-132)) 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 <= -1.44e-142) || ~((y <= 6.5e-132))) 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, -1.44e-142], N[Not[LessEqual[y, 6.5e-132]], $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.44 \cdot 10^{-142} \lor \neg \left(y \leq 6.5 \cdot 10^{-132}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -1.4399999999999999e-142 or 6.49999999999999991e-132 < y Initial program 98.4%
+-commutative98.4%
associate-+r-98.4%
+-commutative98.4%
associate--l+98.4%
sub-neg98.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-frac97.0%
distribute-frac-neg97.0%
neg-mul-197.0%
*-commutative97.0%
associate-/l*96.9%
*-commutative96.9%
Simplified97.9%
Taylor expanded in t around 0 80.9%
metadata-eval80.9%
distribute-lft-neg-in80.9%
*-commutative80.9%
associate-*l/80.9%
associate-*r/80.9%
distribute-rgt-neg-out80.9%
distribute-neg-frac80.9%
metadata-eval80.9%
Simplified80.9%
if -1.4399999999999999e-142 < y < 6.49999999999999991e-132Initial program 81.1%
+-commutative81.1%
associate-+r-81.1%
sub-neg81.1%
associate-*l*81.2%
*-commutative81.2%
distribute-frac-neg281.2%
distribute-rgt-neg-in81.2%
metadata-eval81.2%
Simplified81.2%
clear-num81.2%
inv-pow81.2%
Applied egg-rr81.2%
unpow-181.2%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in z around 0 74.6%
associate-*r/74.6%
+-commutative74.6%
metadata-eval74.6%
cancel-sign-sub-inv74.6%
*-commutative74.6%
div-sub74.6%
*-commutative74.6%
associate-*r/74.6%
associate-/l/64.6%
*-commutative64.6%
associate-*r/64.6%
distribute-lft-out--64.6%
associate-/r*74.6%
div-sub74.6%
Simplified74.6%
Taylor expanded in t around inf 64.6%
associate-/l/76.2%
Simplified76.2%
Final simplification79.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.75e-151) (not (<= y 6e-133))) (- x (/ y (* z 3.0))) (* 0.3333333333333333 (/ (/ t z) y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.75e-151) || !(y <= 6e-133)) {
tmp = x - (y / (z * 3.0));
} 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 <= (-2.75d-151)) .or. (.not. (y <= 6d-133))) then
tmp = x - (y / (z * 3.0d0))
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 <= -2.75e-151) || !(y <= 6e-133)) {
tmp = x - (y / (z * 3.0));
} else {
tmp = 0.3333333333333333 * ((t / z) / y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.75e-151) or not (y <= 6e-133): tmp = x - (y / (z * 3.0)) else: tmp = 0.3333333333333333 * ((t / z) / y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.75e-151) || !(y <= 6e-133)) tmp = Float64(x - Float64(y / Float64(z * 3.0))); 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 <= -2.75e-151) || ~((y <= 6e-133))) tmp = x - (y / (z * 3.0)); else tmp = 0.3333333333333333 * ((t / z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.75e-151], N[Not[LessEqual[y, 6e-133]], $MachinePrecision]], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.75 \cdot 10^{-151} \lor \neg \left(y \leq 6 \cdot 10^{-133}\right):\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -2.7499999999999999e-151 or 6.00000000000000038e-133 < y Initial program 98.4%
Taylor expanded in t around 0 80.9%
associate-*r/80.9%
*-commutative80.9%
Applied egg-rr80.9%
associate-/l*80.9%
metadata-eval80.9%
associate-/r*80.9%
*-commutative80.9%
div-inv81.0%
add-cube-cbrt80.4%
associate-/l*80.4%
pow280.4%
Applied egg-rr80.4%
associate-*r/80.4%
unpow280.4%
rem-3cbrt-lft81.0%
Simplified81.0%
if -2.7499999999999999e-151 < y < 6.00000000000000038e-133Initial program 81.1%
+-commutative81.1%
associate-+r-81.1%
sub-neg81.1%
associate-*l*81.2%
*-commutative81.2%
distribute-frac-neg281.2%
distribute-rgt-neg-in81.2%
metadata-eval81.2%
Simplified81.2%
clear-num81.2%
inv-pow81.2%
Applied egg-rr81.2%
unpow-181.2%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in z around 0 74.6%
associate-*r/74.6%
+-commutative74.6%
metadata-eval74.6%
cancel-sign-sub-inv74.6%
*-commutative74.6%
div-sub74.6%
*-commutative74.6%
associate-*r/74.6%
associate-/l/64.6%
*-commutative64.6%
associate-*r/64.6%
distribute-lft-out--64.6%
associate-/r*74.6%
div-sub74.6%
Simplified74.6%
Taylor expanded in t around inf 64.6%
associate-/l/76.2%
Simplified76.2%
Final simplification80.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.44e-142)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 3.8e-130)
(* 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.44e-142) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 3.8e-130) {
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 <= (-1.44d-142)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 3.8d-130) 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 <= -1.44e-142) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 3.8e-130) {
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 <= -1.44e-142: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 3.8e-130: 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 <= -1.44e-142) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 3.8e-130) tmp = 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 <= -1.44e-142) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 3.8e-130) 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, -1.44e-142], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e-130], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.44 \cdot 10^{-142}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{-130}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{else}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.4399999999999999e-142Initial program 98.0%
+-commutative98.0%
associate-+r-98.0%
+-commutative98.0%
associate--l+98.0%
sub-neg98.0%
remove-double-neg98.0%
distribute-frac-neg98.0%
distribute-neg-in98.0%
remove-double-neg98.0%
sub-neg98.0%
neg-mul-198.0%
times-frac97.0%
distribute-frac-neg97.0%
neg-mul-197.0%
*-commutative97.0%
associate-/l*96.9%
*-commutative96.9%
Simplified97.9%
Taylor expanded in t around 0 81.7%
metadata-eval81.7%
distribute-lft-neg-in81.7%
*-commutative81.7%
associate-*l/81.8%
associate-*r/81.8%
distribute-rgt-neg-out81.8%
distribute-neg-frac81.8%
metadata-eval81.8%
Simplified81.8%
if -1.4399999999999999e-142 < y < 3.7999999999999998e-130Initial program 81.1%
+-commutative81.1%
associate-+r-81.1%
sub-neg81.1%
associate-*l*81.2%
*-commutative81.2%
distribute-frac-neg281.2%
distribute-rgt-neg-in81.2%
metadata-eval81.2%
Simplified81.2%
clear-num81.2%
inv-pow81.2%
Applied egg-rr81.2%
unpow-181.2%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in z around 0 74.6%
associate-*r/74.6%
+-commutative74.6%
metadata-eval74.6%
cancel-sign-sub-inv74.6%
*-commutative74.6%
div-sub74.6%
*-commutative74.6%
associate-*r/74.6%
associate-/l/64.6%
*-commutative64.6%
associate-*r/64.6%
distribute-lft-out--64.6%
associate-/r*74.6%
div-sub74.6%
Simplified74.6%
Taylor expanded in t around inf 64.6%
associate-/l/76.2%
Simplified76.2%
if 3.7999999999999998e-130 < y Initial program 98.9%
Taylor expanded in t around 0 80.0%
Final simplification79.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -0.000155) (not (<= y 9.8e+126))) (* -0.3333333333333333 (/ y z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.000155) || !(y <= 9.8e+126)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-0.000155d0)) .or. (.not. (y <= 9.8d+126))) then
tmp = (-0.3333333333333333d0) * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -0.000155) || !(y <= 9.8e+126)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -0.000155) or not (y <= 9.8e+126): tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -0.000155) || !(y <= 9.8e+126)) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -0.000155) || ~((y <= 9.8e+126))) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -0.000155], N[Not[LessEqual[y, 9.8e+126]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.000155 \lor \neg \left(y \leq 9.8 \cdot 10^{+126}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.55e-4 or 9.80000000000000002e126 < y Initial program 99.0%
+-commutative99.0%
associate-+r-99.0%
sub-neg99.0%
associate-*l*99.0%
*-commutative99.0%
distribute-frac-neg299.0%
distribute-rgt-neg-in99.0%
metadata-eval99.0%
Simplified99.0%
clear-num98.9%
inv-pow98.9%
Applied egg-rr98.9%
unpow-198.9%
associate-/l*99.0%
Simplified99.0%
Taylor expanded in y around inf 70.7%
if -1.55e-4 < y < 9.80000000000000002e126Initial program 91.7%
+-commutative91.7%
associate-+r-91.7%
+-commutative91.7%
associate--l+91.7%
sub-neg91.7%
remove-double-neg91.7%
distribute-frac-neg91.7%
distribute-neg-in91.7%
remove-double-neg91.7%
sub-neg91.7%
neg-mul-191.7%
times-frac94.0%
distribute-frac-neg94.0%
neg-mul-194.0%
*-commutative94.0%
associate-/l*93.9%
*-commutative93.9%
Simplified94.6%
Taylor expanded in x around inf 42.5%
Final simplification54.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.1) (not (<= y 1e+127))) (/ y (* z -3.0)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.1) || !(y <= 1e+127)) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-3.1d0)) .or. (.not. (y <= 1d+127))) then
tmp = y / (z * (-3.0d0))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.1) || !(y <= 1e+127)) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.1) or not (y <= 1e+127): tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.1) || !(y <= 1e+127)) tmp = Float64(y / Float64(z * -3.0)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.1) || ~((y <= 1e+127))) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.1], N[Not[LessEqual[y, 1e+127]], $MachinePrecision]], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \lor \neg \left(y \leq 10^{+127}\right):\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.10000000000000009 or 9.99999999999999955e126 < y Initial program 99.0%
+-commutative99.0%
associate-+r-99.0%
+-commutative99.0%
associate--l+99.0%
sub-neg99.0%
remove-double-neg99.0%
distribute-frac-neg99.0%
distribute-neg-in99.0%
remove-double-neg99.0%
sub-neg99.0%
neg-mul-199.0%
times-frac99.0%
distribute-frac-neg99.0%
neg-mul-199.0%
*-commutative99.0%
associate-/l*98.8%
*-commutative98.8%
Simplified99.7%
Taylor expanded in y around inf 90.1%
Taylor expanded in x around 0 70.7%
associate-*r/70.7%
metadata-eval70.7%
div-inv70.9%
associate-/l/70.9%
Applied egg-rr70.9%
if -3.10000000000000009 < y < 9.99999999999999955e126Initial program 91.7%
+-commutative91.7%
associate-+r-91.7%
+-commutative91.7%
associate--l+91.7%
sub-neg91.7%
remove-double-neg91.7%
distribute-frac-neg91.7%
distribute-neg-in91.7%
remove-double-neg91.7%
sub-neg91.7%
neg-mul-191.7%
times-frac94.0%
distribute-frac-neg94.0%
neg-mul-194.0%
*-commutative94.0%
associate-/l*93.9%
*-commutative93.9%
Simplified94.6%
Taylor expanded in x around inf 42.5%
Final simplification54.6%
(FPCore (x y z t) :precision binary64 (if (<= y -0.122) (* y (/ -0.3333333333333333 z)) (if (<= y 9.8e+126) x (* -0.3333333333333333 (/ y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.122) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 9.8e+126) {
tmp = x;
} else {
tmp = -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 <= (-0.122d0)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= 9.8d+126) then
tmp = x
else
tmp = (-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 <= -0.122) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 9.8e+126) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -0.122: tmp = y * (-0.3333333333333333 / z) elif y <= 9.8e+126: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -0.122) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= 9.8e+126) tmp = x; else tmp = Float64(-0.3333333333333333 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -0.122) tmp = y * (-0.3333333333333333 / z); elseif (y <= 9.8e+126) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -0.122], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.8e+126], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.122:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+126}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -0.122Initial program 98.6%
+-commutative98.6%
associate-+r-98.6%
+-commutative98.6%
associate--l+98.6%
sub-neg98.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.5%
distribute-frac-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.4%
*-commutative98.4%
Simplified99.8%
Taylor expanded in y around inf 85.9%
Taylor expanded in x around 0 65.4%
if -0.122 < y < 9.80000000000000002e126Initial program 91.7%
+-commutative91.7%
associate-+r-91.7%
+-commutative91.7%
associate--l+91.7%
sub-neg91.7%
remove-double-neg91.7%
distribute-frac-neg91.7%
distribute-neg-in91.7%
remove-double-neg91.7%
sub-neg91.7%
neg-mul-191.7%
times-frac94.0%
distribute-frac-neg94.0%
neg-mul-194.0%
*-commutative94.0%
associate-/l*93.9%
*-commutative93.9%
Simplified94.6%
Taylor expanded in x around inf 42.5%
if 9.80000000000000002e126 < y Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
sub-neg99.9%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
clear-num99.9%
inv-pow99.9%
Applied egg-rr99.9%
unpow-199.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around inf 82.6%
Final simplification54.5%
(FPCore (x y z t) :precision binary64 (if (<= y -3.2) (/ -0.3333333333333333 (/ z y)) (if (<= y 1e+127) x (* -0.3333333333333333 (/ y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.2) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 1e+127) {
tmp = x;
} else {
tmp = -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.2d0)) then
tmp = (-0.3333333333333333d0) / (z / y)
else if (y <= 1d+127) then
tmp = x
else
tmp = (-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.2) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 1e+127) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.2: tmp = -0.3333333333333333 / (z / y) elif y <= 1e+127: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.2) tmp = Float64(-0.3333333333333333 / Float64(z / y)); elseif (y <= 1e+127) tmp = x; else tmp = Float64(-0.3333333333333333 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.2) tmp = -0.3333333333333333 / (z / y); elseif (y <= 1e+127) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.2], N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+127], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 10^{+127}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -3.2000000000000002Initial program 98.6%
+-commutative98.6%
associate-+r-98.6%
sub-neg98.6%
associate-*l*98.6%
*-commutative98.6%
distribute-frac-neg298.6%
distribute-rgt-neg-in98.6%
metadata-eval98.6%
Simplified98.6%
clear-num98.5%
inv-pow98.5%
Applied egg-rr98.5%
unpow-198.5%
associate-/l*98.5%
Simplified98.5%
Taylor expanded in y around inf 65.3%
clear-num65.3%
un-div-inv65.4%
Applied egg-rr65.4%
if -3.2000000000000002 < y < 9.99999999999999955e126Initial program 91.7%
+-commutative91.7%
associate-+r-91.7%
+-commutative91.7%
associate--l+91.7%
sub-neg91.7%
remove-double-neg91.7%
distribute-frac-neg91.7%
distribute-neg-in91.7%
remove-double-neg91.7%
sub-neg91.7%
neg-mul-191.7%
times-frac94.0%
distribute-frac-neg94.0%
neg-mul-194.0%
*-commutative94.0%
associate-/l*93.9%
*-commutative93.9%
Simplified94.6%
Taylor expanded in x around inf 42.5%
if 9.99999999999999955e126 < y Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
sub-neg99.9%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
clear-num99.9%
inv-pow99.9%
Applied egg-rr99.9%
unpow-199.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around inf 82.6%
Final simplification54.5%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 94.8%
+-commutative94.8%
associate-+r-94.8%
+-commutative94.8%
associate--l+94.8%
sub-neg94.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-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.0%
*-commutative96.0%
Simplified96.8%
Taylor expanded in x around inf 33.3%
Final simplification33.3%
(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 2024055
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:alt
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))