
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + (t / ((z * 3.0d0) * y))
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y));
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y))
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(Float64(z * 3.0) * y))) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(N[(z * 3.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ t y) y)))
(if (<= y -5.9e-33)
(+ x (* 0.3333333333333333 (/ t_1 z)))
(if (<= y 7e-114)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(+ x (* (/ 0.3333333333333333 z) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -5.9e-33) {
tmp = x + (0.3333333333333333 * (t_1 / z));
} else if (y <= 7e-114) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((0.3333333333333333 / z) * 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 = (t / y) - y
if (y <= (-5.9d-33)) then
tmp = x + (0.3333333333333333d0 * (t_1 / z))
else if (y <= 7d-114) then
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
else
tmp = x + ((0.3333333333333333d0 / z) * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (t / y) - y;
double tmp;
if (y <= -5.9e-33) {
tmp = x + (0.3333333333333333 * (t_1 / z));
} else if (y <= 7e-114) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x + ((0.3333333333333333 / z) * t_1);
}
return tmp;
}
def code(x, y, z, t): t_1 = (t / y) - y tmp = 0 if y <= -5.9e-33: tmp = x + (0.3333333333333333 * (t_1 / z)) elif y <= 7e-114: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x + ((0.3333333333333333 / z) * t_1) return tmp
function code(x, y, z, t) t_1 = Float64(Float64(t / y) - y) tmp = 0.0 if (y <= -5.9e-33) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t_1 / z))); elseif (y <= 7e-114) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); else tmp = Float64(x + Float64(Float64(0.3333333333333333 / z) * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (t / y) - y; tmp = 0.0; if (y <= -5.9e-33) tmp = x + (0.3333333333333333 * (t_1 / z)); elseif (y <= 7e-114) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x + ((0.3333333333333333 / z) * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[y, -5.9e-33], N[(x + N[(0.3333333333333333 * N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e-114], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{y} - y\\
\mathbf{if}\;y \leq -5.9 \cdot 10^{-33}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t\_1}{z}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-114}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot t\_1\\
\end{array}
\end{array}
if y < -5.89999999999999985e-33Initial program 97.2%
+-commutative97.2%
associate-+r-97.2%
+-commutative97.2%
associate--l+97.2%
sub-neg97.2%
remove-double-neg97.2%
distribute-frac-neg97.2%
distribute-neg-in97.2%
remove-double-neg97.2%
sub-neg97.2%
neg-mul-197.2%
times-frac98.5%
distribute-frac-neg98.5%
neg-mul-198.5%
*-commutative98.5%
associate-/l*98.4%
*-commutative98.4%
Simplified99.8%
Taylor expanded in z around 0 99.8%
if -5.89999999999999985e-33 < y < 7e-114Initial program 92.8%
+-commutative92.8%
associate-+r-92.8%
+-commutative92.8%
associate--l+92.8%
sub-neg92.8%
remove-double-neg92.8%
distribute-frac-neg92.8%
distribute-neg-in92.8%
remove-double-neg92.8%
sub-neg92.8%
neg-mul-192.8%
times-frac87.2%
distribute-frac-neg87.2%
neg-mul-187.2%
*-commutative87.2%
associate-/l*87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in t around inf 90.8%
associate-*r/91.5%
Simplified91.5%
times-frac97.7%
*-commutative97.7%
Applied egg-rr97.7%
if 7e-114 < y 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-frac99.8%
distribute-frac-neg99.8%
neg-mul-199.8%
*-commutative99.8%
associate-/l*99.8%
*-commutative99.8%
Simplified99.8%
(FPCore (x y z t)
:precision binary64
(if (<= y -5.3e+110)
(* y (/ -0.3333333333333333 z))
(if (<= y -5e+74)
x
(if (<= y -0.0055)
(* (/ y z) -0.3333333333333333)
(if (<= y -2.8e-129)
(* t (/ 0.3333333333333333 (* y z)))
(if (<= y -1.45e-144)
x
(if (<= y 6.8e-15)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y 8.2e+109) x (/ (* y -0.3333333333333333) z)))))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -5.3e+110) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -5e+74) {
tmp = x;
} else if (y <= -0.0055) {
tmp = (y / z) * -0.3333333333333333;
} else if (y <= -2.8e-129) {
tmp = t * (0.3333333333333333 / (y * z));
} else if (y <= -1.45e-144) {
tmp = x;
} else if (y <= 6.8e-15) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 8.2e+109) {
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 <= (-5.3d+110)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= (-5d+74)) then
tmp = x
else if (y <= (-0.0055d0)) then
tmp = (y / z) * (-0.3333333333333333d0)
else if (y <= (-2.8d-129)) then
tmp = t * (0.3333333333333333d0 / (y * z))
else if (y <= (-1.45d-144)) then
tmp = x
else if (y <= 6.8d-15) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= 8.2d+109) 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 <= -5.3e+110) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -5e+74) {
tmp = x;
} else if (y <= -0.0055) {
tmp = (y / z) * -0.3333333333333333;
} else if (y <= -2.8e-129) {
tmp = t * (0.3333333333333333 / (y * z));
} else if (y <= -1.45e-144) {
tmp = x;
} else if (y <= 6.8e-15) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 8.2e+109) {
tmp = x;
} else {
tmp = (y * -0.3333333333333333) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -5.3e+110: tmp = y * (-0.3333333333333333 / z) elif y <= -5e+74: tmp = x elif y <= -0.0055: tmp = (y / z) * -0.3333333333333333 elif y <= -2.8e-129: tmp = t * (0.3333333333333333 / (y * z)) elif y <= -1.45e-144: tmp = x elif y <= 6.8e-15: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= 8.2e+109: tmp = x else: tmp = (y * -0.3333333333333333) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -5.3e+110) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= -5e+74) tmp = x; elseif (y <= -0.0055) tmp = Float64(Float64(y / z) * -0.3333333333333333); elseif (y <= -2.8e-129) tmp = Float64(t * Float64(0.3333333333333333 / Float64(y * z))); elseif (y <= -1.45e-144) tmp = x; elseif (y <= 6.8e-15) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= 8.2e+109) tmp = x; else tmp = Float64(Float64(y * -0.3333333333333333) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -5.3e+110) tmp = y * (-0.3333333333333333 / z); elseif (y <= -5e+74) tmp = x; elseif (y <= -0.0055) tmp = (y / z) * -0.3333333333333333; elseif (y <= -2.8e-129) tmp = t * (0.3333333333333333 / (y * z)); elseif (y <= -1.45e-144) tmp = x; elseif (y <= 6.8e-15) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= 8.2e+109) tmp = x; else tmp = (y * -0.3333333333333333) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -5.3e+110], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5e+74], x, If[LessEqual[y, -0.0055], N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], If[LessEqual[y, -2.8e-129], N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.45e-144], x, If[LessEqual[y, 6.8e-15], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e+109], x, N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.3 \cdot 10^{+110}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -5 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -0.0055:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-129}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-144}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-15}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+109}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.2999999999999998e110Initial 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.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 78.7%
Taylor expanded in t around 0 77.5%
*-commutative77.5%
associate-*l/77.5%
associate-/l*77.5%
Simplified77.5%
if -5.2999999999999998e110 < y < -4.99999999999999963e74 or -2.7999999999999999e-129 < y < -1.4500000000000001e-144 or 6.8000000000000001e-15 < y < 8.19999999999999939e109Initial 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-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.8%
Taylor expanded in x around inf 71.6%
if -4.99999999999999963e74 < y < -0.0054999999999999997Initial program 95.2%
+-commutative95.2%
associate-+r-95.2%
+-commutative95.2%
associate--l+95.2%
sub-neg95.2%
remove-double-neg95.2%
distribute-frac-neg95.2%
distribute-neg-in95.2%
remove-double-neg95.2%
sub-neg95.2%
neg-mul-195.2%
times-frac95.2%
distribute-frac-neg95.2%
neg-mul-195.2%
*-commutative95.2%
associate-/l*95.2%
*-commutative95.2%
Simplified99.6%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 76.8%
Taylor expanded in t around 0 55.5%
if -0.0054999999999999997 < y < -2.7999999999999999e-129Initial program 96.8%
+-commutative96.8%
associate-+r-96.8%
+-commutative96.8%
associate--l+96.8%
sub-neg96.8%
remove-double-neg96.8%
distribute-frac-neg96.8%
distribute-neg-in96.8%
remove-double-neg96.8%
sub-neg96.8%
neg-mul-196.8%
times-frac88.4%
distribute-frac-neg88.4%
neg-mul-188.4%
*-commutative88.4%
associate-/l*88.3%
*-commutative88.3%
Simplified88.4%
Taylor expanded in z around 0 88.3%
Taylor expanded in x around 0 58.3%
Taylor expanded in t around inf 52.5%
*-commutative52.5%
associate-*l/55.1%
associate-*r/55.1%
Simplified55.1%
if -1.4500000000000001e-144 < y < 6.8000000000000001e-15Initial program 92.1%
+-commutative92.1%
associate-+r-92.1%
+-commutative92.1%
associate--l+92.1%
sub-neg92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
distribute-neg-in92.1%
remove-double-neg92.1%
sub-neg92.1%
neg-mul-192.1%
times-frac89.5%
distribute-frac-neg89.5%
neg-mul-189.5%
*-commutative89.5%
associate-/l*89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in z around 0 89.5%
Taylor expanded in x around 0 76.5%
Taylor expanded in t around inf 76.1%
if 8.19999999999999939e109 < y 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-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 93.8%
Taylor expanded in t around 0 89.1%
associate-*r/89.3%
*-commutative89.3%
Simplified89.3%
Final simplification73.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (/ (* y 0.3333333333333333) z))))
(if (<= (* z 3.0) -2e+193)
t_1
(if (<= (* z 3.0) -2e+154)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= (* z 3.0) -5e+47)
(- x (/ y (* z 3.0)))
(if (<= (* z 3.0) 1e+106)
(* 0.3333333333333333 (/ (- (/ t y) y) z))
t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x - ((y * 0.3333333333333333) / z);
double tmp;
if ((z * 3.0) <= -2e+193) {
tmp = t_1;
} else if ((z * 3.0) <= -2e+154) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if ((z * 3.0) <= -5e+47) {
tmp = x - (y / (z * 3.0));
} else if ((z * 3.0) <= 1e+106) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} 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 * 0.3333333333333333d0) / z)
if ((z * 3.0d0) <= (-2d+193)) then
tmp = t_1
else if ((z * 3.0d0) <= (-2d+154)) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if ((z * 3.0d0) <= (-5d+47)) then
tmp = x - (y / (z * 3.0d0))
else if ((z * 3.0d0) <= 1d+106) then
tmp = 0.3333333333333333d0 * (((t / y) - y) / z)
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 * 0.3333333333333333) / z);
double tmp;
if ((z * 3.0) <= -2e+193) {
tmp = t_1;
} else if ((z * 3.0) <= -2e+154) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if ((z * 3.0) <= -5e+47) {
tmp = x - (y / (z * 3.0));
} else if ((z * 3.0) <= 1e+106) {
tmp = 0.3333333333333333 * (((t / y) - y) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x - ((y * 0.3333333333333333) / z) tmp = 0 if (z * 3.0) <= -2e+193: tmp = t_1 elif (z * 3.0) <= -2e+154: tmp = 0.3333333333333333 * (t / (y * z)) elif (z * 3.0) <= -5e+47: tmp = x - (y / (z * 3.0)) elif (z * 3.0) <= 1e+106: tmp = 0.3333333333333333 * (((t / y) - y) / z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)) tmp = 0.0 if (Float64(z * 3.0) <= -2e+193) tmp = t_1; elseif (Float64(z * 3.0) <= -2e+154) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (Float64(z * 3.0) <= -5e+47) tmp = Float64(x - Float64(y / Float64(z * 3.0))); elseif (Float64(z * 3.0) <= 1e+106) tmp = Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - ((y * 0.3333333333333333) / z); tmp = 0.0; if ((z * 3.0) <= -2e+193) tmp = t_1; elseif ((z * 3.0) <= -2e+154) tmp = 0.3333333333333333 * (t / (y * z)); elseif ((z * 3.0) <= -5e+47) tmp = x - (y / (z * 3.0)); elseif ((z * 3.0) <= 1e+106) tmp = 0.3333333333333333 * (((t / y) - y) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+193], t$95$1, If[LessEqual[N[(z * 3.0), $MachinePrecision], -2e+154], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], -5e+47], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * 3.0), $MachinePrecision], 1e+106], N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y \cdot 0.3333333333333333}{z}\\
\mathbf{if}\;z \cdot 3 \leq -2 \cdot 10^{+193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot 3 \leq -2 \cdot 10^{+154}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;z \cdot 3 \leq -5 \cdot 10^{+47}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\mathbf{elif}\;z \cdot 3 \leq 10^{+106}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 z #s(literal 3 binary64)) < -2.00000000000000013e193 or 1.00000000000000009e106 < (*.f64 z #s(literal 3 binary64)) 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-frac87.2%
distribute-frac-neg87.2%
neg-mul-187.2%
*-commutative87.2%
associate-/l*87.1%
*-commutative87.1%
Simplified87.2%
Taylor expanded in t around 0 77.9%
metadata-eval77.9%
cancel-sign-sub-inv77.9%
associate-*r/77.9%
Simplified77.9%
if -2.00000000000000013e193 < (*.f64 z #s(literal 3 binary64)) < -2.00000000000000007e154Initial program 99.3%
+-commutative99.3%
associate-+r-99.3%
+-commutative99.3%
associate--l+99.3%
sub-neg99.3%
remove-double-neg99.3%
distribute-frac-neg99.3%
distribute-neg-in99.3%
remove-double-neg99.3%
sub-neg99.3%
neg-mul-199.3%
times-frac58.8%
distribute-frac-neg58.8%
neg-mul-158.8%
*-commutative58.8%
associate-/l*58.8%
*-commutative58.8%
Simplified59.1%
Taylor expanded in z around 0 59.1%
Taylor expanded in x around 0 46.2%
Taylor expanded in t around inf 86.5%
if -2.00000000000000007e154 < (*.f64 z #s(literal 3 binary64)) < -5.00000000000000022e47Initial program 99.6%
+-commutative99.6%
associate-+r-99.6%
+-commutative99.6%
associate--l+99.6%
sub-neg99.6%
remove-double-neg99.6%
distribute-frac-neg99.6%
distribute-neg-in99.6%
remove-double-neg99.6%
sub-neg99.6%
neg-mul-199.6%
times-frac94.9%
distribute-frac-neg94.9%
neg-mul-194.9%
*-commutative94.9%
associate-/l*94.9%
*-commutative94.9%
Simplified94.8%
Taylor expanded in t around 0 75.2%
metadata-eval75.2%
cancel-sign-sub-inv75.2%
associate-*r/75.2%
Simplified75.2%
Taylor expanded in y around 0 75.2%
*-commutative75.2%
associate-*l/75.2%
associate-*r/75.2%
Simplified75.2%
Taylor expanded in y around 0 75.2%
*-commutative75.2%
metadata-eval75.2%
times-frac75.2%
*-rgt-identity75.2%
Simplified75.2%
if -5.00000000000000022e47 < (*.f64 z #s(literal 3 binary64)) < 1.00000000000000009e106Initial program 94.1%
+-commutative94.1%
associate-+r-94.1%
+-commutative94.1%
associate--l+94.1%
sub-neg94.1%
remove-double-neg94.1%
distribute-frac-neg94.1%
distribute-neg-in94.1%
remove-double-neg94.1%
sub-neg94.1%
neg-mul-194.1%
times-frac97.7%
distribute-frac-neg97.7%
neg-mul-197.7%
*-commutative97.7%
associate-/l*97.7%
*-commutative97.7%
Simplified98.2%
Taylor expanded in z around 0 98.2%
Taylor expanded in x around 0 89.4%
Final simplification85.5%
(FPCore (x y z t) :precision binary64 (if (<= (+ (- x (/ y (* z 3.0))) (/ t (* y (* z 3.0)))) (- INFINITY)) (+ x (* (/ 0.3333333333333333 z) (- (/ t y) y))) (+ (+ x (/ t (* z (* y 3.0)))) (/ y (* z -3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= -((double) INFINITY)) {
tmp = x + ((0.3333333333333333 / z) * ((t / y) - y));
} else {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
double tmp;
if (((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= -Double.POSITIVE_INFINITY) {
tmp = x + ((0.3333333333333333 / z) * ((t / y) - y));
} else {
tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= -math.inf: tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)) else: tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(t / Float64(y * Float64(z * 3.0)))) <= Float64(-Inf)) tmp = Float64(x + Float64(Float64(0.3333333333333333 / z) * Float64(Float64(t / y) - y))); else tmp = Float64(Float64(x + Float64(t / Float64(z * Float64(y * 3.0)))) + Float64(y / Float64(z * -3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((x - (y / (z * 3.0))) + (t / (y * (z * 3.0)))) <= -Inf) tmp = x + ((0.3333333333333333 / z) * ((t / y) - y)); else tmp = (x + (t / (z * (y * 3.0)))) + (y / (z * -3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t / N[(y * N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(x + N[(N[(0.3333333333333333 / z), $MachinePrecision] * N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(t / N[(z * N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)} \leq -\infty:\\
\;\;\;\;x + \frac{0.3333333333333333}{z} \cdot \left(\frac{t}{y} - y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{t}{z \cdot \left(y \cdot 3\right)}\right) + \frac{y}{z \cdot -3}\\
\end{array}
\end{array}
if (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) < -inf.0Initial program 86.0%
+-commutative86.0%
associate-+r-86.0%
+-commutative86.0%
associate--l+86.0%
sub-neg86.0%
remove-double-neg86.0%
distribute-frac-neg86.0%
distribute-neg-in86.0%
remove-double-neg86.0%
sub-neg86.0%
neg-mul-186.0%
times-frac100.0%
distribute-frac-neg100.0%
neg-mul-1100.0%
*-commutative100.0%
associate-/l*100.0%
*-commutative100.0%
Simplified99.9%
if -inf.0 < (+.f64 (-.f64 x (/.f64 y (*.f64 z #s(literal 3 binary64)))) (/.f64 t (*.f64 (*.f64 z #s(literal 3 binary64)) y))) Initial program 98.3%
+-commutative98.3%
associate-+r-98.3%
sub-neg98.3%
associate-*l*98.3%
*-commutative98.3%
distribute-frac-neg298.3%
distribute-rgt-neg-in98.3%
metadata-eval98.3%
Simplified98.3%
Final simplification98.6%
(FPCore (x y z t)
:precision binary64
(if (<= y -6e+110)
(* y (/ -0.3333333333333333 z))
(if (<= y -5e+74)
x
(if (<= y -0.00135)
(* (/ y z) -0.3333333333333333)
(if (<= y 3.3e-14)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y 1.85e+109) x (/ (* y -0.3333333333333333) z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -6e+110) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -5e+74) {
tmp = x;
} else if (y <= -0.00135) {
tmp = (y / z) * -0.3333333333333333;
} else if (y <= 3.3e-14) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 1.85e+109) {
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 <= (-6d+110)) then
tmp = y * ((-0.3333333333333333d0) / z)
else if (y <= (-5d+74)) then
tmp = x
else if (y <= (-0.00135d0)) then
tmp = (y / z) * (-0.3333333333333333d0)
else if (y <= 3.3d-14) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= 1.85d+109) 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 <= -6e+110) {
tmp = y * (-0.3333333333333333 / z);
} else if (y <= -5e+74) {
tmp = x;
} else if (y <= -0.00135) {
tmp = (y / z) * -0.3333333333333333;
} else if (y <= 3.3e-14) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 1.85e+109) {
tmp = x;
} else {
tmp = (y * -0.3333333333333333) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -6e+110: tmp = y * (-0.3333333333333333 / z) elif y <= -5e+74: tmp = x elif y <= -0.00135: tmp = (y / z) * -0.3333333333333333 elif y <= 3.3e-14: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= 1.85e+109: tmp = x else: tmp = (y * -0.3333333333333333) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -6e+110) tmp = Float64(y * Float64(-0.3333333333333333 / z)); elseif (y <= -5e+74) tmp = x; elseif (y <= -0.00135) tmp = Float64(Float64(y / z) * -0.3333333333333333); elseif (y <= 3.3e-14) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= 1.85e+109) tmp = x; else tmp = Float64(Float64(y * -0.3333333333333333) / z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -6e+110) tmp = y * (-0.3333333333333333 / z); elseif (y <= -5e+74) tmp = x; elseif (y <= -0.00135) tmp = (y / z) * -0.3333333333333333; elseif (y <= 3.3e-14) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= 1.85e+109) tmp = x; else tmp = (y * -0.3333333333333333) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -6e+110], N[(y * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5e+74], x, If[LessEqual[y, -0.00135], N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], If[LessEqual[y, 3.3e-14], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e+109], x, N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+110}:\\
\;\;\;\;y \cdot \frac{-0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq -5 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -0.00135:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{-14}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+109}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -6.00000000000000014e110Initial 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.8%
*-commutative99.8%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 78.7%
Taylor expanded in t around 0 77.5%
*-commutative77.5%
associate-*l/77.5%
associate-/l*77.5%
Simplified77.5%
if -6.00000000000000014e110 < y < -4.99999999999999963e74 or 3.2999999999999998e-14 < y < 1.8500000000000001e109Initial 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-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 67.2%
if -4.99999999999999963e74 < y < -0.0013500000000000001Initial program 95.2%
+-commutative95.2%
associate-+r-95.2%
+-commutative95.2%
associate--l+95.2%
sub-neg95.2%
remove-double-neg95.2%
distribute-frac-neg95.2%
distribute-neg-in95.2%
remove-double-neg95.2%
sub-neg95.2%
neg-mul-195.2%
times-frac95.2%
distribute-frac-neg95.2%
neg-mul-195.2%
*-commutative95.2%
associate-/l*95.2%
*-commutative95.2%
Simplified99.6%
Taylor expanded in z around 0 99.8%
Taylor expanded in x around 0 76.8%
Taylor expanded in t around 0 55.5%
if -0.0013500000000000001 < y < 3.2999999999999998e-14Initial program 93.5%
+-commutative93.5%
associate-+r-93.5%
+-commutative93.5%
associate--l+93.5%
sub-neg93.5%
remove-double-neg93.5%
distribute-frac-neg93.5%
distribute-neg-in93.5%
remove-double-neg93.5%
sub-neg93.5%
neg-mul-193.5%
times-frac89.6%
distribute-frac-neg89.6%
neg-mul-189.6%
*-commutative89.6%
associate-/l*89.6%
*-commutative89.6%
Simplified89.6%
Taylor expanded in z around 0 89.6%
Taylor expanded in x around 0 69.6%
Taylor expanded in t around inf 68.0%
if 1.8500000000000001e109 < y 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-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.8%
Taylor expanded in z around 0 99.7%
Taylor expanded in x around 0 93.8%
Taylor expanded in t around 0 89.1%
associate-*r/89.3%
*-commutative89.3%
Simplified89.3%
Final simplification70.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* 0.3333333333333333 (/ y z)))))
(if (<= y -8.8e-33)
t_1
(if (<= y -4e-63)
(* t (/ 0.3333333333333333 (* y z)))
(if (or (<= y -3.6e-144) (not (<= y 1.36e-15)))
t_1
(* 0.3333333333333333 (/ t (* y z))))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (0.3333333333333333 * (y / z));
double tmp;
if (y <= -8.8e-33) {
tmp = t_1;
} else if (y <= -4e-63) {
tmp = t * (0.3333333333333333 / (y * z));
} else if ((y <= -3.6e-144) || !(y <= 1.36e-15)) {
tmp = t_1;
} else {
tmp = 0.3333333333333333 * (t / (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 = x - (0.3333333333333333d0 * (y / z))
if (y <= (-8.8d-33)) then
tmp = t_1
else if (y <= (-4d-63)) then
tmp = t * (0.3333333333333333d0 / (y * z))
else if ((y <= (-3.6d-144)) .or. (.not. (y <= 1.36d-15))) then
tmp = t_1
else
tmp = 0.3333333333333333d0 * (t / (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x - (0.3333333333333333 * (y / z));
double tmp;
if (y <= -8.8e-33) {
tmp = t_1;
} else if (y <= -4e-63) {
tmp = t * (0.3333333333333333 / (y * z));
} else if ((y <= -3.6e-144) || !(y <= 1.36e-15)) {
tmp = t_1;
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (0.3333333333333333 * (y / z)) tmp = 0 if y <= -8.8e-33: tmp = t_1 elif y <= -4e-63: tmp = t * (0.3333333333333333 / (y * z)) elif (y <= -3.6e-144) or not (y <= 1.36e-15): tmp = t_1 else: tmp = 0.3333333333333333 * (t / (y * z)) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(0.3333333333333333 * Float64(y / z))) tmp = 0.0 if (y <= -8.8e-33) tmp = t_1; elseif (y <= -4e-63) tmp = Float64(t * Float64(0.3333333333333333 / Float64(y * z))); elseif ((y <= -3.6e-144) || !(y <= 1.36e-15)) tmp = t_1; else tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (0.3333333333333333 * (y / z)); tmp = 0.0; if (y <= -8.8e-33) tmp = t_1; elseif (y <= -4e-63) tmp = t * (0.3333333333333333 / (y * z)); elseif ((y <= -3.6e-144) || ~((y <= 1.36e-15))) tmp = t_1; else tmp = 0.3333333333333333 * (t / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.8e-33], t$95$1, If[LessEqual[y, -4e-63], N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3.6e-144], N[Not[LessEqual[y, 1.36e-15]], $MachinePrecision]], t$95$1, N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -8.8 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-63}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-144} \lor \neg \left(y \leq 1.36 \cdot 10^{-15}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -8.80000000000000022e-33 or -4.00000000000000027e-63 < y < -3.6e-144 or 1.36e-15 < y Initial program 98.5%
Taylor expanded in t around 0 86.4%
if -8.80000000000000022e-33 < y < -4.00000000000000027e-63Initial program 99.3%
+-commutative99.3%
associate-+r-99.3%
+-commutative99.3%
associate--l+99.3%
sub-neg99.3%
remove-double-neg99.3%
distribute-frac-neg99.3%
distribute-neg-in99.3%
remove-double-neg99.3%
sub-neg99.3%
neg-mul-199.3%
times-frac85.5%
distribute-frac-neg85.5%
neg-mul-185.5%
*-commutative85.5%
associate-/l*85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in z around 0 85.3%
Taylor expanded in x around 0 85.3%
Taylor expanded in t around inf 85.3%
*-commutative85.3%
associate-*l/85.8%
associate-*r/85.6%
Simplified85.6%
if -3.6e-144 < y < 1.36e-15Initial program 92.1%
+-commutative92.1%
associate-+r-92.1%
+-commutative92.1%
associate--l+92.1%
sub-neg92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
distribute-neg-in92.1%
remove-double-neg92.1%
sub-neg92.1%
neg-mul-192.1%
times-frac89.5%
distribute-frac-neg89.5%
neg-mul-189.5%
*-commutative89.5%
associate-/l*89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in z around 0 89.5%
Taylor expanded in x around 0 76.5%
Taylor expanded in t around inf 76.1%
Final simplification82.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* 0.3333333333333333 (/ y z)))))
(if (<= y -1.32e-32)
t_1
(if (<= y -3.7e-63)
(* t (/ 0.3333333333333333 (* y z)))
(if (<= y -3.6e-144)
t_1
(if (<= y 3.1e-17)
(* 0.3333333333333333 (/ t (* y z)))
(- x (/ (* y 0.3333333333333333) z))))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (0.3333333333333333 * (y / z));
double tmp;
if (y <= -1.32e-32) {
tmp = t_1;
} else if (y <= -3.7e-63) {
tmp = t * (0.3333333333333333 / (y * z));
} else if (y <= -3.6e-144) {
tmp = t_1;
} else if (y <= 3.1e-17) {
tmp = 0.3333333333333333 * (t / (y * 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) :: t_1
real(8) :: tmp
t_1 = x - (0.3333333333333333d0 * (y / z))
if (y <= (-1.32d-32)) then
tmp = t_1
else if (y <= (-3.7d-63)) then
tmp = t * (0.3333333333333333d0 / (y * z))
else if (y <= (-3.6d-144)) then
tmp = t_1
else if (y <= 3.1d-17) then
tmp = 0.3333333333333333d0 * (t / (y * 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 t_1 = x - (0.3333333333333333 * (y / z));
double tmp;
if (y <= -1.32e-32) {
tmp = t_1;
} else if (y <= -3.7e-63) {
tmp = t * (0.3333333333333333 / (y * z));
} else if (y <= -3.6e-144) {
tmp = t_1;
} else if (y <= 3.1e-17) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (0.3333333333333333 * (y / z)) tmp = 0 if y <= -1.32e-32: tmp = t_1 elif y <= -3.7e-63: tmp = t * (0.3333333333333333 / (y * z)) elif y <= -3.6e-144: tmp = t_1 elif y <= 3.1e-17: tmp = 0.3333333333333333 * (t / (y * z)) else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(0.3333333333333333 * Float64(y / z))) tmp = 0.0 if (y <= -1.32e-32) tmp = t_1; elseif (y <= -3.7e-63) tmp = Float64(t * Float64(0.3333333333333333 / Float64(y * z))); elseif (y <= -3.6e-144) tmp = t_1; elseif (y <= 3.1e-17) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (0.3333333333333333 * (y / z)); tmp = 0.0; if (y <= -1.32e-32) tmp = t_1; elseif (y <= -3.7e-63) tmp = t * (0.3333333333333333 / (y * z)); elseif (y <= -3.6e-144) tmp = t_1; elseif (y <= 3.1e-17) tmp = 0.3333333333333333 * (t / (y * z)); else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.32e-32], t$95$1, If[LessEqual[y, -3.7e-63], N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.6e-144], t$95$1, If[LessEqual[y, 3.1e-17], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -1.32 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-63}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-17}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.3200000000000001e-32 or -3.70000000000000012e-63 < y < -3.6e-144Initial program 97.8%
Taylor expanded in t around 0 81.1%
if -1.3200000000000001e-32 < y < -3.70000000000000012e-63Initial program 99.3%
+-commutative99.3%
associate-+r-99.3%
+-commutative99.3%
associate--l+99.3%
sub-neg99.3%
remove-double-neg99.3%
distribute-frac-neg99.3%
distribute-neg-in99.3%
remove-double-neg99.3%
sub-neg99.3%
neg-mul-199.3%
times-frac85.5%
distribute-frac-neg85.5%
neg-mul-185.5%
*-commutative85.5%
associate-/l*85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in z around 0 85.3%
Taylor expanded in x around 0 85.3%
Taylor expanded in t around inf 85.3%
*-commutative85.3%
associate-*l/85.8%
associate-*r/85.6%
Simplified85.6%
if -3.6e-144 < y < 3.0999999999999998e-17Initial program 92.1%
+-commutative92.1%
associate-+r-92.1%
+-commutative92.1%
associate--l+92.1%
sub-neg92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
distribute-neg-in92.1%
remove-double-neg92.1%
sub-neg92.1%
neg-mul-192.1%
times-frac89.5%
distribute-frac-neg89.5%
neg-mul-189.5%
*-commutative89.5%
associate-/l*89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in z around 0 89.5%
Taylor expanded in x around 0 76.5%
Taylor expanded in t around inf 76.1%
if 3.0999999999999998e-17 < y 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-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.8%
Taylor expanded in t around 0 96.7%
metadata-eval96.7%
cancel-sign-sub-inv96.7%
associate-*r/96.9%
Simplified96.9%
Final simplification82.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* 0.3333333333333333 (/ y z)))))
(if (<= y -6.8e-33)
t_1
(if (<= y -5e-66)
(* t (/ 0.3333333333333333 (* y z)))
(if (<= y -3.6e-144)
t_1
(if (<= y 7e-17)
(* 0.3333333333333333 (/ t (* y z)))
(- x (/ y (* z 3.0)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (0.3333333333333333 * (y / z));
double tmp;
if (y <= -6.8e-33) {
tmp = t_1;
} else if (y <= -5e-66) {
tmp = t * (0.3333333333333333 / (y * z));
} else if (y <= -3.6e-144) {
tmp = t_1;
} else if (y <= 7e-17) {
tmp = 0.3333333333333333 * (t / (y * z));
} 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 = x - (0.3333333333333333d0 * (y / z))
if (y <= (-6.8d-33)) then
tmp = t_1
else if (y <= (-5d-66)) then
tmp = t * (0.3333333333333333d0 / (y * z))
else if (y <= (-3.6d-144)) then
tmp = t_1
else if (y <= 7d-17) then
tmp = 0.3333333333333333d0 * (t / (y * z))
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 = x - (0.3333333333333333 * (y / z));
double tmp;
if (y <= -6.8e-33) {
tmp = t_1;
} else if (y <= -5e-66) {
tmp = t * (0.3333333333333333 / (y * z));
} else if (y <= -3.6e-144) {
tmp = t_1;
} else if (y <= 7e-17) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = x - (y / (z * 3.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (0.3333333333333333 * (y / z)) tmp = 0 if y <= -6.8e-33: tmp = t_1 elif y <= -5e-66: tmp = t * (0.3333333333333333 / (y * z)) elif y <= -3.6e-144: tmp = t_1 elif y <= 7e-17: tmp = 0.3333333333333333 * (t / (y * z)) else: tmp = x - (y / (z * 3.0)) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(0.3333333333333333 * Float64(y / z))) tmp = 0.0 if (y <= -6.8e-33) tmp = t_1; elseif (y <= -5e-66) tmp = Float64(t * Float64(0.3333333333333333 / Float64(y * z))); elseif (y <= -3.6e-144) tmp = t_1; elseif (y <= 7e-17) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); else tmp = Float64(x - Float64(y / Float64(z * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (0.3333333333333333 * (y / z)); tmp = 0.0; if (y <= -6.8e-33) tmp = t_1; elseif (y <= -5e-66) tmp = t * (0.3333333333333333 / (y * z)); elseif (y <= -3.6e-144) tmp = t_1; elseif (y <= 7e-17) tmp = 0.3333333333333333 * (t / (y * z)); else tmp = x - (y / (z * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.8e-33], t$95$1, If[LessEqual[y, -5e-66], N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.6e-144], t$95$1, If[LessEqual[y, 7e-17], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -6.8 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-66}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-17}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{z \cdot 3}\\
\end{array}
\end{array}
if y < -6.8000000000000001e-33 or -4.99999999999999962e-66 < y < -3.6e-144Initial program 97.8%
Taylor expanded in t around 0 81.1%
if -6.8000000000000001e-33 < y < -4.99999999999999962e-66Initial program 99.3%
+-commutative99.3%
associate-+r-99.3%
+-commutative99.3%
associate--l+99.3%
sub-neg99.3%
remove-double-neg99.3%
distribute-frac-neg99.3%
distribute-neg-in99.3%
remove-double-neg99.3%
sub-neg99.3%
neg-mul-199.3%
times-frac85.5%
distribute-frac-neg85.5%
neg-mul-185.5%
*-commutative85.5%
associate-/l*85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in z around 0 85.3%
Taylor expanded in x around 0 85.3%
Taylor expanded in t around inf 85.3%
*-commutative85.3%
associate-*l/85.8%
associate-*r/85.6%
Simplified85.6%
if -3.6e-144 < y < 7.0000000000000003e-17Initial program 92.1%
+-commutative92.1%
associate-+r-92.1%
+-commutative92.1%
associate--l+92.1%
sub-neg92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
distribute-neg-in92.1%
remove-double-neg92.1%
sub-neg92.1%
neg-mul-192.1%
times-frac89.5%
distribute-frac-neg89.5%
neg-mul-189.5%
*-commutative89.5%
associate-/l*89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in z around 0 89.5%
Taylor expanded in x around 0 76.5%
Taylor expanded in t around inf 76.1%
if 7.0000000000000003e-17 < y 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-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.8%
Taylor expanded in t around 0 96.7%
metadata-eval96.7%
cancel-sign-sub-inv96.7%
associate-*r/96.9%
Simplified96.9%
Taylor expanded in y around 0 96.7%
*-commutative96.7%
associate-*l/96.9%
associate-*r/96.7%
Simplified96.7%
Taylor expanded in y around 0 96.7%
*-commutative96.7%
metadata-eval96.7%
times-frac96.9%
*-rgt-identity96.9%
Simplified96.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- x (* 0.3333333333333333 (/ y z)))))
(if (<= y -5.4e-31)
t_1
(if (<= y -4.6e-63)
(* t (/ 0.3333333333333333 (* y z)))
(if (<= y -3.4e-144)
t_1
(if (<= y 3e-17)
(* 0.3333333333333333 (/ t (* y z)))
(- x (* y (/ 0.3333333333333333 z)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x - (0.3333333333333333 * (y / z));
double tmp;
if (y <= -5.4e-31) {
tmp = t_1;
} else if (y <= -4.6e-63) {
tmp = t * (0.3333333333333333 / (y * z));
} else if (y <= -3.4e-144) {
tmp = t_1;
} else if (y <= 3e-17) {
tmp = 0.3333333333333333 * (t / (y * 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) :: t_1
real(8) :: tmp
t_1 = x - (0.3333333333333333d0 * (y / z))
if (y <= (-5.4d-31)) then
tmp = t_1
else if (y <= (-4.6d-63)) then
tmp = t * (0.3333333333333333d0 / (y * z))
else if (y <= (-3.4d-144)) then
tmp = t_1
else if (y <= 3d-17) then
tmp = 0.3333333333333333d0 * (t / (y * 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 t_1 = x - (0.3333333333333333 * (y / z));
double tmp;
if (y <= -5.4e-31) {
tmp = t_1;
} else if (y <= -4.6e-63) {
tmp = t * (0.3333333333333333 / (y * z));
} else if (y <= -3.4e-144) {
tmp = t_1;
} else if (y <= 3e-17) {
tmp = 0.3333333333333333 * (t / (y * z));
} else {
tmp = x - (y * (0.3333333333333333 / z));
}
return tmp;
}
def code(x, y, z, t): t_1 = x - (0.3333333333333333 * (y / z)) tmp = 0 if y <= -5.4e-31: tmp = t_1 elif y <= -4.6e-63: tmp = t * (0.3333333333333333 / (y * z)) elif y <= -3.4e-144: tmp = t_1 elif y <= 3e-17: tmp = 0.3333333333333333 * (t / (y * z)) else: tmp = x - (y * (0.3333333333333333 / z)) return tmp
function code(x, y, z, t) t_1 = Float64(x - Float64(0.3333333333333333 * Float64(y / z))) tmp = 0.0 if (y <= -5.4e-31) tmp = t_1; elseif (y <= -4.6e-63) tmp = Float64(t * Float64(0.3333333333333333 / Float64(y * z))); elseif (y <= -3.4e-144) tmp = t_1; elseif (y <= 3e-17) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); else tmp = Float64(x - Float64(y * Float64(0.3333333333333333 / z))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x - (0.3333333333333333 * (y / z)); tmp = 0.0; if (y <= -5.4e-31) tmp = t_1; elseif (y <= -4.6e-63) tmp = t * (0.3333333333333333 / (y * z)); elseif (y <= -3.4e-144) tmp = t_1; elseif (y <= 3e-17) tmp = 0.3333333333333333 * (t / (y * z)); else tmp = x - (y * (0.3333333333333333 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.4e-31], t$95$1, If[LessEqual[y, -4.6e-63], N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.4e-144], t$95$1, If[LessEqual[y, 3e-17], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{if}\;y \leq -5.4 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{-63}:\\
\;\;\;\;t \cdot \frac{0.3333333333333333}{y \cdot z}\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-17}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -5.40000000000000027e-31 or -4.6e-63 < y < -3.40000000000000017e-144Initial program 97.8%
Taylor expanded in t around 0 81.1%
if -5.40000000000000027e-31 < y < -4.6e-63Initial program 99.3%
+-commutative99.3%
associate-+r-99.3%
+-commutative99.3%
associate--l+99.3%
sub-neg99.3%
remove-double-neg99.3%
distribute-frac-neg99.3%
distribute-neg-in99.3%
remove-double-neg99.3%
sub-neg99.3%
neg-mul-199.3%
times-frac85.5%
distribute-frac-neg85.5%
neg-mul-185.5%
*-commutative85.5%
associate-/l*85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in z around 0 85.3%
Taylor expanded in x around 0 85.3%
Taylor expanded in t around inf 85.3%
*-commutative85.3%
associate-*l/85.8%
associate-*r/85.6%
Simplified85.6%
if -3.40000000000000017e-144 < y < 3.00000000000000006e-17Initial program 92.1%
+-commutative92.1%
associate-+r-92.1%
+-commutative92.1%
associate--l+92.1%
sub-neg92.1%
remove-double-neg92.1%
distribute-frac-neg92.1%
distribute-neg-in92.1%
remove-double-neg92.1%
sub-neg92.1%
neg-mul-192.1%
times-frac89.5%
distribute-frac-neg89.5%
neg-mul-189.5%
*-commutative89.5%
associate-/l*89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in z around 0 89.5%
Taylor expanded in x around 0 76.5%
Taylor expanded in t around inf 76.1%
if 3.00000000000000006e-17 < y 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-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.8%
Taylor expanded in t around 0 96.7%
metadata-eval96.7%
cancel-sign-sub-inv96.7%
associate-*r/96.9%
Simplified96.9%
Taylor expanded in y around 0 96.7%
*-commutative96.7%
associate-*l/96.9%
associate-*r/96.7%
Simplified96.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.2e-32) (not (<= y 6.6e-114))) (+ x (* 0.3333333333333333 (/ (- (/ t y) y) z))) (+ x (* (/ t z) (/ 0.3333333333333333 y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.2e-32) || !(y <= 6.6e-114)) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.2d-32)) .or. (.not. (y <= 6.6d-114))) then
tmp = x + (0.3333333333333333d0 * (((t / y) - y) / z))
else
tmp = x + ((t / z) * (0.3333333333333333d0 / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.2e-32) || !(y <= 6.6e-114)) {
tmp = x + (0.3333333333333333 * (((t / y) - y) / z));
} else {
tmp = x + ((t / z) * (0.3333333333333333 / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.2e-32) or not (y <= 6.6e-114): tmp = x + (0.3333333333333333 * (((t / y) - y) / z)) else: tmp = x + ((t / z) * (0.3333333333333333 / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.2e-32) || !(y <= 6.6e-114)) tmp = Float64(x + Float64(0.3333333333333333 * Float64(Float64(Float64(t / y) - y) / z))); else tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.2e-32) || ~((y <= 6.6e-114))) tmp = x + (0.3333333333333333 * (((t / y) - y) / z)); else tmp = x + ((t / z) * (0.3333333333333333 / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.2e-32], N[Not[LessEqual[y, 6.6e-114]], $MachinePrecision]], N[(x + N[(0.3333333333333333 * N[(N[(N[(t / y), $MachinePrecision] - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{-32} \lor \neg \left(y \leq 6.6 \cdot 10^{-114}\right):\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{\frac{t}{y} - y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\end{array}
\end{array}
if y < -1.2000000000000001e-32 or 6.60000000000000069e-114 < y Initial 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-frac99.1%
distribute-frac-neg99.1%
neg-mul-199.1%
*-commutative99.1%
associate-/l*99.1%
*-commutative99.1%
Simplified99.8%
Taylor expanded in z around 0 99.8%
if -1.2000000000000001e-32 < y < 6.60000000000000069e-114Initial program 92.8%
+-commutative92.8%
associate-+r-92.8%
+-commutative92.8%
associate--l+92.8%
sub-neg92.8%
remove-double-neg92.8%
distribute-frac-neg92.8%
distribute-neg-in92.8%
remove-double-neg92.8%
sub-neg92.8%
neg-mul-192.8%
times-frac87.2%
distribute-frac-neg87.2%
neg-mul-187.2%
*-commutative87.2%
associate-/l*87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in t around inf 90.8%
associate-*r/91.5%
Simplified91.5%
times-frac97.7%
*-commutative97.7%
Applied egg-rr97.7%
Final simplification98.9%
(FPCore (x y z t)
:precision binary64
(if (<= y -0.023)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 6.2e-15)
(+ x (* (/ t z) (/ 0.3333333333333333 y)))
(- x (/ (* y 0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.023) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 6.2e-15) {
tmp = x + ((t / z) * (0.3333333333333333 / 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 <= (-0.023d0)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 6.2d-15) then
tmp = x + ((t / z) * (0.3333333333333333d0 / 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 <= -0.023) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 6.2e-15) {
tmp = x + ((t / z) * (0.3333333333333333 / y));
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -0.023: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 6.2e-15: tmp = x + ((t / z) * (0.3333333333333333 / y)) else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -0.023) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 6.2e-15) tmp = Float64(x + Float64(Float64(t / z) * Float64(0.3333333333333333 / y))); 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 <= -0.023) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 6.2e-15) tmp = x + ((t / z) * (0.3333333333333333 / y)); else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -0.023], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.2e-15], N[(x + N[(N[(t / z), $MachinePrecision] * N[(0.3333333333333333 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.023:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{-15}:\\
\;\;\;\;x + \frac{t}{z} \cdot \frac{0.3333333333333333}{y}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -0.023Initial program 98.3%
Taylor expanded in t around 0 88.4%
if -0.023 < y < 6.1999999999999998e-15Initial program 93.6%
+-commutative93.6%
associate-+r-93.6%
+-commutative93.6%
associate--l+93.6%
sub-neg93.6%
remove-double-neg93.6%
distribute-frac-neg93.6%
distribute-neg-in93.6%
remove-double-neg93.6%
sub-neg93.6%
neg-mul-193.6%
times-frac89.7%
distribute-frac-neg89.7%
neg-mul-189.7%
*-commutative89.7%
associate-/l*89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in t around inf 89.1%
associate-*r/89.7%
Simplified89.7%
times-frac94.6%
*-commutative94.6%
Applied egg-rr94.6%
if 6.1999999999999998e-15 < y 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-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.8%
Taylor expanded in t around 0 96.7%
metadata-eval96.7%
cancel-sign-sub-inv96.7%
associate-*r/96.9%
Simplified96.9%
Final simplification93.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -0.022)
(- x (* 0.3333333333333333 (/ y z)))
(if (<= y 2.6e-14)
(+ x (* 0.3333333333333333 (/ t (* y z))))
(- x (/ (* y 0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -0.022) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 2.6e-14) {
tmp = x + (0.3333333333333333 * (t / (y * 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 <= (-0.022d0)) then
tmp = x - (0.3333333333333333d0 * (y / z))
else if (y <= 2.6d-14) then
tmp = x + (0.3333333333333333d0 * (t / (y * 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 <= -0.022) {
tmp = x - (0.3333333333333333 * (y / z));
} else if (y <= 2.6e-14) {
tmp = x + (0.3333333333333333 * (t / (y * z)));
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -0.022: tmp = x - (0.3333333333333333 * (y / z)) elif y <= 2.6e-14: tmp = x + (0.3333333333333333 * (t / (y * z))) else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -0.022) tmp = Float64(x - Float64(0.3333333333333333 * Float64(y / z))); elseif (y <= 2.6e-14) tmp = Float64(x + Float64(0.3333333333333333 * Float64(t / Float64(y * 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 <= -0.022) tmp = x - (0.3333333333333333 * (y / z)); elseif (y <= 2.6e-14) tmp = x + (0.3333333333333333 * (t / (y * z))); else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -0.022], N[(x - N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e-14], N[(x + N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.022:\\
\;\;\;\;x - 0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-14}:\\
\;\;\;\;x + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -0.021999999999999999Initial program 98.3%
Taylor expanded in t around 0 88.4%
if -0.021999999999999999 < y < 2.59999999999999997e-14Initial program 93.6%
+-commutative93.6%
associate-+r-93.6%
+-commutative93.6%
associate--l+93.6%
sub-neg93.6%
remove-double-neg93.6%
distribute-frac-neg93.6%
distribute-neg-in93.6%
remove-double-neg93.6%
sub-neg93.6%
neg-mul-193.6%
times-frac89.7%
distribute-frac-neg89.7%
neg-mul-189.7%
*-commutative89.7%
associate-/l*89.7%
*-commutative89.7%
Simplified89.7%
Taylor expanded in t around inf 89.1%
if 2.59999999999999997e-14 < y 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-frac99.9%
distribute-frac-neg99.9%
neg-mul-199.9%
*-commutative99.9%
associate-/l*99.9%
*-commutative99.9%
Simplified99.8%
Taylor expanded in t around 0 96.7%
metadata-eval96.7%
cancel-sign-sub-inv96.7%
associate-*r/96.9%
Simplified96.9%
Final simplification90.5%
(FPCore (x y z t) :precision binary64 (if (<= z -7e+28) x (if (<= z 9.5e+110) (* (/ y z) -0.3333333333333333) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7e+28) {
tmp = x;
} else if (z <= 9.5e+110) {
tmp = (y / z) * -0.3333333333333333;
} 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 (z <= (-7d+28)) then
tmp = x
else if (z <= 9.5d+110) then
tmp = (y / z) * (-0.3333333333333333d0)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7e+28) {
tmp = x;
} else if (z <= 9.5e+110) {
tmp = (y / z) * -0.3333333333333333;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7e+28: tmp = x elif z <= 9.5e+110: tmp = (y / z) * -0.3333333333333333 else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7e+28) tmp = x; elseif (z <= 9.5e+110) tmp = Float64(Float64(y / z) * -0.3333333333333333); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -7e+28) tmp = x; elseif (z <= 9.5e+110) tmp = (y / z) * -0.3333333333333333; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7e+28], x, If[LessEqual[z, 9.5e+110], N[(N[(y / z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+28}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+110}:\\
\;\;\;\;\frac{y}{z} \cdot -0.3333333333333333\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -6.9999999999999999e28 or 9.49999999999999939e110 < z 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-frac86.1%
distribute-frac-neg86.1%
neg-mul-186.1%
*-commutative86.1%
associate-/l*86.0%
*-commutative86.0%
Simplified86.1%
Taylor expanded in x around inf 56.6%
if -6.9999999999999999e28 < z < 9.49999999999999939e110Initial program 94.1%
+-commutative94.1%
associate-+r-94.1%
+-commutative94.1%
associate--l+94.1%
sub-neg94.1%
remove-double-neg94.1%
distribute-frac-neg94.1%
distribute-neg-in94.1%
remove-double-neg94.1%
sub-neg94.1%
neg-mul-194.1%
times-frac98.2%
distribute-frac-neg98.2%
neg-mul-198.2%
*-commutative98.2%
associate-/l*98.1%
*-commutative98.1%
Simplified98.7%
Taylor expanded in z around 0 98.7%
Taylor expanded in x around 0 90.3%
Taylor expanded in t around 0 42.4%
Final simplification47.3%
(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 96.0%
+-commutative96.0%
associate-+r-96.0%
+-commutative96.0%
associate--l+96.0%
sub-neg96.0%
remove-double-neg96.0%
distribute-frac-neg96.0%
distribute-neg-in96.0%
remove-double-neg96.0%
sub-neg96.0%
neg-mul-196.0%
times-frac94.0%
distribute-frac-neg94.0%
neg-mul-194.0%
*-commutative94.0%
associate-/l*93.9%
*-commutative93.9%
Simplified94.3%
Taylor expanded in x around inf 26.3%
(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y)))
double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x - (y / (z * 3.0d0))) + ((t / (z * 3.0d0)) / y)
end function
public static double code(double x, double y, double z, double t) {
return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y);
}
def code(x, y, z, t): return (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y)
function code(x, y, z, t) return Float64(Float64(x - Float64(y / Float64(z * 3.0))) + Float64(Float64(t / Float64(z * 3.0)) / y)) end
function tmp = code(x, y, z, t) tmp = (x - (y / (z * 3.0))) + ((t / (z * 3.0)) / y); end
code[x_, y_, z_, t_] := N[(N[(x - N[(y / N[(z * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(z * 3.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x - \frac{y}{z \cdot 3}\right) + \frac{\frac{t}{z \cdot 3}}{y}
\end{array}
herbie shell --seed 2024110
(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))))