
(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 13 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 (+ x (/ (- y (/ t y)) (* z -3.0))))
double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) / (z * -3.0));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - (t / y)) / (z * (-3.0d0)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) / (z * -3.0));
}
def code(x, y, z, t): return x + ((y - (t / y)) / (z * -3.0))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - Float64(t / y)) / Float64(z * -3.0))) end
function tmp = code(x, y, z, t) tmp = x + ((y - (t / y)) / (z * -3.0)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / N[(z * -3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - \frac{t}{y}}{z \cdot -3}
\end{array}
Initial program 95.5%
associate-+l-95.5%
sub-neg95.5%
sub-neg95.5%
distribute-neg-in95.5%
unsub-neg95.5%
neg-mul-195.5%
associate-*r/95.5%
associate-*l/95.4%
distribute-neg-frac95.4%
neg-mul-195.4%
times-frac97.5%
distribute-lft-out--97.9%
*-commutative97.9%
associate-/r*97.9%
metadata-eval97.9%
Simplified97.9%
*-commutative97.9%
clear-num97.9%
un-div-inv98.0%
div-inv98.0%
metadata-eval98.0%
Applied egg-rr98.0%
Final simplification98.0%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 0.3333333333333333 (/ t (* y z))))
(t_2 (+ x (* 0.3333333333333333 (/ y z))))
(t_3 (/ 0.3333333333333333 (/ (- z) y))))
(if (<= y -1.06e-27)
t_3
(if (<= y 1.95e-26)
t_1
(if (<= y 2.1e+19)
t_2
(if (<= y 7e+29)
t_1
(if (<= y 4.1e+66)
(/ (* y -0.3333333333333333) z)
(if (<= y 7.4e+99) t_2 t_3))))))))
double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (y * z));
double t_2 = x + (0.3333333333333333 * (y / z));
double t_3 = 0.3333333333333333 / (-z / y);
double tmp;
if (y <= -1.06e-27) {
tmp = t_3;
} else if (y <= 1.95e-26) {
tmp = t_1;
} else if (y <= 2.1e+19) {
tmp = t_2;
} else if (y <= 7e+29) {
tmp = t_1;
} else if (y <= 4.1e+66) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 7.4e+99) {
tmp = t_2;
} else {
tmp = t_3;
}
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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 0.3333333333333333d0 * (t / (y * z))
t_2 = x + (0.3333333333333333d0 * (y / z))
t_3 = 0.3333333333333333d0 / (-z / y)
if (y <= (-1.06d-27)) then
tmp = t_3
else if (y <= 1.95d-26) then
tmp = t_1
else if (y <= 2.1d+19) then
tmp = t_2
else if (y <= 7d+29) then
tmp = t_1
else if (y <= 4.1d+66) then
tmp = (y * (-0.3333333333333333d0)) / z
else if (y <= 7.4d+99) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (y * z));
double t_2 = x + (0.3333333333333333 * (y / z));
double t_3 = 0.3333333333333333 / (-z / y);
double tmp;
if (y <= -1.06e-27) {
tmp = t_3;
} else if (y <= 1.95e-26) {
tmp = t_1;
} else if (y <= 2.1e+19) {
tmp = t_2;
} else if (y <= 7e+29) {
tmp = t_1;
} else if (y <= 4.1e+66) {
tmp = (y * -0.3333333333333333) / z;
} else if (y <= 7.4e+99) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 * (t / (y * z)) t_2 = x + (0.3333333333333333 * (y / z)) t_3 = 0.3333333333333333 / (-z / y) tmp = 0 if y <= -1.06e-27: tmp = t_3 elif y <= 1.95e-26: tmp = t_1 elif y <= 2.1e+19: tmp = t_2 elif y <= 7e+29: tmp = t_1 elif y <= 4.1e+66: tmp = (y * -0.3333333333333333) / z elif y <= 7.4e+99: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t) t_1 = Float64(0.3333333333333333 * Float64(t / Float64(y * z))) t_2 = Float64(x + Float64(0.3333333333333333 * Float64(y / z))) t_3 = Float64(0.3333333333333333 / Float64(Float64(-z) / y)) tmp = 0.0 if (y <= -1.06e-27) tmp = t_3; elseif (y <= 1.95e-26) tmp = t_1; elseif (y <= 2.1e+19) tmp = t_2; elseif (y <= 7e+29) tmp = t_1; elseif (y <= 4.1e+66) tmp = Float64(Float64(y * -0.3333333333333333) / z); elseif (y <= 7.4e+99) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 0.3333333333333333 * (t / (y * z)); t_2 = x + (0.3333333333333333 * (y / z)); t_3 = 0.3333333333333333 / (-z / y); tmp = 0.0; if (y <= -1.06e-27) tmp = t_3; elseif (y <= 1.95e-26) tmp = t_1; elseif (y <= 2.1e+19) tmp = t_2; elseif (y <= 7e+29) tmp = t_1; elseif (y <= 4.1e+66) tmp = (y * -0.3333333333333333) / z; elseif (y <= 7.4e+99) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(0.3333333333333333 / N[((-z) / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.06e-27], t$95$3, If[LessEqual[y, 1.95e-26], t$95$1, If[LessEqual[y, 2.1e+19], t$95$2, If[LessEqual[y, 7e+29], t$95$1, If[LessEqual[y, 4.1e+66], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 7.4e+99], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
t_2 := x + 0.3333333333333333 \cdot \frac{y}{z}\\
t_3 := \frac{0.3333333333333333}{\frac{-z}{y}}\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{-27}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+19}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+66}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{+99}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -1.05999999999999998e-27 or 7.4000000000000002e99 < y Initial program 99.8%
associate-/r*96.3%
Simplified96.3%
clear-num96.3%
inv-pow96.3%
*-commutative96.3%
*-un-lft-identity96.3%
times-frac96.3%
metadata-eval96.3%
Applied egg-rr96.3%
unpow-196.3%
Simplified96.3%
associate-+l-96.3%
associate-/r*96.3%
metadata-eval96.3%
Applied egg-rr96.3%
associate--r-96.3%
+-commutative96.3%
associate-+r-96.3%
associate-/r/96.3%
associate-/r*95.5%
Simplified95.5%
Taylor expanded in z around 0 77.0%
distribute-lft-out--77.0%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in t around 0 73.4%
associate-*r/73.4%
neg-mul-173.4%
Simplified73.4%
if -1.05999999999999998e-27 < y < 1.94999999999999993e-26 or 2.1e19 < y < 6.99999999999999958e29Initial program 91.5%
associate-/r*99.1%
Simplified99.1%
clear-num99.0%
inv-pow99.0%
*-commutative99.0%
*-un-lft-identity99.0%
times-frac99.0%
metadata-eval99.0%
Applied egg-rr99.0%
unpow-199.0%
Simplified99.0%
associate-+l-99.0%
associate-/r*99.0%
metadata-eval99.0%
Applied egg-rr99.0%
associate--r-99.0%
+-commutative99.0%
associate-+r-99.0%
associate-/r/99.0%
associate-/r*99.0%
Simplified99.0%
Taylor expanded in z around 0 62.6%
distribute-lft-out--62.6%
associate-/l*62.6%
Simplified62.6%
Taylor expanded in t around inf 57.2%
if 1.94999999999999993e-26 < y < 2.1e19 or 4.09999999999999994e66 < y < 7.4000000000000002e99Initial program 93.5%
associate-+l-93.5%
sub-neg93.5%
sub-neg93.5%
distribute-neg-in93.5%
unsub-neg93.5%
neg-mul-193.5%
associate-*r/93.5%
associate-*l/93.5%
distribute-neg-frac93.5%
neg-mul-193.5%
times-frac93.6%
distribute-lft-out--99.8%
*-commutative99.8%
associate-/r*99.8%
metadata-eval99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.8%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 87.4%
associate-*r/87.5%
associate-/l*87.3%
Simplified87.3%
add-sqr-sqrt50.0%
sqrt-unprod81.2%
frac-times81.3%
metadata-eval81.3%
metadata-eval81.3%
frac-times81.2%
associate-/l*81.3%
associate-/l*81.3%
sqrt-unprod31.3%
add-sqr-sqrt75.6%
*-un-lft-identity75.6%
times-frac75.6%
metadata-eval75.6%
metadata-eval75.6%
times-frac75.6%
*-un-lft-identity75.6%
associate-/l/75.6%
div-inv75.6%
metadata-eval75.6%
Applied egg-rr75.6%
if 6.99999999999999958e29 < y < 4.09999999999999994e66Initial program 100.0%
associate-/r*86.9%
Simplified86.9%
clear-num86.9%
inv-pow86.9%
*-commutative86.9%
*-un-lft-identity86.9%
times-frac86.9%
metadata-eval86.9%
Applied egg-rr86.9%
unpow-186.9%
Simplified86.9%
associate-+l-86.9%
associate-/r*86.9%
metadata-eval86.9%
Applied egg-rr86.9%
associate--r-86.9%
+-commutative86.9%
associate-+r-86.9%
associate-/r/86.9%
associate-/r*86.5%
Simplified86.5%
Taylor expanded in z around 0 71.6%
distribute-lft-out--71.6%
associate-/l*71.2%
Simplified71.2%
Taylor expanded in t around 0 56.9%
*-commutative56.9%
associate-*l/57.4%
Simplified57.4%
Final simplification65.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 0.3333333333333333 (* z (/ y t))))
(t_2 (+ x (/ -0.3333333333333333 (/ z y)))))
(if (<= y -6.8e-42)
t_2
(if (<= y -4.8e-159)
t_1
(if (<= y -3.7e-191)
t_2
(if (<= y 4.2e-131)
t_1
(if (<= y 1.15e-82)
t_2
(if (<= y 2e-26) t_1 (- x (/ (* y 0.3333333333333333) z))))))))))
double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 / (z * (y / t));
double t_2 = x + (-0.3333333333333333 / (z / y));
double tmp;
if (y <= -6.8e-42) {
tmp = t_2;
} else if (y <= -4.8e-159) {
tmp = t_1;
} else if (y <= -3.7e-191) {
tmp = t_2;
} else if (y <= 4.2e-131) {
tmp = t_1;
} else if (y <= 1.15e-82) {
tmp = t_2;
} else if (y <= 2e-26) {
tmp = t_1;
} 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) :: t_2
real(8) :: tmp
t_1 = 0.3333333333333333d0 / (z * (y / t))
t_2 = x + ((-0.3333333333333333d0) / (z / y))
if (y <= (-6.8d-42)) then
tmp = t_2
else if (y <= (-4.8d-159)) then
tmp = t_1
else if (y <= (-3.7d-191)) then
tmp = t_2
else if (y <= 4.2d-131) then
tmp = t_1
else if (y <= 1.15d-82) then
tmp = t_2
else if (y <= 2d-26) then
tmp = t_1
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 = 0.3333333333333333 / (z * (y / t));
double t_2 = x + (-0.3333333333333333 / (z / y));
double tmp;
if (y <= -6.8e-42) {
tmp = t_2;
} else if (y <= -4.8e-159) {
tmp = t_1;
} else if (y <= -3.7e-191) {
tmp = t_2;
} else if (y <= 4.2e-131) {
tmp = t_1;
} else if (y <= 1.15e-82) {
tmp = t_2;
} else if (y <= 2e-26) {
tmp = t_1;
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 / (z * (y / t)) t_2 = x + (-0.3333333333333333 / (z / y)) tmp = 0 if y <= -6.8e-42: tmp = t_2 elif y <= -4.8e-159: tmp = t_1 elif y <= -3.7e-191: tmp = t_2 elif y <= 4.2e-131: tmp = t_1 elif y <= 1.15e-82: tmp = t_2 elif y <= 2e-26: tmp = t_1 else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) t_1 = Float64(0.3333333333333333 / Float64(z * Float64(y / t))) t_2 = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))) tmp = 0.0 if (y <= -6.8e-42) tmp = t_2; elseif (y <= -4.8e-159) tmp = t_1; elseif (y <= -3.7e-191) tmp = t_2; elseif (y <= 4.2e-131) tmp = t_1; elseif (y <= 1.15e-82) tmp = t_2; elseif (y <= 2e-26) tmp = t_1; else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 0.3333333333333333 / (z * (y / t)); t_2 = x + (-0.3333333333333333 / (z / y)); tmp = 0.0; if (y <= -6.8e-42) tmp = t_2; elseif (y <= -4.8e-159) tmp = t_1; elseif (y <= -3.7e-191) tmp = t_2; elseif (y <= 4.2e-131) tmp = t_1; elseif (y <= 1.15e-82) tmp = t_2; elseif (y <= 2e-26) tmp = t_1; else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 / N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.8e-42], t$95$2, If[LessEqual[y, -4.8e-159], t$95$1, If[LessEqual[y, -3.7e-191], t$95$2, If[LessEqual[y, 4.2e-131], t$95$1, If[LessEqual[y, 1.15e-82], t$95$2, If[LessEqual[y, 2e-26], t$95$1, N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{0.3333333333333333}{z \cdot \frac{y}{t}}\\
t_2 := x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{if}\;y \leq -6.8 \cdot 10^{-42}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{-159}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{-191}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-82}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-26}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -6.80000000000000045e-42 or -4.79999999999999995e-159 < y < -3.6999999999999997e-191 or 4.19999999999999994e-131 < y < 1.14999999999999998e-82Initial program 98.1%
associate-+l-98.1%
sub-neg98.1%
sub-neg98.1%
distribute-neg-in98.1%
unsub-neg98.1%
neg-mul-198.1%
associate-*r/98.1%
associate-*l/98.0%
distribute-neg-frac98.0%
neg-mul-198.0%
times-frac97.8%
distribute-lft-out--97.8%
*-commutative97.8%
associate-/r*97.8%
metadata-eval97.8%
Simplified97.8%
*-commutative97.8%
clear-num97.8%
un-div-inv97.9%
div-inv97.9%
metadata-eval97.9%
Applied egg-rr97.9%
Taylor expanded in y around inf 87.6%
associate-*r/88.4%
associate-/l*88.5%
Simplified88.5%
if -6.80000000000000045e-42 < y < -4.79999999999999995e-159 or -3.6999999999999997e-191 < y < 4.19999999999999994e-131 or 1.14999999999999998e-82 < y < 2.0000000000000001e-26Initial program 90.9%
associate-/r*98.8%
Simplified98.8%
clear-num98.8%
inv-pow98.8%
*-commutative98.8%
*-un-lft-identity98.8%
times-frac98.8%
metadata-eval98.8%
Applied egg-rr98.8%
unpow-198.8%
Simplified98.8%
associate-+l-98.8%
associate-/r*98.8%
metadata-eval98.8%
Applied egg-rr98.8%
associate--r-98.8%
+-commutative98.8%
associate-+r-98.8%
associate-/r/98.8%
associate-/r*98.8%
Simplified98.8%
Taylor expanded in z around 0 70.0%
distribute-lft-out--70.0%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in t around inf 63.7%
*-commutative63.7%
associate-*r/68.7%
Simplified68.7%
if 2.0000000000000001e-26 < y Initial program 98.3%
Taylor expanded in x around 0 98.2%
cancel-sign-sub-inv98.2%
metadata-eval98.2%
+-commutative98.2%
associate-+r+98.2%
+-commutative98.2%
associate-/r*98.2%
associate-*r/98.2%
metadata-eval98.2%
cancel-sign-sub-inv98.2%
associate-*r/98.2%
div-sub99.8%
distribute-lft-out--99.8%
metadata-eval99.8%
associate-*r*99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 91.0%
Final simplification81.8%
(FPCore (x y z t)
:precision binary64
(if (or (<= y -4.3e-40)
(and (not (<= y 5.3e-133)) (or (<= y 1.3e-83) (not (<= y 1.35e-26)))))
(+ x (/ -0.3333333333333333 (/ z y)))
(* 0.3333333333333333 (/ t (* y z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -4.3e-40) || (!(y <= 5.3e-133) && ((y <= 1.3e-83) || !(y <= 1.35e-26)))) {
tmp = x + (-0.3333333333333333 / (z / y));
} 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) :: tmp
if ((y <= (-4.3d-40)) .or. (.not. (y <= 5.3d-133)) .and. (y <= 1.3d-83) .or. (.not. (y <= 1.35d-26))) then
tmp = x + ((-0.3333333333333333d0) / (z / y))
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 tmp;
if ((y <= -4.3e-40) || (!(y <= 5.3e-133) && ((y <= 1.3e-83) || !(y <= 1.35e-26)))) {
tmp = x + (-0.3333333333333333 / (z / y));
} else {
tmp = 0.3333333333333333 * (t / (y * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -4.3e-40) or (not (y <= 5.3e-133) and ((y <= 1.3e-83) or not (y <= 1.35e-26))): tmp = x + (-0.3333333333333333 / (z / y)) else: tmp = 0.3333333333333333 * (t / (y * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -4.3e-40) || (!(y <= 5.3e-133) && ((y <= 1.3e-83) || !(y <= 1.35e-26)))) tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); else tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -4.3e-40) || (~((y <= 5.3e-133)) && ((y <= 1.3e-83) || ~((y <= 1.35e-26))))) tmp = x + (-0.3333333333333333 / (z / y)); else tmp = 0.3333333333333333 * (t / (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -4.3e-40], And[N[Not[LessEqual[y, 5.3e-133]], $MachinePrecision], Or[LessEqual[y, 1.3e-83], N[Not[LessEqual[y, 1.35e-26]], $MachinePrecision]]]], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{-40} \lor \neg \left(y \leq 5.3 \cdot 10^{-133}\right) \land \left(y \leq 1.3 \cdot 10^{-83} \lor \neg \left(y \leq 1.35 \cdot 10^{-26}\right)\right):\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\end{array}
\end{array}
if y < -4.3000000000000003e-40 or 5.29999999999999983e-133 < y < 1.30000000000000004e-83 or 1.34999999999999991e-26 < y Initial program 98.0%
associate-+l-98.0%
sub-neg98.0%
sub-neg98.0%
distribute-neg-in98.0%
unsub-neg98.0%
neg-mul-198.0%
associate-*r/98.0%
associate-*l/97.9%
distribute-neg-frac97.9%
neg-mul-197.9%
times-frac98.4%
distribute-lft-out--99.1%
*-commutative99.1%
associate-/r*99.1%
metadata-eval99.1%
Simplified99.1%
*-commutative99.1%
clear-num99.1%
un-div-inv99.2%
div-inv99.2%
metadata-eval99.2%
Applied egg-rr99.2%
Taylor expanded in y around inf 90.7%
associate-*r/91.3%
associate-/l*91.3%
Simplified91.3%
if -4.3000000000000003e-40 < y < 5.29999999999999983e-133 or 1.30000000000000004e-83 < y < 1.34999999999999991e-26Initial program 91.9%
associate-/r*99.0%
Simplified99.0%
clear-num98.9%
inv-pow98.9%
*-commutative98.9%
*-un-lft-identity98.9%
times-frac98.9%
metadata-eval98.9%
Applied egg-rr98.9%
unpow-198.9%
Simplified98.9%
associate-+l-98.9%
associate-/r*98.9%
metadata-eval98.9%
Applied egg-rr98.9%
associate--r-98.9%
+-commutative98.9%
associate-+r-98.9%
associate-/r/98.9%
associate-/r*98.9%
Simplified98.9%
Taylor expanded in z around 0 65.2%
distribute-lft-out--65.2%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in t around inf 60.5%
Final simplification78.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 0.3333333333333333 (/ t (* y z))))
(t_2 (+ x (/ -0.3333333333333333 (/ z y)))))
(if (<= y -1.75e-42)
t_2
(if (<= y 3.6e-130)
t_1
(if (<= y 1.9e-83)
t_2
(if (<= y 3.9e-26) t_1 (- x (/ (* y 0.3333333333333333) z))))))))
double code(double x, double y, double z, double t) {
double t_1 = 0.3333333333333333 * (t / (y * z));
double t_2 = x + (-0.3333333333333333 / (z / y));
double tmp;
if (y <= -1.75e-42) {
tmp = t_2;
} else if (y <= 3.6e-130) {
tmp = t_1;
} else if (y <= 1.9e-83) {
tmp = t_2;
} else if (y <= 3.9e-26) {
tmp = t_1;
} 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) :: t_2
real(8) :: tmp
t_1 = 0.3333333333333333d0 * (t / (y * z))
t_2 = x + ((-0.3333333333333333d0) / (z / y))
if (y <= (-1.75d-42)) then
tmp = t_2
else if (y <= 3.6d-130) then
tmp = t_1
else if (y <= 1.9d-83) then
tmp = t_2
else if (y <= 3.9d-26) then
tmp = t_1
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 = 0.3333333333333333 * (t / (y * z));
double t_2 = x + (-0.3333333333333333 / (z / y));
double tmp;
if (y <= -1.75e-42) {
tmp = t_2;
} else if (y <= 3.6e-130) {
tmp = t_1;
} else if (y <= 1.9e-83) {
tmp = t_2;
} else if (y <= 3.9e-26) {
tmp = t_1;
} else {
tmp = x - ((y * 0.3333333333333333) / z);
}
return tmp;
}
def code(x, y, z, t): t_1 = 0.3333333333333333 * (t / (y * z)) t_2 = x + (-0.3333333333333333 / (z / y)) tmp = 0 if y <= -1.75e-42: tmp = t_2 elif y <= 3.6e-130: tmp = t_1 elif y <= 1.9e-83: tmp = t_2 elif y <= 3.9e-26: tmp = t_1 else: tmp = x - ((y * 0.3333333333333333) / z) return tmp
function code(x, y, z, t) t_1 = Float64(0.3333333333333333 * Float64(t / Float64(y * z))) t_2 = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))) tmp = 0.0 if (y <= -1.75e-42) tmp = t_2; elseif (y <= 3.6e-130) tmp = t_1; elseif (y <= 1.9e-83) tmp = t_2; elseif (y <= 3.9e-26) tmp = t_1; else tmp = Float64(x - Float64(Float64(y * 0.3333333333333333) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 0.3333333333333333 * (t / (y * z)); t_2 = x + (-0.3333333333333333 / (z / y)); tmp = 0.0; if (y <= -1.75e-42) tmp = t_2; elseif (y <= 3.6e-130) tmp = t_1; elseif (y <= 1.9e-83) tmp = t_2; elseif (y <= 3.9e-26) tmp = t_1; else tmp = x - ((y * 0.3333333333333333) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.75e-42], t$95$2, If[LessEqual[y, 3.6e-130], t$95$1, If[LessEqual[y, 1.9e-83], t$95$2, If[LessEqual[y, 3.9e-26], t$95$1, N[(x - N[(N[(y * 0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
t_2 := x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{-42}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-83}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{-26}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot 0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -1.7500000000000001e-42 or 3.6000000000000001e-130 < y < 1.89999999999999988e-83Initial program 97.8%
associate-+l-97.8%
sub-neg97.8%
sub-neg97.8%
distribute-neg-in97.8%
unsub-neg97.8%
neg-mul-197.8%
associate-*r/97.8%
associate-*l/97.7%
distribute-neg-frac97.7%
neg-mul-197.7%
times-frac98.6%
distribute-lft-out--98.6%
*-commutative98.6%
associate-/r*98.6%
metadata-eval98.6%
Simplified98.6%
*-commutative98.6%
clear-num98.6%
un-div-inv98.7%
div-inv98.7%
metadata-eval98.7%
Applied egg-rr98.7%
Taylor expanded in y around inf 90.5%
associate-*r/91.5%
associate-/l*91.5%
Simplified91.5%
if -1.7500000000000001e-42 < y < 3.6000000000000001e-130 or 1.89999999999999988e-83 < y < 3.89999999999999986e-26Initial program 91.9%
associate-/r*99.0%
Simplified99.0%
clear-num98.9%
inv-pow98.9%
*-commutative98.9%
*-un-lft-identity98.9%
times-frac98.9%
metadata-eval98.9%
Applied egg-rr98.9%
unpow-198.9%
Simplified98.9%
associate-+l-98.9%
associate-/r*98.9%
metadata-eval98.9%
Applied egg-rr98.9%
associate--r-98.9%
+-commutative98.9%
associate-+r-98.9%
associate-/r/98.9%
associate-/r*98.9%
Simplified98.9%
Taylor expanded in z around 0 65.2%
distribute-lft-out--65.2%
associate-/l*65.2%
Simplified65.2%
Taylor expanded in t around inf 60.5%
if 3.89999999999999986e-26 < y Initial program 98.3%
Taylor expanded in x around 0 98.2%
cancel-sign-sub-inv98.2%
metadata-eval98.2%
+-commutative98.2%
associate-+r+98.2%
+-commutative98.2%
associate-/r*98.2%
associate-*r/98.2%
metadata-eval98.2%
cancel-sign-sub-inv98.2%
associate-*r/98.2%
div-sub99.8%
distribute-lft-out--99.8%
metadata-eval99.8%
associate-*r*99.8%
distribute-lft-out--99.8%
associate-*r/99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 91.0%
Final simplification78.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.06e-27) (not (<= y 3.2e+36))) (+ x (/ -0.3333333333333333 (/ z y))) (+ x (* t (/ 0.3333333333333333 (* y z))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.06e-27) || !(y <= 3.2e+36)) {
tmp = x + (-0.3333333333333333 / (z / y));
} else {
tmp = x + (t * (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.06d-27)) .or. (.not. (y <= 3.2d+36))) then
tmp = x + ((-0.3333333333333333d0) / (z / y))
else
tmp = x + (t * (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.06e-27) || !(y <= 3.2e+36)) {
tmp = x + (-0.3333333333333333 / (z / y));
} else {
tmp = x + (t * (0.3333333333333333 / (y * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.06e-27) or not (y <= 3.2e+36): tmp = x + (-0.3333333333333333 / (z / y)) else: tmp = x + (t * (0.3333333333333333 / (y * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.06e-27) || !(y <= 3.2e+36)) tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); else tmp = Float64(x + Float64(t * Float64(0.3333333333333333 / Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.06e-27) || ~((y <= 3.2e+36))) tmp = x + (-0.3333333333333333 / (z / y)); else tmp = x + (t * (0.3333333333333333 / (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.06e-27], N[Not[LessEqual[y, 3.2e+36]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(0.3333333333333333 / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{-27} \lor \neg \left(y \leq 3.2 \cdot 10^{+36}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{0.3333333333333333}{y \cdot z}\\
\end{array}
\end{array}
if y < -1.05999999999999998e-27 or 3.1999999999999999e36 < y Initial program 99.0%
associate-+l-99.0%
sub-neg99.0%
sub-neg99.0%
distribute-neg-in99.0%
unsub-neg99.0%
neg-mul-199.0%
associate-*r/99.0%
associate-*l/98.9%
distribute-neg-frac98.9%
neg-mul-198.9%
times-frac98.9%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 94.3%
associate-*r/95.0%
associate-/l*95.0%
Simplified95.0%
if -1.05999999999999998e-27 < y < 3.1999999999999999e36Initial program 92.1%
associate-+l-92.1%
sub-neg92.1%
sub-neg92.1%
distribute-neg-in92.1%
unsub-neg92.1%
neg-mul-192.1%
associate-*r/92.1%
associate-*l/92.1%
distribute-neg-frac92.1%
neg-mul-192.1%
times-frac96.2%
distribute-lft-out--96.2%
*-commutative96.2%
associate-/r*96.2%
metadata-eval96.2%
Simplified96.2%
Taylor expanded in y around 0 88.9%
metadata-eval88.9%
times-frac89.0%
associate-*r*88.9%
*-commutative88.9%
*-lft-identity88.9%
associate-/r*95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in t around 0 88.9%
associate-*r/89.0%
*-commutative89.0%
associate-*r/87.9%
Simplified87.9%
Final simplification91.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -3.6e-30) (not (<= y 3.9e+36))) (+ x (/ -0.3333333333333333 (/ z y))) (+ x (/ (/ t z) (* y 3.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.6e-30) || !(y <= 3.9e+36)) {
tmp = x + (-0.3333333333333333 / (z / y));
} else {
tmp = x + ((t / z) / (y * 3.0));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-3.6d-30)) .or. (.not. (y <= 3.9d+36))) then
tmp = x + ((-0.3333333333333333d0) / (z / y))
else
tmp = x + ((t / z) / (y * 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -3.6e-30) || !(y <= 3.9e+36)) {
tmp = x + (-0.3333333333333333 / (z / y));
} else {
tmp = x + ((t / z) / (y * 3.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -3.6e-30) or not (y <= 3.9e+36): tmp = x + (-0.3333333333333333 / (z / y)) else: tmp = x + ((t / z) / (y * 3.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -3.6e-30) || !(y <= 3.9e+36)) tmp = Float64(x + Float64(-0.3333333333333333 / Float64(z / y))); else tmp = Float64(x + Float64(Float64(t / z) / Float64(y * 3.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -3.6e-30) || ~((y <= 3.9e+36))) tmp = x + (-0.3333333333333333 / (z / y)); else tmp = x + ((t / z) / (y * 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -3.6e-30], N[Not[LessEqual[y, 3.9e+36]], $MachinePrecision]], N[(x + N[(-0.3333333333333333 / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t / z), $MachinePrecision] / N[(y * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{-30} \lor \neg \left(y \leq 3.9 \cdot 10^{+36}\right):\\
\;\;\;\;x + \frac{-0.3333333333333333}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{t}{z}}{y \cdot 3}\\
\end{array}
\end{array}
if y < -3.6000000000000003e-30 or 3.90000000000000021e36 < y Initial program 99.0%
associate-+l-99.0%
sub-neg99.0%
sub-neg99.0%
distribute-neg-in99.0%
unsub-neg99.0%
neg-mul-199.0%
associate-*r/99.0%
associate-*l/98.9%
distribute-neg-frac98.9%
neg-mul-198.9%
times-frac98.9%
distribute-lft-out--99.7%
*-commutative99.7%
associate-/r*99.7%
metadata-eval99.7%
Simplified99.7%
*-commutative99.7%
clear-num99.7%
un-div-inv99.8%
div-inv99.8%
metadata-eval99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 94.3%
associate-*r/95.0%
associate-/l*95.0%
Simplified95.0%
if -3.6000000000000003e-30 < y < 3.90000000000000021e36Initial program 92.1%
associate-+l-92.1%
sub-neg92.1%
sub-neg92.1%
distribute-neg-in92.1%
unsub-neg92.1%
neg-mul-192.1%
associate-*r/92.1%
associate-*l/92.1%
distribute-neg-frac92.1%
neg-mul-192.1%
times-frac96.2%
distribute-lft-out--96.2%
*-commutative96.2%
associate-/r*96.2%
metadata-eval96.2%
Simplified96.2%
Taylor expanded in y around 0 88.9%
metadata-eval88.9%
times-frac89.0%
associate-*r*88.9%
*-commutative88.9%
*-lft-identity88.9%
associate-/r*95.9%
*-commutative95.9%
Simplified95.9%
Final simplification95.5%
(FPCore (x y z t)
:precision binary64
(if (<= y -2.7e-33)
(/ 0.3333333333333333 (/ (- z) y))
(if (<= y 8e-27)
(* 0.3333333333333333 (/ t (* y z)))
(if (<= y 4e+44) x (/ (* y -0.3333333333333333) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2.7e-33) {
tmp = 0.3333333333333333 / (-z / y);
} else if (y <= 8e-27) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 4e+44) {
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 <= (-2.7d-33)) then
tmp = 0.3333333333333333d0 / (-z / y)
else if (y <= 8d-27) then
tmp = 0.3333333333333333d0 * (t / (y * z))
else if (y <= 4d+44) 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 <= -2.7e-33) {
tmp = 0.3333333333333333 / (-z / y);
} else if (y <= 8e-27) {
tmp = 0.3333333333333333 * (t / (y * z));
} else if (y <= 4e+44) {
tmp = x;
} else {
tmp = (y * -0.3333333333333333) / z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2.7e-33: tmp = 0.3333333333333333 / (-z / y) elif y <= 8e-27: tmp = 0.3333333333333333 * (t / (y * z)) elif y <= 4e+44: tmp = x else: tmp = (y * -0.3333333333333333) / z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2.7e-33) tmp = Float64(0.3333333333333333 / Float64(Float64(-z) / y)); elseif (y <= 8e-27) tmp = Float64(0.3333333333333333 * Float64(t / Float64(y * z))); elseif (y <= 4e+44) 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 <= -2.7e-33) tmp = 0.3333333333333333 / (-z / y); elseif (y <= 8e-27) tmp = 0.3333333333333333 * (t / (y * z)); elseif (y <= 4e+44) tmp = x; else tmp = (y * -0.3333333333333333) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2.7e-33], N[(0.3333333333333333 / N[((-z) / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e-27], N[(0.3333333333333333 * N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+44], x, N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-33}:\\
\;\;\;\;\frac{0.3333333333333333}{\frac{-z}{y}}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-27}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+44}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\end{array}
\end{array}
if y < -2.7000000000000001e-33Initial program 99.8%
associate-/r*98.4%
Simplified98.4%
clear-num98.4%
inv-pow98.4%
*-commutative98.4%
*-un-lft-identity98.4%
times-frac98.4%
metadata-eval98.4%
Applied egg-rr98.4%
unpow-198.4%
Simplified98.4%
associate-+l-98.4%
associate-/r*98.4%
metadata-eval98.4%
Applied egg-rr98.4%
associate--r-98.4%
+-commutative98.4%
associate-+r-98.4%
associate-/r/98.4%
associate-/r*97.2%
Simplified97.2%
Taylor expanded in z around 0 77.5%
distribute-lft-out--77.5%
associate-/l*77.5%
Simplified77.5%
Taylor expanded in t around 0 71.9%
associate-*r/71.9%
neg-mul-171.9%
Simplified71.9%
if -2.7000000000000001e-33 < y < 8.0000000000000003e-27Initial program 91.3%
associate-/r*99.0%
Simplified99.0%
clear-num99.0%
inv-pow99.0%
*-commutative99.0%
*-un-lft-identity99.0%
times-frac99.0%
metadata-eval99.0%
Applied egg-rr99.0%
unpow-199.0%
Simplified99.0%
associate-+l-99.0%
associate-/r*99.0%
metadata-eval99.0%
Applied egg-rr99.0%
associate--r-99.0%
+-commutative99.0%
associate-+r-99.0%
associate-/r/99.0%
associate-/r*99.0%
Simplified99.0%
Taylor expanded in z around 0 62.2%
distribute-lft-out--62.2%
associate-/l*62.1%
Simplified62.1%
Taylor expanded in t around inf 56.6%
if 8.0000000000000003e-27 < y < 4.0000000000000004e44Initial program 99.8%
Taylor expanded in x around inf 63.1%
if 4.0000000000000004e44 < y Initial program 97.9%
associate-/r*90.7%
Simplified90.7%
clear-num90.7%
inv-pow90.7%
*-commutative90.7%
*-un-lft-identity90.7%
times-frac90.7%
metadata-eval90.7%
Applied egg-rr90.7%
unpow-190.7%
Simplified90.7%
associate-+l-90.7%
associate-/r*90.7%
metadata-eval90.7%
Applied egg-rr90.7%
associate--r-90.7%
+-commutative90.7%
associate-+r-90.7%
associate-/r/90.7%
associate-/r*90.7%
Simplified90.7%
Taylor expanded in z around 0 72.8%
distribute-lft-out--72.8%
associate-/l*72.7%
Simplified72.7%
Taylor expanded in t around 0 68.9%
*-commutative68.9%
associate-*l/69.0%
Simplified69.0%
Final simplification63.7%
(FPCore (x y z t) :precision binary64 (+ x (* -0.3333333333333333 (/ (- y (/ t y)) z))))
double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * ((y - (t / 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) * ((y - (t / y)) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + (-0.3333333333333333 * ((y - (t / y)) / z));
}
def code(x, y, z, t): return x + (-0.3333333333333333 * ((y - (t / y)) / z))
function code(x, y, z, t) return Float64(x + Float64(-0.3333333333333333 * Float64(Float64(y - Float64(t / y)) / z))) end
function tmp = code(x, y, z, t) tmp = x + (-0.3333333333333333 * ((y - (t / y)) / z)); end
code[x_, y_, z_, t_] := N[(x + N[(-0.3333333333333333 * N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + -0.3333333333333333 \cdot \frac{y - \frac{t}{y}}{z}
\end{array}
Initial program 95.5%
associate-+l-95.5%
sub-neg95.5%
sub-neg95.5%
distribute-neg-in95.5%
unsub-neg95.5%
neg-mul-195.5%
associate-*r/95.5%
associate-*l/95.4%
distribute-neg-frac95.4%
neg-mul-195.4%
times-frac97.5%
distribute-lft-out--97.9%
*-commutative97.9%
associate-/r*97.9%
metadata-eval97.9%
Simplified97.9%
Taylor expanded in z around 0 97.6%
Final simplification97.6%
(FPCore (x y z t) :precision binary64 (+ x (* (- y (/ t y)) (/ -0.3333333333333333 z))))
double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) * (-0.3333333333333333 / z));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y - (t / y)) * ((-0.3333333333333333d0) / z))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - (t / y)) * (-0.3333333333333333 / z));
}
def code(x, y, z, t): return x + ((y - (t / y)) * (-0.3333333333333333 / z))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - Float64(t / y)) * Float64(-0.3333333333333333 / z))) end
function tmp = code(x, y, z, t) tmp = x + ((y - (t / y)) * (-0.3333333333333333 / z)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - N[(t / y), $MachinePrecision]), $MachinePrecision] * N[(-0.3333333333333333 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - \frac{t}{y}\right) \cdot \frac{-0.3333333333333333}{z}
\end{array}
Initial program 95.5%
associate-+l-95.5%
sub-neg95.5%
sub-neg95.5%
distribute-neg-in95.5%
unsub-neg95.5%
neg-mul-195.5%
associate-*r/95.5%
associate-*l/95.4%
distribute-neg-frac95.4%
neg-mul-195.4%
times-frac97.5%
distribute-lft-out--97.9%
*-commutative97.9%
associate-/r*97.9%
metadata-eval97.9%
Simplified97.9%
Final simplification97.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.55e+59) (not (<= y 8.4e+44))) (* -0.3333333333333333 (/ y z)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.55e+59) || !(y <= 8.4e+44)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.55d+59)) .or. (.not. (y <= 8.4d+44))) then
tmp = (-0.3333333333333333d0) * (y / z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.55e+59) || !(y <= 8.4e+44)) {
tmp = -0.3333333333333333 * (y / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.55e+59) or not (y <= 8.4e+44): tmp = -0.3333333333333333 * (y / z) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.55e+59) || !(y <= 8.4e+44)) tmp = Float64(-0.3333333333333333 * Float64(y / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.55e+59) || ~((y <= 8.4e+44))) tmp = -0.3333333333333333 * (y / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.55e+59], N[Not[LessEqual[y, 8.4e+44]], $MachinePrecision]], N[(-0.3333333333333333 * N[(y / z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{+59} \lor \neg \left(y \leq 8.4 \cdot 10^{+44}\right):\\
\;\;\;\;-0.3333333333333333 \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.55000000000000007e59 or 8.39999999999999947e44 < y Initial program 98.9%
associate-/r*94.5%
Simplified94.5%
clear-num94.5%
inv-pow94.5%
*-commutative94.5%
*-un-lft-identity94.5%
times-frac94.5%
metadata-eval94.5%
Applied egg-rr94.5%
unpow-194.5%
Simplified94.5%
associate-+l-94.5%
associate-/r*94.5%
metadata-eval94.5%
Applied egg-rr94.5%
associate--r-94.5%
+-commutative94.5%
associate-+r-94.5%
associate-/r/94.5%
associate-/r*93.8%
Simplified93.8%
Taylor expanded in z around 0 77.0%
distribute-lft-out--77.0%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in t around 0 73.6%
if -1.55000000000000007e59 < y < 8.39999999999999947e44Initial program 92.9%
Taylor expanded in x around inf 37.7%
Final simplification53.2%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.22e+57) (not (<= y 7.1e+43))) (/ (* y -0.3333333333333333) z) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.22e+57) || !(y <= 7.1e+43)) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.22d+57)) .or. (.not. (y <= 7.1d+43))) then
tmp = (y * (-0.3333333333333333d0)) / z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.22e+57) || !(y <= 7.1e+43)) {
tmp = (y * -0.3333333333333333) / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.22e+57) or not (y <= 7.1e+43): tmp = (y * -0.3333333333333333) / z else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.22e+57) || !(y <= 7.1e+43)) tmp = Float64(Float64(y * -0.3333333333333333) / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.22e+57) || ~((y <= 7.1e+43))) tmp = (y * -0.3333333333333333) / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.22e+57], N[Not[LessEqual[y, 7.1e+43]], $MachinePrecision]], N[(N[(y * -0.3333333333333333), $MachinePrecision] / z), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.22 \cdot 10^{+57} \lor \neg \left(y \leq 7.1 \cdot 10^{+43}\right):\\
\;\;\;\;\frac{y \cdot -0.3333333333333333}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.22e57 or 7.09999999999999972e43 < y Initial program 98.9%
associate-/r*94.5%
Simplified94.5%
clear-num94.5%
inv-pow94.5%
*-commutative94.5%
*-un-lft-identity94.5%
times-frac94.5%
metadata-eval94.5%
Applied egg-rr94.5%
unpow-194.5%
Simplified94.5%
associate-+l-94.5%
associate-/r*94.5%
metadata-eval94.5%
Applied egg-rr94.5%
associate--r-94.5%
+-commutative94.5%
associate-+r-94.5%
associate-/r/94.5%
associate-/r*93.8%
Simplified93.8%
Taylor expanded in z around 0 77.0%
distribute-lft-out--77.0%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in t around 0 73.6%
*-commutative73.6%
associate-*l/74.3%
Simplified74.3%
if -1.22e57 < y < 7.09999999999999972e43Initial program 92.9%
Taylor expanded in x around inf 37.7%
Final simplification53.6%
(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.5%
Taylor expanded in x around inf 31.8%
Final simplification31.8%
(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 2023229
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))