
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c) :precision binary64 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c): return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c)) end
function tmp = code(x, y, z, t, a, b, c) tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* x (* 9.0 y))))
(if (or (<= z -0.00044) (not (<= z 5e-11)))
(/ (+ (/ (+ b t_1) z) (* t (* a -4.0))) c)
(* (+ b (- t_1 (* a (* t (* z 4.0))))) (/ 1.0 (* z c))))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x * (9.0 * y);
double tmp;
if ((z <= -0.00044) || !(z <= 5e-11)) {
tmp = (((b + t_1) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + (t_1 - (a * (t * (z * 4.0))))) * (1.0 / (z * c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x * (9.0d0 * y)
if ((z <= (-0.00044d0)) .or. (.not. (z <= 5d-11))) then
tmp = (((b + t_1) / z) + (t * (a * (-4.0d0)))) / c
else
tmp = (b + (t_1 - (a * (t * (z * 4.0d0))))) * (1.0d0 / (z * c))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x * (9.0 * y);
double tmp;
if ((z <= -0.00044) || !(z <= 5e-11)) {
tmp = (((b + t_1) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + (t_1 - (a * (t * (z * 4.0))))) * (1.0 / (z * c));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): t_1 = x * (9.0 * y) tmp = 0 if (z <= -0.00044) or not (z <= 5e-11): tmp = (((b + t_1) / z) + (t * (a * -4.0))) / c else: tmp = (b + (t_1 - (a * (t * (z * 4.0))))) * (1.0 / (z * c)) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) t_1 = Float64(x * Float64(9.0 * y)) tmp = 0.0 if ((z <= -0.00044) || !(z <= 5e-11)) tmp = Float64(Float64(Float64(Float64(b + t_1) / z) + Float64(t * Float64(a * -4.0))) / c); else tmp = Float64(Float64(b + Float64(t_1 - Float64(a * Float64(t * Float64(z * 4.0))))) * Float64(1.0 / Float64(z * c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = x * (9.0 * y);
tmp = 0.0;
if ((z <= -0.00044) || ~((z <= 5e-11)))
tmp = (((b + t_1) / z) + (t * (a * -4.0))) / c;
else
tmp = (b + (t_1 - (a * (t * (z * 4.0))))) * (1.0 / (z * c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -0.00044], N[Not[LessEqual[z, 5e-11]], $MachinePrecision]], N[(N[(N[(N[(b + t$95$1), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(t$95$1 - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(9 \cdot y\right)\\
\mathbf{if}\;z \leq -0.00044 \lor \neg \left(z \leq 5 \cdot 10^{-11}\right):\\
\;\;\;\;\frac{\frac{b + t_1}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\left(b + \left(t_1 - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)\right) \cdot \frac{1}{z \cdot c}\\
\end{array}
\end{array}
if z < -4.40000000000000016e-4 or 5.00000000000000018e-11 < z Initial program 72.0%
associate-/r*79.6%
Simplified91.1%
fma-udef91.1%
Applied egg-rr91.1%
if -4.40000000000000016e-4 < z < 5.00000000000000018e-11Initial program 95.9%
associate-*l*95.9%
associate-*l*94.3%
Simplified94.3%
div-inv94.3%
associate-+l-94.3%
associate-*r*94.3%
associate-*r*95.9%
associate-+l-95.9%
+-commutative95.9%
associate-*r*95.9%
*-commutative95.9%
*-commutative95.9%
Applied egg-rr95.9%
Final simplification93.4%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= (* (* x 9.0) y) -2e+254) (* 9.0 (/ 1.0 (* (/ z x) (/ c y)))) (/ (fma t (* a -4.0) (/ (fma x (* 9.0 y) b) z)) c)))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (((x * 9.0) * y) <= -2e+254) {
tmp = 9.0 * (1.0 / ((z / x) * (c / y)));
} else {
tmp = fma(t, (a * -4.0), (fma(x, (9.0 * y), b) / z)) / c;
}
return tmp;
}
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (Float64(Float64(x * 9.0) * y) <= -2e+254) tmp = Float64(9.0 * Float64(1.0 / Float64(Float64(z / x) * Float64(c / y)))); else tmp = Float64(fma(t, Float64(a * -4.0), Float64(fma(x, Float64(9.0 * y), b) / z)) / c); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision], -2e+254], N[(9.0 * N[(1.0 / N[(N[(z / x), $MachinePrecision] * N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(a * -4.0), $MachinePrecision] + N[(N[(x * N[(9.0 * y), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(x \cdot 9\right) \cdot y \leq -2 \cdot 10^{+254}:\\
\;\;\;\;9 \cdot \frac{1}{\frac{z}{x} \cdot \frac{c}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\right)}{c}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x 9) y) < -1.9999999999999999e254Initial program 69.8%
associate-/r*70.2%
Simplified70.2%
Taylor expanded in x around inf 69.9%
times-frac93.8%
Simplified93.8%
*-commutative93.8%
clear-num93.8%
clear-num93.9%
frac-times94.0%
metadata-eval94.0%
Applied egg-rr94.0%
if -1.9999999999999999e254 < (*.f64 (*.f64 x 9) y) Initial program 84.3%
associate-/r*84.6%
Simplified91.1%
Final simplification91.3%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -1.8e+130)
(* -4.0 (* a (/ 1.0 (/ c t))))
(if (<= t -2.85e+51)
(* b (/ 1.0 (* z c)))
(if (<= t -1.55e-37)
(* 9.0 (/ (* x y) (* z c)))
(if (<= t -3.2e-123)
(* (/ b z) (/ 1.0 c))
(if (<= t -6.5e-267)
(/ (* 9.0 (/ (* x y) z)) c)
(if (<= t 1.75e-115)
(/ b (* z c))
(if (<= t 4.8e-62)
(* 9.0 (/ x (* z (/ c y))))
(* -4.0 (/ a (/ c t)))))))))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.8e+130) {
tmp = -4.0 * (a * (1.0 / (c / t)));
} else if (t <= -2.85e+51) {
tmp = b * (1.0 / (z * c));
} else if (t <= -1.55e-37) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (t <= -3.2e-123) {
tmp = (b / z) * (1.0 / c);
} else if (t <= -6.5e-267) {
tmp = (9.0 * ((x * y) / z)) / c;
} else if (t <= 1.75e-115) {
tmp = b / (z * c);
} else if (t <= 4.8e-62) {
tmp = 9.0 * (x / (z * (c / y)));
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-1.8d+130)) then
tmp = (-4.0d0) * (a * (1.0d0 / (c / t)))
else if (t <= (-2.85d+51)) then
tmp = b * (1.0d0 / (z * c))
else if (t <= (-1.55d-37)) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (t <= (-3.2d-123)) then
tmp = (b / z) * (1.0d0 / c)
else if (t <= (-6.5d-267)) then
tmp = (9.0d0 * ((x * y) / z)) / c
else if (t <= 1.75d-115) then
tmp = b / (z * c)
else if (t <= 4.8d-62) then
tmp = 9.0d0 * (x / (z * (c / y)))
else
tmp = (-4.0d0) * (a / (c / t))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -1.8e+130) {
tmp = -4.0 * (a * (1.0 / (c / t)));
} else if (t <= -2.85e+51) {
tmp = b * (1.0 / (z * c));
} else if (t <= -1.55e-37) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (t <= -3.2e-123) {
tmp = (b / z) * (1.0 / c);
} else if (t <= -6.5e-267) {
tmp = (9.0 * ((x * y) / z)) / c;
} else if (t <= 1.75e-115) {
tmp = b / (z * c);
} else if (t <= 4.8e-62) {
tmp = 9.0 * (x / (z * (c / y)));
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -1.8e+130: tmp = -4.0 * (a * (1.0 / (c / t))) elif t <= -2.85e+51: tmp = b * (1.0 / (z * c)) elif t <= -1.55e-37: tmp = 9.0 * ((x * y) / (z * c)) elif t <= -3.2e-123: tmp = (b / z) * (1.0 / c) elif t <= -6.5e-267: tmp = (9.0 * ((x * y) / z)) / c elif t <= 1.75e-115: tmp = b / (z * c) elif t <= 4.8e-62: tmp = 9.0 * (x / (z * (c / y))) else: tmp = -4.0 * (a / (c / t)) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -1.8e+130) tmp = Float64(-4.0 * Float64(a * Float64(1.0 / Float64(c / t)))); elseif (t <= -2.85e+51) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (t <= -1.55e-37) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (t <= -3.2e-123) tmp = Float64(Float64(b / z) * Float64(1.0 / c)); elseif (t <= -6.5e-267) tmp = Float64(Float64(9.0 * Float64(Float64(x * y) / z)) / c); elseif (t <= 1.75e-115) tmp = Float64(b / Float64(z * c)); elseif (t <= 4.8e-62) tmp = Float64(9.0 * Float64(x / Float64(z * Float64(c / y)))); else tmp = Float64(-4.0 * Float64(a / Float64(c / t))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -1.8e+130)
tmp = -4.0 * (a * (1.0 / (c / t)));
elseif (t <= -2.85e+51)
tmp = b * (1.0 / (z * c));
elseif (t <= -1.55e-37)
tmp = 9.0 * ((x * y) / (z * c));
elseif (t <= -3.2e-123)
tmp = (b / z) * (1.0 / c);
elseif (t <= -6.5e-267)
tmp = (9.0 * ((x * y) / z)) / c;
elseif (t <= 1.75e-115)
tmp = b / (z * c);
elseif (t <= 4.8e-62)
tmp = 9.0 * (x / (z * (c / y)));
else
tmp = -4.0 * (a / (c / t));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -1.8e+130], N[(-4.0 * N[(a * N[(1.0 / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.85e+51], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.55e-37], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.2e-123], N[(N[(b / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.5e-267], N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t, 1.75e-115], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e-62], N[(9.0 * N[(x / N[(z * N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{+130}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{1}{\frac{c}{t}}\right)\\
\mathbf{elif}\;t \leq -2.85 \cdot 10^{+51}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{-37}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-123}:\\
\;\;\;\;\frac{b}{z} \cdot \frac{1}{c}\\
\mathbf{elif}\;t \leq -6.5 \cdot 10^{-267}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{z}}{c}\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-115}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-62}:\\
\;\;\;\;9 \cdot \frac{x}{z \cdot \frac{c}{y}}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}
\end{array}
if t < -1.8000000000000001e130Initial program 71.0%
associate-/r*68.4%
Simplified84.1%
Taylor expanded in t around inf 65.4%
associate-/l*74.7%
Simplified74.7%
div-inv77.6%
Applied egg-rr77.6%
if -1.8000000000000001e130 < t < -2.8500000000000001e51Initial program 99.7%
associate-/r*93.4%
Simplified93.4%
Taylor expanded in b around inf 60.8%
*-commutative60.8%
Simplified60.8%
div-inv60.7%
Applied egg-rr60.7%
if -2.8500000000000001e51 < t < -1.54999999999999997e-37Initial program 95.4%
associate-/r*82.7%
Simplified87.1%
Taylor expanded in x around inf 51.1%
*-commutative51.1%
Simplified51.1%
if -1.54999999999999997e-37 < t < -3.19999999999999979e-123Initial program 90.6%
associate-/r*91.4%
Simplified95.6%
Taylor expanded in t around 0 78.9%
Taylor expanded in b around inf 52.1%
div-inv52.1%
Applied egg-rr52.1%
if -3.19999999999999979e-123 < t < -6.4999999999999999e-267Initial program 86.8%
associate-/r*99.4%
Simplified99.5%
Taylor expanded in t around 0 90.5%
Taylor expanded in b around 0 72.7%
if -6.4999999999999999e-267 < t < 1.7500000000000001e-115Initial program 79.6%
associate-/r*83.2%
Simplified87.4%
Taylor expanded in b around inf 43.4%
*-commutative43.4%
Simplified43.4%
if 1.7500000000000001e-115 < t < 4.79999999999999967e-62Initial program 89.4%
associate-/r*89.8%
Simplified89.9%
Taylor expanded in x around inf 40.6%
times-frac45.8%
Simplified45.8%
clear-num45.8%
frac-times40.6%
*-un-lft-identity40.6%
Applied egg-rr40.6%
if 4.79999999999999967e-62 < t Initial program 79.4%
associate-/r*80.2%
Simplified89.0%
Taylor expanded in t around inf 48.7%
associate-/l*51.0%
Simplified51.0%
Final simplification54.5%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (or (<= b -1.95e-28)
(and (not (<= b 1.8e-22))
(or (<= b 1.32e+14) (not (<= b 1.05e+78)))))
(/ (+ t_1 (/ b z)) c)
(/ (+ t_1 (/ 9.0 (/ z (* x y)))) c))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = t * (a * -4.0);
double tmp;
if ((b <= -1.95e-28) || (!(b <= 1.8e-22) && ((b <= 1.32e+14) || !(b <= 1.05e+78)))) {
tmp = (t_1 + (b / z)) / c;
} else {
tmp = (t_1 + (9.0 / (z / (x * y)))) / c;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
if ((b <= (-1.95d-28)) .or. (.not. (b <= 1.8d-22)) .and. (b <= 1.32d+14) .or. (.not. (b <= 1.05d+78))) then
tmp = (t_1 + (b / z)) / c
else
tmp = (t_1 + (9.0d0 / (z / (x * y)))) / c
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = t * (a * -4.0);
double tmp;
if ((b <= -1.95e-28) || (!(b <= 1.8e-22) && ((b <= 1.32e+14) || !(b <= 1.05e+78)))) {
tmp = (t_1 + (b / z)) / c;
} else {
tmp = (t_1 + (9.0 / (z / (x * y)))) / c;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): t_1 = t * (a * -4.0) tmp = 0 if (b <= -1.95e-28) or (not (b <= 1.8e-22) and ((b <= 1.32e+14) or not (b <= 1.05e+78))): tmp = (t_1 + (b / z)) / c else: tmp = (t_1 + (9.0 / (z / (x * y)))) / c return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if ((b <= -1.95e-28) || (!(b <= 1.8e-22) && ((b <= 1.32e+14) || !(b <= 1.05e+78)))) tmp = Float64(Float64(t_1 + Float64(b / z)) / c); else tmp = Float64(Float64(t_1 + Float64(9.0 / Float64(z / Float64(x * y)))) / c); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = t * (a * -4.0);
tmp = 0.0;
if ((b <= -1.95e-28) || (~((b <= 1.8e-22)) && ((b <= 1.32e+14) || ~((b <= 1.05e+78)))))
tmp = (t_1 + (b / z)) / c;
else
tmp = (t_1 + (9.0 / (z / (x * y)))) / c;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[b, -1.95e-28], And[N[Not[LessEqual[b, 1.8e-22]], $MachinePrecision], Or[LessEqual[b, 1.32e+14], N[Not[LessEqual[b, 1.05e+78]], $MachinePrecision]]]], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(t$95$1 + N[(9.0 / N[(z / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;b \leq -1.95 \cdot 10^{-28} \lor \neg \left(b \leq 1.8 \cdot 10^{-22}\right) \land \left(b \leq 1.32 \cdot 10^{+14} \lor \neg \left(b \leq 1.05 \cdot 10^{+78}\right)\right):\\
\;\;\;\;\frac{t_1 + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1 + \frac{9}{\frac{z}{x \cdot y}}}{c}\\
\end{array}
\end{array}
if b < -1.94999999999999999e-28 or 1.7999999999999999e-22 < b < 1.32e14 or 1.05e78 < b Initial program 84.4%
associate-/r*84.2%
Simplified90.2%
Taylor expanded in x around 0 83.7%
if -1.94999999999999999e-28 < b < 1.7999999999999999e-22 or 1.32e14 < b < 1.05e78Initial program 82.3%
associate-/r*83.2%
Simplified88.6%
Taylor expanded in x around inf 82.5%
associate-*r/82.5%
associate-/l*82.5%
Simplified82.5%
Final simplification83.1%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* x (* 9.0 y))))
(if (or (<= z -6.4e-11) (not (<= z 5e-10)))
(/ (+ (/ (+ b t_1) z) (* t (* a -4.0))) c)
(/ (+ b (- t_1 (* (* z 4.0) (* t a)))) (* z c)))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x * (9.0 * y);
double tmp;
if ((z <= -6.4e-11) || !(z <= 5e-10)) {
tmp = (((b + t_1) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = x * (9.0d0 * y)
if ((z <= (-6.4d-11)) .or. (.not. (z <= 5d-10))) then
tmp = (((b + t_1) / z) + (t * (a * (-4.0d0)))) / c
else
tmp = (b + (t_1 - ((z * 4.0d0) * (t * a)))) / (z * c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x * (9.0 * y);
double tmp;
if ((z <= -6.4e-11) || !(z <= 5e-10)) {
tmp = (((b + t_1) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): t_1 = x * (9.0 * y) tmp = 0 if (z <= -6.4e-11) or not (z <= 5e-10): tmp = (((b + t_1) / z) + (t * (a * -4.0))) / c else: tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) t_1 = Float64(x * Float64(9.0 * y)) tmp = 0.0 if ((z <= -6.4e-11) || !(z <= 5e-10)) tmp = Float64(Float64(Float64(Float64(b + t_1) / z) + Float64(t * Float64(a * -4.0))) / c); else tmp = Float64(Float64(b + Float64(t_1 - Float64(Float64(z * 4.0) * Float64(t * a)))) / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = x * (9.0 * y);
tmp = 0.0;
if ((z <= -6.4e-11) || ~((z <= 5e-10)))
tmp = (((b + t_1) / z) + (t * (a * -4.0))) / c;
else
tmp = (b + (t_1 - ((z * 4.0) * (t * a)))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -6.4e-11], N[Not[LessEqual[z, 5e-10]], $MachinePrecision]], N[(N[(N[(N[(b + t$95$1), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(t$95$1 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(9 \cdot y\right)\\
\mathbf{if}\;z \leq -6.4 \cdot 10^{-11} \lor \neg \left(z \leq 5 \cdot 10^{-10}\right):\\
\;\;\;\;\frac{\frac{b + t_1}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(t_1 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -6.39999999999999987e-11 or 5.00000000000000031e-10 < z Initial program 72.4%
associate-/r*79.9%
Simplified91.3%
fma-udef91.3%
Applied egg-rr91.3%
if -6.39999999999999987e-11 < z < 5.00000000000000031e-10Initial program 95.8%
associate-*l*95.9%
associate-*l*94.2%
Simplified94.2%
Final simplification92.6%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -2.8e-10) (not (<= z 5e-10))) (/ (+ (/ (+ b (* x (* 9.0 y))) z) (* t (* a -4.0))) c) (/ (+ b (- (* (* x 9.0) y) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.8e-10) || !(z <= 5e-10)) {
tmp = (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-2.8d-10)) .or. (.not. (z <= 5d-10))) then
tmp = (((b + (x * (9.0d0 * y))) / z) + (t * (a * (-4.0d0)))) / c
else
tmp = (b + (((x * 9.0d0) * y) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -2.8e-10) || !(z <= 5e-10)) {
tmp = (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -2.8e-10) or not (z <= 5e-10): tmp = (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c else: tmp = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -2.8e-10) || !(z <= 5e-10)) tmp = Float64(Float64(Float64(Float64(b + Float64(x * Float64(9.0 * y))) / z) + Float64(t * Float64(a * -4.0))) / c); else tmp = Float64(Float64(b + Float64(Float64(Float64(x * 9.0) * y) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -2.8e-10) || ~((z <= 5e-10)))
tmp = (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c;
else
tmp = (b + (((x * 9.0) * y) - (a * (t * (z * 4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -2.8e-10], N[Not[LessEqual[z, 5e-10]], $MachinePrecision]], N[(N[(N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-10} \lor \neg \left(z \leq 5 \cdot 10^{-10}\right):\\
\;\;\;\;\frac{\frac{b + x \cdot \left(9 \cdot y\right)}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(\left(x \cdot 9\right) \cdot y - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -2.80000000000000015e-10 or 5.00000000000000031e-10 < z Initial program 72.4%
associate-/r*79.9%
Simplified91.3%
fma-udef91.3%
Applied egg-rr91.3%
if -2.80000000000000015e-10 < z < 5.00000000000000031e-10Initial program 95.8%
Final simplification93.4%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* -4.0 (/ a (/ c t)))))
(if (<= x -1.5e+26)
(/ 9.0 (* (/ z x) (/ c y)))
(if (<= x -1.15e-16)
t_1
(if (<= x -1.3e-185)
(* b (/ 1.0 (* z c)))
(if (<= x -1.5e-221)
t_1
(if (<= x 8.3e-159)
(/ (/ b z) c)
(if (<= x 3.8e-60) t_1 (* 9.0 (* (/ y c) (/ x z)))))))))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (x <= -1.5e+26) {
tmp = 9.0 / ((z / x) * (c / y));
} else if (x <= -1.15e-16) {
tmp = t_1;
} else if (x <= -1.3e-185) {
tmp = b * (1.0 / (z * c));
} else if (x <= -1.5e-221) {
tmp = t_1;
} else if (x <= 8.3e-159) {
tmp = (b / z) / c;
} else if (x <= 3.8e-60) {
tmp = t_1;
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (a / (c / t))
if (x <= (-1.5d+26)) then
tmp = 9.0d0 / ((z / x) * (c / y))
else if (x <= (-1.15d-16)) then
tmp = t_1
else if (x <= (-1.3d-185)) then
tmp = b * (1.0d0 / (z * c))
else if (x <= (-1.5d-221)) then
tmp = t_1
else if (x <= 8.3d-159) then
tmp = (b / z) / c
else if (x <= 3.8d-60) then
tmp = t_1
else
tmp = 9.0d0 * ((y / c) * (x / z))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = -4.0 * (a / (c / t));
double tmp;
if (x <= -1.5e+26) {
tmp = 9.0 / ((z / x) * (c / y));
} else if (x <= -1.15e-16) {
tmp = t_1;
} else if (x <= -1.3e-185) {
tmp = b * (1.0 / (z * c));
} else if (x <= -1.5e-221) {
tmp = t_1;
} else if (x <= 8.3e-159) {
tmp = (b / z) / c;
} else if (x <= 3.8e-60) {
tmp = t_1;
} else {
tmp = 9.0 * ((y / c) * (x / z));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): t_1 = -4.0 * (a / (c / t)) tmp = 0 if x <= -1.5e+26: tmp = 9.0 / ((z / x) * (c / y)) elif x <= -1.15e-16: tmp = t_1 elif x <= -1.3e-185: tmp = b * (1.0 / (z * c)) elif x <= -1.5e-221: tmp = t_1 elif x <= 8.3e-159: tmp = (b / z) / c elif x <= 3.8e-60: tmp = t_1 else: tmp = 9.0 * ((y / c) * (x / z)) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) t_1 = Float64(-4.0 * Float64(a / Float64(c / t))) tmp = 0.0 if (x <= -1.5e+26) tmp = Float64(9.0 / Float64(Float64(z / x) * Float64(c / y))); elseif (x <= -1.15e-16) tmp = t_1; elseif (x <= -1.3e-185) tmp = Float64(b * Float64(1.0 / Float64(z * c))); elseif (x <= -1.5e-221) tmp = t_1; elseif (x <= 8.3e-159) tmp = Float64(Float64(b / z) / c); elseif (x <= 3.8e-60) tmp = t_1; else tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = -4.0 * (a / (c / t));
tmp = 0.0;
if (x <= -1.5e+26)
tmp = 9.0 / ((z / x) * (c / y));
elseif (x <= -1.15e-16)
tmp = t_1;
elseif (x <= -1.3e-185)
tmp = b * (1.0 / (z * c));
elseif (x <= -1.5e-221)
tmp = t_1;
elseif (x <= 8.3e-159)
tmp = (b / z) / c;
elseif (x <= 3.8e-60)
tmp = t_1;
else
tmp = 9.0 * ((y / c) * (x / z));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.5e+26], N[(9.0 / N[(N[(z / x), $MachinePrecision] * N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.15e-16], t$95$1, If[LessEqual[x, -1.3e-185], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.5e-221], t$95$1, If[LessEqual[x, 8.3e-159], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[x, 3.8e-60], t$95$1, N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{if}\;x \leq -1.5 \cdot 10^{+26}:\\
\;\;\;\;\frac{9}{\frac{z}{x} \cdot \frac{c}{y}}\\
\mathbf{elif}\;x \leq -1.15 \cdot 10^{-16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.3 \cdot 10^{-185}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-221}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 8.3 \cdot 10^{-159}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-60}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\end{array}
\end{array}
if x < -1.49999999999999999e26Initial program 76.9%
associate-/r*80.0%
Simplified84.8%
div-inv84.9%
inv-pow84.9%
Applied egg-rr84.9%
Taylor expanded in x around inf 51.1%
*-commutative51.1%
associate-*r/51.0%
associate-/l*51.1%
Simplified51.1%
Taylor expanded in z around 0 51.1%
times-frac59.5%
Simplified59.5%
if -1.49999999999999999e26 < x < -1.15e-16 or -1.29999999999999992e-185 < x < -1.5000000000000001e-221 or 8.30000000000000047e-159 < x < 3.79999999999999994e-60Initial program 80.6%
associate-/r*83.3%
Simplified95.1%
Taylor expanded in t around inf 59.8%
associate-/l*64.5%
Simplified64.5%
if -1.15e-16 < x < -1.29999999999999992e-185Initial program 88.1%
associate-/r*83.9%
Simplified88.6%
Taylor expanded in b around inf 54.3%
*-commutative54.3%
Simplified54.3%
div-inv54.3%
Applied egg-rr54.3%
if -1.5000000000000001e-221 < x < 8.30000000000000047e-159Initial program 85.3%
associate-/r*81.7%
Simplified89.7%
Taylor expanded in t around 0 64.6%
Taylor expanded in b around inf 62.7%
if 3.79999999999999994e-60 < x Initial program 87.1%
associate-/r*89.1%
Simplified92.2%
Taylor expanded in x around inf 46.5%
times-frac40.5%
Simplified40.5%
Final simplification55.4%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* z c))) (t_2 (* 9.0 (* x (/ y (* z c))))))
(if (<= z -1.16e+25)
(* t (/ (* a -4.0) c))
(if (<= z -6.8e-81)
t_1
(if (<= z 1.75e-283)
t_2
(if (<= z 2.6e-224)
(/ (/ b z) c)
(if (<= z 2.9e-156)
t_2
(if (<= z 1e+55) t_1 (/ (* -4.0 (* t a)) c)))))))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double t_2 = 9.0 * (x * (y / (z * c)));
double tmp;
if (z <= -1.16e+25) {
tmp = t * ((a * -4.0) / c);
} else if (z <= -6.8e-81) {
tmp = t_1;
} else if (z <= 1.75e-283) {
tmp = t_2;
} else if (z <= 2.6e-224) {
tmp = (b / z) / c;
} else if (z <= 2.9e-156) {
tmp = t_2;
} else if (z <= 1e+55) {
tmp = t_1;
} else {
tmp = (-4.0 * (t * a)) / c;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b / (z * c)
t_2 = 9.0d0 * (x * (y / (z * c)))
if (z <= (-1.16d+25)) then
tmp = t * ((a * (-4.0d0)) / c)
else if (z <= (-6.8d-81)) then
tmp = t_1
else if (z <= 1.75d-283) then
tmp = t_2
else if (z <= 2.6d-224) then
tmp = (b / z) / c
else if (z <= 2.9d-156) then
tmp = t_2
else if (z <= 1d+55) then
tmp = t_1
else
tmp = ((-4.0d0) * (t * a)) / c
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double t_2 = 9.0 * (x * (y / (z * c)));
double tmp;
if (z <= -1.16e+25) {
tmp = t * ((a * -4.0) / c);
} else if (z <= -6.8e-81) {
tmp = t_1;
} else if (z <= 1.75e-283) {
tmp = t_2;
} else if (z <= 2.6e-224) {
tmp = (b / z) / c;
} else if (z <= 2.9e-156) {
tmp = t_2;
} else if (z <= 1e+55) {
tmp = t_1;
} else {
tmp = (-4.0 * (t * a)) / c;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): t_1 = b / (z * c) t_2 = 9.0 * (x * (y / (z * c))) tmp = 0 if z <= -1.16e+25: tmp = t * ((a * -4.0) / c) elif z <= -6.8e-81: tmp = t_1 elif z <= 1.75e-283: tmp = t_2 elif z <= 2.6e-224: tmp = (b / z) / c elif z <= 2.9e-156: tmp = t_2 elif z <= 1e+55: tmp = t_1 else: tmp = (-4.0 * (t * a)) / c return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(z * c)) t_2 = Float64(9.0 * Float64(x * Float64(y / Float64(z * c)))) tmp = 0.0 if (z <= -1.16e+25) tmp = Float64(t * Float64(Float64(a * -4.0) / c)); elseif (z <= -6.8e-81) tmp = t_1; elseif (z <= 1.75e-283) tmp = t_2; elseif (z <= 2.6e-224) tmp = Float64(Float64(b / z) / c); elseif (z <= 2.9e-156) tmp = t_2; elseif (z <= 1e+55) tmp = t_1; else tmp = Float64(Float64(-4.0 * Float64(t * a)) / c); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = b / (z * c);
t_2 = 9.0 * (x * (y / (z * c)));
tmp = 0.0;
if (z <= -1.16e+25)
tmp = t * ((a * -4.0) / c);
elseif (z <= -6.8e-81)
tmp = t_1;
elseif (z <= 1.75e-283)
tmp = t_2;
elseif (z <= 2.6e-224)
tmp = (b / z) / c;
elseif (z <= 2.9e-156)
tmp = t_2;
elseif (z <= 1e+55)
tmp = t_1;
else
tmp = (-4.0 * (t * a)) / c;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(x * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e+25], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.8e-81], t$95$1, If[LessEqual[z, 1.75e-283], t$95$2, If[LessEqual[z, 2.6e-224], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 2.9e-156], t$95$2, If[LessEqual[z, 1e+55], t$95$1, N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
t_2 := 9 \cdot \left(x \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{if}\;z \leq -1.16 \cdot 10^{+25}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{-81}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-283}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-224}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-156}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 10^{+55}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\
\end{array}
\end{array}
if z < -1.15999999999999992e25Initial program 63.6%
associate-/r*72.3%
Simplified85.3%
fma-udef85.3%
Applied egg-rr85.3%
Taylor expanded in z around inf 52.6%
associate-/l*58.3%
associate-*r/58.3%
*-commutative58.3%
associate-/r/59.7%
*-commutative59.7%
*-commutative59.7%
Simplified59.7%
if -1.15999999999999992e25 < z < -6.7999999999999997e-81 or 2.90000000000000021e-156 < z < 1.00000000000000001e55Initial program 93.8%
associate-/r*92.6%
Simplified92.6%
Taylor expanded in b around inf 58.6%
*-commutative58.6%
Simplified58.6%
if -6.7999999999999997e-81 < z < 1.7499999999999999e-283 or 2.6000000000000002e-224 < z < 2.90000000000000021e-156Initial program 96.7%
associate-/r*84.8%
Simplified84.8%
Taylor expanded in x around inf 65.4%
*-commutative65.4%
Simplified65.4%
Taylor expanded in y around 0 65.4%
*-commutative65.4%
associate-*l/66.9%
*-commutative66.9%
Simplified66.9%
if 1.7499999999999999e-283 < z < 2.6000000000000002e-224Initial program 92.6%
associate-/r*99.9%
Simplified99.9%
Taylor expanded in t around 0 92.5%
Taylor expanded in b around inf 77.6%
if 1.00000000000000001e55 < z Initial program 76.5%
associate-/r*81.4%
Simplified95.8%
Taylor expanded in z around inf 57.1%
Final simplification61.6%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ (+ (/ (+ b (* x (* 9.0 y))) z) (* t (* a -4.0))) c))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
return (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = (((b + (x * (9.0d0 * y))) / z) + (t * (a * (-4.0d0)))) / c
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): return (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) return Float64(Float64(Float64(Float64(b + Float64(x * Float64(9.0 * y))) / z) + Float64(t * Float64(a * -4.0))) / c) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = (((b + (x * (9.0 * y))) / z) + (t * (a * -4.0))) / c;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{\frac{b + x \cdot \left(9 \cdot y\right)}{z} + t \cdot \left(a \cdot -4\right)}{c}
\end{array}
Initial program 83.4%
associate-/r*83.7%
Simplified89.4%
fma-udef89.4%
Applied egg-rr89.4%
Final simplification89.4%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -3.15e+90) (not (<= z 6e-162))) (/ (+ (* t (* a -4.0)) (/ b z)) c) (/ (+ b (* 9.0 (* x y))) (* z c))))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.15e+90) || !(z <= 6e-162)) {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-3.15d+90)) .or. (.not. (z <= 6d-162))) then
tmp = ((t * (a * (-4.0d0))) + (b / z)) / c
else
tmp = (b + (9.0d0 * (x * y))) / (z * c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.15e+90) || !(z <= 6e-162)) {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -3.15e+90) or not (z <= 6e-162): tmp = ((t * (a * -4.0)) + (b / z)) / c else: tmp = (b + (9.0 * (x * y))) / (z * c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -3.15e+90) || !(z <= 6e-162)) tmp = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -3.15e+90) || ~((z <= 6e-162)))
tmp = ((t * (a * -4.0)) + (b / z)) / c;
else
tmp = (b + (9.0 * (x * y))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -3.15e+90], N[Not[LessEqual[z, 6e-162]], $MachinePrecision]], N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.15 \cdot 10^{+90} \lor \neg \left(z \leq 6 \cdot 10^{-162}\right):\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -3.15e90 or 5.99999999999999997e-162 < z Initial program 74.6%
associate-/r*80.8%
Simplified91.3%
Taylor expanded in x around 0 74.4%
if -3.15e90 < z < 5.99999999999999997e-162Initial program 95.4%
associate-/r*87.7%
Simplified87.7%
Taylor expanded in z around 0 84.1%
Final simplification78.5%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -6.2e+198)
(* -4.0 (* a (/ 1.0 (/ c t))))
(if (<= t 7500000.0)
(/ (+ b (* 9.0 (* x y))) (* z c))
(* -4.0 (/ a (/ c t))))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -6.2e+198) {
tmp = -4.0 * (a * (1.0 / (c / t)));
} else if (t <= 7500000.0) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (t <= (-6.2d+198)) then
tmp = (-4.0d0) * (a * (1.0d0 / (c / t)))
else if (t <= 7500000.0d0) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = (-4.0d0) * (a / (c / t))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -6.2e+198) {
tmp = -4.0 * (a * (1.0 / (c / t)));
} else if (t <= 7500000.0) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -6.2e+198: tmp = -4.0 * (a * (1.0 / (c / t))) elif t <= 7500000.0: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = -4.0 * (a / (c / t)) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -6.2e+198) tmp = Float64(-4.0 * Float64(a * Float64(1.0 / Float64(c / t)))); elseif (t <= 7500000.0) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(-4.0 * Float64(a / Float64(c / t))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -6.2e+198)
tmp = -4.0 * (a * (1.0 / (c / t)));
elseif (t <= 7500000.0)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = -4.0 * (a / (c / t));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -6.2e+198], N[(-4.0 * N[(a * N[(1.0 / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7500000.0], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+198}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{1}{\frac{c}{t}}\right)\\
\mathbf{elif}\;t \leq 7500000:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}
\end{array}
if t < -6.1999999999999995e198Initial program 70.1%
associate-/r*70.4%
Simplified88.0%
Taylor expanded in t around inf 75.7%
associate-/l*81.7%
Simplified81.7%
div-inv87.8%
Applied egg-rr87.8%
if -6.1999999999999995e198 < t < 7.5e6Initial program 85.9%
associate-/r*86.6%
Simplified90.5%
Taylor expanded in z around 0 73.1%
if 7.5e6 < t Initial program 79.8%
associate-/r*79.3%
Simplified88.3%
Taylor expanded in t around inf 51.6%
associate-/l*54.4%
Simplified54.4%
Final simplification69.2%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (+ b (* 9.0 (* x y)))))
(if (<= x -2.6e+79)
(/ (/ t_1 z) c)
(if (<= x 7.2e-60) (/ (+ (* t (* a -4.0)) (/ b z)) c) (/ t_1 (* z c))))))assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b + (9.0 * (x * y));
double tmp;
if (x <= -2.6e+79) {
tmp = (t_1 / z) / c;
} else if (x <= 7.2e-60) {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
} else {
tmp = t_1 / (z * c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: tmp
t_1 = b + (9.0d0 * (x * y))
if (x <= (-2.6d+79)) then
tmp = (t_1 / z) / c
else if (x <= 7.2d-60) then
tmp = ((t * (a * (-4.0d0))) + (b / z)) / c
else
tmp = t_1 / (z * c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b + (9.0 * (x * y));
double tmp;
if (x <= -2.6e+79) {
tmp = (t_1 / z) / c;
} else if (x <= 7.2e-60) {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
} else {
tmp = t_1 / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): t_1 = b + (9.0 * (x * y)) tmp = 0 if x <= -2.6e+79: tmp = (t_1 / z) / c elif x <= 7.2e-60: tmp = ((t * (a * -4.0)) + (b / z)) / c else: tmp = t_1 / (z * c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) t_1 = Float64(b + Float64(9.0 * Float64(x * y))) tmp = 0.0 if (x <= -2.6e+79) tmp = Float64(Float64(t_1 / z) / c); elseif (x <= 7.2e-60) tmp = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c); else tmp = Float64(t_1 / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = b + (9.0 * (x * y));
tmp = 0.0;
if (x <= -2.6e+79)
tmp = (t_1 / z) / c;
elseif (x <= 7.2e-60)
tmp = ((t * (a * -4.0)) + (b / z)) / c;
else
tmp = t_1 / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.6e+79], N[(N[(t$95$1 / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[x, 7.2e-60], N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(t$95$1 / N[(z * c), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_1 := b + 9 \cdot \left(x \cdot y\right)\\
\mathbf{if}\;x \leq -2.6 \cdot 10^{+79}:\\
\;\;\;\;\frac{\frac{t_1}{z}}{c}\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{-60}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{z \cdot c}\\
\end{array}
\end{array}
if x < -2.60000000000000015e79Initial program 71.6%
associate-/r*79.1%
Simplified85.0%
Taylor expanded in t around 0 67.7%
Taylor expanded in z around 0 69.5%
if -2.60000000000000015e79 < x < 7.2e-60Initial program 86.0%
associate-/r*83.0%
Simplified89.7%
Taylor expanded in x around 0 78.3%
if 7.2e-60 < x Initial program 87.1%
associate-/r*89.1%
Simplified92.2%
Taylor expanded in z around 0 69.1%
Final simplification74.3%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -3.7e+25) (not (<= z 3.7e+58))) (* -4.0 (/ a (/ c t))) (/ b (* z c))))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.7e+25) || !(z <= 3.7e+58)) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-3.7d+25)) .or. (.not. (z <= 3.7d+58))) then
tmp = (-4.0d0) * (a / (c / t))
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.7e+25) || !(z <= 3.7e+58)) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -3.7e+25) or not (z <= 3.7e+58): tmp = -4.0 * (a / (c / t)) else: tmp = b / (z * c) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -3.7e+25) || !(z <= 3.7e+58)) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -3.7e+25) || ~((z <= 3.7e+58)))
tmp = -4.0 * (a / (c / t));
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -3.7e+25], N[Not[LessEqual[z, 3.7e+58]], $MachinePrecision]], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+25} \lor \neg \left(z \leq 3.7 \cdot 10^{+58}\right):\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -3.6999999999999999e25 or 3.7000000000000002e58 < z Initial program 68.9%
associate-/r*76.0%
Simplified89.6%
Taylor expanded in t around inf 54.5%
associate-/l*57.0%
Simplified57.0%
if -3.6999999999999999e25 < z < 3.7000000000000002e58Initial program 95.0%
associate-/r*89.9%
Simplified89.9%
Taylor expanded in b around inf 48.7%
*-commutative48.7%
Simplified48.7%
Final simplification52.4%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -9.5e+22) (not (<= z 1.1e+55))) (* -4.0 (/ a (/ c t))) (* b (/ 1.0 (* z c)))))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -9.5e+22) || !(z <= 1.1e+55)) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = b * (1.0 / (z * c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if ((z <= (-9.5d+22)) .or. (.not. (z <= 1.1d+55))) then
tmp = (-4.0d0) * (a / (c / t))
else
tmp = b * (1.0d0 / (z * c))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -9.5e+22) || !(z <= 1.1e+55)) {
tmp = -4.0 * (a / (c / t));
} else {
tmp = b * (1.0 / (z * c));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -9.5e+22) or not (z <= 1.1e+55): tmp = -4.0 * (a / (c / t)) else: tmp = b * (1.0 / (z * c)) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -9.5e+22) || !(z <= 1.1e+55)) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); else tmp = Float64(b * Float64(1.0 / Float64(z * c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -9.5e+22) || ~((z <= 1.1e+55)))
tmp = -4.0 * (a / (c / t));
else
tmp = b * (1.0 / (z * c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -9.5e+22], N[Not[LessEqual[z, 1.1e+55]], $MachinePrecision]], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+22} \lor \neg \left(z \leq 1.1 \cdot 10^{+55}\right):\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{else}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\end{array}
\end{array}
if z < -9.49999999999999937e22 or 1.10000000000000005e55 < z Initial program 68.9%
associate-/r*76.0%
Simplified89.6%
Taylor expanded in t around inf 54.5%
associate-/l*57.0%
Simplified57.0%
if -9.49999999999999937e22 < z < 1.10000000000000005e55Initial program 95.0%
associate-/r*89.9%
Simplified89.9%
Taylor expanded in b around inf 48.7%
*-commutative48.7%
Simplified48.7%
div-inv48.8%
Applied egg-rr48.8%
Final simplification52.5%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= z -1e+24) (* t (/ (* a -4.0) c)) (if (<= z 3.8e+50) (* b (/ 1.0 (* z c))) (* -4.0 (/ a (/ c t))))))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1e+24) {
tmp = t * ((a * -4.0) / c);
} else if (z <= 3.8e+50) {
tmp = b * (1.0 / (z * c));
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-1d+24)) then
tmp = t * ((a * (-4.0d0)) / c)
else if (z <= 3.8d+50) then
tmp = b * (1.0d0 / (z * c))
else
tmp = (-4.0d0) * (a / (c / t))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1e+24) {
tmp = t * ((a * -4.0) / c);
} else if (z <= 3.8e+50) {
tmp = b * (1.0 / (z * c));
} else {
tmp = -4.0 * (a / (c / t));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -1e+24: tmp = t * ((a * -4.0) / c) elif z <= 3.8e+50: tmp = b * (1.0 / (z * c)) else: tmp = -4.0 * (a / (c / t)) return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -1e+24) tmp = Float64(t * Float64(Float64(a * -4.0) / c)); elseif (z <= 3.8e+50) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = Float64(-4.0 * Float64(a / Float64(c / t))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -1e+24)
tmp = t * ((a * -4.0) / c);
elseif (z <= 3.8e+50)
tmp = b * (1.0 / (z * c));
else
tmp = -4.0 * (a / (c / t));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1e+24], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+50], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+24}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+50}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\end{array}
\end{array}
if z < -9.9999999999999998e23Initial program 63.6%
associate-/r*72.3%
Simplified85.3%
fma-udef85.3%
Applied egg-rr85.3%
Taylor expanded in z around inf 52.6%
associate-/l*58.3%
associate-*r/58.3%
*-commutative58.3%
associate-/r/59.7%
*-commutative59.7%
*-commutative59.7%
Simplified59.7%
if -9.9999999999999998e23 < z < 3.79999999999999987e50Initial program 95.0%
associate-/r*89.9%
Simplified89.9%
Taylor expanded in b around inf 48.7%
*-commutative48.7%
Simplified48.7%
div-inv48.8%
Applied egg-rr48.8%
if 3.79999999999999987e50 < z Initial program 76.5%
associate-/r*81.4%
Simplified95.8%
Taylor expanded in t around inf 57.1%
associate-/l*55.1%
Simplified55.1%
Final simplification52.8%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= z -1.3e+25) (* t (/ (* a -4.0) c)) (if (<= z 1.52e+57) (* b (/ 1.0 (* z c))) (/ (* -4.0 (* t a)) c))))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.3e+25) {
tmp = t * ((a * -4.0) / c);
} else if (z <= 1.52e+57) {
tmp = b * (1.0 / (z * c));
} else {
tmp = (-4.0 * (t * a)) / c;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: tmp
if (z <= (-1.3d+25)) then
tmp = t * ((a * (-4.0d0)) / c)
else if (z <= 1.52d+57) then
tmp = b * (1.0d0 / (z * c))
else
tmp = ((-4.0d0) * (t * a)) / c
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.3e+25) {
tmp = t * ((a * -4.0) / c);
} else if (z <= 1.52e+57) {
tmp = b * (1.0 / (z * c));
} else {
tmp = (-4.0 * (t * a)) / c;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -1.3e+25: tmp = t * ((a * -4.0) / c) elif z <= 1.52e+57: tmp = b * (1.0 / (z * c)) else: tmp = (-4.0 * (t * a)) / c return tmp
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -1.3e+25) tmp = Float64(t * Float64(Float64(a * -4.0) / c)); elseif (z <= 1.52e+57) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = Float64(Float64(-4.0 * Float64(t * a)) / c); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -1.3e+25)
tmp = t * ((a * -4.0) / c);
elseif (z <= 1.52e+57)
tmp = b * (1.0 / (z * c));
else
tmp = (-4.0 * (t * a)) / c;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1.3e+25], N[(t * N[(N[(a * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.52e+57], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+25}:\\
\;\;\;\;t \cdot \frac{a \cdot -4}{c}\\
\mathbf{elif}\;z \leq 1.52 \cdot 10^{+57}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot \left(t \cdot a\right)}{c}\\
\end{array}
\end{array}
if z < -1.2999999999999999e25Initial program 63.6%
associate-/r*72.3%
Simplified85.3%
fma-udef85.3%
Applied egg-rr85.3%
Taylor expanded in z around inf 52.6%
associate-/l*58.3%
associate-*r/58.3%
*-commutative58.3%
associate-/r/59.7%
*-commutative59.7%
*-commutative59.7%
Simplified59.7%
if -1.2999999999999999e25 < z < 1.51999999999999998e57Initial program 95.0%
associate-/r*89.9%
Simplified89.9%
Taylor expanded in b around inf 48.7%
*-commutative48.7%
Simplified48.7%
div-inv48.8%
Applied egg-rr48.8%
if 1.51999999999999998e57 < z Initial program 76.5%
associate-/r*81.4%
Simplified95.8%
Taylor expanded in z around inf 57.1%
Final simplification53.2%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
assert(x < y);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
code = b / (z * c)
end function
assert x < y;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y] = sort([x, y]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y = sort([x, y]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 83.4%
associate-/r*83.7%
Simplified89.8%
Taylor expanded in b around inf 39.0%
*-commutative39.0%
Simplified39.0%
Final simplification39.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ b (* c z)))
(t_2 (* 4.0 (/ (* a t) c)))
(t_3 (* (* x 9.0) y))
(t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
(t_5 (/ t_4 (* z c)))
(t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
(if (< t_5 -1.100156740804105e-171)
t_6
(if (< t_5 0.0)
(/ (/ t_4 z) c)
(if (< t_5 1.1708877911747488e-53)
t_6
(if (< t_5 2.876823679546137e+130)
(- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
(if (< t_5 1.3838515042456319e+158)
t_6
(- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = b / (c * z)
t_2 = 4.0d0 * ((a * t) / c)
t_3 = (x * 9.0d0) * y
t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
t_5 = t_4 / (z * c)
t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
if (t_5 < (-1.100156740804105d-171)) then
tmp = t_6
else if (t_5 < 0.0d0) then
tmp = (t_4 / z) / c
else if (t_5 < 1.1708877911747488d-53) then
tmp = t_6
else if (t_5 < 2.876823679546137d+130) then
tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
else if (t_5 < 1.3838515042456319d+158) then
tmp = t_6
else
tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (c * z);
double t_2 = 4.0 * ((a * t) / c);
double t_3 = (x * 9.0) * y;
double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
double t_5 = t_4 / (z * c);
double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
double tmp;
if (t_5 < -1.100156740804105e-171) {
tmp = t_6;
} else if (t_5 < 0.0) {
tmp = (t_4 / z) / c;
} else if (t_5 < 1.1708877911747488e-53) {
tmp = t_6;
} else if (t_5 < 2.876823679546137e+130) {
tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
} else if (t_5 < 1.3838515042456319e+158) {
tmp = t_6;
} else {
tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = b / (c * z) t_2 = 4.0 * ((a * t) / c) t_3 = (x * 9.0) * y t_4 = (t_3 - (((z * 4.0) * t) * a)) + b t_5 = t_4 / (z * c) t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c) tmp = 0 if t_5 < -1.100156740804105e-171: tmp = t_6 elif t_5 < 0.0: tmp = (t_4 / z) / c elif t_5 < 1.1708877911747488e-53: tmp = t_6 elif t_5 < 2.876823679546137e+130: tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2 elif t_5 < 1.3838515042456319e+158: tmp = t_6 else: tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(c * z)) t_2 = Float64(4.0 * Float64(Float64(a * t) / c)) t_3 = Float64(Float64(x * 9.0) * y) t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) t_5 = Float64(t_4 / Float64(z * c)) t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c)) tmp = 0.0 if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = Float64(Float64(t_4 / z) / c); elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2); elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = b / (c * z); t_2 = 4.0 * ((a * t) / c); t_3 = (x * 9.0) * y; t_4 = (t_3 - (((z * 4.0) * t) * a)) + b; t_5 = t_4 / (z * c); t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c); tmp = 0.0; if (t_5 < -1.100156740804105e-171) tmp = t_6; elseif (t_5 < 0.0) tmp = (t_4 / z) / c; elseif (t_5 < 1.1708877911747488e-53) tmp = t_6; elseif (t_5 < 2.876823679546137e+130) tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2; elseif (t_5 < 1.3838515042456319e+158) tmp = t_6; else tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t_4}{z \cdot c}\\
t_6 := \frac{\left(t_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 0:\\
\;\;\;\;\frac{\frac{t_4}{z}}{c}\\
\mathbf{elif}\;t_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t_6\\
\mathbf{elif}\;t_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t_1\right) - t_2\\
\mathbf{elif}\;t_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t_6\\
\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t_1\right) - t_2\\
\end{array}
\end{array}
herbie shell --seed 2023240
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) -1.100156740804105e-171) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 0.0) (/ (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9.0 (/ y c)) (/ x z)) (/ b (* c z))) (* 4.0 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9.0) y) (* (* z 4.0) (* t a))) b) (* z c)) (- (+ (* 9.0 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4.0 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))