
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= t -2.5e+106) (+ (+ (/ 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 <= -2.5e+106) {
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 <= (-2.5d+106)) 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 <= -2.5e+106) {
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 <= -2.5e+106: 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 <= -2.5e+106) 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 <= -2.5e+106) 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, -2.5e+106], 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 -2.5 \cdot 10^{+106}:\\
\;\;\;\;\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 < -2.4999999999999999e106Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
sub-neg97.7%
associate-*l*97.8%
*-commutative97.8%
distribute-frac-neg297.8%
distribute-rgt-neg-in97.8%
metadata-eval97.8%
Simplified97.8%
if -2.4999999999999999e106 < t Initial program 97.0%
sub-neg97.0%
associate-+l+97.0%
+-commutative97.0%
remove-double-neg97.0%
distribute-frac-neg97.0%
distribute-neg-in97.0%
remove-double-neg97.0%
sub-neg97.0%
neg-mul-197.0%
times-frac98.4%
distribute-frac-neg98.4%
neg-mul-198.4%
*-commutative98.4%
associate-/l*98.4%
*-commutative98.4%
Simplified98.8%
*-commutative98.8%
clear-num98.8%
div-inv98.9%
metadata-eval98.9%
un-div-inv98.9%
Applied egg-rr98.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.3e+95)
(/ (/ y z) -3.0)
(if (<= y -1.65e-249)
x
(if (<= y 9e+14) (* 0.3333333333333333 (/ t (* z y))) (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.3e+95) {
tmp = (y / z) / -3.0;
} else if (y <= -1.65e-249) {
tmp = x;
} else if (y <= 9e+14) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-5.3d+95)) then
tmp = (y / z) / (-3.0d0)
else if (y <= (-1.65d-249)) then
tmp = x
else if (y <= 9d+14) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else
tmp = y / (z * (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.3e+95) {
tmp = (y / z) / -3.0;
} else if (y <= -1.65e-249) {
tmp = x;
} else if (y <= 9e+14) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.3e+95: tmp = (y / z) / -3.0 elif y <= -1.65e-249: tmp = x elif y <= 9e+14: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.3e+95) tmp = Float64(Float64(y / z) / -3.0); elseif (y <= -1.65e-249) tmp = x; elseif (y <= 9e+14) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); else tmp = Float64(y / Float64(z * -3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.3e+95) tmp = (y / z) / -3.0; elseif (y <= -1.65e-249) tmp = x; elseif (y <= 9e+14) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.3e+95], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[y, -1.65e-249], x, If[LessEqual[y, 9e+14], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.3 \cdot 10^{+95}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{-249}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+14}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -5.3000000000000002e95Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.7%
fma-define99.7%
metadata-eval99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 99.5%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 78.4%
metadata-eval78.4%
times-frac78.5%
neg-mul-178.5%
associate-/r*78.5%
div-inv78.4%
frac-2neg78.4%
remove-double-neg78.4%
associate-*l/78.5%
div-inv78.6%
metadata-eval78.6%
Applied egg-rr78.6%
if -5.3000000000000002e95 < y < -1.65e-249Initial program 97.0%
sub-neg97.0%
associate-+l+97.0%
distribute-frac-neg97.0%
neg-mul-197.0%
*-commutative97.0%
times-frac97.0%
fma-define97.0%
metadata-eval97.0%
associate-*l*97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in x around inf 48.6%
if -1.65e-249 < y < 9e14Initial program 95.4%
sub-neg95.4%
associate-+l+95.4%
distribute-frac-neg95.4%
neg-mul-195.4%
*-commutative95.4%
times-frac95.4%
fma-define95.4%
metadata-eval95.4%
associate-*l*95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in y around 0 93.0%
Taylor expanded in t around inf 75.1%
if 9e14 < y Initial program 96.1%
sub-neg96.1%
associate-+l+96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
times-frac96.0%
fma-define96.0%
metadata-eval96.0%
associate-*l*96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in y around inf 94.2%
associate-*r/94.1%
metadata-eval94.1%
Simplified94.1%
Taylor expanded in y around inf 77.1%
metadata-eval77.1%
times-frac77.3%
neg-mul-177.3%
*-commutative77.3%
frac-2neg77.3%
remove-double-neg77.3%
distribute-rgt-neg-in77.3%
metadata-eval77.3%
Applied egg-rr77.3%
Final simplification69.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2.6e+64) (not (<= y 4.3e-38))) (- x (/ (/ y 3.0) z)) (+ x (/ (* t 0.3333333333333333) (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2.6e+64) || !(y <= 4.3e-38)) {
tmp = x - ((y / 3.0) / z);
} 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 <= (-2.6d+64)) .or. (.not. (y <= 4.3d-38))) then
tmp = x - ((y / 3.0d0) / z)
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 <= -2.6e+64) || !(y <= 4.3e-38)) {
tmp = x - ((y / 3.0) / z);
} else {
tmp = x + ((t * 0.3333333333333333) / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2.6e+64) or not (y <= 4.3e-38): tmp = x - ((y / 3.0) / z) else: tmp = x + ((t * 0.3333333333333333) / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2.6e+64) || !(y <= 4.3e-38)) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); else tmp = Float64(x + Float64(Float64(t * 0.3333333333333333) / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2.6e+64) || ~((y <= 4.3e-38))) tmp = x - ((y / 3.0) / z); else tmp = x + ((t * 0.3333333333333333) / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2.6e+64], N[Not[LessEqual[y, 4.3e-38]], $MachinePrecision]], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * 0.3333333333333333), $MachinePrecision] / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+64} \lor \neg \left(y \leq 4.3 \cdot 10^{-38}\right):\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot 0.3333333333333333}{z \cdot y}\\
\end{array}
\end{array}
if y < -2.59999999999999997e64 or 4.3000000000000002e-38 < y Initial program 98.4%
sub-neg98.4%
associate-+l+98.4%
+-commutative98.4%
remove-double-neg98.4%
distribute-frac-neg98.4%
distribute-neg-in98.4%
remove-double-neg98.4%
sub-neg98.4%
neg-mul-198.4%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.6%
*-commutative99.6%
clear-num99.6%
div-inv99.8%
metadata-eval99.8%
un-div-inv99.8%
Applied egg-rr99.8%
*-commutative99.8%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in t around 0 94.2%
neg-mul-194.2%
Simplified94.2%
if -2.59999999999999997e64 < y < 4.3000000000000002e-38Initial program 95.7%
sub-neg95.7%
associate-+l+95.7%
+-commutative95.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-frac92.1%
distribute-frac-neg92.1%
neg-mul-192.1%
*-commutative92.1%
associate-/l*92.1%
*-commutative92.1%
Simplified92.9%
*-commutative92.9%
clear-num92.8%
div-inv92.9%
metadata-eval92.9%
un-div-inv92.9%
Applied egg-rr92.9%
Taylor expanded in t around inf 91.9%
associate-*r/91.9%
Simplified91.9%
Final simplification93.1%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.1e-246) (not (<= y 7.8e-30))) (- x (/ (/ y 3.0) z)) (/ (/ (* t 0.3333333333333333) z) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.1e-246) || !(y <= 7.8e-30)) {
tmp = x - ((y / 3.0) / z);
} else {
tmp = ((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 <= (-1.1d-246)) .or. (.not. (y <= 7.8d-30))) then
tmp = x - ((y / 3.0d0) / z)
else
tmp = ((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 <= -1.1e-246) || !(y <= 7.8e-30)) {
tmp = x - ((y / 3.0) / z);
} else {
tmp = ((t * 0.3333333333333333) / z) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.1e-246) or not (y <= 7.8e-30): tmp = x - ((y / 3.0) / z) else: tmp = ((t * 0.3333333333333333) / z) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.1e-246) || !(y <= 7.8e-30)) tmp = Float64(x - Float64(Float64(y / 3.0) / z)); else tmp = Float64(Float64(Float64(t * 0.3333333333333333) / z) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.1e-246) || ~((y <= 7.8e-30))) tmp = x - ((y / 3.0) / z); else tmp = ((t * 0.3333333333333333) / z) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.1e-246], N[Not[LessEqual[y, 7.8e-30]], $MachinePrecision]], N[(x - N[(N[(y / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-246} \lor \neg \left(y \leq 7.8 \cdot 10^{-30}\right):\\
\;\;\;\;x - \frac{\frac{y}{3}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -1.09999999999999999e-246 or 7.8000000000000007e-30 < y Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
+-commutative98.3%
remove-double-neg98.3%
distribute-frac-neg98.3%
distribute-neg-in98.3%
remove-double-neg98.3%
sub-neg98.3%
neg-mul-198.3%
times-frac98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.7%
*-commutative98.7%
Simplified99.2%
*-commutative99.2%
clear-num99.1%
div-inv99.3%
metadata-eval99.3%
un-div-inv99.3%
Applied egg-rr99.3%
*-commutative99.3%
associate-/r*99.3%
Simplified99.3%
Taylor expanded in t around 0 83.6%
neg-mul-183.6%
Simplified83.6%
if -1.09999999999999999e-246 < y < 7.8000000000000007e-30Initial program 93.8%
sub-neg93.8%
associate-+l+93.8%
distribute-frac-neg93.8%
neg-mul-193.8%
*-commutative93.8%
times-frac93.8%
fma-define93.8%
metadata-eval93.8%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in y around 0 94.1%
Taylor expanded in t around inf 78.7%
associate-*r/78.8%
Applied egg-rr78.8%
Final simplification82.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.1e-246) (not (<= y 1.55e-28))) (+ x (* -0.3333333333333333 (/ y z))) (/ (/ (* t 0.3333333333333333) z) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.1e-246) || !(y <= 1.55e-28)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = ((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 <= (-1.1d-246)) .or. (.not. (y <= 1.55d-28))) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else
tmp = ((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 <= -1.1e-246) || !(y <= 1.55e-28)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = ((t * 0.3333333333333333) / z) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.1e-246) or not (y <= 1.55e-28): tmp = x + (-0.3333333333333333 * (y / z)) else: tmp = ((t * 0.3333333333333333) / z) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.1e-246) || !(y <= 1.55e-28)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); else tmp = Float64(Float64(Float64(t * 0.3333333333333333) / z) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.1e-246) || ~((y <= 1.55e-28))) tmp = x + (-0.3333333333333333 * (y / z)); else tmp = ((t * 0.3333333333333333) / z) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.1e-246], N[Not[LessEqual[y, 1.55e-28]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-246} \lor \neg \left(y \leq 1.55 \cdot 10^{-28}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t \cdot 0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -1.09999999999999999e-246 or 1.54999999999999996e-28 < y Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
+-commutative98.3%
remove-double-neg98.3%
distribute-frac-neg98.3%
distribute-neg-in98.3%
remove-double-neg98.3%
sub-neg98.3%
neg-mul-198.3%
times-frac98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.7%
*-commutative98.7%
Simplified99.2%
Taylor expanded in t around 0 83.5%
if -1.09999999999999999e-246 < y < 1.54999999999999996e-28Initial program 93.8%
sub-neg93.8%
associate-+l+93.8%
distribute-frac-neg93.8%
neg-mul-193.8%
*-commutative93.8%
times-frac93.8%
fma-define93.8%
metadata-eval93.8%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in y around 0 94.1%
Taylor expanded in t around inf 78.7%
associate-*r/78.8%
Applied egg-rr78.8%
Final simplification82.3%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.1e-246) (not (<= y 3.4e-22))) (+ x (* -0.3333333333333333 (/ y z))) (/ (/ 0.3333333333333333 (/ z t)) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.1e-246) || !(y <= 3.4e-22)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = (0.3333333333333333 / (z / t)) / 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.1d-246)) .or. (.not. (y <= 3.4d-22))) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else
tmp = (0.3333333333333333d0 / (z / t)) / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.1e-246) || !(y <= 3.4e-22)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = (0.3333333333333333 / (z / t)) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.1e-246) or not (y <= 3.4e-22): tmp = x + (-0.3333333333333333 * (y / z)) else: tmp = (0.3333333333333333 / (z / t)) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.1e-246) || !(y <= 3.4e-22)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); else tmp = Float64(Float64(0.3333333333333333 / Float64(z / t)) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.1e-246) || ~((y <= 3.4e-22))) tmp = x + (-0.3333333333333333 * (y / z)); else tmp = (0.3333333333333333 / (z / t)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.1e-246], N[Not[LessEqual[y, 3.4e-22]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 / N[(z / t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-246} \lor \neg \left(y \leq 3.4 \cdot 10^{-22}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{0.3333333333333333}{\frac{z}{t}}}{y}\\
\end{array}
\end{array}
if y < -1.09999999999999999e-246 or 3.3999999999999998e-22 < y Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
+-commutative98.3%
remove-double-neg98.3%
distribute-frac-neg98.3%
distribute-neg-in98.3%
remove-double-neg98.3%
sub-neg98.3%
neg-mul-198.3%
times-frac98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.7%
*-commutative98.7%
Simplified99.2%
Taylor expanded in t around 0 83.5%
if -1.09999999999999999e-246 < y < 3.3999999999999998e-22Initial program 93.8%
sub-neg93.8%
associate-+l+93.8%
distribute-frac-neg93.8%
neg-mul-193.8%
*-commutative93.8%
times-frac93.8%
fma-define93.8%
metadata-eval93.8%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in y around 0 94.1%
Taylor expanded in t around inf 78.7%
clear-num78.6%
un-div-inv78.8%
Applied egg-rr78.8%
Final simplification82.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.1e-246) (not (<= y 1.66e-31))) (+ x (* -0.3333333333333333 (/ y z))) (/ (* t (/ 0.3333333333333333 z)) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.1e-246) || !(y <= 1.66e-31)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = (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 <= (-1.1d-246)) .or. (.not. (y <= 1.66d-31))) then
tmp = x + ((-0.3333333333333333d0) * (y / z))
else
tmp = (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 <= -1.1e-246) || !(y <= 1.66e-31)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = (t * (0.3333333333333333 / z)) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.1e-246) or not (y <= 1.66e-31): tmp = x + (-0.3333333333333333 * (y / z)) else: tmp = (t * (0.3333333333333333 / z)) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.1e-246) || !(y <= 1.66e-31)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); else tmp = 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 <= -1.1e-246) || ~((y <= 1.66e-31))) tmp = x + (-0.3333333333333333 * (y / z)); else tmp = (t * (0.3333333333333333 / z)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.1e-246], N[Not[LessEqual[y, 1.66e-31]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-246} \lor \neg \left(y \leq 1.66 \cdot 10^{-31}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \frac{0.3333333333333333}{z}}{y}\\
\end{array}
\end{array}
if y < -1.09999999999999999e-246 or 1.66000000000000002e-31 < y Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
+-commutative98.3%
remove-double-neg98.3%
distribute-frac-neg98.3%
distribute-neg-in98.3%
remove-double-neg98.3%
sub-neg98.3%
neg-mul-198.3%
times-frac98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.7%
*-commutative98.7%
Simplified99.2%
Taylor expanded in t around 0 83.5%
if -1.09999999999999999e-246 < y < 1.66000000000000002e-31Initial program 93.8%
sub-neg93.8%
associate-+l+93.8%
distribute-frac-neg93.8%
neg-mul-193.8%
*-commutative93.8%
times-frac93.8%
fma-define93.8%
metadata-eval93.8%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in y around 0 94.1%
Taylor expanded in t around inf 78.7%
associate-*r/78.8%
*-commutative78.8%
associate-*r/78.7%
Simplified78.7%
Final simplification82.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.1e-246) (not (<= y 1.05e-31))) (+ x (* -0.3333333333333333 (/ y z))) (/ (* 0.3333333333333333 (/ t z)) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.1e-246) || !(y <= 1.05e-31)) {
tmp = x + (-0.3333333333333333 * (y / 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.1d-246)) .or. (.not. (y <= 1.05d-31))) then
tmp = x + ((-0.3333333333333333d0) * (y / 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.1e-246) || !(y <= 1.05e-31)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = (0.3333333333333333 * (t / z)) / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.1e-246) or not (y <= 1.05e-31): tmp = x + (-0.3333333333333333 * (y / z)) else: tmp = (0.3333333333333333 * (t / z)) / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.1e-246) || !(y <= 1.05e-31)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); else tmp = Float64(Float64(0.3333333333333333 * Float64(t / z)) / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.1e-246) || ~((y <= 1.05e-31))) tmp = x + (-0.3333333333333333 * (y / z)); else tmp = (0.3333333333333333 * (t / z)) / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.1e-246], N[Not[LessEqual[y, 1.05e-31]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.3333333333333333 * N[(t / z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{-246} \lor \neg \left(y \leq 1.05 \cdot 10^{-31}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{z}}{y}\\
\end{array}
\end{array}
if y < -1.09999999999999999e-246 or 1.04999999999999996e-31 < y Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
+-commutative98.3%
remove-double-neg98.3%
distribute-frac-neg98.3%
distribute-neg-in98.3%
remove-double-neg98.3%
sub-neg98.3%
neg-mul-198.3%
times-frac98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.7%
*-commutative98.7%
Simplified99.2%
Taylor expanded in t around 0 83.5%
if -1.09999999999999999e-246 < y < 1.04999999999999996e-31Initial program 93.8%
sub-neg93.8%
associate-+l+93.8%
distribute-frac-neg93.8%
neg-mul-193.8%
*-commutative93.8%
times-frac93.8%
fma-define93.8%
metadata-eval93.8%
associate-*l*93.8%
*-commutative93.8%
Simplified93.8%
Taylor expanded in y around 0 94.1%
Taylor expanded in t around inf 78.7%
Final simplification82.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -8.1e-249) (not (<= y 9.6e-32))) (+ x (* -0.3333333333333333 (/ y z))) (* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8.1e-249) || !(y <= 9.6e-32)) {
tmp = x + (-0.3333333333333333 * (y / 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 <= (-8.1d-249)) .or. (.not. (y <= 9.6d-32))) then
tmp = x + ((-0.3333333333333333d0) * (y / 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 <= -8.1e-249) || !(y <= 9.6e-32)) {
tmp = x + (-0.3333333333333333 * (y / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -8.1e-249) or not (y <= 9.6e-32): tmp = x + (-0.3333333333333333 * (y / z)) else: tmp = 0.3333333333333333 * (t / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -8.1e-249) || !(y <= 9.6e-32)) tmp = Float64(x + Float64(-0.3333333333333333 * Float64(y / z))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -8.1e-249) || ~((y <= 9.6e-32))) tmp = x + (-0.3333333333333333 * (y / z)); else tmp = 0.3333333333333333 * (t / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -8.1e-249], N[Not[LessEqual[y, 9.6e-32]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.1 \cdot 10^{-249} \lor \neg \left(y \leq 9.6 \cdot 10^{-32}\right):\\
\;\;\;\;x + -0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -8.1000000000000003e-249 or 9.6000000000000005e-32 < y Initial program 97.8%
sub-neg97.8%
associate-+l+97.8%
+-commutative97.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-frac98.8%
distribute-frac-neg98.8%
neg-mul-198.8%
*-commutative98.8%
associate-/l*98.8%
*-commutative98.8%
Simplified99.2%
Taylor expanded in t around 0 83.1%
if -8.1000000000000003e-249 < y < 9.6000000000000005e-32Initial program 95.0%
sub-neg95.0%
associate-+l+95.0%
distribute-frac-neg95.0%
neg-mul-195.0%
*-commutative95.0%
times-frac95.0%
fma-define95.0%
metadata-eval95.0%
associate-*l*95.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in y around 0 95.3%
Taylor expanded in t around inf 77.5%
Final simplification81.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -5.2e+95) (not (<= y 3.2e-44))) (/ y (* z -3.0)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -5.2e+95) || !(y <= 3.2e-44)) {
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 <= (-5.2d+95)) .or. (.not. (y <= 3.2d-44))) 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 <= -5.2e+95) || !(y <= 3.2e-44)) {
tmp = y / (z * -3.0);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -5.2e+95) or not (y <= 3.2e-44): tmp = y / (z * -3.0) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -5.2e+95) || !(y <= 3.2e-44)) 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 <= -5.2e+95) || ~((y <= 3.2e-44))) tmp = y / (z * -3.0); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -5.2e+95], N[Not[LessEqual[y, 3.2e-44]], $MachinePrecision]], N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+95} \lor \neg \left(y \leq 3.2 \cdot 10^{-44}\right):\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.19999999999999981e95 or 3.19999999999999995e-44 < y Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
times-frac98.2%
fma-define98.2%
metadata-eval98.2%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in y around inf 93.6%
associate-*r/93.6%
metadata-eval93.6%
Simplified93.6%
Taylor expanded in y around inf 74.4%
metadata-eval74.4%
times-frac74.6%
neg-mul-174.6%
*-commutative74.6%
frac-2neg74.6%
remove-double-neg74.6%
distribute-rgt-neg-in74.6%
metadata-eval74.6%
Applied egg-rr74.6%
if -5.19999999999999981e95 < y < 3.19999999999999995e-44Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
times-frac96.0%
fma-define96.0%
metadata-eval96.0%
associate-*l*96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in x around inf 34.1%
Final simplification53.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -8e+95) (not (<= y 2.7e-44))) (* -0.3333333333333333 (/ y z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8e+95) || !(y <= 2.7e-44)) {
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 <= (-8d+95)) .or. (.not. (y <= 2.7d-44))) 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 <= -8e+95) || !(y <= 2.7e-44)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -8e+95) or not (y <= 2.7e-44): tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -8e+95) || !(y <= 2.7e-44)) 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 <= -8e+95) || ~((y <= 2.7e-44))) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -8e+95], N[Not[LessEqual[y, 2.7e-44]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+95} \lor \neg \left(y \leq 2.7 \cdot 10^{-44}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -8.00000000000000016e95 or 2.6999999999999999e-44 < y Initial program 98.3%
sub-neg98.3%
associate-+l+98.3%
distribute-frac-neg98.3%
neg-mul-198.3%
*-commutative98.3%
times-frac98.2%
fma-define98.2%
metadata-eval98.2%
associate-*l*98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in y around inf 93.6%
associate-*r/93.6%
metadata-eval93.6%
Simplified93.6%
Taylor expanded in y around inf 74.4%
if -8.00000000000000016e95 < y < 2.6999999999999999e-44Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
times-frac96.0%
fma-define96.0%
metadata-eval96.0%
associate-*l*96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in x around inf 34.1%
Final simplification53.6%
(FPCore (x y z t) :precision binary64 (if (<= y -4.8e+95) (/ (/ y z) -3.0) (if (<= y 2.05e-44) x (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e+95) {
tmp = (y / z) / -3.0;
} else if (y <= 2.05e-44) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.8d+95)) then
tmp = (y / z) / (-3.0d0)
else if (y <= 2.05d-44) then
tmp = x
else
tmp = y / (z * (-3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.8e+95) {
tmp = (y / z) / -3.0;
} else if (y <= 2.05e-44) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.8e+95: tmp = (y / z) / -3.0 elif y <= 2.05e-44: tmp = x else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.8e+95) tmp = Float64(Float64(y / z) / -3.0); elseif (y <= 2.05e-44) tmp = x; else tmp = Float64(y / Float64(z * -3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.8e+95) tmp = (y / z) / -3.0; elseif (y <= 2.05e-44) tmp = x; else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.8e+95], N[(N[(y / z), $MachinePrecision] / -3.0), $MachinePrecision], If[LessEqual[y, 2.05e-44], x, N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+95}:\\
\;\;\;\;\frac{\frac{y}{z}}{-3}\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-44}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -4.8000000000000001e95Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.7%
fma-define99.7%
metadata-eval99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 99.5%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 78.4%
metadata-eval78.4%
times-frac78.5%
neg-mul-178.5%
associate-/r*78.5%
div-inv78.4%
frac-2neg78.4%
remove-double-neg78.4%
associate-*l/78.5%
div-inv78.6%
metadata-eval78.6%
Applied egg-rr78.6%
if -4.8000000000000001e95 < y < 2.04999999999999996e-44Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
times-frac96.0%
fma-define96.0%
metadata-eval96.0%
associate-*l*96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in x around inf 34.1%
if 2.04999999999999996e-44 < y Initial program 96.7%
sub-neg96.7%
associate-+l+96.7%
distribute-frac-neg96.7%
neg-mul-196.7%
*-commutative96.7%
times-frac96.5%
fma-define96.5%
metadata-eval96.5%
associate-*l*96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in y around inf 87.1%
associate-*r/87.0%
metadata-eval87.0%
Simplified87.0%
Taylor expanded in y around inf 70.0%
metadata-eval70.0%
times-frac70.2%
neg-mul-170.2%
*-commutative70.2%
frac-2neg70.2%
remove-double-neg70.2%
distribute-rgt-neg-in70.2%
metadata-eval70.2%
Applied egg-rr70.2%
(FPCore (x y z t) :precision binary64 (if (<= y -4.9e+95) (/ -0.3333333333333333 (/ z y)) (if (<= y 3.2e-44) x (* -0.3333333333333333 (/ y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.9e+95) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 3.2e-44) {
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 <= (-4.9d+95)) then
tmp = (-0.3333333333333333d0) / (z / y)
else if (y <= 3.2d-44) 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 <= -4.9e+95) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 3.2e-44) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.9e+95: tmp = -0.3333333333333333 / (z / y) elif y <= 3.2e-44: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.9e+95) tmp = Float64(-0.3333333333333333 / Float64(z / y)); elseif (y <= 3.2e-44) 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 <= -4.9e+95) tmp = -0.3333333333333333 / (z / y); elseif (y <= 3.2e-44) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.9e+95], N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.2e-44], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.9 \cdot 10^{+95}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{-44}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -4.8999999999999999e95Initial program 99.8%
sub-neg99.8%
associate-+l+99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
times-frac99.7%
fma-define99.7%
metadata-eval99.7%
associate-*l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around inf 99.5%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around inf 78.4%
clear-num78.4%
un-div-inv78.4%
Applied egg-rr78.4%
if -4.8999999999999999e95 < y < 3.19999999999999995e-44Initial program 95.9%
sub-neg95.9%
associate-+l+95.9%
distribute-frac-neg95.9%
neg-mul-195.9%
*-commutative95.9%
times-frac96.0%
fma-define96.0%
metadata-eval96.0%
associate-*l*96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in x around inf 34.1%
if 3.19999999999999995e-44 < y Initial program 96.7%
sub-neg96.7%
associate-+l+96.7%
distribute-frac-neg96.7%
neg-mul-196.7%
*-commutative96.7%
times-frac96.5%
fma-define96.5%
metadata-eval96.5%
associate-*l*96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in y around inf 87.1%
associate-*r/87.0%
metadata-eval87.0%
Simplified87.0%
Taylor expanded in y around inf 70.0%
(FPCore (x y z t) :precision binary64 (+ x (/ (/ (- (/ t y) y) 3.0) z)))
double code(double x, double y, double z, double t) {
return x + ((((t / y) - y) / 3.0) / 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 + ((((t / y) - y) / 3.0d0) / z)
end function
public static double code(double x, double y, double z, double t) {
return x + ((((t / y) - y) / 3.0) / z);
}
def code(x, y, z, t): return x + ((((t / y) - y) / 3.0) / z)
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(Float64(t / y) - y) / 3.0) / z)) end
function tmp = code(x, y, z, t) tmp = x + ((((t / y) - y) / 3.0) / z); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / 3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{\frac{t}{y} - y}{3}}{z}
\end{array}
Initial program 97.1%
sub-neg97.1%
associate-+l+97.1%
+-commutative97.1%
remove-double-neg97.1%
distribute-frac-neg97.1%
distribute-neg-in97.1%
remove-double-neg97.1%
sub-neg97.1%
neg-mul-197.1%
times-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.1%
*-commutative96.1%
Simplified96.4%
*-commutative96.4%
clear-num96.4%
div-inv96.5%
metadata-eval96.5%
un-div-inv96.5%
Applied egg-rr96.5%
*-commutative96.5%
associate-/r*96.5%
Simplified96.5%
(FPCore (x y z t) :precision binary64 (+ x (/ (- (/ t y) y) (* z 3.0))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - 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 + (((t / y) - y) / (z * 3.0d0))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) / (z * 3.0));
}
def code(x, y, z, t): return x + (((t / y) - y) / (z * 3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) / (z * 3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\frac{t}{y} - y}{z \cdot 3}
\end{array}
Initial program 97.1%
sub-neg97.1%
associate-+l+97.1%
+-commutative97.1%
remove-double-neg97.1%
distribute-frac-neg97.1%
distribute-neg-in97.1%
remove-double-neg97.1%
sub-neg97.1%
neg-mul-197.1%
times-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.1%
*-commutative96.1%
Simplified96.4%
*-commutative96.4%
clear-num96.4%
div-inv96.5%
metadata-eval96.5%
un-div-inv96.5%
Applied egg-rr96.5%
(FPCore (x y z t) :precision binary64 (+ x (* (- (/ t y) y) (/ 0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + (((t / y) - 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 + (((t / y) - y) * (0.3333333333333333d0 / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (((t / y) - y) * (0.3333333333333333 / z));
}
def code(x, y, z, t): return x + (((t / y) - y) * (0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(t / y) - y) * Float64(0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + (((t / y) - y) * (0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(\frac{t}{y} - y\right) \cdot \frac{0.3333333333333333}{z}
\end{array}
Initial program 97.1%
sub-neg97.1%
associate-+l+97.1%
+-commutative97.1%
remove-double-neg97.1%
distribute-frac-neg97.1%
distribute-neg-in97.1%
remove-double-neg97.1%
sub-neg97.1%
neg-mul-197.1%
times-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.1%
*-commutative96.1%
Simplified96.4%
Final simplification96.4%
(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 97.1%
sub-neg97.1%
associate-+l+97.1%
distribute-frac-neg97.1%
neg-mul-197.1%
*-commutative97.1%
times-frac97.0%
fma-define97.0%
metadata-eval97.0%
associate-*l*97.0%
*-commutative97.0%
Simplified97.0%
Taylor expanded in x around inf 27.4%
(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 2024111
(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))))