
(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 16 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.
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (fma x (* 9.0 y) b)))
(if (<= z -4.3e+29)
(/ (fma t (* a -4.0) (/ t_1 z)) c)
(if (<= z 1e-30)
(/ (+ b (- (* x (* 9.0 y)) (* 4.0 (* t (* z a))))) (* z c))
(/ (+ (pow (/ z t_1) -1.0) (* t (* a -4.0))) c)))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma(x, (9.0 * y), b);
double tmp;
if (z <= -4.3e+29) {
tmp = fma(t, (a * -4.0), (t_1 / z)) / c;
} else if (z <= 1e-30) {
tmp = (b + ((x * (9.0 * y)) - (4.0 * (t * (z * a))))) / (z * c);
} else {
tmp = (pow((z / t_1), -1.0) + (t * (a * -4.0))) / c;
}
return tmp;
}
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = fma(x, Float64(9.0 * y), b) tmp = 0.0 if (z <= -4.3e+29) tmp = Float64(fma(t, Float64(a * -4.0), Float64(t_1 / z)) / c); elseif (z <= 1e-30) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(4.0 * Float64(t * Float64(z * a))))) / Float64(z * c)); else tmp = Float64(Float64((Float64(z / t_1) ^ -1.0) + Float64(t * Float64(a * -4.0))) / c); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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] + b), $MachinePrecision]}, If[LessEqual[z, -4.3e+29], N[(N[(t * N[(a * -4.0), $MachinePrecision] + N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1e-30], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[N[(z / t$95$1), $MachinePrecision], -1.0], $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, 9 \cdot y, b\right)\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{+29}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, \frac{t_1}{z}\right)}{c}\\
\mathbf{elif}\;z \leq 10^{-30}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - 4 \cdot \left(t \cdot \left(z \cdot a\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{z}{t_1}\right)}^{-1} + t \cdot \left(a \cdot -4\right)}{c}\\
\end{array}
\end{array}
if z < -4.3000000000000003e29Initial program 68.4%
associate-/r*77.1%
Simplified99.8%
if -4.3000000000000003e29 < z < 1e-30Initial program 93.4%
associate-*l*93.4%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in z around 0 93.4%
associate-*r*91.3%
*-commutative91.3%
associate-*l*94.1%
Simplified94.1%
if 1e-30 < z Initial program 62.9%
associate-/r*69.5%
Simplified88.8%
clear-num88.8%
inv-pow88.8%
Applied egg-rr88.8%
Final simplification94.2%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (fma x (* 9.0 y) b) z)))
(if (<= z -4.5e+29)
(/ (fma t (* a -4.0) t_1) c)
(if (<= z 2e+41)
(/ (+ b (- (* x (* 9.0 y)) (* 4.0 (* t (* z a))))) (* z c))
(/ (+ t_1 (* t (* a -4.0))) c)))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = fma(x, (9.0 * y), b) / z;
double tmp;
if (z <= -4.5e+29) {
tmp = fma(t, (a * -4.0), t_1) / c;
} else if (z <= 2e+41) {
tmp = (b + ((x * (9.0 * y)) - (4.0 * (t * (z * a))))) / (z * c);
} else {
tmp = (t_1 + (t * (a * -4.0))) / c;
}
return tmp;
}
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(fma(x, Float64(9.0 * y), b) / z) tmp = 0.0 if (z <= -4.5e+29) tmp = Float64(fma(t, Float64(a * -4.0), t_1) / c); elseif (z <= 2e+41) tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(4.0 * Float64(t * Float64(z * a))))) / Float64(z * c)); else tmp = Float64(Float64(t_1 + Float64(t * Float64(a * -4.0))) / c); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * N[(9.0 * y), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -4.5e+29], N[(N[(t * N[(a * -4.0), $MachinePrecision] + t$95$1), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 2e+41], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+29}:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, a \cdot -4, t_1\right)}{c}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+41}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - 4 \cdot \left(t \cdot \left(z \cdot a\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1 + t \cdot \left(a \cdot -4\right)}{c}\\
\end{array}
\end{array}
if z < -4.5000000000000002e29Initial program 68.4%
associate-/r*77.1%
Simplified99.8%
if -4.5000000000000002e29 < z < 2.00000000000000001e41Initial program 93.5%
associate-*l*93.4%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in z around 0 93.4%
associate-*r*91.5%
*-commutative91.5%
associate-*l*94.0%
Simplified94.0%
if 2.00000000000000001e41 < z Initial program 53.5%
associate-/r*62.3%
Simplified87.4%
Final simplification94.2%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -4.3e+29) (not (<= z 6e+41))) (/ (+ (/ (fma x (* 9.0 y) b) z) (* t (* a -4.0))) c) (/ (+ b (- (* x (* 9.0 y)) (* 4.0 (* t (* z a))))) (* z c))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -4.3e+29) || !(z <= 6e+41)) {
tmp = ((fma(x, (9.0 * y), b) / z) + (t * (a * -4.0))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - (4.0 * (t * (z * a))))) / (z * c);
}
return tmp;
}
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -4.3e+29) || !(z <= 6e+41)) tmp = Float64(Float64(Float64(fma(x, Float64(9.0 * y), b) / z) + Float64(t * Float64(a * -4.0))) / c); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(4.0 * Float64(t * Float64(z * a))))) / Float64(z * c)); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -4.3e+29], N[Not[LessEqual[z, 6e+41]], $MachinePrecision]], N[(N[(N[(N[(x * N[(9.0 * y), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+29} \lor \neg \left(z \leq 6 \cdot 10^{+41}\right):\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x, 9 \cdot y, b\right)}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - 4 \cdot \left(t \cdot \left(z \cdot a\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -4.3000000000000003e29 or 5.9999999999999997e41 < z Initial program 62.1%
associate-/r*70.9%
Simplified94.5%
if -4.3000000000000003e29 < z < 5.9999999999999997e41Initial program 93.5%
associate-*l*93.4%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in z around 0 93.4%
associate-*r*91.5%
*-commutative91.5%
associate-*l*94.0%
Simplified94.0%
Final simplification94.2%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -7.8e+118) (not (<= z 2.9e+106))) (/ (+ (* t (* a -4.0)) (* 9.0 (/ (* x y) z))) c) (/ (+ b (- (* x (* 9.0 y)) (* 4.0 (* t (* z a))))) (* z c))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -7.8e+118) || !(z <= 2.9e+106)) {
tmp = ((t * (a * -4.0)) + (9.0 * ((x * y) / z))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - (4.0 * (t * (z * a))))) / (z * c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 <= (-7.8d+118)) .or. (.not. (z <= 2.9d+106))) then
tmp = ((t * (a * (-4.0d0))) + (9.0d0 * ((x * y) / z))) / c
else
tmp = (b + ((x * (9.0d0 * y)) - (4.0d0 * (t * (z * a))))) / (z * c)
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -7.8e+118) || !(z <= 2.9e+106)) {
tmp = ((t * (a * -4.0)) + (9.0 * ((x * y) / z))) / c;
} else {
tmp = (b + ((x * (9.0 * y)) - (4.0 * (t * (z * a))))) / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -7.8e+118) or not (z <= 2.9e+106): tmp = ((t * (a * -4.0)) + (9.0 * ((x * y) / z))) / c else: tmp = (b + ((x * (9.0 * y)) - (4.0 * (t * (z * a))))) / (z * c) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -7.8e+118) || !(z <= 2.9e+106)) tmp = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(9.0 * Float64(Float64(x * y) / z))) / c); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) - Float64(4.0 * Float64(t * Float64(z * a))))) / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -7.8e+118) || ~((z <= 2.9e+106)))
tmp = ((t * (a * -4.0)) + (9.0 * ((x * y) / z))) / c;
else
tmp = (b + ((x * (9.0 * y)) - (4.0 * (t * (z * a))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -7.8e+118], N[Not[LessEqual[z, 2.9e+106]], $MachinePrecision]], N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+118} \lor \neg \left(z \leq 2.9 \cdot 10^{+106}\right):\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) - 4 \cdot \left(t \cdot \left(z \cdot a\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -7.8e118 or 2.9000000000000002e106 < z Initial program 58.1%
associate-/r*66.8%
Simplified93.2%
Taylor expanded in x around inf 81.3%
if -7.8e118 < z < 2.9000000000000002e106Initial program 91.5%
associate-*l*91.4%
associate-*l*91.4%
Simplified91.4%
Taylor expanded in z around 0 91.4%
associate-*r*91.4%
*-commutative91.4%
associate-*l*93.6%
Simplified93.6%
Final simplification89.4%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (or (<= x -6.5e+189)
(and (not (<= x -3.8e+154))
(or (<= x -2.1e+73) (not (<= x 1.55e-172)))))
(/ (+ b (* 9.0 (* x y))) (* z c))
(/ (+ (* t (* a -4.0)) (/ b z)) c)))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x <= -6.5e+189) || (!(x <= -3.8e+154) && ((x <= -2.1e+73) || !(x <= 1.55e-172)))) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 ((x <= (-6.5d+189)) .or. (.not. (x <= (-3.8d+154))) .and. (x <= (-2.1d+73)) .or. (.not. (x <= 1.55d-172))) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = ((t * (a * (-4.0d0))) + (b / z)) / c
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((x <= -6.5e+189) || (!(x <= -3.8e+154) && ((x <= -2.1e+73) || !(x <= 1.55e-172)))) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = ((t * (a * -4.0)) + (b / z)) / c;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (x <= -6.5e+189) or (not (x <= -3.8e+154) and ((x <= -2.1e+73) or not (x <= 1.55e-172))): tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = ((t * (a * -4.0)) + (b / z)) / c return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((x <= -6.5e+189) || (!(x <= -3.8e+154) && ((x <= -2.1e+73) || !(x <= 1.55e-172)))) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((x <= -6.5e+189) || (~((x <= -3.8e+154)) && ((x <= -2.1e+73) || ~((x <= 1.55e-172)))))
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = ((t * (a * -4.0)) + (b / z)) / c;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[x, -6.5e+189], And[N[Not[LessEqual[x, -3.8e+154]], $MachinePrecision], Or[LessEqual[x, -2.1e+73], N[Not[LessEqual[x, 1.55e-172]], $MachinePrecision]]]], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{+189} \lor \neg \left(x \leq -3.8 \cdot 10^{+154}\right) \land \left(x \leq -2.1 \cdot 10^{+73} \lor \neg \left(x \leq 1.55 \cdot 10^{-172}\right)\right):\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if x < -6.50000000000000027e189 or -3.7999999999999998e154 < x < -2.1000000000000001e73 or 1.5500000000000001e-172 < x Initial program 80.3%
associate-*l*80.3%
associate-*l*80.4%
Simplified80.4%
Taylor expanded in x around inf 65.9%
if -6.50000000000000027e189 < x < -3.7999999999999998e154 or -2.1000000000000001e73 < x < 1.5500000000000001e-172Initial program 79.9%
associate-/r*79.0%
Simplified93.5%
Taylor expanded in x around 0 84.8%
associate-*r*84.8%
*-commutative84.8%
*-commutative84.8%
Simplified84.8%
Final simplification75.0%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 -6.8e-106) (not (<= b 9.2e+95)))
(/ (+ t_1 (/ b z)) c)
(/ (+ t_1 (* 9.0 (/ (* x y) z))) c))))assert(x < y);
assert(t < a);
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 <= -6.8e-106) || !(b <= 9.2e+95)) {
tmp = (t_1 + (b / z)) / c;
} else {
tmp = (t_1 + (9.0 * ((x * y) / z))) / c;
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 <= (-6.8d-106)) .or. (.not. (b <= 9.2d+95))) then
tmp = (t_1 + (b / z)) / c
else
tmp = (t_1 + (9.0d0 * ((x * y) / z))) / c
end if
code = tmp
end function
assert x < y;
assert t < a;
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 <= -6.8e-106) || !(b <= 9.2e+95)) {
tmp = (t_1 + (b / z)) / c;
} else {
tmp = (t_1 + (9.0 * ((x * y) / z))) / c;
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = t * (a * -4.0) tmp = 0 if (b <= -6.8e-106) or not (b <= 9.2e+95): tmp = (t_1 + (b / z)) / c else: tmp = (t_1 + (9.0 * ((x * y) / z))) / c return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if ((b <= -6.8e-106) || !(b <= 9.2e+95)) tmp = Float64(Float64(t_1 + Float64(b / z)) / c); else tmp = Float64(Float64(t_1 + Float64(9.0 * Float64(Float64(x * y) / z))) / c); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = t * (a * -4.0);
tmp = 0.0;
if ((b <= -6.8e-106) || ~((b <= 9.2e+95)))
tmp = (t_1 + (b / z)) / c;
else
tmp = (t_1 + (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.
NOTE: t and a 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, -6.8e-106], N[Not[LessEqual[b, 9.2e+95]], $MachinePrecision]], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(t$95$1 + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;b \leq -6.8 \cdot 10^{-106} \lor \neg \left(b \leq 9.2 \cdot 10^{+95}\right):\\
\;\;\;\;\frac{t_1 + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1 + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\end{array}
\end{array}
if b < -6.79999999999999965e-106 or 9.19999999999999989e95 < b Initial program 78.6%
associate-/r*75.8%
Simplified88.6%
Taylor expanded in x around 0 78.9%
associate-*r*78.9%
*-commutative78.9%
*-commutative78.9%
Simplified78.9%
if -6.79999999999999965e-106 < b < 9.19999999999999989e95Initial program 81.6%
associate-/r*80.8%
Simplified88.9%
Taylor expanded in x around inf 81.6%
Final simplification80.3%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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))))
(if (<= z -2.75e-21)
(/ (* t (* a -4.0)) c)
(if (<= z 6.8e-277)
t_1
(if (<= z 4.6e-222)
(* 9.0 (/ y (/ c (/ x z))))
(if (<= z 1.36e-61) t_1 (* a (* -4.0 (/ t c)))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (z <= -2.75e-21) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 6.8e-277) {
tmp = t_1;
} else if (z <= 4.6e-222) {
tmp = 9.0 * (y / (c / (x / z)));
} else if (z <= 1.36e-61) {
tmp = t_1;
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 / (z * c)
if (z <= (-2.75d-21)) then
tmp = (t * (a * (-4.0d0))) / c
else if (z <= 6.8d-277) then
tmp = t_1
else if (z <= 4.6d-222) then
tmp = 9.0d0 * (y / (c / (x / z)))
else if (z <= 1.36d-61) then
tmp = t_1
else
tmp = a * ((-4.0d0) * (t / c))
end if
code = tmp
end function
assert x < y;
assert t < a;
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 tmp;
if (z <= -2.75e-21) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 6.8e-277) {
tmp = t_1;
} else if (z <= 4.6e-222) {
tmp = 9.0 * (y / (c / (x / z)));
} else if (z <= 1.36e-61) {
tmp = t_1;
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = b / (z * c) tmp = 0 if z <= -2.75e-21: tmp = (t * (a * -4.0)) / c elif z <= 6.8e-277: tmp = t_1 elif z <= 4.6e-222: tmp = 9.0 * (y / (c / (x / z))) elif z <= 1.36e-61: tmp = t_1 else: tmp = a * (-4.0 * (t / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(z * c)) tmp = 0.0 if (z <= -2.75e-21) tmp = Float64(Float64(t * Float64(a * -4.0)) / c); elseif (z <= 6.8e-277) tmp = t_1; elseif (z <= 4.6e-222) tmp = Float64(9.0 * Float64(y / Float64(c / Float64(x / z)))); elseif (z <= 1.36e-61) tmp = t_1; else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = b / (z * c);
tmp = 0.0;
if (z <= -2.75e-21)
tmp = (t * (a * -4.0)) / c;
elseif (z <= 6.8e-277)
tmp = t_1;
elseif (z <= 4.6e-222)
tmp = 9.0 * (y / (c / (x / z)));
elseif (z <= 1.36e-61)
tmp = t_1;
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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]}, If[LessEqual[z, -2.75e-21], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 6.8e-277], t$95$1, If[LessEqual[z, 4.6e-222], N[(9.0 * N[(y / N[(c / N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.36e-61], t$95$1, N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
\mathbf{if}\;z \leq -2.75 \cdot 10^{-21}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-277}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-222}:\\
\;\;\;\;9 \cdot \frac{y}{\frac{c}{\frac{x}{z}}}\\
\mathbf{elif}\;z \leq 1.36 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if z < -2.74999999999999989e-21Initial program 73.0%
associate-/r*80.4%
Simplified99.7%
Taylor expanded in z around inf 59.9%
associate-*r*59.9%
*-commutative59.9%
*-commutative59.9%
Simplified59.9%
if -2.74999999999999989e-21 < z < 6.79999999999999964e-277 or 4.6000000000000003e-222 < z < 1.35999999999999995e-61Initial program 93.5%
associate-*l*93.4%
associate-*l*90.6%
Simplified90.6%
Taylor expanded in b around inf 61.6%
if 6.79999999999999964e-277 < z < 4.6000000000000003e-222Initial program 99.7%
associate-/r*90.3%
Simplified90.3%
+-commutative90.3%
fma-udef90.3%
div-inv90.4%
Applied egg-rr90.4%
Taylor expanded in x around inf 99.8%
times-frac99.8%
associate-*l/90.3%
associate-/l*99.7%
Simplified99.7%
if 1.35999999999999995e-61 < z Initial program 64.9%
associate-/r*69.3%
Simplified86.0%
Taylor expanded in z around inf 51.9%
associate-*r*51.9%
*-commutative51.9%
*-commutative51.9%
Simplified51.9%
*-commutative51.9%
*-un-lft-identity51.9%
times-frac50.3%
Applied egg-rr50.3%
add-log-exp31.8%
/-rgt-identity31.8%
*-commutative31.8%
exp-prod31.5%
Applied egg-rr31.5%
log-pow33.0%
rem-log-exp50.3%
associate-*l*50.3%
Simplified50.3%
Final simplification59.6%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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))))
(if (<= z -1.3e-23)
(/ (* t (* a -4.0)) c)
(if (<= z 6.2e-277)
t_1
(if (<= z 3.2e-222)
(* 9.0 (/ (* x y) (* z c)))
(if (<= z 1.6e-61) t_1 (* a (* -4.0 (/ t c)))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b / (z * c);
double tmp;
if (z <= -1.3e-23) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 6.2e-277) {
tmp = t_1;
} else if (z <= 3.2e-222) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 1.6e-61) {
tmp = t_1;
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 / (z * c)
if (z <= (-1.3d-23)) then
tmp = (t * (a * (-4.0d0))) / c
else if (z <= 6.2d-277) then
tmp = t_1
else if (z <= 3.2d-222) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (z <= 1.6d-61) then
tmp = t_1
else
tmp = a * ((-4.0d0) * (t / c))
end if
code = tmp
end function
assert x < y;
assert t < a;
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 tmp;
if (z <= -1.3e-23) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 6.2e-277) {
tmp = t_1;
} else if (z <= 3.2e-222) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 1.6e-61) {
tmp = t_1;
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): t_1 = b / (z * c) tmp = 0 if z <= -1.3e-23: tmp = (t * (a * -4.0)) / c elif z <= 6.2e-277: tmp = t_1 elif z <= 3.2e-222: tmp = 9.0 * ((x * y) / (z * c)) elif z <= 1.6e-61: tmp = t_1 else: tmp = a * (-4.0 * (t / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) t_1 = Float64(b / Float64(z * c)) tmp = 0.0 if (z <= -1.3e-23) tmp = Float64(Float64(t * Float64(a * -4.0)) / c); elseif (z <= 6.2e-277) tmp = t_1; elseif (z <= 3.2e-222) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (z <= 1.6e-61) tmp = t_1; else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = b / (z * c);
tmp = 0.0;
if (z <= -1.3e-23)
tmp = (t * (a * -4.0)) / c;
elseif (z <= 6.2e-277)
tmp = t_1;
elseif (z <= 3.2e-222)
tmp = 9.0 * ((x * y) / (z * c));
elseif (z <= 1.6e-61)
tmp = t_1;
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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]}, If[LessEqual[z, -1.3e-23], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 6.2e-277], t$95$1, If[LessEqual[z, 3.2e-222], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-61], t$95$1, N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
t_1 := \frac{b}{z \cdot c}\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{-23}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-277}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-222}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if z < -1.3e-23Initial program 73.0%
associate-/r*80.4%
Simplified99.7%
Taylor expanded in z around inf 59.9%
associate-*r*59.9%
*-commutative59.9%
*-commutative59.9%
Simplified59.9%
if -1.3e-23 < z < 6.19999999999999958e-277 or 3.1999999999999999e-222 < z < 1.6000000000000001e-61Initial program 93.5%
associate-*l*93.4%
associate-*l*90.6%
Simplified90.6%
Taylor expanded in b around inf 61.6%
if 6.19999999999999958e-277 < z < 3.1999999999999999e-222Initial program 99.7%
associate-*l*99.7%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in x around inf 99.8%
if 1.6000000000000001e-61 < z Initial program 64.9%
associate-/r*69.3%
Simplified86.0%
Taylor expanded in z around inf 51.9%
associate-*r*51.9%
*-commutative51.9%
*-commutative51.9%
Simplified51.9%
*-commutative51.9%
*-un-lft-identity51.9%
times-frac50.3%
Applied egg-rr50.3%
add-log-exp31.8%
/-rgt-identity31.8%
*-commutative31.8%
exp-prod31.5%
Applied egg-rr31.5%
log-pow33.0%
rem-log-exp50.3%
associate-*l*50.3%
Simplified50.3%
Final simplification59.6%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -8.5e-23)
(/ (* t (* a -4.0)) c)
(if (<= z 4.1e-277)
(* b (/ (/ 1.0 c) z))
(if (<= z 2.3e-221)
(* 9.0 (/ (* x y) (* z c)))
(if (<= z 1.36e-61) (/ b (* z c)) (* a (* -4.0 (/ t c))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -8.5e-23) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 4.1e-277) {
tmp = b * ((1.0 / c) / z);
} else if (z <= 2.3e-221) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 1.36e-61) {
tmp = b / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 <= (-8.5d-23)) then
tmp = (t * (a * (-4.0d0))) / c
else if (z <= 4.1d-277) then
tmp = b * ((1.0d0 / c) / z)
else if (z <= 2.3d-221) then
tmp = 9.0d0 * ((x * y) / (z * c))
else if (z <= 1.36d-61) then
tmp = b / (z * c)
else
tmp = a * ((-4.0d0) * (t / c))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -8.5e-23) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 4.1e-277) {
tmp = b * ((1.0 / c) / z);
} else if (z <= 2.3e-221) {
tmp = 9.0 * ((x * y) / (z * c));
} else if (z <= 1.36e-61) {
tmp = b / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -8.5e-23: tmp = (t * (a * -4.0)) / c elif z <= 4.1e-277: tmp = b * ((1.0 / c) / z) elif z <= 2.3e-221: tmp = 9.0 * ((x * y) / (z * c)) elif z <= 1.36e-61: tmp = b / (z * c) else: tmp = a * (-4.0 * (t / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -8.5e-23) tmp = Float64(Float64(t * Float64(a * -4.0)) / c); elseif (z <= 4.1e-277) tmp = Float64(b * Float64(Float64(1.0 / c) / z)); elseif (z <= 2.3e-221) tmp = Float64(9.0 * Float64(Float64(x * y) / Float64(z * c))); elseif (z <= 1.36e-61) tmp = Float64(b / Float64(z * c)); else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -8.5e-23)
tmp = (t * (a * -4.0)) / c;
elseif (z <= 4.1e-277)
tmp = b * ((1.0 / c) / z);
elseif (z <= 2.3e-221)
tmp = 9.0 * ((x * y) / (z * c));
elseif (z <= 1.36e-61)
tmp = b / (z * c);
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -8.5e-23], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 4.1e-277], N[(b * N[(N[(1.0 / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e-221], N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.36e-61], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{-23}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-277}:\\
\;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-221}:\\
\;\;\;\;9 \cdot \frac{x \cdot y}{z \cdot c}\\
\mathbf{elif}\;z \leq 1.36 \cdot 10^{-61}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if z < -8.4999999999999996e-23Initial program 73.0%
associate-/r*80.4%
Simplified99.7%
Taylor expanded in z around inf 59.9%
associate-*r*59.9%
*-commutative59.9%
*-commutative59.9%
Simplified59.9%
if -8.4999999999999996e-23 < z < 4.09999999999999989e-277Initial program 91.5%
associate-*l*91.5%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in b around inf 60.0%
associate-/r*53.2%
Simplified53.2%
div-inv53.1%
*-un-lft-identity53.1%
times-frac60.0%
Applied egg-rr60.0%
if 4.09999999999999989e-277 < z < 2.3e-221Initial program 99.7%
associate-*l*99.7%
associate-*l*99.7%
Simplified99.7%
Taylor expanded in x around inf 99.8%
if 2.3e-221 < z < 1.35999999999999995e-61Initial program 97.3%
associate-*l*97.2%
associate-*l*89.0%
Simplified89.0%
Taylor expanded in b around inf 64.9%
if 1.35999999999999995e-61 < z Initial program 64.9%
associate-/r*69.3%
Simplified86.0%
Taylor expanded in z around inf 51.9%
associate-*r*51.9%
*-commutative51.9%
*-commutative51.9%
Simplified51.9%
*-commutative51.9%
*-un-lft-identity51.9%
times-frac50.3%
Applied egg-rr50.3%
add-log-exp31.8%
/-rgt-identity31.8%
*-commutative31.8%
exp-prod31.5%
Applied egg-rr31.5%
log-pow33.0%
rem-log-exp50.3%
associate-*l*50.3%
Simplified50.3%
Final simplification59.6%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -6.5e-29)
(/ (* t (* a -4.0)) c)
(if (<= z 6.8e-277)
(* b (/ (/ 1.0 c) z))
(if (<= z 4.2e-222)
(/ 9.0 (/ (* z c) (* x y)))
(if (<= z 1.9e-61) (/ b (* z c)) (* a (* -4.0 (/ t c))))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -6.5e-29) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 6.8e-277) {
tmp = b * ((1.0 / c) / z);
} else if (z <= 4.2e-222) {
tmp = 9.0 / ((z * c) / (x * y));
} else if (z <= 1.9e-61) {
tmp = b / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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 <= (-6.5d-29)) then
tmp = (t * (a * (-4.0d0))) / c
else if (z <= 6.8d-277) then
tmp = b * ((1.0d0 / c) / z)
else if (z <= 4.2d-222) then
tmp = 9.0d0 / ((z * c) / (x * y))
else if (z <= 1.9d-61) then
tmp = b / (z * c)
else
tmp = a * ((-4.0d0) * (t / c))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -6.5e-29) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 6.8e-277) {
tmp = b * ((1.0 / c) / z);
} else if (z <= 4.2e-222) {
tmp = 9.0 / ((z * c) / (x * y));
} else if (z <= 1.9e-61) {
tmp = b / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -6.5e-29: tmp = (t * (a * -4.0)) / c elif z <= 6.8e-277: tmp = b * ((1.0 / c) / z) elif z <= 4.2e-222: tmp = 9.0 / ((z * c) / (x * y)) elif z <= 1.9e-61: tmp = b / (z * c) else: tmp = a * (-4.0 * (t / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -6.5e-29) tmp = Float64(Float64(t * Float64(a * -4.0)) / c); elseif (z <= 6.8e-277) tmp = Float64(b * Float64(Float64(1.0 / c) / z)); elseif (z <= 4.2e-222) tmp = Float64(9.0 / Float64(Float64(z * c) / Float64(x * y))); elseif (z <= 1.9e-61) tmp = Float64(b / Float64(z * c)); else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -6.5e-29)
tmp = (t * (a * -4.0)) / c;
elseif (z <= 6.8e-277)
tmp = b * ((1.0 / c) / z);
elseif (z <= 4.2e-222)
tmp = 9.0 / ((z * c) / (x * y));
elseif (z <= 1.9e-61)
tmp = b / (z * c);
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -6.5e-29], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 6.8e-277], N[(b * N[(N[(1.0 / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-222], N[(9.0 / N[(N[(z * c), $MachinePrecision] / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e-61], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{-29}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-277}:\\
\;\;\;\;b \cdot \frac{\frac{1}{c}}{z}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-222}:\\
\;\;\;\;\frac{9}{\frac{z \cdot c}{x \cdot y}}\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-61}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if z < -6.5e-29Initial program 73.0%
associate-/r*80.4%
Simplified99.7%
Taylor expanded in z around inf 59.9%
associate-*r*59.9%
*-commutative59.9%
*-commutative59.9%
Simplified59.9%
if -6.5e-29 < z < 6.79999999999999964e-277Initial program 91.5%
associate-*l*91.5%
associate-*l*91.5%
Simplified91.5%
Taylor expanded in b around inf 60.0%
associate-/r*53.2%
Simplified53.2%
div-inv53.1%
*-un-lft-identity53.1%
times-frac60.0%
Applied egg-rr60.0%
if 6.79999999999999964e-277 < z < 4.1999999999999998e-222Initial program 99.7%
associate-/r*90.3%
Simplified90.3%
+-commutative90.3%
fma-udef90.3%
div-inv90.4%
Applied egg-rr90.4%
Taylor expanded in x around inf 99.8%
*-commutative99.8%
associate-*r/99.7%
associate-/l*100.0%
Simplified100.0%
if 4.1999999999999998e-222 < z < 1.8999999999999999e-61Initial program 97.3%
associate-*l*97.2%
associate-*l*89.0%
Simplified89.0%
Taylor expanded in b around inf 64.9%
if 1.8999999999999999e-61 < z Initial program 64.9%
associate-/r*69.3%
Simplified86.0%
Taylor expanded in z around inf 51.9%
associate-*r*51.9%
*-commutative51.9%
*-commutative51.9%
Simplified51.9%
*-commutative51.9%
*-un-lft-identity51.9%
times-frac50.3%
Applied egg-rr50.3%
add-log-exp31.8%
/-rgt-identity31.8%
*-commutative31.8%
exp-prod31.5%
Applied egg-rr31.5%
log-pow33.0%
rem-log-exp50.3%
associate-*l*50.3%
Simplified50.3%
Final simplification59.6%
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= t -6.3e+144)
(* -4.0 (/ a (/ c t)))
(if (<= t 1.16e-77)
(/ (+ b (* 9.0 (* x y))) (* z c))
(* a (* -4.0 (/ t c))))))assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -6.3e+144) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 1.16e-77) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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.3d+144)) then
tmp = (-4.0d0) * (a / (c / t))
else if (t <= 1.16d-77) then
tmp = (b + (9.0d0 * (x * y))) / (z * c)
else
tmp = a * ((-4.0d0) * (t / c))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (t <= -6.3e+144) {
tmp = -4.0 * (a / (c / t));
} else if (t <= 1.16e-77) {
tmp = (b + (9.0 * (x * y))) / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if t <= -6.3e+144: tmp = -4.0 * (a / (c / t)) elif t <= 1.16e-77: tmp = (b + (9.0 * (x * y))) / (z * c) else: tmp = a * (-4.0 * (t / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (t <= -6.3e+144) tmp = Float64(-4.0 * Float64(a / Float64(c / t))); elseif (t <= 1.16e-77) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (t <= -6.3e+144)
tmp = -4.0 * (a / (c / t));
elseif (t <= 1.16e-77)
tmp = (b + (9.0 * (x * y))) / (z * c);
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[t, -6.3e+144], N[(-4.0 * N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.16e-77], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.3 \cdot 10^{+144}:\\
\;\;\;\;-4 \cdot \frac{a}{\frac{c}{t}}\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{-77}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if t < -6.30000000000000024e144Initial program 73.5%
associate-*l*73.5%
associate-*l*76.4%
Simplified76.4%
Taylor expanded in z around inf 70.2%
*-commutative70.2%
associate-/l*74.6%
Simplified74.6%
if -6.30000000000000024e144 < t < 1.16e-77Initial program 84.0%
associate-*l*84.0%
associate-*l*84.6%
Simplified84.6%
Taylor expanded in x around inf 72.5%
if 1.16e-77 < t Initial program 74.8%
associate-/r*71.1%
Simplified88.7%
Taylor expanded in z around inf 55.8%
associate-*r*55.8%
*-commutative55.8%
*-commutative55.8%
Simplified55.8%
*-commutative55.8%
*-un-lft-identity55.8%
times-frac56.4%
Applied egg-rr56.4%
add-log-exp28.6%
/-rgt-identity28.6%
*-commutative28.6%
exp-prod32.8%
Applied egg-rr32.8%
log-pow32.8%
rem-log-exp56.4%
associate-*l*56.4%
Simplified56.4%
Final simplification68.4%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -3.4e-29) (not (<= z 9.5e+40))) (* -4.0 (* t (/ a c))) (/ b (* z c))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.4e-29) || !(z <= 9.5e+40)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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.4d-29)) .or. (.not. (z <= 9.5d+40))) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = b / (z * c)
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -3.4e-29) || !(z <= 9.5e+40)) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (z * c);
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -3.4e-29) or not (z <= 9.5e+40): tmp = -4.0 * (t * (a / c)) else: tmp = b / (z * c) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -3.4e-29) || !(z <= 9.5e+40)) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(b / Float64(z * c)); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -3.4e-29) || ~((z <= 9.5e+40)))
tmp = -4.0 * (t * (a / c));
else
tmp = b / (z * c);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -3.4e-29], N[Not[LessEqual[z, 9.5e+40]], $MachinePrecision]], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{-29} \lor \neg \left(z \leq 9.5 \cdot 10^{+40}\right):\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\end{array}
\end{array}
if z < -3.39999999999999972e-29 or 9.5000000000000003e40 < z Initial program 65.8%
associate-/r*73.7%
Simplified95.0%
+-commutative95.0%
fma-udef95.0%
div-inv95.0%
Applied egg-rr95.0%
Taylor expanded in t around inf 60.4%
associate-/l*56.2%
associate-/r/59.4%
Simplified59.4%
if -3.39999999999999972e-29 < z < 9.5000000000000003e40Initial program 92.9%
associate-*l*92.9%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in b around inf 54.2%
Final simplification56.7%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= z -1e-19) (* -4.0 (* t (/ a c))) (if (<= z 2e-61) (/ b (* z c)) (* a (* -4.0 (/ t c))))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1e-19) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 2e-61) {
tmp = b / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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-19)) then
tmp = (-4.0d0) * (t * (a / c))
else if (z <= 2d-61) then
tmp = b / (z * c)
else
tmp = a * ((-4.0d0) * (t / c))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1e-19) {
tmp = -4.0 * (t * (a / c));
} else if (z <= 2e-61) {
tmp = b / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -1e-19: tmp = -4.0 * (t * (a / c)) elif z <= 2e-61: tmp = b / (z * c) else: tmp = a * (-4.0 * (t / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -1e-19) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); elseif (z <= 2e-61) tmp = Float64(b / Float64(z * c)); else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -1e-19)
tmp = -4.0 * (t * (a / c));
elseif (z <= 2e-61)
tmp = b / (z * c);
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1e-19], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-61], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-19}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-61}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if z < -9.9999999999999998e-20Initial program 73.0%
associate-/r*80.4%
Simplified99.7%
+-commutative99.7%
fma-udef99.7%
div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in t around inf 59.9%
associate-/l*54.2%
associate-/r/57.1%
Simplified57.1%
if -9.9999999999999998e-20 < z < 2.0000000000000001e-61Initial program 94.0%
associate-*l*94.0%
associate-*l*91.4%
Simplified91.4%
Taylor expanded in b around inf 58.1%
if 2.0000000000000001e-61 < z Initial program 64.9%
associate-/r*69.3%
Simplified86.0%
Taylor expanded in z around inf 51.9%
associate-*r*51.9%
*-commutative51.9%
*-commutative51.9%
Simplified51.9%
*-commutative51.9%
*-un-lft-identity51.9%
times-frac50.3%
Applied egg-rr50.3%
add-log-exp31.8%
/-rgt-identity31.8%
*-commutative31.8%
exp-prod31.5%
Applied egg-rr31.5%
log-pow33.0%
rem-log-exp50.3%
associate-*l*50.3%
Simplified50.3%
Final simplification55.7%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= z -1.26e-21) (* (* t a) (/ -4.0 c)) (if (<= z 2.1e-61) (/ b (* z c)) (* a (* -4.0 (/ t c))))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.26e-21) {
tmp = (t * a) * (-4.0 / c);
} else if (z <= 2.1e-61) {
tmp = b / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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.26d-21)) then
tmp = (t * a) * ((-4.0d0) / c)
else if (z <= 2.1d-61) then
tmp = b / (z * c)
else
tmp = a * ((-4.0d0) * (t / c))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.26e-21) {
tmp = (t * a) * (-4.0 / c);
} else if (z <= 2.1e-61) {
tmp = b / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -1.26e-21: tmp = (t * a) * (-4.0 / c) elif z <= 2.1e-61: tmp = b / (z * c) else: tmp = a * (-4.0 * (t / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -1.26e-21) tmp = Float64(Float64(t * a) * Float64(-4.0 / c)); elseif (z <= 2.1e-61) tmp = Float64(b / Float64(z * c)); else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -1.26e-21)
tmp = (t * a) * (-4.0 / c);
elseif (z <= 2.1e-61)
tmp = b / (z * c);
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1.26e-21], N[(N[(t * a), $MachinePrecision] * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-61], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.26 \cdot 10^{-21}:\\
\;\;\;\;\left(t \cdot a\right) \cdot \frac{-4}{c}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-61}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if z < -1.26e-21Initial program 73.0%
associate-/r*80.4%
Simplified99.7%
clear-num99.6%
inv-pow99.6%
Applied egg-rr99.6%
Taylor expanded in z around inf 59.9%
associate-*r/59.9%
*-commutative59.9%
*-commutative59.9%
associate-*r/59.9%
*-commutative59.9%
Simplified59.9%
if -1.26e-21 < z < 2.0999999999999999e-61Initial program 94.0%
associate-*l*94.0%
associate-*l*91.4%
Simplified91.4%
Taylor expanded in b around inf 58.1%
if 2.0999999999999999e-61 < z Initial program 64.9%
associate-/r*69.3%
Simplified86.0%
Taylor expanded in z around inf 51.9%
associate-*r*51.9%
*-commutative51.9%
*-commutative51.9%
Simplified51.9%
*-commutative51.9%
*-un-lft-identity51.9%
times-frac50.3%
Applied egg-rr50.3%
add-log-exp31.8%
/-rgt-identity31.8%
*-commutative31.8%
exp-prod31.5%
Applied egg-rr31.5%
log-pow33.0%
rem-log-exp50.3%
associate-*l*50.3%
Simplified50.3%
Final simplification56.5%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= z -2.1e-18) (/ (* t (* a -4.0)) c) (if (<= z 1.35e-61) (/ b (* z c)) (* a (* -4.0 (/ t c))))))
assert(x < y);
assert(t < a);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.1e-18) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 1.35e-61) {
tmp = b / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
NOTE: t and a 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.1d-18)) then
tmp = (t * (a * (-4.0d0))) / c
else if (z <= 1.35d-61) then
tmp = b / (z * c)
else
tmp = a * ((-4.0d0) * (t / c))
end if
code = tmp
end function
assert x < y;
assert t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -2.1e-18) {
tmp = (t * (a * -4.0)) / c;
} else if (z <= 1.35e-61) {
tmp = b / (z * c);
} else {
tmp = a * (-4.0 * (t / c));
}
return tmp;
}
[x, y] = sort([x, y]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -2.1e-18: tmp = (t * (a * -4.0)) / c elif z <= 1.35e-61: tmp = b / (z * c) else: tmp = a * (-4.0 * (t / c)) return tmp
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -2.1e-18) tmp = Float64(Float64(t * Float64(a * -4.0)) / c); elseif (z <= 1.35e-61) tmp = Float64(b / Float64(z * c)); else tmp = Float64(a * Float64(-4.0 * Float64(t / c))); end return tmp end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -2.1e-18)
tmp = (t * (a * -4.0)) / c;
elseif (z <= 1.35e-61)
tmp = b / (z * c);
else
tmp = a * (-4.0 * (t / c));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2.1e-18], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1.35e-61], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-18}:\\
\;\;\;\;\frac{t \cdot \left(a \cdot -4\right)}{c}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-61}:\\
\;\;\;\;\frac{b}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
\end{array}
\end{array}
if z < -2.1e-18Initial program 73.0%
associate-/r*80.4%
Simplified99.7%
Taylor expanded in z around inf 59.9%
associate-*r*59.9%
*-commutative59.9%
*-commutative59.9%
Simplified59.9%
if -2.1e-18 < z < 1.34999999999999997e-61Initial program 94.0%
associate-*l*94.0%
associate-*l*91.4%
Simplified91.4%
Taylor expanded in b around inf 58.1%
if 1.34999999999999997e-61 < z Initial program 64.9%
associate-/r*69.3%
Simplified86.0%
Taylor expanded in z around inf 51.9%
associate-*r*51.9%
*-commutative51.9%
*-commutative51.9%
Simplified51.9%
*-commutative51.9%
*-un-lft-identity51.9%
times-frac50.3%
Applied egg-rr50.3%
add-log-exp31.8%
/-rgt-identity31.8%
*-commutative31.8%
exp-prod31.5%
Applied egg-rr31.5%
log-pow33.0%
rem-log-exp50.3%
associate-*l*50.3%
Simplified50.3%
Final simplification56.5%
NOTE: x and y should be sorted in increasing order before calling this function. NOTE: t and a 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);
assert(t < a);
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.
NOTE: t and a 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;
assert t < a;
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]) [t, a] = sort([t, a]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y = sort([x, y]) t, a = sort([t, a]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y = num2cell(sort([x, y])){:}
t, a = num2cell(sort([t, a])){:}
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. NOTE: t and a 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])\\
[t, a] = \mathsf{sort}([t, a])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 80.1%
associate-*l*80.1%
associate-*l*82.4%
Simplified82.4%
Taylor expanded in b around inf 38.5%
Final simplification38.5%
(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 2023224
(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)))