
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (* z 3.0) 2e-149) (+ x (* 0.3333333333333333 (/ (- (/ t y) y) z))) (+ (+ x (/ t (* z (* 3.0 y)))) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 2e-149) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((z * 3.0d0) <= 2d-149) then
tmp = x + (0.3333333333333333d0 * (((t / y) - y) / z))
else
tmp = (x + (t / (z * (3.0d0 * y)))) + (y / (z * (-3.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * 3.0) <= 2e-149) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * 3.0) <= 2e-149: tmp = x + (0.3333333333333333 * (((t / y) - y) / z)) else: tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * 3.0) <= 2e-149) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z))); else tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(3.0 * y)))) + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * 3.0) <= 2e-149) tmp = x + (0.3333333333333333 * (((t / y) - y) / z)); else tmp = (x + (t / (z * (3.0 * y)))) + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * 3.0), $MachinePrecision], 2e-149], N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(t / N[(z * N[(3.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq 2 \cdot 10^{-149}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(3 \cdot y\right)}\right) + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < 1.99999999999999996e-149Initial program 93.3%
+-commutative93.3%
associate-+r-93.3%
+-commutative93.3%
associate--l+93.3%
sub-neg93.3%
remove-double-neg93.3%
distribute-frac-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
sub-neg93.3%
neg-mul-193.3%
times-frac98.0%
distribute-frac-neg98.0%
neg-mul-198.0%
*-commutative98.0%
associate-/l*98.0%
*-commutative98.0%
Simplified98.6%
Taylor expanded in z around 0 98.6%
if 1.99999999999999996e-149 < (*.f64 z #s(literal 3 binary64)) Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
sub-neg99.8%
associate-*l*99.8%
*-commutative99.8%
distribute-frac-neg299.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 0.3333333333333333 (/ t (* z y)))))
(if (<= y -1e+61)
(/ -0.3333333333333333 (/ z y))
(if (<= y -2.1e-283)
t_1
(if (<= y -3.6e-307)
x
(if (<= y 1.6e-150)
t_1
(if (<= y 0.00026) x (* -0.3333333333333333 (/ y z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (z * y));
double tmp;
if (y <= -1e+61) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= -2.1e-283) {
tmp = t_1;
} else if (y <= -3.6e-307) {
tmp = x;
} else if (y <= 1.6e-150) {
tmp = t_1;
} else if (y <= 0.00026) {
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) :: t_1
real(8) :: tmp
t_1 = 0.3333333333333333d0 * (t / (z * y))
if (y <= (-1d+61)) then
tmp = (-0.3333333333333333d0) / (z / y)
else if (y <= (-2.1d-283)) then
tmp = t_1
else if (y <= (-3.6d-307)) then
tmp = x
else if (y <= 1.6d-150) then
tmp = t_1
else if (y <= 0.00026d0) 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 t_1 = 0.3333333333333333 * (t / (z * y));
double tmp;
if (y <= -1e+61) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= -2.1e-283) {
tmp = t_1;
} else if (y <= -3.6e-307) {
tmp = x;
} else if (y <= 1.6e-150) {
tmp = t_1;
} else if (y <= 0.00026) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 * (t / (z * y)) tmp = 0 if y <= -1e+61: tmp = -0.3333333333333333 / (z / y) elif y <= -2.1e-283: tmp = t_1 elif y <= -3.6e-307: tmp = x elif y <= 1.6e-150: tmp = t_1 elif y <= 0.00026: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) t_1 = Float64(0.3333333333333333 * Float64(t / Float64(z * y))) tmp = 0.0 if (y <= -1e+61) tmp = Float64(-0.3333333333333333 / Float64(z / y)); elseif (y <= -2.1e-283) tmp = t_1; elseif (y <= -3.6e-307) tmp = x; elseif (y <= 1.6e-150) tmp = t_1; elseif (y <= 0.00026) tmp = x; else tmp = Float64(-0.3333333333333333 * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 0.3333333333333333 * (t / (z * y)); tmp = 0.0; if (y <= -1e+61) tmp = -0.3333333333333333 / (z / y); elseif (y <= -2.1e-283) tmp = t_1; elseif (y <= -3.6e-307) tmp = x; elseif (y <= 1.6e-150) tmp = t_1; elseif (y <= 0.00026) tmp = x; else tmp = -0.3333333333333333 * (y / z); 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, -1e+61], N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.1e-283], t$95$1, If[LessEqual[y, -3.6e-307], x, If[LessEqual[y, 1.6e-150], t$95$1, If[LessEqual[y, 0.00026], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{if}\;y \leq -1 \cdot 10^{+61}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-283}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-307}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-150}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.00026:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -9.99999999999999949e60Initial program 97.7%
Taylor expanded in x around 0 81.0%
Taylor expanded in t around 0 81.1%
clear-num81.1%
un-div-inv81.2%
Applied egg-rr81.2%
if -9.99999999999999949e60 < y < -2.09999999999999997e-283 or -3.60000000000000007e-307 < y < 1.5999999999999999e-150Initial program 93.5%
Taylor expanded in x around 0 66.7%
Taylor expanded in t around inf 64.3%
if -2.09999999999999997e-283 < y < -3.60000000000000007e-307 or 1.5999999999999999e-150 < y < 2.59999999999999977e-4Initial program 92.4%
+-commutative92.4%
associate-+r-92.4%
+-commutative92.4%
associate--l+92.4%
sub-neg92.4%
remove-double-neg92.4%
distribute-frac-neg92.4%
distribute-neg-in92.4%
remove-double-neg92.4%
sub-neg92.4%
neg-mul-192.4%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 56.9%
if 2.59999999999999977e-4 < y Initial program 99.8%
Taylor expanded in x around 0 74.8%
Taylor expanded in t around 0 66.7%
Final simplification67.0%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e+61)
(/ -0.3333333333333333 (/ z y))
(if (<= y 2.9e-150)
(* 0.3333333333333333 (/ (/ t z) y))
(if (<= y 7.5e-125)
x
(if (<= y 1.36e-98)
(* 0.3333333333333333 (/ t (* z y)))
(if (<= y 0.0004) x (* -0.3333333333333333 (/ y z))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+61) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 2.9e-150) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 7.5e-125) {
tmp = x;
} else if (y <= 1.36e-98) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 0.0004) {
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 <= (-1d+61)) then
tmp = (-0.3333333333333333d0) / (z / y)
else if (y <= 2.9d-150) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else if (y <= 7.5d-125) then
tmp = x
else if (y <= 1.36d-98) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else if (y <= 0.0004d0) 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 <= -1e+61) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 2.9e-150) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 7.5e-125) {
tmp = x;
} else if (y <= 1.36e-98) {
tmp = 0.3333333333333333 * (t / (z * y));
} else if (y <= 0.0004) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e+61: tmp = -0.3333333333333333 / (z / y) elif y <= 2.9e-150: tmp = 0.3333333333333333 * ((t / z) / y) elif y <= 7.5e-125: tmp = x elif y <= 1.36e-98: tmp = 0.3333333333333333 * (t / (z * y)) elif y <= 0.0004: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e+61) tmp = Float64(-0.3333333333333333 / Float64(z / y)); elseif (y <= 2.9e-150) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); elseif (y <= 7.5e-125) tmp = x; elseif (y <= 1.36e-98) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); elseif (y <= 0.0004) 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 <= -1e+61) tmp = -0.3333333333333333 / (z / y); elseif (y <= 2.9e-150) tmp = 0.3333333333333333 * ((t / z) / y); elseif (y <= 7.5e-125) tmp = x; elseif (y <= 1.36e-98) tmp = 0.3333333333333333 * (t / (z * y)); elseif (y <= 0.0004) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+61], N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e-150], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e-125], x, If[LessEqual[y, 1.36e-98], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0004], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+61}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-150}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-125}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.36 \cdot 10^{-98}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{elif}\;y \leq 0.0004:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -9.99999999999999949e60Initial program 97.7%
Taylor expanded in x around 0 81.0%
Taylor expanded in t around 0 81.1%
clear-num81.1%
un-div-inv81.2%
Applied egg-rr81.2%
if -9.99999999999999949e60 < y < 2.8999999999999998e-150Initial program 91.3%
Taylor expanded in x around 0 62.7%
distribute-lft-out--62.8%
*-commutative62.8%
associate-/r*62.4%
sub-div62.4%
Applied egg-rr62.4%
Taylor expanded in t around inf 60.5%
associate-/l/65.0%
Simplified65.0%
if 2.8999999999999998e-150 < y < 7.5e-125 or 1.36000000000000003e-98 < y < 4.00000000000000019e-4Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
+-commutative99.7%
associate--l+99.7%
sub-neg99.7%
remove-double-neg99.7%
distribute-frac-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
sub-neg99.7%
neg-mul-199.7%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 62.8%
if 7.5e-125 < y < 1.36000000000000003e-98Initial program 99.5%
Taylor expanded in x around 0 83.5%
Taylor expanded in t around inf 83.5%
if 4.00000000000000019e-4 < y Initial program 99.8%
Taylor expanded in x around 0 74.8%
Taylor expanded in t around 0 66.7%
Final simplification68.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (/ y (* z -3.0)))))
(if (<= y -1.9e-73)
t_1
(if (<= y 2.9e-150)
(* 0.3333333333333333 (/ (/ t z) y))
(if (<= y 8.5e-126)
x
(if (<= y 4.8e-99) (* 0.3333333333333333 (/ t (* z y))) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x + (y / (z * -3.0));
double tmp;
if (y <= -1.9e-73) {
tmp = t_1;
} else if (y <= 2.9e-150) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 8.5e-126) {
tmp = x;
} else if (y <= 4.8e-99) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y / (z * (-3.0d0)))
if (y <= (-1.9d-73)) then
tmp = t_1
else if (y <= 2.9d-150) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else if (y <= 8.5d-126) then
tmp = x
else if (y <= 4.8d-99) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x + (y / (z * -3.0));
double tmp;
if (y <= -1.9e-73) {
tmp = t_1;
} else if (y <= 2.9e-150) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 8.5e-126) {
tmp = x;
} else if (y <= 4.8e-99) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x + (y / (z * -3.0)) tmp = 0 if y <= -1.9e-73: tmp = t_1 elif y <= 2.9e-150: tmp = 0.3333333333333333 * ((t / z) / y) elif y <= 8.5e-126: tmp = x elif y <= 4.8e-99: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x + Float64(y / Float64(z * -3.0))) tmp = 0.0 if (y <= -1.9e-73) tmp = t_1; elseif (y <= 2.9e-150) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); elseif (y <= 8.5e-126) tmp = x; elseif (y <= 4.8e-99) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x + (y / (z * -3.0)); tmp = 0.0; if (y <= -1.9e-73) tmp = t_1; elseif (y <= 2.9e-150) tmp = 0.3333333333333333 * ((t / z) / y); elseif (y <= 8.5e-126) tmp = x; elseif (y <= 4.8e-99) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.9e-73], t$95$1, If[LessEqual[y, 2.9e-150], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e-126], x, If[LessEqual[y, 4.8e-99], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{z \cdot -3}\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-150}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-126}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-99}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.9000000000000001e-73 or 4.8000000000000001e-99 < y Initial program 99.2%
+-commutative99.2%
associate-+r-99.2%
+-commutative99.2%
associate--l+99.2%
sub-neg99.2%
remove-double-neg99.2%
distribute-frac-neg99.2%
distribute-neg-in99.2%
remove-double-neg99.2%
sub-neg99.2%
neg-mul-199.2%
times-frac98.6%
distribute-frac-neg98.6%
neg-mul-198.6%
*-commutative98.6%
associate-/l*98.5%
*-commutative98.5%
Simplified99.1%
Taylor expanded in t around 0 85.6%
neg-mul-185.6%
Simplified85.6%
clear-num85.6%
frac-2neg85.6%
metadata-eval85.6%
associate-*l/85.6%
add-sqr-sqrt39.9%
sqrt-unprod42.2%
sqr-neg42.2%
sqrt-unprod16.7%
add-sqr-sqrt29.2%
neg-mul-129.2%
add-sqr-sqrt12.5%
sqrt-unprod45.3%
sqr-neg45.3%
sqrt-unprod45.6%
add-sqr-sqrt85.6%
div-inv85.7%
metadata-eval85.7%
distribute-rgt-neg-in85.7%
metadata-eval85.7%
Applied egg-rr85.7%
if -1.9000000000000001e-73 < y < 2.8999999999999998e-150Initial program 88.8%
Taylor expanded in x around 0 66.5%
distribute-lft-out--66.5%
*-commutative66.5%
associate-/r*67.1%
sub-div67.1%
Applied egg-rr67.1%
Taylor expanded in t around inf 66.5%
associate-/l/72.2%
Simplified72.2%
if 2.8999999999999998e-150 < y < 8.49999999999999938e-126Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 86.1%
if 8.49999999999999938e-126 < y < 4.8000000000000001e-99Initial program 99.5%
Taylor expanded in x around 0 83.5%
Taylor expanded in t around inf 83.5%
Final simplification81.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.95e-72)
(+ x (/ y (* z -3.0)))
(if (<= y 2.8e-150)
(* 0.3333333333333333 (/ (/ t z) y))
(if (<= y 3.4e-125)
x
(if (<= y 1.05e-98)
(* 0.3333333333333333 (/ t (* z y)))
(+ x (/ (/ y -3.0) z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.95e-72) {
tmp = x + (y / (z * -3.0));
} else if (y <= 2.8e-150) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 3.4e-125) {
tmp = x;
} else if (y <= 1.05e-98) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x + ((y / -3.0) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-1.95d-72)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 2.8d-150) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else if (y <= 3.4d-125) then
tmp = x
else if (y <= 1.05d-98) then
tmp = 0.3333333333333333d0 * (t / (z * y))
else
tmp = x + ((y / (-3.0d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.95e-72) {
tmp = x + (y / (z * -3.0));
} else if (y <= 2.8e-150) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 3.4e-125) {
tmp = x;
} else if (y <= 1.05e-98) {
tmp = 0.3333333333333333 * (t / (z * y));
} else {
tmp = x + ((y / -3.0) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.95e-72: tmp = x + (y / (z * -3.0)) elif y <= 2.8e-150: tmp = 0.3333333333333333 * ((t / z) / y) elif y <= 3.4e-125: tmp = x elif y <= 1.05e-98: tmp = 0.3333333333333333 * (t / (z * y)) else: tmp = x + ((y / -3.0) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.95e-72) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 2.8e-150) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); elseif (y <= 3.4e-125) tmp = x; elseif (y <= 1.05e-98) tmp = Float64(0.3333333333333333 * Float64(t / Float64(z * y))); else tmp = Float64(x + Float64(Float64(y / -3.0) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -1.95e-72) tmp = x + (y / (z * -3.0)); elseif (y <= 2.8e-150) tmp = 0.3333333333333333 * ((t / z) / y); elseif (y <= 3.4e-125) tmp = x; elseif (y <= 1.05e-98) tmp = 0.3333333333333333 * (t / (z * y)); else tmp = x + ((y / -3.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.95e-72], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e-150], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-125], x, If[LessEqual[y, 1.05e-98], N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{-72}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-150}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-125}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-98}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\end{array}
\end{array}
if y < -1.95e-72Initial program 98.5%
+-commutative98.5%
associate-+r-98.5%
+-commutative98.5%
associate--l+98.5%
sub-neg98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
distribute-neg-in98.5%
remove-double-neg98.5%
sub-neg98.5%
neg-mul-198.5%
times-frac97.2%
distribute-frac-neg97.2%
neg-mul-197.2%
*-commutative97.2%
associate-/l*97.1%
*-commutative97.1%
Simplified98.4%
Taylor expanded in t around 0 84.6%
neg-mul-184.6%
Simplified84.6%
clear-num84.6%
frac-2neg84.6%
metadata-eval84.6%
associate-*l/84.6%
add-sqr-sqrt84.6%
sqrt-unprod64.2%
sqr-neg64.2%
sqrt-unprod0.0%
add-sqr-sqrt26.5%
neg-mul-126.5%
add-sqr-sqrt26.5%
sqrt-unprod23.5%
sqr-neg23.5%
sqrt-unprod0.0%
add-sqr-sqrt84.6%
div-inv84.6%
metadata-eval84.6%
distribute-rgt-neg-in84.6%
metadata-eval84.6%
Applied egg-rr84.6%
if -1.95e-72 < y < 2.79999999999999996e-150Initial program 88.8%
Taylor expanded in x around 0 66.5%
distribute-lft-out--66.5%
*-commutative66.5%
associate-/r*67.1%
sub-div67.1%
Applied egg-rr67.1%
Taylor expanded in t around inf 66.5%
associate-/l/72.2%
Simplified72.2%
if 2.79999999999999996e-150 < y < 3.39999999999999975e-125Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 86.1%
if 3.39999999999999975e-125 < y < 1.04999999999999996e-98Initial program 99.5%
Taylor expanded in x around 0 83.5%
Taylor expanded in t around inf 83.5%
if 1.04999999999999996e-98 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 86.4%
neg-mul-186.4%
Simplified86.4%
clear-num86.4%
frac-2neg86.4%
metadata-eval86.4%
associate-*l/86.5%
add-sqr-sqrt0.0%
sqrt-unprod22.6%
sqr-neg22.6%
sqrt-unprod31.6%
add-sqr-sqrt31.6%
neg-mul-131.6%
add-sqr-sqrt0.0%
sqrt-unprod64.8%
sqr-neg64.8%
sqrt-unprod86.3%
add-sqr-sqrt86.5%
div-inv86.5%
metadata-eval86.5%
distribute-rgt-neg-in86.5%
metadata-eval86.5%
Applied egg-rr86.5%
*-commutative86.5%
associate-/r*86.6%
Simplified86.6%
Final simplification81.1%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.05e-72)
(+ x (/ y (* z -3.0)))
(if (<= y 1.6e-150)
(* 0.3333333333333333 (/ (/ t z) y))
(if (<= y 2.3e-125)
x
(if (<= y 6.6e-99)
(/ (* 0.3333333333333333 (/ t y)) z)
(+ x (/ (/ y -3.0) z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.05e-72) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1.6e-150) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 2.3e-125) {
tmp = x;
} else if (y <= 6.6e-99) {
tmp = (0.3333333333333333 * (t / y)) / z;
} else {
tmp = x + ((y / -3.0) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (y <= (-2.05d-72)) then
tmp = x + (y / (z * (-3.0d0)))
else if (y <= 1.6d-150) then
tmp = 0.3333333333333333d0 * ((t / z) / y)
else if (y <= 2.3d-125) then
tmp = x
else if (y <= 6.6d-99) then
tmp = (0.3333333333333333d0 * (t / y)) / z
else
tmp = x + ((y / (-3.0d0)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.05e-72) {
tmp = x + (y / (z * -3.0));
} else if (y <= 1.6e-150) {
tmp = 0.3333333333333333 * ((t / z) / y);
} else if (y <= 2.3e-125) {
tmp = x;
} else if (y <= 6.6e-99) {
tmp = (0.3333333333333333 * (t / y)) / z;
} else {
tmp = x + ((y / -3.0) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.05e-72: tmp = x + (y / (z * -3.0)) elif y <= 1.6e-150: tmp = 0.3333333333333333 * ((t / z) / y) elif y <= 2.3e-125: tmp = x elif y <= 6.6e-99: tmp = (0.3333333333333333 * (t / y)) / z else: tmp = x + ((y / -3.0) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.05e-72) tmp = Float64(x + Float64(y / Float64(z * -3.0))); elseif (y <= 1.6e-150) tmp = Float64(0.3333333333333333 * Float64(Float64(t / z) / y)); elseif (y <= 2.3e-125) tmp = x; elseif (y <= 6.6e-99) tmp = Float64(Float64(0.3333333333333333 * Float64(t / y)) / z); else tmp = Float64(x + Float64(Float64(y / -3.0) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2.05e-72) tmp = x + (y / (z * -3.0)); elseif (y <= 1.6e-150) tmp = 0.3333333333333333 * ((t / z) / y); elseif (y <= 2.3e-125) tmp = x; elseif (y <= 6.6e-99) tmp = (0.3333333333333333 * (t / y)) / z; else tmp = x + ((y / -3.0) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.05e-72], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e-150], N[(0.3333333333333333 * N[(N[(t / z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e-125], x, If[LessEqual[y, 6.6e-99], N[(N[(0.3333333333333333 * N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.05 \cdot 10^{-72}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-150}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{z}}{y}\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{-125}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{-99}:\\
\;\;\;\;\frac{0.3333333333333333 \cdot \frac{t}{y}}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\end{array}
\end{array}
if y < -2.05000000000000002e-72Initial program 98.5%
+-commutative98.5%
associate-+r-98.5%
+-commutative98.5%
associate--l+98.5%
sub-neg98.5%
remove-double-neg98.5%
distribute-frac-neg98.5%
distribute-neg-in98.5%
remove-double-neg98.5%
sub-neg98.5%
neg-mul-198.5%
times-frac97.2%
distribute-frac-neg97.2%
neg-mul-197.2%
*-commutative97.2%
associate-/l*97.1%
*-commutative97.1%
Simplified98.4%
Taylor expanded in t around 0 84.6%
neg-mul-184.6%
Simplified84.6%
clear-num84.6%
frac-2neg84.6%
metadata-eval84.6%
associate-*l/84.6%
add-sqr-sqrt84.6%
sqrt-unprod64.2%
sqr-neg64.2%
sqrt-unprod0.0%
add-sqr-sqrt26.5%
neg-mul-126.5%
add-sqr-sqrt26.5%
sqrt-unprod23.5%
sqr-neg23.5%
sqrt-unprod0.0%
add-sqr-sqrt84.6%
div-inv84.6%
metadata-eval84.6%
distribute-rgt-neg-in84.6%
metadata-eval84.6%
Applied egg-rr84.6%
if -2.05000000000000002e-72 < y < 1.5999999999999999e-150Initial program 88.8%
Taylor expanded in x around 0 66.5%
distribute-lft-out--66.5%
*-commutative66.5%
associate-/r*67.1%
sub-div67.1%
Applied egg-rr67.1%
Taylor expanded in t around inf 66.5%
associate-/l/72.2%
Simplified72.2%
if 1.5999999999999999e-150 < y < 2.2999999999999999e-125Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 86.1%
if 2.2999999999999999e-125 < y < 6.59999999999999973e-99Initial program 99.5%
Taylor expanded in x around 0 83.5%
Taylor expanded in t around inf 83.5%
*-commutative83.5%
associate-/r*83.5%
associate-*l/83.5%
Applied egg-rr83.5%
if 6.59999999999999973e-99 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 86.4%
neg-mul-186.4%
Simplified86.4%
clear-num86.4%
frac-2neg86.4%
metadata-eval86.4%
associate-*l/86.5%
add-sqr-sqrt0.0%
sqrt-unprod22.6%
sqr-neg22.6%
sqrt-unprod31.6%
add-sqr-sqrt31.6%
neg-mul-131.6%
add-sqr-sqrt0.0%
sqrt-unprod64.8%
sqr-neg64.8%
sqrt-unprod86.3%
add-sqr-sqrt86.5%
div-inv86.5%
metadata-eval86.5%
distribute-rgt-neg-in86.5%
metadata-eval86.5%
Applied egg-rr86.5%
*-commutative86.5%
associate-/r*86.6%
Simplified86.6%
Final simplification81.1%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z 3.0) -1e+143) (not (<= (* z 3.0) 1e+109))) (+ x (/ y (* z -3.0))) (* 0.3333333333333333 (/ (- (/ t y) y) z))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -1e+143) || !((z * 3.0) <= 1e+109)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (((z * 3.0d0) <= (-1d+143)) .or. (.not. ((z * 3.0d0) <= 1d+109))) then
tmp = x + (y / (z * (-3.0d0)))
else
tmp = 0.3333333333333333d0 * (((t / y) - y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z * 3.0) <= -1e+143) || !((z * 3.0) <= 1e+109)) {
tmp = x + (y / (z * -3.0));
} else {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * 3.0) <= -1e+143) or not ((z * 3.0) <= 1e+109): tmp = x + (y / (z * -3.0)) else: tmp = 0.3333333333333333 * (((t / y) - y) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * 3.0) <= -1e+143) || !(Float64(z * 3.0) <= 1e+109)) tmp = Float64(x + Float64(y / Float64(z * -3.0))); else tmp = Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * 3.0) <= -1e+143) || ~(((z * 3.0) <= 1e+109))) tmp = x + (y / (z * -3.0)); else tmp = 0.3333333333333333 * (((t / y) - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * 3.0), $MachinePrecision], -1e+143], N[Not[LessEqual[N[(z * 3.0), $MachinePrecision], 1e+109]], $MachinePrecision]], N[(x + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot 3 \leq -1 \cdot 10^{+143} \lor \neg \left(z \cdot 3 \leq 10^{+109}\right):\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -1e143 or 9.99999999999999982e108 < (*.f64 z #s(literal 3 binary64)) Initial program 99.9%
+-commutative99.9%
associate-+r-99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.9%
remove-double-neg99.9%
distribute-frac-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
sub-neg99.9%
neg-mul-199.9%
times-frac89.3%
distribute-frac-neg89.3%
neg-mul-189.3%
*-commutative89.3%
associate-/l*89.3%
*-commutative89.3%
Simplified89.2%
Taylor expanded in t around 0 80.8%
neg-mul-180.8%
Simplified80.8%
clear-num80.8%
frac-2neg80.8%
metadata-eval80.8%
associate-*l/80.9%
add-sqr-sqrt36.4%
sqrt-unprod55.2%
sqr-neg55.2%
sqrt-unprod41.0%
add-sqr-sqrt65.5%
neg-mul-165.5%
add-sqr-sqrt24.5%
sqrt-unprod53.6%
sqr-neg53.6%
sqrt-unprod44.3%
add-sqr-sqrt80.9%
div-inv80.9%
metadata-eval80.9%
distribute-rgt-neg-in80.9%
metadata-eval80.9%
Applied egg-rr80.9%
if -1e143 < (*.f64 z #s(literal 3 binary64)) < 9.99999999999999982e108Initial program 94.1%
Taylor expanded in x around 0 80.6%
distribute-lft-out--80.6%
*-commutative80.6%
associate-/r*83.7%
sub-div84.2%
Applied egg-rr84.2%
Final simplification83.3%
(FPCore (x y z t)
:precision binary64
(if (<= y -1.1e+61)
(+ x (/ (/ y -3.0) z))
(if (<= y 2.6e-17)
(+ x (* 0.3333333333333333 (/ t (* z y))))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.1e+61) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 2.6e-17) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} 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.1d+61)) then
tmp = x + ((y / (-3.0d0)) / z)
else if (y <= 2.6d-17) then
tmp = x + (0.3333333333333333d0 * (t / (z * y)))
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.1e+61) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 2.6e-17) {
tmp = x + (0.3333333333333333 * (t / (z * y)));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.1e+61: tmp = x + ((y / -3.0) / z) elif y <= 2.6e-17: tmp = x + (0.3333333333333333 * (t / (z * y))) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.1e+61) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); elseif (y <= 2.6e-17) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(z * y)))); 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.1e+61) tmp = x + ((y / -3.0) / z); elseif (y <= 2.6e-17) tmp = x + (0.3333333333333333 * (t / (z * y))); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.1e+61], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e-17], N[(x + N[(0.3333333333333333 * N[(t / N[(z * y), $MachinePrecision]), $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.1 \cdot 10^{+61}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-17}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{z \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -1.1e61Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
+-commutative97.7%
associate--l+97.7%
sub-neg97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
Simplified99.7%
Taylor expanded in t around 0 97.8%
neg-mul-197.8%
Simplified97.8%
clear-num97.8%
frac-2neg97.8%
metadata-eval97.8%
associate-*l/97.8%
add-sqr-sqrt97.8%
sqrt-unprod67.0%
sqr-neg67.0%
sqrt-unprod0.0%
add-sqr-sqrt15.0%
neg-mul-115.0%
add-sqr-sqrt15.0%
sqrt-unprod10.4%
sqr-neg10.4%
sqrt-unprod0.0%
add-sqr-sqrt97.8%
div-inv97.8%
metadata-eval97.8%
distribute-rgt-neg-in97.8%
metadata-eval97.8%
Applied egg-rr97.8%
*-commutative97.8%
associate-/r*97.9%
Simplified97.9%
if -1.1e61 < y < 2.60000000000000003e-17Initial program 93.0%
+-commutative93.0%
associate-+r-93.0%
+-commutative93.0%
associate--l+93.0%
sub-neg93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
sub-neg93.0%
neg-mul-193.0%
times-frac93.7%
distribute-frac-neg93.7%
neg-mul-193.7%
*-commutative93.7%
associate-/l*93.7%
*-commutative93.7%
Simplified93.6%
Taylor expanded in t around inf 89.2%
if 2.60000000000000003e-17 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 91.9%
neg-mul-191.9%
Simplified91.9%
clear-num91.9%
frac-2neg91.9%
metadata-eval91.9%
associate-*l/92.0%
add-sqr-sqrt0.0%
sqrt-unprod15.6%
sqr-neg15.6%
sqrt-unprod26.8%
add-sqr-sqrt26.8%
neg-mul-126.8%
add-sqr-sqrt0.0%
sqrt-unprod65.1%
sqr-neg65.1%
sqrt-unprod91.8%
add-sqr-sqrt92.0%
div-inv92.0%
metadata-eval92.0%
distribute-rgt-neg-in92.0%
metadata-eval92.0%
Applied egg-rr92.0%
Final simplification91.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -1e+61)
(+ x (/ (/ y -3.0) z))
(if (<= y 2.45e-23)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+61) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 2.45e-23) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} 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 <= (-1d+61)) then
tmp = x + ((y / (-3.0d0)) / z)
else if (y <= 2.45d-23) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
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 <= -1e+61) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 2.45e-23) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e+61: tmp = x + ((y / -3.0) / z) elif y <= 2.45e-23: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e+61) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); elseif (y <= 2.45e-23) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); 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 <= -1e+61) tmp = x + ((y / -3.0) / z); elseif (y <= 2.45e-23) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+61], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.45e-23], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $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 \cdot 10^{+61}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{-23}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -9.99999999999999949e60Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
+-commutative97.7%
associate--l+97.7%
sub-neg97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
Simplified99.7%
Taylor expanded in t around 0 97.8%
neg-mul-197.8%
Simplified97.8%
clear-num97.8%
frac-2neg97.8%
metadata-eval97.8%
associate-*l/97.8%
add-sqr-sqrt97.8%
sqrt-unprod67.0%
sqr-neg67.0%
sqrt-unprod0.0%
add-sqr-sqrt15.0%
neg-mul-115.0%
add-sqr-sqrt15.0%
sqrt-unprod10.4%
sqr-neg10.4%
sqrt-unprod0.0%
add-sqr-sqrt97.8%
div-inv97.8%
metadata-eval97.8%
distribute-rgt-neg-in97.8%
metadata-eval97.8%
Applied egg-rr97.8%
*-commutative97.8%
associate-/r*97.9%
Simplified97.9%
if -9.99999999999999949e60 < y < 2.4499999999999999e-23Initial program 93.0%
+-commutative93.0%
associate-+r-93.0%
+-commutative93.0%
associate--l+93.0%
sub-neg93.0%
remove-double-neg93.0%
distribute-frac-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
sub-neg93.0%
neg-mul-193.0%
times-frac93.7%
distribute-frac-neg93.7%
neg-mul-193.7%
*-commutative93.7%
associate-/l*93.7%
*-commutative93.7%
Simplified93.6%
Taylor expanded in t around inf 89.2%
associate-*r/89.2%
Simplified89.2%
times-frac94.4%
*-commutative94.4%
Applied egg-rr94.4%
if 2.4499999999999999e-23 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 91.9%
neg-mul-191.9%
Simplified91.9%
clear-num91.9%
frac-2neg91.9%
metadata-eval91.9%
associate-*l/92.0%
add-sqr-sqrt0.0%
sqrt-unprod15.6%
sqr-neg15.6%
sqrt-unprod26.8%
add-sqr-sqrt26.8%
neg-mul-126.8%
add-sqr-sqrt0.0%
sqrt-unprod65.1%
sqr-neg65.1%
sqrt-unprod91.8%
add-sqr-sqrt92.0%
div-inv92.0%
metadata-eval92.0%
distribute-rgt-neg-in92.0%
metadata-eval92.0%
Applied egg-rr92.0%
Final simplification94.5%
(FPCore (x y z t) :precision binary64 (if (<= y -1e+61) (+ x (/ (/ y -3.0) z)) (if (<= y 0.32) (+ x (/ (/ t z) (* 3.0 y))) (+ x (/ y (* z -3.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+61) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 0.32) {
tmp = x + ((t / z) / (3.0 * y));
} 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 <= (-1d+61)) then
tmp = x + ((y / (-3.0d0)) / z)
else if (y <= 0.32d0) then
tmp = x + ((t / z) / (3.0d0 * y))
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 <= -1e+61) {
tmp = x + ((y / -3.0) / z);
} else if (y <= 0.32) {
tmp = x + ((t / z) / (3.0 * y));
} else {
tmp = x + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e+61: tmp = x + ((y / -3.0) / z) elif y <= 0.32: tmp = x + ((t / z) / (3.0 * y)) else: tmp = x + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e+61) tmp = Float64(x + Float64(Float64(y / -3.0) / z)); elseif (y <= 0.32) tmp = Float64(x + Float64(Float64(t / z) / Float64(3.0 * y))); 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 <= -1e+61) tmp = x + ((y / -3.0) / z); elseif (y <= 0.32) tmp = x + ((t / z) / (3.0 * y)); else tmp = x + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+61], N[(x + N[(N[(y / -3.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.32], N[(x + N[(N[(t / z), $MachinePrecision] / N[(3.0 * y), $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 \cdot 10^{+61}:\\
\;\;\;\;x + \frac{\frac{y}{-3}}{z}\\
\mathbf{elif}\;y \leq 0.32:\\
\;\;\;\;x + \frac{\frac{t}{z}}{3 \cdot y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if y < -9.99999999999999949e60Initial program 97.7%
+-commutative97.7%
associate-+r-97.7%
+-commutative97.7%
associate--l+97.7%
sub-neg97.7%
remove-double-neg97.7%
distribute-frac-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
sub-neg97.7%
neg-mul-197.7%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.6%
*-commutative97.6%
Simplified99.7%
Taylor expanded in t around 0 97.8%
neg-mul-197.8%
Simplified97.8%
clear-num97.8%
frac-2neg97.8%
metadata-eval97.8%
associate-*l/97.8%
add-sqr-sqrt97.8%
sqrt-unprod67.0%
sqr-neg67.0%
sqrt-unprod0.0%
add-sqr-sqrt15.0%
neg-mul-115.0%
add-sqr-sqrt15.0%
sqrt-unprod10.4%
sqr-neg10.4%
sqrt-unprod0.0%
add-sqr-sqrt97.8%
div-inv97.8%
metadata-eval97.8%
distribute-rgt-neg-in97.8%
metadata-eval97.8%
Applied egg-rr97.8%
*-commutative97.8%
associate-/r*97.9%
Simplified97.9%
if -9.99999999999999949e60 < y < 0.320000000000000007Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate--l+93.2%
sub-neg93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
distribute-neg-in93.2%
remove-double-neg93.2%
sub-neg93.2%
neg-mul-193.2%
times-frac93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.8%
Taylor expanded in t around inf 88.8%
associate-*r/88.8%
Simplified88.8%
div-inv88.2%
*-commutative88.2%
associate-*l*88.2%
associate-/r*88.2%
Applied egg-rr88.2%
associate-*r/88.1%
clear-num88.1%
div-inv88.2%
Applied egg-rr88.2%
un-div-inv88.8%
div-inv88.8%
clear-num88.9%
associate-/r*93.9%
div-inv94.0%
metadata-eval94.0%
Applied egg-rr94.0%
if 0.320000000000000007 < y Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
remove-double-neg99.8%
distribute-frac-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
sub-neg99.8%
neg-mul-199.8%
times-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 93.0%
neg-mul-193.0%
Simplified93.0%
clear-num93.0%
frac-2neg93.0%
metadata-eval93.0%
associate-*l/93.1%
add-sqr-sqrt0.0%
sqrt-unprod13.4%
sqr-neg13.4%
sqrt-unprod25.3%
add-sqr-sqrt25.3%
neg-mul-125.3%
add-sqr-sqrt0.0%
sqrt-unprod64.5%
sqr-neg64.5%
sqrt-unprod92.8%
add-sqr-sqrt93.1%
div-inv93.1%
metadata-eval93.1%
distribute-rgt-neg-in93.1%
metadata-eval93.1%
Applied egg-rr93.1%
Final simplification94.5%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1e+61) (not (<= y 0.00033))) (* -0.3333333333333333 (/ y z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1e+61) || !(y <= 0.00033)) {
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 <= (-1d+61)) .or. (.not. (y <= 0.00033d0))) 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 <= -1e+61) || !(y <= 0.00033)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1e+61) or not (y <= 0.00033): tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1e+61) || !(y <= 0.00033)) 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 <= -1e+61) || ~((y <= 0.00033))) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1e+61], N[Not[LessEqual[y, 0.00033]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+61} \lor \neg \left(y \leq 0.00033\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.99999999999999949e60 or 3.3e-4 < y Initial program 98.9%
Taylor expanded in x around 0 77.5%
Taylor expanded in t around 0 72.9%
if -9.99999999999999949e60 < y < 3.3e-4Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate--l+93.2%
sub-neg93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
distribute-neg-in93.2%
remove-double-neg93.2%
sub-neg93.2%
neg-mul-193.2%
times-frac93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.8%
Taylor expanded in x around inf 35.5%
Final simplification52.0%
(FPCore (x y z t) :precision binary64 (if (<= y -1.1e+61) (* y (/ -0.3333333333333333 z)) (if (<= y 0.00048) x (* -0.3333333333333333 (/ y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1.1e+61) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 0.00048) {
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 <= (-1.1d+61)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= 0.00048d0) 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 <= -1.1e+61) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= 0.00048) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1.1e+61: tmp = y * (-0.3333333333333333 / z) elif y <= 0.00048: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1.1e+61) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= 0.00048) 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 <= -1.1e+61) tmp = y * (-0.3333333333333333 / z); elseif (y <= 0.00048) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1.1e+61], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.00048], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+61}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 0.00048:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.1e61Initial program 97.7%
Taylor expanded in x around 0 81.0%
Taylor expanded in t around 0 81.1%
associate-*r/81.2%
associate-*l/81.2%
*-commutative81.2%
Simplified81.2%
if -1.1e61 < y < 4.80000000000000012e-4Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate--l+93.2%
sub-neg93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
distribute-neg-in93.2%
remove-double-neg93.2%
sub-neg93.2%
neg-mul-193.2%
times-frac93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.8%
Taylor expanded in x around inf 35.5%
if 4.80000000000000012e-4 < y Initial program 99.8%
Taylor expanded in x around 0 74.8%
Taylor expanded in t around 0 66.7%
Final simplification52.1%
(FPCore (x y z t) :precision binary64 (if (<= y -1e+61) (/ -0.3333333333333333 (/ z y)) (if (<= y 0.0003) x (* -0.3333333333333333 (/ y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -1e+61) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 0.0003) {
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 <= (-1d+61)) then
tmp = (-0.3333333333333333d0) / (z / y)
else if (y <= 0.0003d0) 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 <= -1e+61) {
tmp = -0.3333333333333333 / (z / y);
} else if (y <= 0.0003) {
tmp = x;
} else {
tmp = -0.3333333333333333 * (y / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -1e+61: tmp = -0.3333333333333333 / (z / y) elif y <= 0.0003: tmp = x else: tmp = -0.3333333333333333 * (y / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -1e+61) tmp = Float64(-0.3333333333333333 / Float64(z / y)); elseif (y <= 0.0003) 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 <= -1e+61) tmp = -0.3333333333333333 / (z / y); elseif (y <= 0.0003) tmp = x; else tmp = -0.3333333333333333 * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -1e+61], N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0003], x, N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+61}:\\
\;\;\;\;\frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{elif}\;y \leq 0.0003:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -9.99999999999999949e60Initial program 97.7%
Taylor expanded in x around 0 81.0%
Taylor expanded in t around 0 81.1%
clear-num81.1%
un-div-inv81.2%
Applied egg-rr81.2%
if -9.99999999999999949e60 < y < 2.99999999999999974e-4Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
+-commutative93.2%
associate--l+93.2%
sub-neg93.2%
remove-double-neg93.2%
distribute-frac-neg93.2%
distribute-neg-in93.2%
remove-double-neg93.2%
sub-neg93.2%
neg-mul-193.2%
times-frac93.9%
distribute-frac-neg93.9%
neg-mul-193.9%
*-commutative93.9%
associate-/l*93.9%
*-commutative93.9%
Simplified93.8%
Taylor expanded in x around inf 35.5%
if 2.99999999999999974e-4 < y Initial program 99.8%
Taylor expanded in x around 0 74.8%
Taylor expanded in t around 0 66.7%
Final simplification52.1%
(FPCore (x y z t) :precision binary64 (+ x (* 0.3333333333333333 (/ (- (/ t y) y) z))))
double code(double x, double y, double z, double t) {
return x + (0.3333333333333333 * (((t / y) - y) / 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 + (0.3333333333333333d0 * (((t / y) - y) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (0.3333333333333333 * (((t / y) - y) / z));
}
def code(x, y, z, t): return x + (0.3333333333333333 * (((t / y) - y) / z))
function code(x, y, z, t) return Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z))) end
function tmp = code(x, y, z, t) tmp = x + (0.3333333333333333 * (((t / y) - y) / z)); end
code[x_, y_, z_, t_] := N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}
\end{array}
Initial program 95.7%
+-commutative95.7%
associate-+r-95.7%
+-commutative95.7%
associate--l+95.7%
sub-neg95.7%
remove-double-neg95.7%
distribute-frac-neg95.7%
distribute-neg-in95.7%
remove-double-neg95.7%
sub-neg95.7%
neg-mul-195.7%
times-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.0%
*-commutative96.0%
Simplified96.4%
Taylor expanded in z around 0 96.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 95.7%
+-commutative95.7%
associate-+r-95.7%
+-commutative95.7%
associate--l+95.7%
sub-neg95.7%
remove-double-neg95.7%
distribute-frac-neg95.7%
distribute-neg-in95.7%
remove-double-neg95.7%
sub-neg95.7%
neg-mul-195.7%
times-frac96.1%
distribute-frac-neg96.1%
neg-mul-196.1%
*-commutative96.1%
associate-/l*96.0%
*-commutative96.0%
Simplified96.4%
Taylor expanded in x around inf 29.6%
Final simplification29.6%
(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 2024080
(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))))