
(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 (<= (* z 3.0) -2e-10) (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))) (+ x (/ (- (/ t y) y) (* z 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -2e-10) {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= (-2d-10)) then
tmp = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
else
tmp = x + (((t / y) - y) / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= -2e-10) {
tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
} else {
tmp = x + (((t / y) - y) / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= -2e-10: tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)) else: tmp = x + (((t / y) - y) / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= -2e-10) tmp = Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))); else tmp = Float64(x + Float64(Float64(Float64(t / y) - y) / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= -2e-10) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); else tmp = x + (((t / y) - y) / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e-10], N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{-10}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{y} - y}{z \cdot 3}\\
\end{array}
\end{array}
if (*.f64 z 3) < -2.00000000000000007e-10Initial program 99.9%
if -2.00000000000000007e-10 < (*.f64 z 3) Initial program 94.3%
associate-+l-94.3%
sub-neg94.3%
distribute-frac-neg94.3%
associate-/r*94.0%
neg-mul-194.0%
*-commutative94.0%
times-frac94.0%
metadata-eval94.0%
Simplified94.0%
Taylor expanded in y around 0 94.2%
+-commutative94.2%
metadata-eval94.2%
associate-/l/94.0%
cancel-sign-sub-inv94.0%
*-commutative94.0%
metadata-eval94.0%
times-frac94.0%
*-rgt-identity94.0%
*-commutative94.0%
associate-/l/94.2%
associate-/r*97.2%
metadata-eval97.2%
times-frac97.2%
*-rgt-identity97.2%
div-sub98.8%
Simplified98.8%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 0.3333333333333333 (/ t (* z y)))))
(if (<= y -2.9e+114)
(/ (* y -0.3333333333333333) z)
(if (<= y -2.5e-48)
x
(if (<= y -3.4e-162)
t_1
(if (<= y -1.02e-215)
x
(if (<= y 9.6e-118) t_1 (if (<= y 9e-37) x (/ y (* z -3.0))))))))))
double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (z * y));
double tmp;
if (y <= -2.9e+114) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= -2.5e-48) {
tmp = x;
} else if (y <= -3.4e-162) {
tmp = t_1;
} else if (y <= -1.02e-215) {
tmp = x;
} else if (y <= 9.6e-118) {
tmp = t_1;
} else if (y <= 9e-37) {
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) :: t_1
real(8) :: tmp
t_1 = 0.3333333333333333d0 * (t / (z * y))
if (y <= (-2.9d+114)) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= (-2.5d-48)) then
tmp = x
else if (y <= (-3.4d-162)) then
tmp = t_1
else if (y <= (-1.02d-215)) then
tmp = x
else if (y <= 9.6d-118) then
tmp = t_1
else if (y <= 9d-37) 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 t_1 = 0.3333333333333333 * (t / (z * y));
double tmp;
if (y <= -2.9e+114) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= -2.5e-48) {
tmp = x;
} else if (y <= -3.4e-162) {
tmp = t_1;
} else if (y <= -1.02e-215) {
tmp = x;
} else if (y <= 9.6e-118) {
tmp = t_1;
} else if (y <= 9e-37) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 * (t / (z * y)) tmp = 0 if y <= -2.9e+114: tmp = (y * -0.3333333333333333) / z elif y <= -2.5e-48: tmp = x elif y <= -3.4e-162: tmp = t_1 elif y <= -1.02e-215: tmp = x elif y <= 9.6e-118: tmp = t_1 elif y <= 9e-37: tmp = x else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) t_1 = Float64(0.3333333333333333 * Float64(t / Float64(z * y))) tmp = 0.0 if (y <= -2.9e+114) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= -2.5e-48) tmp = x; elseif (y <= -3.4e-162) tmp = t_1; elseif (y <= -1.02e-215) tmp = x; elseif (y <= 9.6e-118) tmp = t_1; elseif (y <= 9e-37) tmp = x; else tmp = Float64(y / Float64(z * -3.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 0.3333333333333333 * (t / (z * y)); tmp = 0.0; if (y <= -2.9e+114) tmp = (y * -0.3333333333333333) / z; elseif (y <= -2.5e-48) tmp = x; elseif (y <= -3.4e-162) tmp = t_1; elseif (y <= -1.02e-215) tmp = x; elseif (y <= 9.6e-118) tmp = t_1; elseif (y <= 9e-37) tmp = x; else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.9e+114], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, -2.5e-48], x, If[LessEqual[y, -3.4e-162], t$95$1, If[LessEqual[y, -1.02e-215], x, If[LessEqual[y, 9.6e-118], t$95$1, If[LessEqual[y, 9e-37], x, N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{if}\;y \leq -2.9 \cdot 10^{+114}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-48}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-162}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-215}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{-118}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-37}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -2.9e114Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
Simplified99.9%
clear-num99.8%
inv-pow99.8%
*-commutative99.8%
*-un-lft-identity99.8%
times-frac99.7%
metadata-eval99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
associate-*r/99.8%
*-commutative99.8%
clear-num99.9%
associate-/r*99.9%
div-sub99.9%
associate-/r*99.9%
sub-neg99.9%
distribute-frac-neg99.9%
add-sqr-sqrt53.9%
sqrt-unprod82.0%
sqr-neg82.0%
sqrt-unprod45.4%
add-sqr-sqrt96.7%
Applied egg-rr96.7%
Taylor expanded in y around inf 80.4%
associate-*r/80.4%
*-commutative80.4%
Simplified80.4%
if -2.9e114 < y < -2.4999999999999999e-48 or -3.4e-162 < y < -1.0200000000000001e-215 or 9.6000000000000006e-118 < y < 9.00000000000000081e-37Initial program 94.2%
Simplified98.5%
Taylor expanded in x around inf 56.0%
if -2.4999999999999999e-48 < y < -3.4e-162 or -1.0200000000000001e-215 < y < 9.6000000000000006e-118Initial program 95.2%
associate-+l-95.2%
sub-neg95.2%
distribute-frac-neg95.2%
associate-/r*97.3%
neg-mul-197.3%
*-commutative97.3%
times-frac97.2%
metadata-eval97.2%
Simplified97.2%
Taylor expanded in y around 0 95.0%
+-commutative95.0%
metadata-eval95.0%
associate-/l/97.3%
cancel-sign-sub-inv97.3%
*-commutative97.3%
metadata-eval97.3%
times-frac97.3%
*-rgt-identity97.3%
*-commutative97.3%
associate-/l/95.0%
associate-/r*89.8%
metadata-eval89.8%
times-frac89.7%
*-rgt-identity89.7%
div-sub89.7%
Simplified89.7%
Taylor expanded in y around 0 71.7%
*-commutative71.7%
Simplified71.7%
if 9.00000000000000081e-37 < y Initial program 95.9%
associate-+l-95.9%
sub-neg95.9%
distribute-frac-neg95.9%
associate-/r*93.4%
neg-mul-193.4%
*-commutative93.4%
times-frac93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in y around 0 95.8%
+-commutative95.8%
metadata-eval95.8%
associate-/l/93.3%
cancel-sign-sub-inv93.3%
*-commutative93.3%
metadata-eval93.3%
times-frac93.4%
*-rgt-identity93.4%
*-commutative93.4%
associate-/l/95.9%
associate-/r*97.2%
metadata-eval97.2%
times-frac97.1%
*-rgt-identity97.1%
div-sub99.7%
Simplified99.7%
Taylor expanded in x around 0 79.7%
associate-*r/79.8%
distribute-lft-out--79.8%
div-sub77.2%
*-commutative77.2%
associate-*r/77.2%
*-commutative77.2%
associate-*r/77.2%
distribute-rgt-out--79.8%
Simplified79.8%
Taylor expanded in y around inf 68.9%
*-commutative68.9%
clear-num68.8%
un-div-inv68.9%
div-inv68.9%
metadata-eval68.9%
Applied egg-rr68.9%
Final simplification68.0%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z 3.0) -400000.0) (not (<= (* z 3.0) 1e+91))) (+ x (* y (/ -0.3333333333333333 z))) (* (- y (/ t y)) (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -400000.0) || !((z * 3.0) <= 1e+91)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((z * 3.0d0) <= (-400000.0d0)) .or. (.not. ((z * 3.0d0) <= 1d+91))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = (y - (t / y)) * ((-0.3333333333333333d0) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -400000.0) || !((z * 3.0) <= 1e+91)) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = (y - (t / y)) * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * 3.0) <= -400000.0) or not ((z * 3.0) <= 1e+91): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = (y - (t / y)) * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * 3.0) <= -400000.0) || !(Float64(z * 3.0) <= 1e+91)) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); else tmp = Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * 3.0) <= -400000.0) || ~(((z * 3.0) <= 1e+91))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = (y - (t / y)) * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * 3.0), $MachinePrecision], -400000.0], N[Not[LessEqual[N[(z * 3.0), $MachinePrecision], 1e+91]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -400000 \lor \neg \left(z \cdot 3 \leq 10^{+91}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if (*.f64 z 3) < -4e5 or 1.00000000000000008e91 < (*.f64 z 3) Initial program 99.9%
Simplified91.7%
Taylor expanded in y around inf 80.7%
if -4e5 < (*.f64 z 3) < 1.00000000000000008e91Initial program 93.1%
associate-+l-93.1%
sub-neg93.1%
distribute-frac-neg93.1%
associate-/r*93.4%
neg-mul-193.4%
*-commutative93.4%
times-frac93.3%
metadata-eval93.3%
Simplified93.3%
Taylor expanded in y around 0 92.9%
+-commutative92.9%
metadata-eval92.9%
associate-/l/93.3%
cancel-sign-sub-inv93.3%
*-commutative93.3%
metadata-eval93.3%
times-frac93.3%
*-rgt-identity93.3%
*-commutative93.3%
associate-/l/93.0%
associate-/r*97.9%
metadata-eval97.9%
times-frac97.9%
*-rgt-identity97.9%
div-sub99.8%
Simplified99.8%
Taylor expanded in x around 0 88.1%
associate-*r/88.1%
distribute-lft-out--88.1%
div-sub86.2%
*-commutative86.2%
associate-*r/86.2%
*-commutative86.2%
associate-*r/86.2%
distribute-rgt-out--88.1%
Simplified88.1%
Final simplification85.1%
(FPCore (x y z t)
:precision binary64
(if (or (<= y -4e-66)
(not
(or (<= y -4.2e-162) (and (not (<= y -1.02e-215)) (<= y 9.5e-118)))))
(+ x (* y (/ -0.3333333333333333 z)))
(* 0.3333333333333333 (/ t (* z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4e-66) || !((y <= -4.2e-162) || (!(y <= -1.02e-215) && (y <= 9.5e-118)))) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-4d-66)) .or. (.not. (y <= (-4.2d-162)) .or. (.not. (y <= (-1.02d-215))) .and. (y <= 9.5d-118))) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else
tmp = 0.3333333333333333d0 * (t / (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4e-66) || !((y <= -4.2e-162) || (!(y <= -1.02e-215) && (y <= 9.5e-118)))) {
tmp = x + (y * (-0.3333333333333333 / z));
} else {
tmp = 0.3333333333333333 * (t / (z * y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4e-66) or not ((y <= -4.2e-162) or (not (y <= -1.02e-215) and (y <= 9.5e-118))): tmp = x + (y * (-0.3333333333333333 / z)) else: tmp = 0.3333333333333333 * (t / (z * y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4e-66) || !((y <= -4.2e-162) || (!(y <= -1.02e-215) && (y <= 9.5e-118)))) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / 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 <= -4e-66) || ~(((y <= -4.2e-162) || (~((y <= -1.02e-215)) && (y <= 9.5e-118))))) tmp = x + (y * (-0.3333333333333333 / z)); else tmp = 0.3333333333333333 * (t / (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4e-66], N[Not[Or[LessEqual[y, -4.2e-162], And[N[Not[LessEqual[y, -1.02e-215]], $MachinePrecision], LessEqual[y, 9.5e-118]]]], $MachinePrecision]], N[(x + N[(y * N[(-0.3333333333333333 / 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 -4 \cdot 10^{-66} \lor \neg \left(y \leq -4.2 \cdot 10^{-162} \lor \neg \left(y \leq -1.02 \cdot 10^{-215}\right) \land y \leq 9.5 \cdot 10^{-118}\right):\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\end{array}
\end{array}
if y < -3.9999999999999999e-66 or -4.2e-162 < y < -1.0200000000000001e-215 or 9.49999999999999931e-118 < y Initial program 96.2%
Simplified99.3%
Taylor expanded in y around inf 83.9%
if -3.9999999999999999e-66 < y < -4.2e-162 or -1.0200000000000001e-215 < y < 9.49999999999999931e-118Initial program 95.0%
associate-+l-95.0%
sub-neg95.0%
distribute-frac-neg95.0%
associate-/r*97.1%
neg-mul-197.1%
*-commutative97.1%
times-frac97.1%
metadata-eval97.1%
Simplified97.1%
Taylor expanded in y around 0 94.8%
+-commutative94.8%
metadata-eval94.8%
associate-/l/97.1%
cancel-sign-sub-inv97.1%
*-commutative97.1%
metadata-eval97.1%
times-frac97.1%
*-rgt-identity97.1%
*-commutative97.1%
associate-/l/94.8%
associate-/r*89.2%
metadata-eval89.2%
times-frac89.2%
*-rgt-identity89.2%
div-sub89.2%
Simplified89.2%
Taylor expanded in y around 0 72.9%
*-commutative72.9%
Simplified72.9%
Final simplification80.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -4.1e-66)
(- x (* 0.3333333333333333 (/ y z)))
(if (or (<= y -3.4e-162) (and (not (<= y -7.5e-216)) (<= y 5.6e-118)))
(* 0.3333333333333333 (/ t (* z y)))
(+ x (* y (/ -0.3333333333333333 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.1e-66) {
tmp = x - (0.3333333333333333 * (y / z));
} else if ((y <= -3.4e-162) || (!(y <= -7.5e-216) && (y <= 5.6e-118))) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-4.1d-66)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if ((y <= (-3.4d-162)) .or. (.not. (y <= (-7.5d-216))) .and. (y <= 5.6d-118)) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else
tmp = x + (y * ((-0.3333333333333333d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.1e-66) {
tmp = x - (0.3333333333333333 * (y / z));
} else if ((y <= -3.4e-162) || (!(y <= -7.5e-216) && (y <= 5.6e-118))) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x + (y * (-0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.1e-66: tmp = x - (0.3333333333333333 * (y / z)) elif (y <= -3.4e-162) or (not (y <= -7.5e-216) and (y <= 5.6e-118)): tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = x + (y * (-0.3333333333333333 / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.1e-66) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif ((y <= -3.4e-162) || (!(y <= -7.5e-216) && (y <= 5.6e-118))) tmp = 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 <= -4.1e-66) tmp = x - (0.3333333333333333 * (y / z)); elseif ((y <= -3.4e-162) || (~((y <= -7.5e-216)) && (y <= 5.6e-118))) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = x + (y * (-0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.1e-66], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.4e-162], And[N[Not[LessEqual[y, -7.5e-216]], $MachinePrecision], LessEqual[y, 5.6e-118]]], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{-66}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-162} \lor \neg \left(y \leq -7.5 \cdot 10^{-216}\right) \land y \leq 5.6 \cdot 10^{-118}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -4.09999999999999998e-66Initial program 98.5%
associate-+l-98.5%
sub-neg98.5%
distribute-frac-neg98.5%
associate-/r*93.3%
neg-mul-193.3%
*-commutative93.3%
times-frac93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in y around inf 83.1%
if -4.09999999999999998e-66 < y < -3.4e-162 or -7.50000000000000064e-216 < y < 5.6e-118Initial program 95.0%
associate-+l-95.0%
sub-neg95.0%
distribute-frac-neg95.0%
associate-/r*97.1%
neg-mul-197.1%
*-commutative97.1%
times-frac97.1%
metadata-eval97.1%
Simplified97.1%
Taylor expanded in y around 0 94.8%
+-commutative94.8%
metadata-eval94.8%
associate-/l/97.1%
cancel-sign-sub-inv97.1%
*-commutative97.1%
metadata-eval97.1%
times-frac97.1%
*-rgt-identity97.1%
*-commutative97.1%
associate-/l/94.8%
associate-/r*89.2%
metadata-eval89.2%
times-frac89.2%
*-rgt-identity89.2%
div-sub89.2%
Simplified89.2%
Taylor expanded in y around 0 72.9%
*-commutative72.9%
Simplified72.9%
if -3.4e-162 < y < -7.50000000000000064e-216 or 5.6e-118 < y Initial program 94.6%
Simplified99.0%
Taylor expanded in y around inf 84.5%
Final simplification80.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 0.3333333333333333 (/ t (* z y)))))
(if (<= y -5.5e-66)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y -3.4e-162)
t_1
(if (<= y -1.02e-215)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 4.6e-118) t_1 (- x (/ y (* z 3.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (z * y));
double tmp;
if (y <= -5.5e-66) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= -3.4e-162) {
tmp = t_1;
} else if (y <= -1.02e-215) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 4.6e-118) {
tmp = t_1;
} else {
tmp = x - (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) :: t_1
real(8) :: tmp
t_1 = 0.3333333333333333d0 * (t / (z * y))
if (y <= (-5.5d-66)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= (-3.4d-162)) then
tmp = t_1
else if (y <= (-1.02d-215)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 4.6d-118) then
tmp = t_1
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (z * y));
double tmp;
if (y <= -5.5e-66) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= -3.4e-162) {
tmp = t_1;
} else if (y <= -1.02e-215) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 4.6e-118) {
tmp = t_1;
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 * (t / (z * y)) tmp = 0 if y <= -5.5e-66: tmp = x - (0.3333333333333333 * (y / z)) elif y <= -3.4e-162: tmp = t_1 elif y <= -1.02e-215: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 4.6e-118: tmp = t_1 else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) t_1 = Float64(0.3333333333333333 * Float64(t / Float64(z * y))) tmp = 0.0 if (y <= -5.5e-66) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= -3.4e-162) tmp = t_1; elseif (y <= -1.02e-215) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 4.6e-118) tmp = t_1; else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 0.3333333333333333 * (t / (z * y)); tmp = 0.0; if (y <= -5.5e-66) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= -3.4e-162) tmp = t_1; elseif (y <= -1.02e-215) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 4.6e-118) tmp = t_1; else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e-66], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.4e-162], t$95$1, If[LessEqual[y, -1.02e-215], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e-118], t$95$1, N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{-66}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-162}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-215}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-118}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -5.50000000000000053e-66Initial program 98.5%
associate-+l-98.5%
sub-neg98.5%
distribute-frac-neg98.5%
associate-/r*93.3%
neg-mul-193.3%
*-commutative93.3%
times-frac93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in y around inf 83.1%
if -5.50000000000000053e-66 < y < -3.4e-162 or -1.0200000000000001e-215 < y < 4.60000000000000042e-118Initial program 95.0%
associate-+l-95.0%
sub-neg95.0%
distribute-frac-neg95.0%
associate-/r*97.1%
neg-mul-197.1%
*-commutative97.1%
times-frac97.1%
metadata-eval97.1%
Simplified97.1%
Taylor expanded in y around 0 94.8%
+-commutative94.8%
metadata-eval94.8%
associate-/l/97.1%
cancel-sign-sub-inv97.1%
*-commutative97.1%
metadata-eval97.1%
times-frac97.1%
*-rgt-identity97.1%
*-commutative97.1%
associate-/l/94.8%
associate-/r*89.2%
metadata-eval89.2%
times-frac89.2%
*-rgt-identity89.2%
div-sub89.2%
Simplified89.2%
Taylor expanded in y around 0 72.9%
*-commutative72.9%
Simplified72.9%
if -3.4e-162 < y < -1.0200000000000001e-215Initial program 100.0%
Simplified100.0%
Taylor expanded in y around inf 80.4%
if 4.60000000000000042e-118 < y Initial program 94.0%
associate-+l-94.0%
sub-neg94.0%
distribute-frac-neg94.0%
associate-/r*94.0%
neg-mul-194.0%
*-commutative94.0%
times-frac93.9%
metadata-eval93.9%
Simplified93.9%
Taylor expanded in y around 0 93.9%
+-commutative93.9%
metadata-eval93.9%
associate-/l/93.8%
cancel-sign-sub-inv93.8%
*-commutative93.8%
metadata-eval93.8%
times-frac93.9%
*-rgt-identity93.9%
*-commutative93.9%
associate-/l/94.0%
associate-/r*96.9%
metadata-eval96.9%
times-frac96.9%
*-rgt-identity96.9%
div-sub98.9%
Simplified98.9%
Taylor expanded in y around inf 85.0%
Final simplification80.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -7.5e-66)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y -4.2e-162)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y -1.02e-215)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 2.8e-119)
(/ 0.3333333333333333 (* y (/ z t)))
(- x (/ y (* z 3.0))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e-66) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= -4.2e-162) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= -1.02e-215) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 2.8e-119) {
tmp = 0.3333333333333333 / (y * (z / t));
} else {
tmp = x - (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 <= (-7.5d-66)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= (-4.2d-162)) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= (-1.02d-215)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 2.8d-119) then
tmp = 0.3333333333333333d0 / (y * (z / t))
else
tmp = x - (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 <= -7.5e-66) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= -4.2e-162) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= -1.02e-215) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 2.8e-119) {
tmp = 0.3333333333333333 / (y * (z / t));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.5e-66: tmp = x - (0.3333333333333333 * (y / z)) elif y <= -4.2e-162: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= -1.02e-215: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 2.8e-119: tmp = 0.3333333333333333 / (y * (z / t)) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.5e-66) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= -4.2e-162) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= -1.02e-215) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 2.8e-119) tmp = Float64(0.3333333333333333 / Float64(y * Float64(z / t))); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.5e-66) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= -4.2e-162) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= -1.02e-215) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 2.8e-119) tmp = 0.3333333333333333 / (y * (z / t)); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.5e-66], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.2e-162], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.02e-215], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e-119], N[(0.3333333333333333 / N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-66}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-162}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-215}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-119}:\\
\;\;\;\;\frac{0.3333333333333333}{y \cdot \frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -7.49999999999999995e-66Initial program 98.5%
associate-+l-98.5%
sub-neg98.5%
distribute-frac-neg98.5%
associate-/r*93.3%
neg-mul-193.3%
*-commutative93.3%
times-frac93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in y around inf 83.1%
if -7.49999999999999995e-66 < y < -4.2e-162Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
distribute-frac-neg100.0%
associate-/r*99.9%
neg-mul-199.9%
*-commutative99.9%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.6%
+-commutative99.6%
metadata-eval99.6%
associate-/l/99.7%
cancel-sign-sub-inv99.7%
*-commutative99.7%
metadata-eval99.7%
times-frac99.7%
*-rgt-identity99.7%
*-commutative99.7%
associate-/l/99.6%
associate-/r*94.2%
metadata-eval94.2%
times-frac94.5%
*-rgt-identity94.5%
div-sub94.5%
Simplified94.5%
Taylor expanded in y around 0 65.6%
*-commutative65.6%
Simplified65.6%
if -4.2e-162 < y < -1.0200000000000001e-215Initial program 100.0%
Simplified100.0%
Taylor expanded in y around inf 80.4%
if -1.0200000000000001e-215 < y < 2.8e-119Initial program 93.4%
associate-+l-93.4%
sub-neg93.4%
distribute-frac-neg93.4%
associate-/r*96.3%
neg-mul-196.3%
*-commutative96.3%
times-frac96.3%
metadata-eval96.3%
Simplified96.3%
Taylor expanded in y around 0 93.2%
+-commutative93.2%
metadata-eval93.2%
associate-/l/96.3%
cancel-sign-sub-inv96.3%
*-commutative96.3%
metadata-eval96.3%
times-frac96.3%
*-rgt-identity96.3%
*-commutative96.3%
associate-/l/93.2%
associate-/r*87.6%
metadata-eval87.6%
times-frac87.5%
*-rgt-identity87.5%
div-sub87.5%
Simplified87.5%
Taylor expanded in y around 0 75.2%
*-commutative75.2%
associate-/r*71.5%
Simplified71.5%
*-commutative71.5%
clear-num71.4%
un-div-inv71.4%
associate-/r/76.6%
Applied egg-rr76.6%
if 2.8e-119 < y Initial program 94.0%
associate-+l-94.0%
sub-neg94.0%
distribute-frac-neg94.0%
associate-/r*94.0%
neg-mul-194.0%
*-commutative94.0%
times-frac93.9%
metadata-eval93.9%
Simplified93.9%
Taylor expanded in y around 0 93.9%
+-commutative93.9%
metadata-eval93.9%
associate-/l/93.8%
cancel-sign-sub-inv93.8%
*-commutative93.8%
metadata-eval93.8%
times-frac93.9%
*-rgt-identity93.9%
*-commutative93.9%
associate-/l/94.0%
associate-/r*96.9%
metadata-eval96.9%
times-frac96.9%
*-rgt-identity96.9%
div-sub98.9%
Simplified98.9%
Taylor expanded in y around inf 85.0%
Final simplification81.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -2e-65)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y -3.4e-162)
(/ 0.3333333333333333 (/ (* z y) t))
(if (<= y -1.02e-215)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 8e-118)
(/ 0.3333333333333333 (* y (/ z t)))
(- x (/ y (* z 3.0))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2e-65) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= -3.4e-162) {
tmp = 0.3333333333333333 / ((z * y) / t);
} else if (y <= -1.02e-215) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 8e-118) {
tmp = 0.3333333333333333 / (y * (z / t));
} else {
tmp = x - (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 <= (-2d-65)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= (-3.4d-162)) then
tmp = 0.3333333333333333d0 / ((z * y) / t)
else if (y <= (-1.02d-215)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 8d-118) then
tmp = 0.3333333333333333d0 / (y * (z / t))
else
tmp = x - (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 <= -2e-65) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= -3.4e-162) {
tmp = 0.3333333333333333 / ((z * y) / t);
} else if (y <= -1.02e-215) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 8e-118) {
tmp = 0.3333333333333333 / (y * (z / t));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2e-65: tmp = x - (0.3333333333333333 * (y / z)) elif y <= -3.4e-162: tmp = 0.3333333333333333 / ((z * y) / t) elif y <= -1.02e-215: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 8e-118: tmp = 0.3333333333333333 / (y * (z / t)) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2e-65) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= -3.4e-162) tmp = Float64(0.3333333333333333 / Float64(Float64(z * y) / t)); elseif (y <= -1.02e-215) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 8e-118) tmp = Float64(0.3333333333333333 / Float64(y * Float64(z / t))); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2e-65) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= -3.4e-162) tmp = 0.3333333333333333 / ((z * y) / t); elseif (y <= -1.02e-215) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 8e-118) tmp = 0.3333333333333333 / (y * (z / t)); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2e-65], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.4e-162], N[(0.3333333333333333 / N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.02e-215], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e-118], N[(0.3333333333333333 / N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-65}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-162}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{z \cdot y}{t}}\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-215}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-118}:\\
\;\;\;\;\frac{0.3333333333333333}{y \cdot \frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -1.99999999999999985e-65Initial program 98.5%
associate-+l-98.5%
sub-neg98.5%
distribute-frac-neg98.5%
associate-/r*93.3%
neg-mul-193.3%
*-commutative93.3%
times-frac93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in y around inf 83.1%
if -1.99999999999999985e-65 < y < -3.4e-162Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
distribute-frac-neg100.0%
associate-/r*99.9%
neg-mul-199.9%
*-commutative99.9%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.6%
+-commutative99.6%
metadata-eval99.6%
associate-/l/99.7%
cancel-sign-sub-inv99.7%
*-commutative99.7%
metadata-eval99.7%
times-frac99.7%
*-rgt-identity99.7%
*-commutative99.7%
associate-/l/99.6%
associate-/r*94.2%
metadata-eval94.2%
times-frac94.5%
*-rgt-identity94.5%
div-sub94.5%
Simplified94.5%
Taylor expanded in y around 0 65.6%
*-commutative65.6%
associate-/r*60.2%
Simplified60.2%
*-commutative60.2%
clear-num60.3%
un-div-inv60.3%
associate-/r/65.3%
Applied egg-rr65.3%
Taylor expanded in z around 0 65.7%
if -3.4e-162 < y < -1.0200000000000001e-215Initial program 100.0%
Simplified100.0%
Taylor expanded in y around inf 80.4%
if -1.0200000000000001e-215 < y < 7.99999999999999988e-118Initial program 93.4%
associate-+l-93.4%
sub-neg93.4%
distribute-frac-neg93.4%
associate-/r*96.3%
neg-mul-196.3%
*-commutative96.3%
times-frac96.3%
metadata-eval96.3%
Simplified96.3%
Taylor expanded in y around 0 93.2%
+-commutative93.2%
metadata-eval93.2%
associate-/l/96.3%
cancel-sign-sub-inv96.3%
*-commutative96.3%
metadata-eval96.3%
times-frac96.3%
*-rgt-identity96.3%
*-commutative96.3%
associate-/l/93.2%
associate-/r*87.6%
metadata-eval87.6%
times-frac87.5%
*-rgt-identity87.5%
div-sub87.5%
Simplified87.5%
Taylor expanded in y around 0 75.2%
*-commutative75.2%
associate-/r*71.5%
Simplified71.5%
*-commutative71.5%
clear-num71.4%
un-div-inv71.4%
associate-/r/76.6%
Applied egg-rr76.6%
if 7.99999999999999988e-118 < y Initial program 94.0%
associate-+l-94.0%
sub-neg94.0%
distribute-frac-neg94.0%
associate-/r*94.0%
neg-mul-194.0%
*-commutative94.0%
times-frac93.9%
metadata-eval93.9%
Simplified93.9%
Taylor expanded in y around 0 93.9%
+-commutative93.9%
metadata-eval93.9%
associate-/l/93.8%
cancel-sign-sub-inv93.8%
*-commutative93.8%
metadata-eval93.8%
times-frac93.9%
*-rgt-identity93.9%
*-commutative93.9%
associate-/l/94.0%
associate-/r*96.9%
metadata-eval96.9%
times-frac96.9%
*-rgt-identity96.9%
div-sub98.9%
Simplified98.9%
Taylor expanded in y around inf 85.0%
Final simplification81.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.25e-65)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y -4.2e-162)
(/ t (* z (* 3.0 y)))
(if (<= y -1.02e-215)
(+ x (* y (/ -0.3333333333333333 z)))
(if (<= y 2.25e-120)
(/ 0.3333333333333333 (* y (/ z t)))
(- x (/ y (* z 3.0))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.25e-65) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= -4.2e-162) {
tmp = t / (z * (3.0 * y));
} else if (y <= -1.02e-215) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 2.25e-120) {
tmp = 0.3333333333333333 / (y * (z / t));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.25d-65)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= (-4.2d-162)) then
tmp = t / (z * (3.0d0 * y))
else if (y <= (-1.02d-215)) then
tmp = x + (y * ((-0.3333333333333333d0) / z))
else if (y <= 2.25d-120) then
tmp = 0.3333333333333333d0 / (y * (z / t))
else
tmp = x - (y / (z * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.25e-65) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= -4.2e-162) {
tmp = t / (z * (3.0 * y));
} else if (y <= -1.02e-215) {
tmp = x + (y * (-0.3333333333333333 / z));
} else if (y <= 2.25e-120) {
tmp = 0.3333333333333333 / (y * (z / t));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.25e-65: tmp = x - (0.3333333333333333 * (y / z)) elif y <= -4.2e-162: tmp = t / (z * (3.0 * y)) elif y <= -1.02e-215: tmp = x + (y * (-0.3333333333333333 / z)) elif y <= 2.25e-120: tmp = 0.3333333333333333 / (y * (z / t)) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.25e-65) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= -4.2e-162) tmp = Float64(t / Float64(z * Float64(3.0 * y))); elseif (y <= -1.02e-215) tmp = Float64(x + Float64(y * Float64(-0.3333333333333333 / z))); elseif (y <= 2.25e-120) tmp = Float64(0.3333333333333333 / Float64(y * Float64(z / t))); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.25e-65) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= -4.2e-162) tmp = t / (z * (3.0 * y)); elseif (y <= -1.02e-215) tmp = x + (y * (-0.3333333333333333 / z)); elseif (y <= 2.25e-120) tmp = 0.3333333333333333 / (y * (z / t)); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.25e-65], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.2e-162], N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.02e-215], N[(x + N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.25e-120], N[(0.3333333333333333 / N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{-65}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-162}:\\
\;\;\;\;\frac{t}{z \cdot \left(3 \cdot y\right)}\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{-215}:\\
\;\;\;\;x + y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{-120}:\\
\;\;\;\;\frac{0.3333333333333333}{y \cdot \frac{z}{t}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -1.24999999999999996e-65Initial program 98.5%
associate-+l-98.5%
sub-neg98.5%
distribute-frac-neg98.5%
associate-/r*93.3%
neg-mul-193.3%
*-commutative93.3%
times-frac93.2%
metadata-eval93.2%
Simplified93.2%
Taylor expanded in y around inf 83.1%
if -1.24999999999999996e-65 < y < -4.2e-162Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
distribute-frac-neg100.0%
associate-/r*99.9%
neg-mul-199.9%
*-commutative99.9%
times-frac99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 99.6%
+-commutative99.6%
metadata-eval99.6%
associate-/l/99.7%
cancel-sign-sub-inv99.7%
*-commutative99.7%
metadata-eval99.7%
times-frac99.7%
*-rgt-identity99.7%
*-commutative99.7%
associate-/l/99.6%
associate-/r*94.2%
metadata-eval94.2%
times-frac94.5%
*-rgt-identity94.5%
div-sub94.5%
Simplified94.5%
Taylor expanded in y around 0 65.6%
*-commutative65.6%
associate-/r*60.2%
Simplified60.2%
*-commutative60.2%
clear-num60.3%
un-div-inv60.3%
associate-/r/65.3%
Applied egg-rr65.3%
Taylor expanded in z around 0 65.6%
*-commutative65.6%
metadata-eval65.6%
times-frac65.8%
*-rgt-identity65.8%
*-commutative65.8%
associate-*l*65.8%
Simplified65.8%
if -4.2e-162 < y < -1.0200000000000001e-215Initial program 100.0%
Simplified100.0%
Taylor expanded in y around inf 80.4%
if -1.0200000000000001e-215 < y < 2.25e-120Initial program 93.4%
associate-+l-93.4%
sub-neg93.4%
distribute-frac-neg93.4%
associate-/r*96.3%
neg-mul-196.3%
*-commutative96.3%
times-frac96.3%
metadata-eval96.3%
Simplified96.3%
Taylor expanded in y around 0 93.2%
+-commutative93.2%
metadata-eval93.2%
associate-/l/96.3%
cancel-sign-sub-inv96.3%
*-commutative96.3%
metadata-eval96.3%
times-frac96.3%
*-rgt-identity96.3%
*-commutative96.3%
associate-/l/93.2%
associate-/r*87.6%
metadata-eval87.6%
times-frac87.5%
*-rgt-identity87.5%
div-sub87.5%
Simplified87.5%
Taylor expanded in y around 0 75.2%
*-commutative75.2%
associate-/r*71.5%
Simplified71.5%
*-commutative71.5%
clear-num71.4%
un-div-inv71.4%
associate-/r/76.6%
Applied egg-rr76.6%
if 2.25e-120 < y Initial program 94.0%
associate-+l-94.0%
sub-neg94.0%
distribute-frac-neg94.0%
associate-/r*94.0%
neg-mul-194.0%
*-commutative94.0%
times-frac93.9%
metadata-eval93.9%
Simplified93.9%
Taylor expanded in y around 0 93.9%
+-commutative93.9%
metadata-eval93.9%
associate-/l/93.8%
cancel-sign-sub-inv93.8%
*-commutative93.8%
metadata-eval93.8%
times-frac93.9%
*-rgt-identity93.9%
*-commutative93.9%
associate-/l/94.0%
associate-/r*96.9%
metadata-eval96.9%
times-frac96.9%
*-rgt-identity96.9%
div-sub98.9%
Simplified98.9%
Taylor expanded in y around inf 85.0%
Final simplification81.2%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.85e+34)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 5.5e+36)
(+ x (* (/ 0.3333333333333333 y) (/ t z)))
(+ x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.85e+34) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 5.5e+36) {
tmp = x + ((0.3333333333333333 / y) * (t / z));
} 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.85d+34)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 5.5d+36) then
tmp = x + ((0.3333333333333333d0 / y) * (t / z))
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.85e+34) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 5.5e+36) {
tmp = x + ((0.3333333333333333 / y) * (t / z));
} else {
tmp = x + ((y * -0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.85e+34: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 5.5e+36: tmp = x + ((0.3333333333333333 / y) * (t / z)) else: tmp = x + ((y * -0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.85e+34) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 5.5e+36) tmp = Float64(x + Float64(Float64(0.3333333333333333 / y) * Float64(t / z))); else tmp = Float64(x + Float64(Float64(y * -0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.85e+34) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 5.5e+36) tmp = x + ((0.3333333333333333 / y) * (t / z)); else tmp = x + ((y * -0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.85e+34], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e+36], N[(x + N[(N[(0.3333333333333333 / y), $MachinePrecision] * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+34}:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+36}:\\
\;\;\;\;x + \frac{0.3333333333333333}{y} \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.85000000000000004e34Initial program 97.8%
associate-+l-97.8%
sub-neg97.8%
distribute-frac-neg97.8%
associate-/r*89.9%
neg-mul-189.9%
*-commutative89.9%
times-frac89.9%
metadata-eval89.9%
Simplified89.9%
Taylor expanded in y around inf 92.0%
if -1.85000000000000004e34 < y < 5.5000000000000002e36Initial program 94.9%
Simplified94.0%
Taylor expanded in y around 0 86.5%
associate-*r/86.5%
times-frac88.6%
Simplified88.6%
if 5.5000000000000002e36 < y Initial program 96.4%
Simplified99.8%
Taylor expanded in y around inf 99.8%
associate-*l/99.8%
Applied egg-rr99.8%
Final simplification91.8%
(FPCore (x y z t) :precision binary64 (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + ((y - (t / 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 - (t / y)) * ((-0.3333333333333333d0) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) * (-0.3333333333333333 / z));
}
def code(x, y, z, t): return x + ((y - (t / y)) * (-0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}
\end{array}
Initial program 95.8%
Simplified96.5%
Final simplification96.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 95.8%
associate-+l-95.8%
sub-neg95.8%
distribute-frac-neg95.8%
associate-/r*94.9%
neg-mul-194.9%
*-commutative94.9%
times-frac94.8%
metadata-eval94.8%
Simplified94.8%
Taylor expanded in y around 0 95.7%
+-commutative95.7%
metadata-eval95.7%
associate-/l/94.8%
cancel-sign-sub-inv94.8%
*-commutative94.8%
metadata-eval94.8%
times-frac94.8%
*-rgt-identity94.8%
*-commutative94.8%
associate-/l/95.8%
associate-/r*95.4%
metadata-eval95.4%
times-frac95.3%
*-rgt-identity95.3%
div-sub96.5%
Simplified96.5%
Final simplification96.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.95e+114) (not (<= y 9e-37))) (* -0.3333333333333333 (/ y z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.95e+114) || !(y <= 9e-37)) {
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 <= (-1.95d+114)) .or. (.not. (y <= 9d-37))) 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 <= -1.95e+114) || !(y <= 9e-37)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.95e+114) or not (y <= 9e-37): tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.95e+114) || !(y <= 9e-37)) 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 <= -1.95e+114) || ~((y <= 9e-37))) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.95e+114], N[Not[LessEqual[y, 9e-37]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+114} \lor \neg \left(y \leq 9 \cdot 10^{-37}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.95e114 or 9.00000000000000081e-37 < y Initial program 97.2%
associate-+l-97.2%
sub-neg97.2%
distribute-frac-neg97.2%
associate-/r*92.0%
neg-mul-192.0%
*-commutative92.0%
times-frac92.0%
metadata-eval92.0%
Simplified92.0%
Taylor expanded in y around 0 97.1%
+-commutative97.1%
metadata-eval97.1%
associate-/l/92.0%
cancel-sign-sub-inv92.0%
*-commutative92.0%
metadata-eval92.0%
times-frac92.0%
*-rgt-identity92.0%
*-commutative92.0%
associate-/l/97.2%
associate-/r*98.1%
metadata-eval98.1%
times-frac98.0%
*-rgt-identity98.0%
div-sub99.8%
Simplified99.8%
Taylor expanded in y around inf 72.6%
if -1.95e114 < y < 9.00000000000000081e-37Initial program 94.8%
Simplified93.8%
Taylor expanded in x around inf 40.7%
Final simplification54.9%
(FPCore (x y z t) :precision binary64 (if (<= y -1.95e+114) (* -0.3333333333333333 (/ y z)) (if (<= y 9e-37) x (* y (/ -0.3333333333333333 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.95e+114) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 9e-37) {
tmp = x;
} else {
tmp = 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.95d+114)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= 9d-37) then
tmp = x
else
tmp = 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.95e+114) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 9e-37) {
tmp = x;
} else {
tmp = y * (-0.3333333333333333 / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.95e+114: tmp = -0.3333333333333333 * (y / z) elif y <= 9e-37: tmp = x else: tmp = y * (-0.3333333333333333 / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.95e+114) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= 9e-37) tmp = x; else tmp = Float64(y * Float64(-0.3333333333333333 / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.95e+114) tmp = -0.3333333333333333 * (y / z); elseif (y <= 9e-37) tmp = x; else tmp = y * (-0.3333333333333333 / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.95e+114], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e-37], x, N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+114}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-37}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.95e114Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
distribute-frac-neg99.9%
associate-/r*89.2%
neg-mul-189.2%
*-commutative89.2%
times-frac89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in y around 0 99.8%
+-commutative99.8%
metadata-eval99.8%
associate-/l/89.2%
cancel-sign-sub-inv89.2%
*-commutative89.2%
metadata-eval89.2%
times-frac89.2%
*-rgt-identity89.2%
*-commutative89.2%
associate-/l/99.8%
associate-/r*99.9%
metadata-eval99.9%
times-frac99.9%
*-rgt-identity99.9%
div-sub99.9%
Simplified99.9%
Taylor expanded in y around inf 80.4%
if -1.95e114 < y < 9.00000000000000081e-37Initial program 94.8%
Simplified93.8%
Taylor expanded in x around inf 40.7%
if 9.00000000000000081e-37 < y Initial program 95.9%
associate-+l-95.9%
sub-neg95.9%
distribute-frac-neg95.9%
associate-/r*93.4%
neg-mul-193.4%
*-commutative93.4%
times-frac93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in y around 0 95.8%
+-commutative95.8%
metadata-eval95.8%
associate-/l/93.3%
cancel-sign-sub-inv93.3%
*-commutative93.3%
metadata-eval93.3%
times-frac93.4%
*-rgt-identity93.4%
*-commutative93.4%
associate-/l/95.9%
associate-/r*97.2%
metadata-eval97.2%
times-frac97.1%
*-rgt-identity97.1%
div-sub99.7%
Simplified99.7%
Taylor expanded in x around 0 79.7%
associate-*r/79.8%
distribute-lft-out--79.8%
div-sub77.2%
*-commutative77.2%
associate-*r/77.2%
*-commutative77.2%
associate-*r/77.2%
distribute-rgt-out--79.8%
Simplified79.8%
Taylor expanded in y around inf 68.9%
Final simplification54.9%
(FPCore (x y z t) :precision binary64 (if (<= y -1.95e+114) (* -0.3333333333333333 (/ y z)) (if (<= y 9e-37) x (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.95e+114) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 9e-37) {
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 <= (-1.95d+114)) then
tmp = (-0.3333333333333333d0) * (y / z)
else if (y <= 9d-37) 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 <= -1.95e+114) {
tmp = -0.3333333333333333 * (y / z);
} else if (y <= 9e-37) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.95e+114: tmp = -0.3333333333333333 * (y / z) elif y <= 9e-37: tmp = x else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.95e+114) tmp = Float64(-0.3333333333333333 * Float64(y / z)); elseif (y <= 9e-37) 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 <= -1.95e+114) tmp = -0.3333333333333333 * (y / z); elseif (y <= 9e-37) tmp = x; else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.95e+114], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e-37], x, N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+114}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{-37}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.95e114Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
distribute-frac-neg99.9%
associate-/r*89.2%
neg-mul-189.2%
*-commutative89.2%
times-frac89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in y around 0 99.8%
+-commutative99.8%
metadata-eval99.8%
associate-/l/89.2%
cancel-sign-sub-inv89.2%
*-commutative89.2%
metadata-eval89.2%
times-frac89.2%
*-rgt-identity89.2%
*-commutative89.2%
associate-/l/99.8%
associate-/r*99.9%
metadata-eval99.9%
times-frac99.9%
*-rgt-identity99.9%
div-sub99.9%
Simplified99.9%
Taylor expanded in y around inf 80.4%
if -1.95e114 < y < 9.00000000000000081e-37Initial program 94.8%
Simplified93.8%
Taylor expanded in x around inf 40.7%
if 9.00000000000000081e-37 < y Initial program 95.9%
associate-+l-95.9%
sub-neg95.9%
distribute-frac-neg95.9%
associate-/r*93.4%
neg-mul-193.4%
*-commutative93.4%
times-frac93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in y around 0 95.8%
+-commutative95.8%
metadata-eval95.8%
associate-/l/93.3%
cancel-sign-sub-inv93.3%
*-commutative93.3%
metadata-eval93.3%
times-frac93.4%
*-rgt-identity93.4%
*-commutative93.4%
associate-/l/95.9%
associate-/r*97.2%
metadata-eval97.2%
times-frac97.1%
*-rgt-identity97.1%
div-sub99.7%
Simplified99.7%
Taylor expanded in x around 0 79.7%
associate-*r/79.8%
distribute-lft-out--79.8%
div-sub77.2%
*-commutative77.2%
associate-*r/77.2%
*-commutative77.2%
associate-*r/77.2%
distribute-rgt-out--79.8%
Simplified79.8%
Taylor expanded in y around inf 68.9%
*-commutative68.9%
clear-num68.8%
un-div-inv68.9%
div-inv68.9%
metadata-eval68.9%
Applied egg-rr68.9%
Final simplification54.9%
(FPCore (x y z t) :precision binary64 (if (<= y -1.95e+114) (/ (* y -0.3333333333333333) z) (if (<= y 8.5e-37) x (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.95e+114) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 8.5e-37) {
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 <= (-1.95d+114)) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= 8.5d-37) 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 <= -1.95e+114) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 8.5e-37) {
tmp = x;
} else {
tmp = y / (z * -3.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.95e+114: tmp = (y * -0.3333333333333333) / z elif y <= 8.5e-37: tmp = x else: tmp = y / (z * -3.0) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.95e+114) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= 8.5e-37) 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 <= -1.95e+114) tmp = (y * -0.3333333333333333) / z; elseif (y <= 8.5e-37) tmp = x; else tmp = y / (z * -3.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.95e+114], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 8.5e-37], x, N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+114}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-37}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.95e114Initial program 99.9%
associate-+l-99.9%
*-commutative99.9%
Simplified99.9%
clear-num99.8%
inv-pow99.8%
*-commutative99.8%
*-un-lft-identity99.8%
times-frac99.7%
metadata-eval99.7%
Applied egg-rr99.7%
unpow-199.7%
Simplified99.7%
associate-*r/99.8%
*-commutative99.8%
clear-num99.9%
associate-/r*99.9%
div-sub99.9%
associate-/r*99.9%
sub-neg99.9%
distribute-frac-neg99.9%
add-sqr-sqrt53.9%
sqrt-unprod82.0%
sqr-neg82.0%
sqrt-unprod45.4%
add-sqr-sqrt96.7%
Applied egg-rr96.7%
Taylor expanded in y around inf 80.4%
associate-*r/80.4%
*-commutative80.4%
Simplified80.4%
if -1.95e114 < y < 8.5000000000000007e-37Initial program 94.8%
Simplified93.8%
Taylor expanded in x around inf 40.7%
if 8.5000000000000007e-37 < y Initial program 95.9%
associate-+l-95.9%
sub-neg95.9%
distribute-frac-neg95.9%
associate-/r*93.4%
neg-mul-193.4%
*-commutative93.4%
times-frac93.4%
metadata-eval93.4%
Simplified93.4%
Taylor expanded in y around 0 95.8%
+-commutative95.8%
metadata-eval95.8%
associate-/l/93.3%
cancel-sign-sub-inv93.3%
*-commutative93.3%
metadata-eval93.3%
times-frac93.4%
*-rgt-identity93.4%
*-commutative93.4%
associate-/l/95.9%
associate-/r*97.2%
metadata-eval97.2%
times-frac97.1%
*-rgt-identity97.1%
div-sub99.7%
Simplified99.7%
Taylor expanded in x around 0 79.7%
associate-*r/79.8%
distribute-lft-out--79.8%
div-sub77.2%
*-commutative77.2%
associate-*r/77.2%
*-commutative77.2%
associate-*r/77.2%
distribute-rgt-out--79.8%
Simplified79.8%
Taylor expanded in y around inf 68.9%
*-commutative68.9%
clear-num68.8%
un-div-inv68.9%
div-inv68.9%
metadata-eval68.9%
Applied egg-rr68.9%
Final simplification54.9%
(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.8%
Simplified96.5%
Taylor expanded in x around inf 31.7%
Final simplification31.7%
(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 2023305
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))