
(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 15 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 -6e-79)
(+ x (/ (* t_1 0.3333333333333333) z))
(if (<= y 7.1e-81)
(+ x (/ (/ t z) (* y 3.0)))
(+ x (* t_1 (/ 0.3333333333333333 z)))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -6e-79) {
tmp = x + ((t_1 * 0.3333333333333333) / z);
} else if (y <= 7.1e-81) {
tmp = x + ((t / z) / (y * 3.0));
} else {
tmp = x + (t_1 * (0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (t / y) - y
if (y <= (-6d-79)) then
tmp = x + ((t_1 * 0.3333333333333333d0) / z)
else if (y <= 7.1d-81) then
tmp = x + ((t / z) / (y * 3.0d0))
else
tmp = x + (t_1 * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -6e-79) {
tmp = x + ((t_1 * 0.3333333333333333) / z);
} else if (y <= 7.1e-81) {
tmp = x + ((t / z) / (y * 3.0));
} else {
tmp = x + (t_1 * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / y) - y tmp = 0 if y <= -6e-79: tmp = x + ((t_1 * 0.3333333333333333) / z) elif y <= 7.1e-81: tmp = x + ((t / z) / (y * 3.0)) else: tmp = x + (t_1 * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / y) - y) tmp = 0.0 if (y <= -6e-79) tmp = Float64(x + Float64(Float64(t_1 * 0.3333333333333333) / z)); elseif (y <= 7.1e-81) tmp = Float64(x + Float64(Float64(t / z) / Float64(y * 3.0))); else tmp = Float64(x + Float64(t_1 * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / y) - y; tmp = 0.0; if (y <= -6e-79) tmp = x + ((t_1 * 0.3333333333333333) / z); elseif (y <= 7.1e-81) tmp = x + ((t / z) / (y * 3.0)); else tmp = x + (t_1 * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[y, -6e-79], N[(x + N[(N[(t$95$1 * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.1e-81], N[(x + N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{y} - y\\
\mathbf{if}\;y \leq -6 \cdot 10^{-79}:\\
\;\;\;\;x + \frac{t\_1 \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 7.1 \cdot 10^{-81}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1 \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.99999999999999999e-79Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.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.8%
Taylor expanded in x around 0 99.7%
+-commutative99.7%
associate-*r/99.8%
Simplified99.8%
if -5.99999999999999999e-79 < y < 7.10000000000000019e-81Initial program 90.0%
+-commutative90.0%
associate-+r-90.0%
+-commutative90.0%
associate--l+90.0%
sub-neg90.0%
remove-double-neg90.0%
distribute-frac-neg90.0%
distribute-neg-in90.0%
remove-double-neg90.0%
sub-neg90.0%
neg-mul-190.0%
times-frac87.5%
distribute-frac-neg87.5%
neg-mul-187.5%
*-commutative87.5%
associate-/l*87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in t around inf 88.9%
*-commutative88.9%
associate-*l/89.0%
associate-*r/87.6%
metadata-eval87.6%
associate-*r/86.7%
associate-*r/87.6%
metadata-eval87.6%
*-commutative87.6%
associate-/r*87.6%
Simplified87.6%
+-commutative87.6%
*-un-lft-identity87.6%
fma-define87.6%
*-commutative87.6%
div-inv87.6%
clear-num87.5%
frac-times87.6%
metadata-eval87.6%
div-inv87.6%
metadata-eval87.6%
associate-*r*87.6%
*-commutative87.6%
associate-/r/89.0%
associate-*r/87.4%
*-commutative87.4%
associate-/r*86.6%
clear-num86.6%
Applied egg-rr86.6%
fma-undefine86.6%
*-lft-identity86.6%
associate-/l/89.1%
associate-/r*98.2%
*-commutative98.2%
Simplified98.2%
if 7.10000000000000019e-81 < y Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate--l+99.7%
sub-neg99.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.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.8%
Final simplification99.2%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ y (* z -3.0))))
(if (<= t -7.8e+75)
(+ (+ (/ t (* z (* y 3.0))) x) t_1)
(+ t_1 (+ x (/ 1.0 (* z (/ (* y 3.0) t))))))))
double code(double x, double y, double z, double t) {
double t_1 = y / (z * -3.0);
double tmp;
if (t <= -7.8e+75) {
tmp = ((t / (z * (y * 3.0))) + x) + t_1;
} else {
tmp = t_1 + (x + (1.0 / (z * ((y * 3.0) / t))));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = y / (z * (-3.0d0))
if (t <= (-7.8d+75)) then
tmp = ((t / (z * (y * 3.0d0))) + x) + t_1
else
tmp = t_1 + (x + (1.0d0 / (z * ((y * 3.0d0) / t))))
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 (t <= -7.8e+75) {
tmp = ((t / (z * (y * 3.0))) + x) + t_1;
} else {
tmp = t_1 + (x + (1.0 / (z * ((y * 3.0) / t))));
}
return tmp;
}
def code(x, y, z, t): t_1 = y / (z * -3.0) tmp = 0 if t <= -7.8e+75: tmp = ((t / (z * (y * 3.0))) + x) + t_1 else: tmp = t_1 + (x + (1.0 / (z * ((y * 3.0) / t)))) return tmp
function code(x, y, z, t) t_1 = Float64(y / Float64(z * -3.0)) tmp = 0.0 if (t <= -7.8e+75) tmp = Float64(Float64(Float64(t / Float64(z * Float64(y * 3.0))) + x) + t_1); else tmp = Float64(t_1 + Float64(x + Float64(1.0 / Float64(z * Float64(Float64(y * 3.0) / t))))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y / (z * -3.0); tmp = 0.0; if (t <= -7.8e+75) tmp = ((t / (z * (y * 3.0))) + x) + t_1; else tmp = t_1 + (x + (1.0 / (z * ((y * 3.0) / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.8e+75], N[(N[(N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(x + N[(1.0 / N[(z * N[(N[(y * 3.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z \cdot -3}\\
\mathbf{if}\;t \leq -7.8 \cdot 10^{+75}:\\
\;\;\;\;\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(x + \frac{1}{z \cdot \frac{y \cdot 3}{t}}\right)\\
\end{array}
\end{array}
if t < -7.80000000000000075e75Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
sub-neg99.8%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
if -7.80000000000000075e75 < t Initial program 94.7%
+-commutative94.7%
associate-+r-94.7%
sub-neg94.7%
associate-*l*94.6%
*-commutative94.6%
distribute-frac-neg294.6%
distribute-rgt-neg-in94.6%
metadata-eval94.6%
Simplified94.6%
clear-num94.6%
inv-pow94.6%
Applied egg-rr94.6%
unpow-194.6%
associate-/l*98.3%
Simplified98.3%
Final simplification98.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.9e-76) (not (<= y 8.4e-81))) (+ x (* (- (/ t y) y) (/ 0.3333333333333333 z))) (+ x (/ (/ t z) (* y 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.9e-76) || !(y <= 8.4e-81)) {
tmp = x + (((t / y) - y) * (0.3333333333333333 / z));
} else {
tmp = x + ((t / z) / (y * 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.9d-76)) .or. (.not. (y <= 8.4d-81))) then
tmp = x + (((t / y) - y) * (0.3333333333333333d0 / z))
else
tmp = x + ((t / z) / (y * 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.9e-76) || !(y <= 8.4e-81)) {
tmp = x + (((t / y) - y) * (0.3333333333333333 / z));
} else {
tmp = x + ((t / z) / (y * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.9e-76) or not (y <= 8.4e-81): tmp = x + (((t / y) - y) * (0.3333333333333333 / z)) else: tmp = x + ((t / z) / (y * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.9e-76) || !(y <= 8.4e-81)) tmp = Float64(x + Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z))); else tmp = Float64(x + Float64(Float64(t / z) / Float64(y * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.9e-76) || ~((y <= 8.4e-81))) tmp = x + (((t / y) - y) * (0.3333333333333333 / z)); else tmp = x + ((t / z) / (y * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.9e-76], N[Not[LessEqual[y, 8.4e-81]], $MachinePrecision]], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.9 \cdot 10^{-76} \lor \neg \left(y \leq 8.4 \cdot 10^{-81}\right):\\
\;\;\;\;x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\end{array}
\end{array}
if y < -1.9000000000000001e-76 or 8.3999999999999997e-81 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.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.8%
if -1.9000000000000001e-76 < y < 8.3999999999999997e-81Initial program 90.0%
+-commutative90.0%
associate-+r-90.0%
+-commutative90.0%
associate--l+90.0%
sub-neg90.0%
remove-double-neg90.0%
distribute-frac-neg90.0%
distribute-neg-in90.0%
remove-double-neg90.0%
sub-neg90.0%
neg-mul-190.0%
times-frac87.5%
distribute-frac-neg87.5%
neg-mul-187.5%
*-commutative87.5%
associate-/l*87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in t around inf 88.9%
*-commutative88.9%
associate-*l/89.0%
associate-*r/87.6%
metadata-eval87.6%
associate-*r/86.7%
associate-*r/87.6%
metadata-eval87.6%
*-commutative87.6%
associate-/r*87.6%
Simplified87.6%
+-commutative87.6%
*-un-lft-identity87.6%
fma-define87.6%
*-commutative87.6%
div-inv87.6%
clear-num87.5%
frac-times87.6%
metadata-eval87.6%
div-inv87.6%
metadata-eval87.6%
associate-*r*87.6%
*-commutative87.6%
associate-/r/89.0%
associate-*r/87.4%
*-commutative87.4%
associate-/r*86.6%
clear-num86.6%
Applied egg-rr86.6%
fma-undefine86.6%
*-lft-identity86.6%
associate-/l/89.1%
associate-/r*98.2%
*-commutative98.2%
Simplified98.2%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ t y) y)))
(if (<= y -9.4e-66)
(+ x (/ t_1 (* z 3.0)))
(if (<= y 4.3e-82)
(+ x (/ (/ t z) (* y 3.0)))
(+ x (* t_1 (/ 0.3333333333333333 z)))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -9.4e-66) {
tmp = x + (t_1 / (z * 3.0));
} else if (y <= 4.3e-82) {
tmp = x + ((t / z) / (y * 3.0));
} else {
tmp = x + (t_1 * (0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = (t / y) - y
if (y <= (-9.4d-66)) then
tmp = x + (t_1 / (z * 3.0d0))
else if (y <= 4.3d-82) then
tmp = x + ((t / z) / (y * 3.0d0))
else
tmp = x + (t_1 * (0.3333333333333333d0 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -9.4e-66) {
tmp = x + (t_1 / (z * 3.0));
} else if (y <= 4.3e-82) {
tmp = x + ((t / z) / (y * 3.0));
} else {
tmp = x + (t_1 * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / y) - y tmp = 0 if y <= -9.4e-66: tmp = x + (t_1 / (z * 3.0)) elif y <= 4.3e-82: tmp = x + ((t / z) / (y * 3.0)) else: tmp = x + (t_1 * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / y) - y) tmp = 0.0 if (y <= -9.4e-66) tmp = Float64(x + Float64(t_1 / Float64(z * 3.0))); elseif (y <= 4.3e-82) tmp = Float64(x + Float64(Float64(t / z) / Float64(y * 3.0))); else tmp = Float64(x + Float64(t_1 * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / y) - y; tmp = 0.0; if (y <= -9.4e-66) tmp = x + (t_1 / (z * 3.0)); elseif (y <= 4.3e-82) tmp = x + ((t / z) / (y * 3.0)); else tmp = x + (t_1 * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[y, -9.4e-66], N[(x + N[(t$95$1 / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.3e-82], N[(x + N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{y} - y\\
\mathbf{if}\;y \leq -9.4 \cdot 10^{-66}:\\
\;\;\;\;x + \frac{t\_1}{z \cdot 3}\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{-82}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1 \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -9.3999999999999998e-66Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.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.8%
*-commutative99.8%
clear-num99.7%
div-inv99.7%
metadata-eval99.7%
un-div-inv99.8%
Applied egg-rr99.8%
if -9.3999999999999998e-66 < y < 4.30000000000000019e-82Initial program 90.2%
+-commutative90.2%
associate-+r-90.2%
+-commutative90.2%
associate--l+90.2%
sub-neg90.2%
remove-double-neg90.2%
distribute-frac-neg90.2%
distribute-neg-in90.2%
remove-double-neg90.2%
sub-neg90.2%
neg-mul-190.2%
times-frac87.8%
distribute-frac-neg87.8%
neg-mul-187.8%
*-commutative87.8%
associate-/l*87.8%
*-commutative87.8%
Simplified87.7%
Taylor expanded in t around inf 89.2%
*-commutative89.2%
associate-*l/89.2%
associate-*r/87.9%
metadata-eval87.9%
associate-*r/87.0%
associate-*r/87.9%
metadata-eval87.9%
*-commutative87.9%
associate-/r*87.9%
Simplified87.9%
+-commutative87.9%
*-un-lft-identity87.9%
fma-define87.9%
*-commutative87.9%
div-inv88.0%
clear-num87.8%
frac-times87.9%
metadata-eval87.9%
div-inv87.9%
metadata-eval87.9%
associate-*r*87.9%
*-commutative87.9%
associate-/r/89.3%
associate-*r/87.7%
*-commutative87.7%
associate-/r*86.9%
clear-num87.0%
Applied egg-rr87.0%
fma-undefine87.0%
*-lft-identity87.0%
associate-/l/89.4%
associate-/r*98.2%
*-commutative98.2%
Simplified98.2%
if 4.30000000000000019e-82 < y Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate--l+99.7%
sub-neg99.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.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.8%
Final simplification99.1%
(FPCore (x y z t) :precision binary64 (if (<= t -5e+72) (+ (+ (/ t (* z (* y 3.0))) x) (/ y (* z -3.0))) (+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5e+72) {
tmp = ((t / (z * (y * 3.0))) + x) + (y / (z * -3.0));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-5d+72)) then
tmp = ((t / (z * (y * 3.0d0))) + x) + (y / (z * (-3.0d0)))
else
tmp = x + (((t / y) - y) / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5e+72) {
tmp = ((t / (z * (y * 3.0))) + x) + (y / (z * -3.0));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -5e+72: tmp = ((t / (z * (y * 3.0))) + x) + (y / (z * -3.0)) else: tmp = x + (((t / y) - y) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -5e+72) tmp = Float64(Float64(Float64(t / Float64(z * Float64(y * 3.0))) + x) + Float64(y / Float64(z * -3.0))); else tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -5e+72) tmp = ((t / (z * (y * 3.0))) + x) + (y / (z * -3.0)); else tmp = x + (((t / y) - y) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -5e+72], N[(N[(N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+72}:\\
\;\;\;\;\left(\frac{t}{z \cdot \left(y \cdot 3\right)} + x\right) + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if t < -4.99999999999999992e72Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
sub-neg99.8%
associate-*l*99.9%
*-commutative99.9%
distribute-frac-neg299.9%
distribute-rgt-neg-in99.9%
metadata-eval99.9%
Simplified99.9%
if -4.99999999999999992e72 < t Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
+-commutative94.6%
associate--l+94.6%
sub-neg94.6%
remove-double-neg94.6%
distribute-frac-neg94.6%
distribute-neg-in94.6%
remove-double-neg94.6%
sub-neg94.6%
neg-mul-194.6%
times-frac97.9%
distribute-frac-neg97.9%
neg-mul-197.9%
*-commutative97.9%
associate-/l*97.8%
*-commutative97.8%
Simplified97.8%
*-commutative97.8%
clear-num97.8%
div-inv97.8%
metadata-eval97.8%
un-div-inv97.9%
Applied egg-rr97.9%
Final simplification98.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.35e+25)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 3.2e+91)
(+ x (* 0.3333333333333333 (/ t (* z y))))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.35e+25) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 3.2e+91) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.35d+25)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 3.2d+91) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.35e+25) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 3.2e+91) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.35e+25: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 3.2e+91: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.35e+25) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 3.2e+91) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.35e+25) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 3.2e+91) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.35e+25], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e+91], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{+25}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+91}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.35e25Initial program 99.8%
Taylor expanded in t around 0 98.8%
*-commutative98.8%
associate-*l/99.0%
Applied egg-rr99.0%
if -1.35e25 < y < 3.19999999999999989e91Initial program 93.1%
+-commutative93.1%
associate-+r-93.1%
+-commutative93.1%
associate--l+93.1%
sub-neg93.1%
remove-double-neg93.1%
distribute-frac-neg93.1%
distribute-neg-in93.1%
remove-double-neg93.1%
sub-neg93.1%
neg-mul-193.1%
times-frac91.4%
distribute-frac-neg91.4%
neg-mul-191.4%
*-commutative91.4%
associate-/l*91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in t around inf 86.4%
if 3.19999999999999989e91 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.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.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in t around 0 99.8%
metadata-eval99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
associate-*l/99.8%
associate-*r/99.9%
distribute-rgt-neg-in99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification91.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -6.6e+32)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 8e+89)
(+ x (/ t (* 3.0 (* z y))))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.6e+32) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 8e+89) {
tmp = x + (t / (3.0 * (z * y)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-6.6d+32)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 8d+89) then
tmp = x + (t / (3.0d0 * (z * y)))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6.6e+32) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 8e+89) {
tmp = x + (t / (3.0 * (z * y)));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6.6e+32: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 8e+89: tmp = x + (t / (3.0 * (z * y))) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6.6e+32) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 8e+89) tmp = Float64(x + Float64(t / Float64(3.0 * Float64(z * y)))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -6.6e+32) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 8e+89) tmp = x + (t / (3.0 * (z * y))); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6.6e+32], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+89], N[(x + N[(t / N[(3.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.6 \cdot 10^{+32}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+89}:\\
\;\;\;\;x + \frac{t}{3 \cdot \left(z \cdot y\right)}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -6.60000000000000039e32Initial program 99.8%
Taylor expanded in t around 0 98.8%
*-commutative98.8%
associate-*l/99.0%
Applied egg-rr99.0%
if -6.60000000000000039e32 < y < 7.99999999999999996e89Initial program 93.1%
+-commutative93.1%
associate-+r-93.1%
+-commutative93.1%
associate--l+93.1%
sub-neg93.1%
remove-double-neg93.1%
distribute-frac-neg93.1%
distribute-neg-in93.1%
remove-double-neg93.1%
sub-neg93.1%
neg-mul-193.1%
times-frac91.4%
distribute-frac-neg91.4%
neg-mul-191.4%
*-commutative91.4%
associate-/l*91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in t around inf 86.4%
*-commutative86.4%
associate-*l/86.4%
associate-*r/85.5%
metadata-eval85.5%
associate-*r/84.8%
associate-*r/85.5%
metadata-eval85.5%
*-commutative85.5%
associate-/r*85.5%
Simplified85.5%
+-commutative85.5%
*-un-lft-identity85.5%
fma-define85.5%
*-commutative85.5%
div-inv85.5%
clear-num85.4%
frac-times85.4%
metadata-eval85.4%
div-inv85.5%
metadata-eval85.5%
associate-*r*85.5%
*-commutative85.5%
associate-/r/86.5%
associate-*r/85.3%
*-commutative85.3%
associate-/r*84.8%
clear-num84.9%
Applied egg-rr84.9%
fma-undefine84.9%
*-lft-identity84.9%
associate-/r*86.5%
*-commutative86.5%
associate-*r*86.5%
Simplified86.5%
if 7.99999999999999996e89 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.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.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in t around 0 99.8%
metadata-eval99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
associate-*l/99.8%
associate-*r/99.9%
distribute-rgt-neg-in99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification91.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.05e+27)
(- x (/ (* y 0.3333333333333333) z))
(if (<= y 8e+89)
(+ x (/ (/ t z) (* y 3.0)))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.05e+27) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 8e+89) {
tmp = x + ((t / z) / (y * 3.0));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.05d+27)) then
tmp = x - ((y * 0.3333333333333333d0) / z)
else if (y <= 8d+89) then
tmp = x + ((t / z) / (y * 3.0d0))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.05e+27) {
tmp = x - ((y * 0.3333333333333333) / z);
} else if (y <= 8e+89) {
tmp = x + ((t / z) / (y * 3.0));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.05e+27: tmp = x - ((y * 0.3333333333333333) / z) elif y <= 8e+89: tmp = x + ((t / z) / (y * 3.0)) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.05e+27) tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); elseif (y <= 8e+89) tmp = Float64(x + Float64(Float64(t / z) / Float64(y * 3.0))); else tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.05e+27) tmp = x - ((y * 0.3333333333333333) / z); elseif (y <= 8e+89) tmp = x + ((t / z) / (y * 3.0)); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.05e+27], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+89], N[(x + N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.05 \cdot 10^{+27}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+89}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.0500000000000001e27Initial program 99.8%
Taylor expanded in t around 0 98.8%
*-commutative98.8%
associate-*l/99.0%
Applied egg-rr99.0%
if -2.0500000000000001e27 < y < 7.99999999999999996e89Initial program 93.1%
+-commutative93.1%
associate-+r-93.1%
+-commutative93.1%
associate--l+93.1%
sub-neg93.1%
remove-double-neg93.1%
distribute-frac-neg93.1%
distribute-neg-in93.1%
remove-double-neg93.1%
sub-neg93.1%
neg-mul-193.1%
times-frac91.4%
distribute-frac-neg91.4%
neg-mul-191.4%
*-commutative91.4%
associate-/l*91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in t around inf 86.4%
*-commutative86.4%
associate-*l/86.4%
associate-*r/85.5%
metadata-eval85.5%
associate-*r/84.8%
associate-*r/85.5%
metadata-eval85.5%
*-commutative85.5%
associate-/r*85.5%
Simplified85.5%
+-commutative85.5%
*-un-lft-identity85.5%
fma-define85.5%
*-commutative85.5%
div-inv85.5%
clear-num85.4%
frac-times85.4%
metadata-eval85.4%
div-inv85.5%
metadata-eval85.5%
associate-*r*85.5%
*-commutative85.5%
associate-/r/86.5%
associate-*r/85.3%
*-commutative85.3%
associate-/r*84.8%
clear-num84.9%
Applied egg-rr84.9%
fma-undefine84.9%
*-lft-identity84.9%
associate-/l/86.5%
associate-/r*92.7%
*-commutative92.7%
Simplified92.7%
if 7.99999999999999996e89 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.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.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in t around 0 99.8%
metadata-eval99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
associate-*l/99.8%
associate-*r/99.9%
distribute-rgt-neg-in99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification95.3%
(FPCore (x y z t) :precision binary64 (if (<= x -1350.0) x (if (<= x 3.2e+64) (* -0.3333333333333333 (/ y z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1350.0) {
tmp = x;
} else if (x <= 3.2e+64) {
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 (x <= (-1350.0d0)) then
tmp = x
else if (x <= 3.2d+64) 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 (x <= -1350.0) {
tmp = x;
} else if (x <= 3.2e+64) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1350.0: tmp = x elif x <= 3.2e+64: tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1350.0) tmp = x; elseif (x <= 3.2e+64) 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 (x <= -1350.0) tmp = x; elseif (x <= 3.2e+64) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1350.0], x, If[LessEqual[x, 3.2e+64], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1350:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+64}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1350 or 3.20000000000000019e64 < x Initial program 95.8%
+-commutative95.8%
associate-+r-95.8%
+-commutative95.8%
associate--l+95.8%
sub-neg95.8%
remove-double-neg95.8%
distribute-frac-neg95.8%
distribute-neg-in95.8%
remove-double-neg95.8%
sub-neg95.8%
neg-mul-195.8%
times-frac95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
associate-/l*95.9%
*-commutative95.9%
Simplified95.8%
Taylor expanded in x around inf 50.2%
if -1350 < x < 3.20000000000000019e64Initial program 95.7%
Taylor expanded in t around 0 55.0%
Taylor expanded in x around 0 45.5%
Final simplification47.7%
(FPCore (x y z t) :precision binary64 (if (<= x -4400000.0) x (if (<= x 5.2e+63) (* y (/ -0.3333333333333333 z)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4400000.0) {
tmp = x;
} else if (x <= 5.2e+63) {
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 <= (-4400000.0d0)) then
tmp = x
else if (x <= 5.2d+63) 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 <= -4400000.0) {
tmp = x;
} else if (x <= 5.2e+63) {
tmp = y * (-0.3333333333333333 / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4400000.0: tmp = x elif x <= 5.2e+63: tmp = y * (-0.3333333333333333 / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4400000.0) tmp = x; elseif (x <= 5.2e+63) 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 <= -4400000.0) tmp = x; elseif (x <= 5.2e+63) tmp = y * (-0.3333333333333333 / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4400000.0], x, If[LessEqual[x, 5.2e+63], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4400000:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{+63}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.4e6 or 5.2000000000000002e63 < x Initial program 95.8%
+-commutative95.8%
associate-+r-95.8%
+-commutative95.8%
associate--l+95.8%
sub-neg95.8%
remove-double-neg95.8%
distribute-frac-neg95.8%
distribute-neg-in95.8%
remove-double-neg95.8%
sub-neg95.8%
neg-mul-195.8%
times-frac95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
associate-/l*95.9%
*-commutative95.9%
Simplified95.8%
Taylor expanded in x around inf 50.2%
if -4.4e6 < x < 5.2000000000000002e63Initial program 95.7%
Taylor expanded in t around 0 55.0%
Taylor expanded in x around 0 45.5%
associate-*r/45.6%
associate-*l/45.5%
associate-/r/45.5%
Simplified45.5%
associate-/r/45.5%
Applied egg-rr45.5%
Final simplification47.7%
(FPCore (x y z t) :precision binary64 (if (<= x -70000000.0) x (if (<= x 3.9e+67) (/ (* y -0.3333333333333333) z) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -70000000.0) {
tmp = x;
} else if (x <= 3.9e+67) {
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 <= (-70000000.0d0)) then
tmp = x
else if (x <= 3.9d+67) 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 <= -70000000.0) {
tmp = x;
} else if (x <= 3.9e+67) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -70000000.0: tmp = x elif x <= 3.9e+67: tmp = (y * -0.3333333333333333) / z else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -70000000.0) tmp = x; elseif (x <= 3.9e+67) tmp = Float64(Float64(y * -0.3333333333333333) / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -70000000.0) tmp = x; elseif (x <= 3.9e+67) tmp = (y * -0.3333333333333333) / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -70000000.0], x, If[LessEqual[x, 3.9e+67], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -70000000:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+67}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -7e7 or 3.90000000000000007e67 < x Initial program 95.8%
+-commutative95.8%
associate-+r-95.8%
+-commutative95.8%
associate--l+95.8%
sub-neg95.8%
remove-double-neg95.8%
distribute-frac-neg95.8%
distribute-neg-in95.8%
remove-double-neg95.8%
sub-neg95.8%
neg-mul-195.8%
times-frac95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
associate-/l*95.9%
*-commutative95.9%
Simplified95.8%
Taylor expanded in x around inf 50.2%
if -7e7 < x < 3.90000000000000007e67Initial program 95.7%
Taylor expanded in t around 0 55.0%
Taylor expanded in x around 0 45.5%
associate-*r/45.6%
Applied egg-rr45.6%
Final simplification47.7%
(FPCore (x y z t) :precision binary64 (+ x (* y (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + (y * (-0.3333333333333333 / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + (y * ((-0.3333333333333333d0) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (y * (-0.3333333333333333 / z));
}
def code(x, y, z, t): return x + (y * (-0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(y * Float64(-0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + (y * (-0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{-0.3333333333333333}{z}
\end{array}
Initial program 95.7%
+-commutative95.7%
associate-+r-95.7%
+-commutative95.7%
associate--l+95.7%
sub-neg95.7%
remove-double-neg95.7%
distribute-frac-neg95.7%
distribute-neg-in95.7%
remove-double-neg95.7%
sub-neg95.7%
neg-mul-195.7%
times-frac94.7%
distribute-frac-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in t around 0 61.0%
metadata-eval61.0%
distribute-lft-neg-in61.0%
*-commutative61.0%
associate-*l/61.0%
associate-*r/61.0%
distribute-rgt-neg-in61.0%
distribute-neg-frac61.0%
metadata-eval61.0%
Simplified61.0%
Final simplification61.0%
(FPCore (x y z t) :precision binary64 (- x (/ y (* z 3.0))))
double code(double x, double y, double z, double t) {
return x - (y / (z * 3.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x - (y / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
return x - (y / (z * 3.0));
}
def code(x, y, z, t): return x - (y / (z * 3.0))
function code(x, y, z, t) return Float64(x - Float64(y / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x - (y / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y}{z \cdot 3}
\end{array}
Initial program 95.7%
Taylor expanded in t around 0 61.0%
associate-*r/61.0%
clear-num61.0%
*-commutative61.0%
Applied egg-rr61.0%
associate-/r/61.0%
*-commutative61.0%
associate-*r*61.0%
*-commutative61.0%
associate-*r/61.0%
metadata-eval61.0%
*-commutative61.0%
Simplified61.0%
clear-num61.0%
div-inv61.0%
metadata-eval61.0%
div-inv61.0%
Applied egg-rr61.0%
Final simplification61.0%
(FPCore (x y z t) :precision binary64 (- x (/ (* y 0.3333333333333333) z)))
double code(double x, double y, double z, double t) {
return x - ((y * 0.3333333333333333) / z);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x - ((y * 0.3333333333333333d0) / z)
end function
public static double code(double x, double y, double z, double t) {
return x - ((y * 0.3333333333333333) / z);
}
def code(x, y, z, t): return x - ((y * 0.3333333333333333) / z)
function code(x, y, z, t) return Float64(x - Float64(Float64(y * 0.3333333333333333) / z)) end
function tmp = code(x, y, z, t) tmp = x - ((y * 0.3333333333333333) / z); end
code[x_, y_, z_, t_] := N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot 0.3333333333333333}{z}
\end{array}
Initial program 95.7%
Taylor expanded in t around 0 61.0%
*-commutative61.0%
associate-*l/61.0%
Applied egg-rr61.0%
Final simplification61.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.7%
+-commutative95.7%
associate-+r-95.7%
+-commutative95.7%
associate--l+95.7%
sub-neg95.7%
remove-double-neg95.7%
distribute-frac-neg95.7%
distribute-neg-in95.7%
remove-double-neg95.7%
sub-neg95.7%
neg-mul-195.7%
times-frac94.7%
distribute-frac-neg94.7%
neg-mul-194.7%
*-commutative94.7%
associate-/l*94.6%
*-commutative94.6%
Simplified94.6%
Taylor expanded in x around inf 29.5%
Final simplification29.5%
(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 2024072
(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))))