
(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 18 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}
(FPCore (x y z t a b c) :precision binary64 (if (or (<= c -4e-27) (not (<= c 8e-15))) (+ (* (/ a (/ c t)) -4.0) (/ (- (/ b c) (* -9.0 (* x (/ y c)))) z)) (* (fma t (* a -4.0) (/ (fma x (* y 9.0) b) z)) (/ 1.0 c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((c <= -4e-27) || !(c <= 8e-15)) {
tmp = ((a / (c / t)) * -4.0) + (((b / c) - (-9.0 * (x * (y / c)))) / z);
} else {
tmp = fma(t, (a * -4.0), (fma(x, (y * 9.0), b) / z)) * (1.0 / c);
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((c <= -4e-27) || !(c <= 8e-15)) tmp = Float64(Float64(Float64(a / Float64(c / t)) * -4.0) + Float64(Float64(Float64(b / c) - Float64(-9.0 * Float64(x * Float64(y / c)))) / z)); else tmp = Float64(fma(t, Float64(a * -4.0), Float64(fma(x, Float64(y * 9.0), b) / z)) * Float64(1.0 / c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[c, -4e-27], N[Not[LessEqual[c, 8e-15]], $MachinePrecision]], N[(N[(N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision] + N[(N[(N[(b / c), $MachinePrecision] - N[(-9.0 * N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(t * N[(a * -4.0), $MachinePrecision] + N[(N[(x * N[(y * 9.0), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4 \cdot 10^{-27} \lor \neg \left(c \leq 8 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{a}{\frac{c}{t}} \cdot -4 + \frac{\frac{b}{c} - -9 \cdot \left(x \cdot \frac{y}{c}\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, a \cdot -4, \frac{\mathsf{fma}\left(x, y \cdot 9, b\right)}{z}\right) \cdot \frac{1}{c}\\
\end{array}
\end{array}
if c < -4.0000000000000002e-27 or 8.0000000000000006e-15 < c Initial program 67.0%
associate-*l*67.0%
associate-*l*66.8%
Simplified66.8%
Taylor expanded in x around 0 77.4%
associate--l+77.4%
associate-/r*81.2%
times-frac83.3%
Simplified83.3%
Taylor expanded in z around -inf 83.1%
+-commutative83.1%
mul-1-neg83.1%
unsub-neg83.1%
*-commutative83.1%
associate-/l*89.4%
neg-mul-189.4%
unsub-neg89.4%
*-commutative89.4%
associate-*r/94.0%
Simplified94.0%
if -4.0000000000000002e-27 < c < 8.0000000000000006e-15Initial program 90.4%
associate-/r*92.8%
Simplified95.3%
div-inv95.2%
+-commutative95.2%
fma-def98.1%
Applied egg-rr98.1%
Final simplification95.7%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= c -5e-29) (not (<= c 1e+15))) (+ (* (/ a (/ c t)) -4.0) (/ (- (/ b c) (* -9.0 (* x (/ y c)))) z)) (/ (+ (/ (fma x (* y 9.0) b) z) (* t (* a -4.0))) c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((c <= -5e-29) || !(c <= 1e+15)) {
tmp = ((a / (c / t)) * -4.0) + (((b / c) - (-9.0 * (x * (y / c)))) / z);
} else {
tmp = ((fma(x, (y * 9.0), b) / z) + (t * (a * -4.0))) / c;
}
return tmp;
}
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((c <= -5e-29) || !(c <= 1e+15)) tmp = Float64(Float64(Float64(a / Float64(c / t)) * -4.0) + Float64(Float64(Float64(b / c) - Float64(-9.0 * Float64(x * Float64(y / c)))) / z)); else tmp = Float64(Float64(Float64(fma(x, Float64(y * 9.0), b) / z) + Float64(t * Float64(a * -4.0))) / c); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[c, -5e-29], N[Not[LessEqual[c, 1e+15]], $MachinePrecision]], N[(N[(N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision] + N[(N[(N[(b / c), $MachinePrecision] - N[(-9.0 * N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(x * N[(y * 9.0), $MachinePrecision] + b), $MachinePrecision] / z), $MachinePrecision] + N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -5 \cdot 10^{-29} \lor \neg \left(c \leq 10^{+15}\right):\\
\;\;\;\;\frac{a}{\frac{c}{t}} \cdot -4 + \frac{\frac{b}{c} - -9 \cdot \left(x \cdot \frac{y}{c}\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x, y \cdot 9, b\right)}{z} + t \cdot \left(a \cdot -4\right)}{c}\\
\end{array}
\end{array}
if c < -4.99999999999999986e-29 or 1e15 < c Initial program 66.3%
associate-*l*66.3%
associate-*l*66.1%
Simplified66.1%
Taylor expanded in x around 0 76.5%
associate--l+76.5%
associate-/r*80.4%
times-frac82.6%
Simplified82.6%
Taylor expanded in z around -inf 82.4%
+-commutative82.4%
mul-1-neg82.4%
unsub-neg82.4%
*-commutative82.4%
associate-/l*89.0%
neg-mul-189.0%
unsub-neg89.0%
*-commutative89.0%
associate-*r/93.8%
Simplified93.8%
if -4.99999999999999986e-29 < c < 1e15Initial program 90.0%
associate-/r*92.4%
Simplified95.5%
Final simplification94.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* x (* y 9.0)))
(t_2 (/ (- b (- (* (* z 4.0) (* a t)) t_1)) (* c z)))
(t_3 (* t (* a -4.0))))
(if (<= z -6.5e+57)
(/ (+ t_3 (/ (* x 9.0) (/ z y))) c)
(if (<= z 4e-241)
t_2
(if (<= z 6.8e-94)
(/ (+ (/ b c) (/ t_1 c)) z)
(if (<= z 2.1e+135) t_2 (/ (+ t_3 (/ b z)) c)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = x * (y * 9.0);
double t_2 = (b - (((z * 4.0) * (a * t)) - t_1)) / (c * z);
double t_3 = t * (a * -4.0);
double tmp;
if (z <= -6.5e+57) {
tmp = (t_3 + ((x * 9.0) / (z / y))) / c;
} else if (z <= 4e-241) {
tmp = t_2;
} else if (z <= 6.8e-94) {
tmp = ((b / c) + (t_1 / c)) / z;
} else if (z <= 2.1e+135) {
tmp = t_2;
} else {
tmp = (t_3 + (b / z)) / c;
}
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) :: tmp
t_1 = x * (y * 9.0d0)
t_2 = (b - (((z * 4.0d0) * (a * t)) - t_1)) / (c * z)
t_3 = t * (a * (-4.0d0))
if (z <= (-6.5d+57)) then
tmp = (t_3 + ((x * 9.0d0) / (z / y))) / c
else if (z <= 4d-241) then
tmp = t_2
else if (z <= 6.8d-94) then
tmp = ((b / c) + (t_1 / c)) / z
else if (z <= 2.1d+135) then
tmp = t_2
else
tmp = (t_3 + (b / z)) / c
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 = x * (y * 9.0);
double t_2 = (b - (((z * 4.0) * (a * t)) - t_1)) / (c * z);
double t_3 = t * (a * -4.0);
double tmp;
if (z <= -6.5e+57) {
tmp = (t_3 + ((x * 9.0) / (z / y))) / c;
} else if (z <= 4e-241) {
tmp = t_2;
} else if (z <= 6.8e-94) {
tmp = ((b / c) + (t_1 / c)) / z;
} else if (z <= 2.1e+135) {
tmp = t_2;
} else {
tmp = (t_3 + (b / z)) / c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = x * (y * 9.0) t_2 = (b - (((z * 4.0) * (a * t)) - t_1)) / (c * z) t_3 = t * (a * -4.0) tmp = 0 if z <= -6.5e+57: tmp = (t_3 + ((x * 9.0) / (z / y))) / c elif z <= 4e-241: tmp = t_2 elif z <= 6.8e-94: tmp = ((b / c) + (t_1 / c)) / z elif z <= 2.1e+135: tmp = t_2 else: tmp = (t_3 + (b / z)) / c return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(x * Float64(y * 9.0)) t_2 = Float64(Float64(b - Float64(Float64(Float64(z * 4.0) * Float64(a * t)) - t_1)) / Float64(c * z)) t_3 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (z <= -6.5e+57) tmp = Float64(Float64(t_3 + Float64(Float64(x * 9.0) / Float64(z / y))) / c); elseif (z <= 4e-241) tmp = t_2; elseif (z <= 6.8e-94) tmp = Float64(Float64(Float64(b / c) + Float64(t_1 / c)) / z); elseif (z <= 2.1e+135) tmp = t_2; else tmp = Float64(Float64(t_3 + Float64(b / z)) / c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = x * (y * 9.0); t_2 = (b - (((z * 4.0) * (a * t)) - t_1)) / (c * z); t_3 = t * (a * -4.0); tmp = 0.0; if (z <= -6.5e+57) tmp = (t_3 + ((x * 9.0) / (z / y))) / c; elseif (z <= 4e-241) tmp = t_2; elseif (z <= 6.8e-94) tmp = ((b / c) + (t_1 / c)) / z; elseif (z <= 2.1e+135) tmp = t_2; else tmp = (t_3 + (b / z)) / c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - N[(N[(N[(z * 4.0), $MachinePrecision] * N[(a * t), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+57], N[(N[(t$95$3 + N[(N[(x * 9.0), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 4e-241], t$95$2, If[LessEqual[z, 6.8e-94], N[(N[(N[(b / c), $MachinePrecision] + N[(t$95$1 / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 2.1e+135], t$95$2, N[(N[(t$95$3 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot 9\right)\\
t_2 := \frac{b - \left(\left(z \cdot 4\right) \cdot \left(a \cdot t\right) - t_1\right)}{c \cdot z}\\
t_3 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+57}:\\
\;\;\;\;\frac{t_3 + \frac{x \cdot 9}{\frac{z}{y}}}{c}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-241}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-94}:\\
\;\;\;\;\frac{\frac{b}{c} + \frac{t_1}{c}}{z}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+135}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{t_3 + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if z < -6.4999999999999997e57Initial program 51.4%
associate-/r*62.6%
Simplified78.7%
Taylor expanded in x around inf 66.4%
associate-*r/66.4%
associate-*r*66.4%
*-commutative66.4%
associate-*r*66.4%
associate-/l*73.4%
*-commutative73.4%
Simplified73.4%
if -6.4999999999999997e57 < z < 3.9999999999999999e-241 or 6.7999999999999996e-94 < z < 2.1000000000000001e135Initial program 92.0%
associate-*l*92.0%
associate-*l*89.1%
Simplified89.1%
if 3.9999999999999999e-241 < z < 6.7999999999999996e-94Initial program 89.6%
associate-*l*89.6%
associate-*l*82.1%
Simplified82.1%
Taylor expanded in x around 0 66.2%
associate--l+66.2%
associate-/r*77.1%
times-frac77.3%
Simplified77.3%
Taylor expanded in z around 0 99.7%
associate-*r/99.7%
associate-*r*99.7%
Simplified99.7%
if 2.1000000000000001e135 < z Initial program 53.1%
associate-/r*58.4%
Simplified90.7%
Taylor expanded in x around 0 86.1%
Final simplification86.4%
(FPCore (x y z t a b c) :precision binary64 (if (or (<= c -1.15e-23) (not (<= c 9.5e-15))) (+ (* (/ a (/ c t)) -4.0) (/ (- (/ b c) (* -9.0 (* x (/ y c)))) z)) (/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c z))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((c <= -1.15e-23) || !(c <= 9.5e-15)) {
tmp = ((a / (c / t)) * -4.0) + (((b / c) - (-9.0 * (x * (y / c)))) / z);
} else {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c * z);
}
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) :: tmp
if ((c <= (-1.15d-23)) .or. (.not. (c <= 9.5d-15))) then
tmp = ((a / (c / t)) * (-4.0d0)) + (((b / c) - ((-9.0d0) * (x * (y / c)))) / z)
else
tmp = (b + ((y * (x * 9.0d0)) - (a * (t * (z * 4.0d0))))) / (c * z)
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 tmp;
if ((c <= -1.15e-23) || !(c <= 9.5e-15)) {
tmp = ((a / (c / t)) * -4.0) + (((b / c) - (-9.0 * (x * (y / c)))) / z);
} else {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c * z);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if (c <= -1.15e-23) or not (c <= 9.5e-15): tmp = ((a / (c / t)) * -4.0) + (((b / c) - (-9.0 * (x * (y / c)))) / z) else: tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c * z) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if ((c <= -1.15e-23) || !(c <= 9.5e-15)) tmp = Float64(Float64(Float64(a / Float64(c / t)) * -4.0) + Float64(Float64(Float64(b / c) - Float64(-9.0 * Float64(x * Float64(y / c)))) / z)); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if ((c <= -1.15e-23) || ~((c <= 9.5e-15))) tmp = ((a / (c / t)) * -4.0) + (((b / c) - (-9.0 * (x * (y / c)))) / z); else tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[c, -1.15e-23], N[Not[LessEqual[c, 9.5e-15]], $MachinePrecision]], N[(N[(N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision] + N[(N[(N[(b / c), $MachinePrecision] - N[(-9.0 * N[(x * N[(y / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.15 \cdot 10^{-23} \lor \neg \left(c \leq 9.5 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{a}{\frac{c}{t}} \cdot -4 + \frac{\frac{b}{c} - -9 \cdot \left(x \cdot \frac{y}{c}\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c \cdot z}\\
\end{array}
\end{array}
if c < -1.15000000000000005e-23 or 9.5000000000000005e-15 < c Initial program 66.6%
associate-*l*66.6%
associate-*l*66.4%
Simplified66.4%
Taylor expanded in x around 0 77.1%
associate--l+77.1%
associate-/r*81.0%
times-frac83.1%
Simplified83.1%
Taylor expanded in z around -inf 82.9%
+-commutative82.9%
mul-1-neg82.9%
unsub-neg82.9%
*-commutative82.9%
associate-/l*89.3%
neg-mul-189.3%
unsub-neg89.3%
*-commutative89.3%
associate-*r/93.9%
Simplified93.9%
if -1.15000000000000005e-23 < c < 9.5000000000000005e-15Initial program 90.6%
Final simplification92.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (* (/ y z) (/ x c)))))
(if (<= b -1.02e+133)
(/ (/ b c) z)
(if (<= b -5.1e-98)
(* (* a t) (/ -4.0 c))
(if (<= b -6.2e-242)
t_1
(if (<= b -8.5e-274)
(* (/ a (/ c t)) -4.0)
(if (<= b 2e-118)
t_1
(if (<= b 3.8e-49)
(/ -4.0 (/ c (* a t)))
(if (<= b 5.8e+121)
(* 9.0 (* (/ y c) (/ x z)))
(/ b (* c z)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * ((y / z) * (x / c));
double tmp;
if (b <= -1.02e+133) {
tmp = (b / c) / z;
} else if (b <= -5.1e-98) {
tmp = (a * t) * (-4.0 / c);
} else if (b <= -6.2e-242) {
tmp = t_1;
} else if (b <= -8.5e-274) {
tmp = (a / (c / t)) * -4.0;
} else if (b <= 2e-118) {
tmp = t_1;
} else if (b <= 3.8e-49) {
tmp = -4.0 / (c / (a * t));
} else if (b <= 5.8e+121) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = b / (c * z);
}
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) :: tmp
t_1 = 9.0d0 * ((y / z) * (x / c))
if (b <= (-1.02d+133)) then
tmp = (b / c) / z
else if (b <= (-5.1d-98)) then
tmp = (a * t) * ((-4.0d0) / c)
else if (b <= (-6.2d-242)) then
tmp = t_1
else if (b <= (-8.5d-274)) then
tmp = (a / (c / t)) * (-4.0d0)
else if (b <= 2d-118) then
tmp = t_1
else if (b <= 3.8d-49) then
tmp = (-4.0d0) / (c / (a * t))
else if (b <= 5.8d+121) then
tmp = 9.0d0 * ((y / c) * (x / z))
else
tmp = b / (c * z)
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 = 9.0 * ((y / z) * (x / c));
double tmp;
if (b <= -1.02e+133) {
tmp = (b / c) / z;
} else if (b <= -5.1e-98) {
tmp = (a * t) * (-4.0 / c);
} else if (b <= -6.2e-242) {
tmp = t_1;
} else if (b <= -8.5e-274) {
tmp = (a / (c / t)) * -4.0;
} else if (b <= 2e-118) {
tmp = t_1;
} else if (b <= 3.8e-49) {
tmp = -4.0 / (c / (a * t));
} else if (b <= 5.8e+121) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = b / (c * z);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 9.0 * ((y / z) * (x / c)) tmp = 0 if b <= -1.02e+133: tmp = (b / c) / z elif b <= -5.1e-98: tmp = (a * t) * (-4.0 / c) elif b <= -6.2e-242: tmp = t_1 elif b <= -8.5e-274: tmp = (a / (c / t)) * -4.0 elif b <= 2e-118: tmp = t_1 elif b <= 3.8e-49: tmp = -4.0 / (c / (a * t)) elif b <= 5.8e+121: tmp = 9.0 * ((y / c) * (x / z)) else: tmp = b / (c * z) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))) tmp = 0.0 if (b <= -1.02e+133) tmp = Float64(Float64(b / c) / z); elseif (b <= -5.1e-98) tmp = Float64(Float64(a * t) * Float64(-4.0 / c)); elseif (b <= -6.2e-242) tmp = t_1; elseif (b <= -8.5e-274) tmp = Float64(Float64(a / Float64(c / t)) * -4.0); elseif (b <= 2e-118) tmp = t_1; elseif (b <= 3.8e-49) tmp = Float64(-4.0 / Float64(c / Float64(a * t))); elseif (b <= 5.8e+121) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); else tmp = Float64(b / Float64(c * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 9.0 * ((y / z) * (x / c)); tmp = 0.0; if (b <= -1.02e+133) tmp = (b / c) / z; elseif (b <= -5.1e-98) tmp = (a * t) * (-4.0 / c); elseif (b <= -6.2e-242) tmp = t_1; elseif (b <= -8.5e-274) tmp = (a / (c / t)) * -4.0; elseif (b <= 2e-118) tmp = t_1; elseif (b <= 3.8e-49) tmp = -4.0 / (c / (a * t)); elseif (b <= 5.8e+121) tmp = 9.0 * ((y / c) * (x / z)); else tmp = b / (c * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.02e+133], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, -5.1e-98], N[(N[(a * t), $MachinePrecision] * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -6.2e-242], t$95$1, If[LessEqual[b, -8.5e-274], N[(N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[b, 2e-118], t$95$1, If[LessEqual[b, 3.8e-49], N[(-4.0 / N[(c / N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.8e+121], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{if}\;b \leq -1.02 \cdot 10^{+133}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;b \leq -5.1 \cdot 10^{-98}:\\
\;\;\;\;\left(a \cdot t\right) \cdot \frac{-4}{c}\\
\mathbf{elif}\;b \leq -6.2 \cdot 10^{-242}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -8.5 \cdot 10^{-274}:\\
\;\;\;\;\frac{a}{\frac{c}{t}} \cdot -4\\
\mathbf{elif}\;b \leq 2 \cdot 10^{-118}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 3.8 \cdot 10^{-49}:\\
\;\;\;\;\frac{-4}{\frac{c}{a \cdot t}}\\
\mathbf{elif}\;b \leq 5.8 \cdot 10^{+121}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\end{array}
\end{array}
if b < -1.02e133Initial program 76.6%
associate-*l*76.6%
associate-*l*70.9%
Simplified70.9%
Taylor expanded in b around inf 70.2%
associate-/r*82.8%
Simplified82.8%
if -1.02e133 < b < -5.10000000000000022e-98Initial program 78.7%
associate-*l*78.7%
associate-*l*81.4%
Simplified81.4%
Taylor expanded in z around inf 50.6%
*-commutative50.6%
associate-*r/50.6%
associate-/l*50.6%
*-commutative50.6%
Simplified50.6%
associate-/r/50.7%
Applied egg-rr50.7%
if -5.10000000000000022e-98 < b < -6.20000000000000031e-242 or -8.49999999999999978e-274 < b < 1.99999999999999997e-118Initial program 78.3%
associate-/r*78.3%
Simplified84.7%
div-inv84.6%
+-commutative84.6%
fma-def85.9%
Applied egg-rr85.9%
Taylor expanded in x around inf 57.4%
associate-*r/57.4%
*-commutative57.4%
associate-*r/57.4%
times-frac59.0%
Simplified59.0%
if -6.20000000000000031e-242 < b < -8.49999999999999978e-274Initial program 56.4%
associate-/r*57.9%
Simplified68.5%
div-inv68.5%
+-commutative68.5%
fma-def68.5%
Applied egg-rr68.5%
Taylor expanded in t around inf 47.1%
associate-/l*67.8%
Simplified67.8%
if 1.99999999999999997e-118 < b < 3.7999999999999997e-49Initial program 54.9%
associate-*l*54.9%
associate-*l*84.6%
Simplified84.6%
Taylor expanded in z around inf 77.4%
*-commutative77.4%
associate-*r/77.4%
associate-/l*77.4%
*-commutative77.4%
Simplified77.4%
if 3.7999999999999997e-49 < b < 5.7999999999999998e121Initial program 79.9%
associate-*l*79.9%
associate-*l*77.4%
Simplified77.4%
Taylor expanded in x around inf 57.6%
times-frac59.6%
Simplified59.6%
if 5.7999999999999998e121 < b Initial program 80.4%
associate-*l*80.4%
associate-*l*78.4%
Simplified78.4%
Taylor expanded in b around inf 64.5%
Final simplification63.0%
(FPCore (x y z t a b c)
:precision binary64
(if (<= b -3.1e+133)
(/ (/ b c) z)
(if (<= b -7.5e-94)
(* (* a t) (/ -4.0 c))
(if (<= b -1.85e-239)
(* 9.0 (* (/ y z) (/ x c)))
(if (<= b -8.2e-274)
(* (/ a (/ c t)) -4.0)
(if (<= b 8.6e-122)
(* 9.0 (* (/ 1.0 c) (* x (/ y z))))
(if (<= b 2.8e-49)
(/ -4.0 (/ c (* a t)))
(if (<= b 5.6e+121)
(* 9.0 (* (/ y c) (/ x z)))
(/ b (* c z))))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -3.1e+133) {
tmp = (b / c) / z;
} else if (b <= -7.5e-94) {
tmp = (a * t) * (-4.0 / c);
} else if (b <= -1.85e-239) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (b <= -8.2e-274) {
tmp = (a / (c / t)) * -4.0;
} else if (b <= 8.6e-122) {
tmp = 9.0 * ((1.0 / c) * (x * (y / z)));
} else if (b <= 2.8e-49) {
tmp = -4.0 / (c / (a * t));
} else if (b <= 5.6e+121) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = b / (c * z);
}
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) :: tmp
if (b <= (-3.1d+133)) then
tmp = (b / c) / z
else if (b <= (-7.5d-94)) then
tmp = (a * t) * ((-4.0d0) / c)
else if (b <= (-1.85d-239)) then
tmp = 9.0d0 * ((y / z) * (x / c))
else if (b <= (-8.2d-274)) then
tmp = (a / (c / t)) * (-4.0d0)
else if (b <= 8.6d-122) then
tmp = 9.0d0 * ((1.0d0 / c) * (x * (y / z)))
else if (b <= 2.8d-49) then
tmp = (-4.0d0) / (c / (a * t))
else if (b <= 5.6d+121) then
tmp = 9.0d0 * ((y / c) * (x / z))
else
tmp = b / (c * z)
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 tmp;
if (b <= -3.1e+133) {
tmp = (b / c) / z;
} else if (b <= -7.5e-94) {
tmp = (a * t) * (-4.0 / c);
} else if (b <= -1.85e-239) {
tmp = 9.0 * ((y / z) * (x / c));
} else if (b <= -8.2e-274) {
tmp = (a / (c / t)) * -4.0;
} else if (b <= 8.6e-122) {
tmp = 9.0 * ((1.0 / c) * (x * (y / z)));
} else if (b <= 2.8e-49) {
tmp = -4.0 / (c / (a * t));
} else if (b <= 5.6e+121) {
tmp = 9.0 * ((y / c) * (x / z));
} else {
tmp = b / (c * z);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -3.1e+133: tmp = (b / c) / z elif b <= -7.5e-94: tmp = (a * t) * (-4.0 / c) elif b <= -1.85e-239: tmp = 9.0 * ((y / z) * (x / c)) elif b <= -8.2e-274: tmp = (a / (c / t)) * -4.0 elif b <= 8.6e-122: tmp = 9.0 * ((1.0 / c) * (x * (y / z))) elif b <= 2.8e-49: tmp = -4.0 / (c / (a * t)) elif b <= 5.6e+121: tmp = 9.0 * ((y / c) * (x / z)) else: tmp = b / (c * z) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -3.1e+133) tmp = Float64(Float64(b / c) / z); elseif (b <= -7.5e-94) tmp = Float64(Float64(a * t) * Float64(-4.0 / c)); elseif (b <= -1.85e-239) tmp = Float64(9.0 * Float64(Float64(y / z) * Float64(x / c))); elseif (b <= -8.2e-274) tmp = Float64(Float64(a / Float64(c / t)) * -4.0); elseif (b <= 8.6e-122) tmp = Float64(9.0 * Float64(Float64(1.0 / c) * Float64(x * Float64(y / z)))); elseif (b <= 2.8e-49) tmp = Float64(-4.0 / Float64(c / Float64(a * t))); elseif (b <= 5.6e+121) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); else tmp = Float64(b / Float64(c * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -3.1e+133) tmp = (b / c) / z; elseif (b <= -7.5e-94) tmp = (a * t) * (-4.0 / c); elseif (b <= -1.85e-239) tmp = 9.0 * ((y / z) * (x / c)); elseif (b <= -8.2e-274) tmp = (a / (c / t)) * -4.0; elseif (b <= 8.6e-122) tmp = 9.0 * ((1.0 / c) * (x * (y / z))); elseif (b <= 2.8e-49) tmp = -4.0 / (c / (a * t)); elseif (b <= 5.6e+121) tmp = 9.0 * ((y / c) * (x / z)); else tmp = b / (c * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -3.1e+133], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, -7.5e-94], N[(N[(a * t), $MachinePrecision] * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.85e-239], N[(9.0 * N[(N[(y / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -8.2e-274], N[(N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[b, 8.6e-122], N[(9.0 * N[(N[(1.0 / c), $MachinePrecision] * N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.8e-49], N[(-4.0 / N[(c / N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.6e+121], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.1 \cdot 10^{+133}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;b \leq -7.5 \cdot 10^{-94}:\\
\;\;\;\;\left(a \cdot t\right) \cdot \frac{-4}{c}\\
\mathbf{elif}\;b \leq -1.85 \cdot 10^{-239}:\\
\;\;\;\;9 \cdot \left(\frac{y}{z} \cdot \frac{x}{c}\right)\\
\mathbf{elif}\;b \leq -8.2 \cdot 10^{-274}:\\
\;\;\;\;\frac{a}{\frac{c}{t}} \cdot -4\\
\mathbf{elif}\;b \leq 8.6 \cdot 10^{-122}:\\
\;\;\;\;9 \cdot \left(\frac{1}{c} \cdot \left(x \cdot \frac{y}{z}\right)\right)\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{-49}:\\
\;\;\;\;\frac{-4}{\frac{c}{a \cdot t}}\\
\mathbf{elif}\;b \leq 5.6 \cdot 10^{+121}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\end{array}
\end{array}
if b < -3.1e133Initial program 76.6%
associate-*l*76.6%
associate-*l*70.9%
Simplified70.9%
Taylor expanded in b around inf 70.2%
associate-/r*82.8%
Simplified82.8%
if -3.1e133 < b < -7.5000000000000003e-94Initial program 78.7%
associate-*l*78.7%
associate-*l*81.4%
Simplified81.4%
Taylor expanded in z around inf 50.6%
*-commutative50.6%
associate-*r/50.6%
associate-/l*50.6%
*-commutative50.6%
Simplified50.6%
associate-/r/50.7%
Applied egg-rr50.7%
if -7.5000000000000003e-94 < b < -1.85000000000000008e-239Initial program 84.0%
associate-/r*86.6%
Simplified83.2%
div-inv83.2%
+-commutative83.2%
fma-def86.7%
Applied egg-rr86.7%
Taylor expanded in x around inf 61.6%
associate-*r/61.7%
*-commutative61.7%
associate-*r/61.6%
times-frac63.0%
Simplified63.0%
if -1.85000000000000008e-239 < b < -8.19999999999999975e-274Initial program 56.4%
associate-/r*57.9%
Simplified68.5%
div-inv68.5%
+-commutative68.5%
fma-def68.5%
Applied egg-rr68.5%
Taylor expanded in t around inf 47.1%
associate-/l*67.8%
Simplified67.8%
if -8.19999999999999975e-274 < b < 8.60000000000000037e-122Initial program 74.7%
associate-/r*73.2%
Simplified85.6%
div-inv85.4%
+-commutative85.4%
fma-def85.4%
Applied egg-rr85.4%
Taylor expanded in x around inf 57.0%
associate-*r/60.8%
Simplified60.8%
un-div-inv60.9%
Applied egg-rr60.9%
div-inv60.8%
inv-pow60.8%
Applied egg-rr60.8%
associate-*l*60.9%
*-commutative60.9%
unpow-160.9%
associate-*r/57.0%
associate-/l*60.9%
associate-/r/58.9%
Simplified58.9%
if 8.60000000000000037e-122 < b < 2.79999999999999997e-49Initial program 54.9%
associate-*l*54.9%
associate-*l*84.6%
Simplified84.6%
Taylor expanded in z around inf 77.4%
*-commutative77.4%
associate-*r/77.4%
associate-/l*77.4%
*-commutative77.4%
Simplified77.4%
if 2.79999999999999997e-49 < b < 5.60000000000000012e121Initial program 79.9%
associate-*l*79.9%
associate-*l*77.4%
Simplified77.4%
Taylor expanded in x around inf 57.6%
times-frac59.6%
Simplified59.6%
if 5.60000000000000012e121 < b Initial program 80.4%
associate-*l*80.4%
associate-*l*78.4%
Simplified78.4%
Taylor expanded in b around inf 64.5%
Final simplification63.5%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= z -3e+52)
(/ (+ t_1 (/ (* x 9.0) (/ z y))) c)
(if (<= z 2.7e+112)
(/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* c z))
(/ (+ t_1 (/ b z)) c)))))
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 (z <= -3e+52) {
tmp = (t_1 + ((x * 9.0) / (z / y))) / c;
} else if (z <= 2.7e+112) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c * z);
} else {
tmp = (t_1 + (b / z)) / c;
}
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) :: tmp
t_1 = t * (a * (-4.0d0))
if (z <= (-3d+52)) then
tmp = (t_1 + ((x * 9.0d0) / (z / y))) / c
else if (z <= 2.7d+112) then
tmp = (b + ((y * (x * 9.0d0)) - (a * (t * (z * 4.0d0))))) / (c * z)
else
tmp = (t_1 + (b / z)) / c
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 = t * (a * -4.0);
double tmp;
if (z <= -3e+52) {
tmp = (t_1 + ((x * 9.0) / (z / y))) / c;
} else if (z <= 2.7e+112) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c * z);
} else {
tmp = (t_1 + (b / z)) / c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = t * (a * -4.0) tmp = 0 if z <= -3e+52: tmp = (t_1 + ((x * 9.0) / (z / y))) / c elif z <= 2.7e+112: tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c * z) else: tmp = (t_1 + (b / z)) / c return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (z <= -3e+52) tmp = Float64(Float64(t_1 + Float64(Float64(x * 9.0) / Float64(z / y))) / c); elseif (z <= 2.7e+112) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(c * z)); else tmp = Float64(Float64(t_1 + Float64(b / z)) / c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = t * (a * -4.0); tmp = 0.0; if (z <= -3e+52) tmp = (t_1 + ((x * 9.0) / (z / y))) / c; elseif (z <= 2.7e+112) tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (c * z); else tmp = (t_1 + (b / z)) / c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e+52], N[(N[(t$95$1 + N[(N[(x * 9.0), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 2.7e+112], N[(N[(b + N[(N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;z \leq -3 \cdot 10^{+52}:\\
\;\;\;\;\frac{t_1 + \frac{x \cdot 9}{\frac{z}{y}}}{c}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+112}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1 + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if z < -3e52Initial program 50.5%
associate-/r*61.5%
Simplified79.1%
Taylor expanded in x around inf 67.0%
associate-*r/67.0%
associate-*r*67.0%
*-commutative67.0%
associate-*r*67.0%
associate-/l*73.9%
*-commutative73.9%
Simplified73.9%
if -3e52 < z < 2.7000000000000001e112Initial program 93.2%
if 2.7000000000000001e112 < z Initial program 53.0%
associate-/r*57.8%
Simplified91.5%
Taylor expanded in x around 0 85.2%
Final simplification87.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (* t (* a -4.0)) (/ b z)) c)))
(if (<= z -1.65e+114)
t_1
(if (<= z -6e+44)
(* 9.0 (* (/ y c) (/ x z)))
(if (or (<= z -5.4e-58) (not (<= z 1.02e-33)))
t_1
(/ (+ (/ b c) (/ (* x (* y 9.0)) c)) z))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -1.65e+114) {
tmp = t_1;
} else if (z <= -6e+44) {
tmp = 9.0 * ((y / c) * (x / z));
} else if ((z <= -5.4e-58) || !(z <= 1.02e-33)) {
tmp = t_1;
} else {
tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z;
}
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) :: tmp
t_1 = ((t * (a * (-4.0d0))) + (b / z)) / c
if (z <= (-1.65d+114)) then
tmp = t_1
else if (z <= (-6d+44)) then
tmp = 9.0d0 * ((y / c) * (x / z))
else if ((z <= (-5.4d-58)) .or. (.not. (z <= 1.02d-33))) then
tmp = t_1
else
tmp = ((b / c) + ((x * (y * 9.0d0)) / c)) / z
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 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -1.65e+114) {
tmp = t_1;
} else if (z <= -6e+44) {
tmp = 9.0 * ((y / c) * (x / z));
} else if ((z <= -5.4e-58) || !(z <= 1.02e-33)) {
tmp = t_1;
} else {
tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((t * (a * -4.0)) + (b / z)) / c tmp = 0 if z <= -1.65e+114: tmp = t_1 elif z <= -6e+44: tmp = 9.0 * ((y / c) * (x / z)) elif (z <= -5.4e-58) or not (z <= 1.02e-33): tmp = t_1 else: tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c) tmp = 0.0 if (z <= -1.65e+114) tmp = t_1; elseif (z <= -6e+44) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); elseif ((z <= -5.4e-58) || !(z <= 1.02e-33)) tmp = t_1; else tmp = Float64(Float64(Float64(b / c) + Float64(Float64(x * Float64(y * 9.0)) / c)) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((t * (a * -4.0)) + (b / z)) / c; tmp = 0.0; if (z <= -1.65e+114) tmp = t_1; elseif (z <= -6e+44) tmp = 9.0 * ((y / c) * (x / z)); elseif ((z <= -5.4e-58) || ~((z <= 1.02e-33))) tmp = t_1; else tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.65e+114], t$95$1, If[LessEqual[z, -6e+44], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -5.4e-58], N[Not[LessEqual[z, 1.02e-33]], $MachinePrecision]], t$95$1, N[(N[(N[(b / c), $MachinePrecision] + N[(N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6 \cdot 10^{+44}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;z \leq -5.4 \cdot 10^{-58} \lor \neg \left(z \leq 1.02 \cdot 10^{-33}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c} + \frac{x \cdot \left(y \cdot 9\right)}{c}}{z}\\
\end{array}
\end{array}
if z < -1.65e114 or -5.99999999999999974e44 < z < -5.3999999999999998e-58 or 1.02e-33 < z Initial program 63.6%
associate-/r*69.6%
Simplified88.0%
Taylor expanded in x around 0 76.7%
if -1.65e114 < z < -5.99999999999999974e44Initial program 63.0%
associate-*l*63.0%
associate-*l*70.5%
Simplified70.5%
Taylor expanded in x around inf 48.6%
times-frac70.2%
Simplified70.2%
if -5.3999999999999998e-58 < z < 1.02e-33Initial program 95.5%
associate-*l*95.5%
associate-*l*87.3%
Simplified87.3%
Taylor expanded in x around 0 69.3%
associate--l+69.3%
associate-/r*72.9%
times-frac70.4%
Simplified70.4%
Taylor expanded in z around 0 84.2%
associate-*r/84.1%
associate-*r*84.2%
Simplified84.2%
Final simplification79.4%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (* t (* a -4.0)) (/ b z)) c)))
(if (<= z -2.05e+116)
t_1
(if (<= z -122.0)
(/ (+ (/ b z) (* 9.0 (/ y (/ z x)))) c)
(if (or (<= z -1.55e-57) (not (<= z 1.02e-33)))
t_1
(/ (+ (/ b c) (/ (* x (* y 9.0)) c)) z))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -2.05e+116) {
tmp = t_1;
} else if (z <= -122.0) {
tmp = ((b / z) + (9.0 * (y / (z / x)))) / c;
} else if ((z <= -1.55e-57) || !(z <= 1.02e-33)) {
tmp = t_1;
} else {
tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z;
}
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) :: tmp
t_1 = ((t * (a * (-4.0d0))) + (b / z)) / c
if (z <= (-2.05d+116)) then
tmp = t_1
else if (z <= (-122.0d0)) then
tmp = ((b / z) + (9.0d0 * (y / (z / x)))) / c
else if ((z <= (-1.55d-57)) .or. (.not. (z <= 1.02d-33))) then
tmp = t_1
else
tmp = ((b / c) + ((x * (y * 9.0d0)) / c)) / z
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 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -2.05e+116) {
tmp = t_1;
} else if (z <= -122.0) {
tmp = ((b / z) + (9.0 * (y / (z / x)))) / c;
} else if ((z <= -1.55e-57) || !(z <= 1.02e-33)) {
tmp = t_1;
} else {
tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((t * (a * -4.0)) + (b / z)) / c tmp = 0 if z <= -2.05e+116: tmp = t_1 elif z <= -122.0: tmp = ((b / z) + (9.0 * (y / (z / x)))) / c elif (z <= -1.55e-57) or not (z <= 1.02e-33): tmp = t_1 else: tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c) tmp = 0.0 if (z <= -2.05e+116) tmp = t_1; elseif (z <= -122.0) tmp = Float64(Float64(Float64(b / z) + Float64(9.0 * Float64(y / Float64(z / x)))) / c); elseif ((z <= -1.55e-57) || !(z <= 1.02e-33)) tmp = t_1; else tmp = Float64(Float64(Float64(b / c) + Float64(Float64(x * Float64(y * 9.0)) / c)) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((t * (a * -4.0)) + (b / z)) / c; tmp = 0.0; if (z <= -2.05e+116) tmp = t_1; elseif (z <= -122.0) tmp = ((b / z) + (9.0 * (y / (z / x)))) / c; elseif ((z <= -1.55e-57) || ~((z <= 1.02e-33))) tmp = t_1; else tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -2.05e+116], t$95$1, If[LessEqual[z, -122.0], N[(N[(N[(b / z), $MachinePrecision] + N[(9.0 * N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[Or[LessEqual[z, -1.55e-57], N[Not[LessEqual[z, 1.02e-33]], $MachinePrecision]], t$95$1, N[(N[(N[(b / c), $MachinePrecision] + N[(N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{+116}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -122:\\
\;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{y}{\frac{z}{x}}}{c}\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-57} \lor \neg \left(z \leq 1.02 \cdot 10^{-33}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c} + \frac{x \cdot \left(y \cdot 9\right)}{c}}{z}\\
\end{array}
\end{array}
if z < -2.0499999999999999e116 or -122 < z < -1.54999999999999988e-57 or 1.02e-33 < z Initial program 62.5%
associate-/r*68.7%
Simplified87.3%
Taylor expanded in x around 0 77.2%
if -2.0499999999999999e116 < z < -122Initial program 70.8%
associate-/r*80.7%
Simplified90.5%
Taylor expanded in t around 0 71.3%
associate-/l*75.8%
Simplified75.8%
if -1.54999999999999988e-57 < z < 1.02e-33Initial program 95.5%
associate-*l*95.5%
associate-*l*87.3%
Simplified87.3%
Taylor expanded in x around 0 69.3%
associate--l+69.3%
associate-/r*72.9%
times-frac70.4%
Simplified70.4%
Taylor expanded in z around 0 84.2%
associate-*r/84.1%
associate-*r*84.2%
Simplified84.2%
Final simplification80.0%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (* t (* a -4.0)) (/ b z)) c)))
(if (<= z -1.8e+114)
t_1
(if (<= z -0.202)
(/ (+ (/ b z) (* 9.0 (/ (* x y) z))) c)
(if (or (<= z -1.4e-57) (not (<= z 1.02e-33)))
t_1
(/ (+ (/ b c) (/ (* x (* y 9.0)) c)) z))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -1.8e+114) {
tmp = t_1;
} else if (z <= -0.202) {
tmp = ((b / z) + (9.0 * ((x * y) / z))) / c;
} else if ((z <= -1.4e-57) || !(z <= 1.02e-33)) {
tmp = t_1;
} else {
tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z;
}
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) :: tmp
t_1 = ((t * (a * (-4.0d0))) + (b / z)) / c
if (z <= (-1.8d+114)) then
tmp = t_1
else if (z <= (-0.202d0)) then
tmp = ((b / z) + (9.0d0 * ((x * y) / z))) / c
else if ((z <= (-1.4d-57)) .or. (.not. (z <= 1.02d-33))) then
tmp = t_1
else
tmp = ((b / c) + ((x * (y * 9.0d0)) / c)) / z
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 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -1.8e+114) {
tmp = t_1;
} else if (z <= -0.202) {
tmp = ((b / z) + (9.0 * ((x * y) / z))) / c;
} else if ((z <= -1.4e-57) || !(z <= 1.02e-33)) {
tmp = t_1;
} else {
tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((t * (a * -4.0)) + (b / z)) / c tmp = 0 if z <= -1.8e+114: tmp = t_1 elif z <= -0.202: tmp = ((b / z) + (9.0 * ((x * y) / z))) / c elif (z <= -1.4e-57) or not (z <= 1.02e-33): tmp = t_1 else: tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c) tmp = 0.0 if (z <= -1.8e+114) tmp = t_1; elseif (z <= -0.202) tmp = Float64(Float64(Float64(b / z) + Float64(9.0 * Float64(Float64(x * y) / z))) / c); elseif ((z <= -1.4e-57) || !(z <= 1.02e-33)) tmp = t_1; else tmp = Float64(Float64(Float64(b / c) + Float64(Float64(x * Float64(y * 9.0)) / c)) / z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((t * (a * -4.0)) + (b / z)) / c; tmp = 0.0; if (z <= -1.8e+114) tmp = t_1; elseif (z <= -0.202) tmp = ((b / z) + (9.0 * ((x * y) / z))) / c; elseif ((z <= -1.4e-57) || ~((z <= 1.02e-33))) tmp = t_1; else tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.8e+114], t$95$1, If[LessEqual[z, -0.202], N[(N[(N[(b / z), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[Or[LessEqual[z, -1.4e-57], N[Not[LessEqual[z, 1.02e-33]], $MachinePrecision]], t$95$1, N[(N[(N[(b / c), $MachinePrecision] + N[(N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.202:\\
\;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-57} \lor \neg \left(z \leq 1.02 \cdot 10^{-33}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{b}{c} + \frac{x \cdot \left(y \cdot 9\right)}{c}}{z}\\
\end{array}
\end{array}
if z < -1.8e114 or -0.20200000000000001 < z < -1.4e-57 or 1.02e-33 < z Initial program 62.5%
associate-/r*68.7%
Simplified87.3%
Taylor expanded in x around 0 77.2%
if -1.8e114 < z < -0.20200000000000001Initial program 70.8%
associate-/r*80.7%
Simplified90.5%
Taylor expanded in t around 0 71.3%
if -1.4e-57 < z < 1.02e-33Initial program 95.5%
associate-*l*95.5%
associate-*l*87.3%
Simplified87.3%
Taylor expanded in x around 0 69.3%
associate--l+69.3%
associate-/r*72.9%
times-frac70.4%
Simplified70.4%
Taylor expanded in z around 0 84.2%
associate-*r/84.1%
associate-*r*84.2%
Simplified84.2%
Final simplification79.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (* t (* a -4.0)) (/ b z)) c)))
(if (<= z -1.8e+114)
t_1
(if (<= z -0.21)
(/ (+ (/ b z) (* 9.0 (/ (* x y) z))) c)
(if (<= z -1.9e-58)
(/ (- b (* 4.0 (* a (* t z)))) (* c z))
(if (<= z 5.8e-34) (/ (+ (/ b c) (/ (* x (* y 9.0)) c)) z) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -1.8e+114) {
tmp = t_1;
} else if (z <= -0.21) {
tmp = ((b / z) + (9.0 * ((x * y) / z))) / c;
} else if (z <= -1.9e-58) {
tmp = (b - (4.0 * (a * (t * z)))) / (c * z);
} else if (z <= 5.8e-34) {
tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z;
} else {
tmp = t_1;
}
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) :: tmp
t_1 = ((t * (a * (-4.0d0))) + (b / z)) / c
if (z <= (-1.8d+114)) then
tmp = t_1
else if (z <= (-0.21d0)) then
tmp = ((b / z) + (9.0d0 * ((x * y) / z))) / c
else if (z <= (-1.9d-58)) then
tmp = (b - (4.0d0 * (a * (t * z)))) / (c * z)
else if (z <= 5.8d-34) then
tmp = ((b / c) + ((x * (y * 9.0d0)) / c)) / z
else
tmp = t_1
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 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -1.8e+114) {
tmp = t_1;
} else if (z <= -0.21) {
tmp = ((b / z) + (9.0 * ((x * y) / z))) / c;
} else if (z <= -1.9e-58) {
tmp = (b - (4.0 * (a * (t * z)))) / (c * z);
} else if (z <= 5.8e-34) {
tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((t * (a * -4.0)) + (b / z)) / c tmp = 0 if z <= -1.8e+114: tmp = t_1 elif z <= -0.21: tmp = ((b / z) + (9.0 * ((x * y) / z))) / c elif z <= -1.9e-58: tmp = (b - (4.0 * (a * (t * z)))) / (c * z) elif z <= 5.8e-34: tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c) tmp = 0.0 if (z <= -1.8e+114) tmp = t_1; elseif (z <= -0.21) tmp = Float64(Float64(Float64(b / z) + Float64(9.0 * Float64(Float64(x * y) / z))) / c); elseif (z <= -1.9e-58) tmp = Float64(Float64(b - Float64(4.0 * Float64(a * Float64(t * z)))) / Float64(c * z)); elseif (z <= 5.8e-34) tmp = Float64(Float64(Float64(b / c) + Float64(Float64(x * Float64(y * 9.0)) / c)) / z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((t * (a * -4.0)) + (b / z)) / c; tmp = 0.0; if (z <= -1.8e+114) tmp = t_1; elseif (z <= -0.21) tmp = ((b / z) + (9.0 * ((x * y) / z))) / c; elseif (z <= -1.9e-58) tmp = (b - (4.0 * (a * (t * z)))) / (c * z); elseif (z <= 5.8e-34) tmp = ((b / c) + ((x * (y * 9.0)) / c)) / z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.8e+114], t$95$1, If[LessEqual[z, -0.21], N[(N[(N[(b / z), $MachinePrecision] + N[(9.0 * N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, -1.9e-58], N[(N[(b - N[(4.0 * N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-34], N[(N[(N[(b / c), $MachinePrecision] + N[(N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -0.21:\\
\;\;\;\;\frac{\frac{b}{z} + 9 \cdot \frac{x \cdot y}{z}}{c}\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-58}:\\
\;\;\;\;\frac{b - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-34}:\\
\;\;\;\;\frac{\frac{b}{c} + \frac{x \cdot \left(y \cdot 9\right)}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.8e114 or 5.8000000000000004e-34 < z Initial program 58.3%
associate-/r*65.3%
Simplified85.9%
Taylor expanded in x around 0 75.5%
if -1.8e114 < z < -0.209999999999999992Initial program 70.8%
associate-/r*80.7%
Simplified90.5%
Taylor expanded in t around 0 71.3%
if -0.209999999999999992 < z < -1.8999999999999999e-58Initial program 99.6%
associate-*l*99.6%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around 0 93.0%
if -1.8999999999999999e-58 < z < 5.8000000000000004e-34Initial program 95.5%
associate-*l*95.5%
associate-*l*87.3%
Simplified87.3%
Taylor expanded in x around 0 69.3%
associate--l+69.3%
associate-/r*72.9%
times-frac70.4%
Simplified70.4%
Taylor expanded in z around 0 84.2%
associate-*r/84.1%
associate-*r*84.2%
Simplified84.2%
Final simplification79.6%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (/ (+ (* t (* a -4.0)) (/ b z)) c)))
(if (<= z -1.65e+114)
t_1
(if (<= z -6e+44)
(* 9.0 (* (/ y c) (/ x z)))
(if (or (<= z -1.9e-58) (not (<= z 1.02e-33)))
t_1
(/ (+ b (* 9.0 (* x y))) (* c z)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -1.65e+114) {
tmp = t_1;
} else if (z <= -6e+44) {
tmp = 9.0 * ((y / c) * (x / z));
} else if ((z <= -1.9e-58) || !(z <= 1.02e-33)) {
tmp = t_1;
} else {
tmp = (b + (9.0 * (x * y))) / (c * z);
}
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) :: tmp
t_1 = ((t * (a * (-4.0d0))) + (b / z)) / c
if (z <= (-1.65d+114)) then
tmp = t_1
else if (z <= (-6d+44)) then
tmp = 9.0d0 * ((y / c) * (x / z))
else if ((z <= (-1.9d-58)) .or. (.not. (z <= 1.02d-33))) then
tmp = t_1
else
tmp = (b + (9.0d0 * (x * y))) / (c * z)
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 = ((t * (a * -4.0)) + (b / z)) / c;
double tmp;
if (z <= -1.65e+114) {
tmp = t_1;
} else if (z <= -6e+44) {
tmp = 9.0 * ((y / c) * (x / z));
} else if ((z <= -1.9e-58) || !(z <= 1.02e-33)) {
tmp = t_1;
} else {
tmp = (b + (9.0 * (x * y))) / (c * z);
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = ((t * (a * -4.0)) + (b / z)) / c tmp = 0 if z <= -1.65e+114: tmp = t_1 elif z <= -6e+44: tmp = 9.0 * ((y / c) * (x / z)) elif (z <= -1.9e-58) or not (z <= 1.02e-33): tmp = t_1 else: tmp = (b + (9.0 * (x * y))) / (c * z) return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(Float64(Float64(t * Float64(a * -4.0)) + Float64(b / z)) / c) tmp = 0.0 if (z <= -1.65e+114) tmp = t_1; elseif (z <= -6e+44) tmp = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))); elseif ((z <= -1.9e-58) || !(z <= 1.02e-33)) tmp = t_1; else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = ((t * (a * -4.0)) + (b / z)) / c; tmp = 0.0; if (z <= -1.65e+114) tmp = t_1; elseif (z <= -6e+44) tmp = 9.0 * ((y / c) * (x / z)); elseif ((z <= -1.9e-58) || ~((z <= 1.02e-33))) tmp = t_1; else tmp = (b + (9.0 * (x * y))) / (c * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.65e+114], t$95$1, If[LessEqual[z, -6e+44], N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -1.9e-58], N[Not[LessEqual[z, 1.02e-33]], $MachinePrecision]], t$95$1, N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot \left(a \cdot -4\right) + \frac{b}{z}}{c}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+114}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -6 \cdot 10^{+44}:\\
\;\;\;\;9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-58} \lor \neg \left(z \leq 1.02 \cdot 10^{-33}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\\
\end{array}
\end{array}
if z < -1.65e114 or -5.99999999999999974e44 < z < -1.8999999999999999e-58 or 1.02e-33 < z Initial program 63.6%
associate-/r*69.6%
Simplified88.0%
Taylor expanded in x around 0 76.7%
if -1.65e114 < z < -5.99999999999999974e44Initial program 63.0%
associate-*l*63.0%
associate-*l*70.5%
Simplified70.5%
Taylor expanded in x around inf 48.6%
times-frac70.2%
Simplified70.2%
if -1.8999999999999999e-58 < z < 1.02e-33Initial program 95.5%
associate-*l*95.5%
associate-*l*87.3%
Simplified87.3%
Taylor expanded in x around inf 83.6%
Final simplification79.2%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= b -2.15e+136)
(/ (/ b c) z)
(if (<= b 7.5e+19)
(/ (+ t_1 (/ (* x 9.0) (/ z y))) c)
(if (<= b 6.7e+177)
(/ (+ b (* 9.0 (* x y))) (* c z))
(/ (+ t_1 (/ b z)) c))))))
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 <= -2.15e+136) {
tmp = (b / c) / z;
} else if (b <= 7.5e+19) {
tmp = (t_1 + ((x * 9.0) / (z / y))) / c;
} else if (b <= 6.7e+177) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else {
tmp = (t_1 + (b / z)) / c;
}
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) :: tmp
t_1 = t * (a * (-4.0d0))
if (b <= (-2.15d+136)) then
tmp = (b / c) / z
else if (b <= 7.5d+19) then
tmp = (t_1 + ((x * 9.0d0) / (z / y))) / c
else if (b <= 6.7d+177) then
tmp = (b + (9.0d0 * (x * y))) / (c * z)
else
tmp = (t_1 + (b / z)) / c
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 = t * (a * -4.0);
double tmp;
if (b <= -2.15e+136) {
tmp = (b / c) / z;
} else if (b <= 7.5e+19) {
tmp = (t_1 + ((x * 9.0) / (z / y))) / c;
} else if (b <= 6.7e+177) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else {
tmp = (t_1 + (b / z)) / c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = t * (a * -4.0) tmp = 0 if b <= -2.15e+136: tmp = (b / c) / z elif b <= 7.5e+19: tmp = (t_1 + ((x * 9.0) / (z / y))) / c elif b <= 6.7e+177: tmp = (b + (9.0 * (x * y))) / (c * z) else: tmp = (t_1 + (b / z)) / c return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (b <= -2.15e+136) tmp = Float64(Float64(b / c) / z); elseif (b <= 7.5e+19) tmp = Float64(Float64(t_1 + Float64(Float64(x * 9.0) / Float64(z / y))) / c); elseif (b <= 6.7e+177) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c * z)); else tmp = Float64(Float64(t_1 + Float64(b / z)) / c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = t * (a * -4.0); tmp = 0.0; if (b <= -2.15e+136) tmp = (b / c) / z; elseif (b <= 7.5e+19) tmp = (t_1 + ((x * 9.0) / (z / y))) / c; elseif (b <= 6.7e+177) tmp = (b + (9.0 * (x * y))) / (c * z); else tmp = (t_1 + (b / z)) / c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.15e+136], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 7.5e+19], N[(N[(t$95$1 + N[(N[(x * 9.0), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[b, 6.7e+177], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;b \leq -2.15 \cdot 10^{+136}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+19}:\\
\;\;\;\;\frac{t_1 + \frac{x \cdot 9}{\frac{z}{y}}}{c}\\
\mathbf{elif}\;b \leq 6.7 \cdot 10^{+177}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1 + \frac{b}{z}}{c}\\
\end{array}
\end{array}
if b < -2.1499999999999999e136Initial program 76.6%
associate-*l*76.6%
associate-*l*70.9%
Simplified70.9%
Taylor expanded in b around inf 70.2%
associate-/r*82.8%
Simplified82.8%
if -2.1499999999999999e136 < b < 7.5e19Initial program 74.8%
associate-/r*74.4%
Simplified85.0%
Taylor expanded in x around inf 75.5%
associate-*r/75.5%
associate-*r*75.5%
*-commutative75.5%
associate-*r*75.5%
associate-/l*76.1%
*-commutative76.1%
Simplified76.1%
if 7.5e19 < b < 6.7000000000000004e177Initial program 86.2%
associate-*l*86.2%
associate-*l*83.4%
Simplified83.4%
Taylor expanded in x around inf 79.9%
if 6.7000000000000004e177 < b Initial program 76.2%
associate-/r*79.5%
Simplified94.0%
Taylor expanded in x around 0 94.0%
Final simplification79.8%
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* 9.0 (* (/ y c) (/ x z)))))
(if (<= y -200000.0)
t_1
(if (<= y 7e-242)
(/ -4.0 (/ c (* a t)))
(if (<= y 3e-82)
(/ 1.0 (* c (/ z b)))
(if (<= y 1.3e+51) (* -4.0 (* t (/ a c))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = 9.0 * ((y / c) * (x / z));
double tmp;
if (y <= -200000.0) {
tmp = t_1;
} else if (y <= 7e-242) {
tmp = -4.0 / (c / (a * t));
} else if (y <= 3e-82) {
tmp = 1.0 / (c * (z / b));
} else if (y <= 1.3e+51) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = t_1;
}
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) :: tmp
t_1 = 9.0d0 * ((y / c) * (x / z))
if (y <= (-200000.0d0)) then
tmp = t_1
else if (y <= 7d-242) then
tmp = (-4.0d0) / (c / (a * t))
else if (y <= 3d-82) then
tmp = 1.0d0 / (c * (z / b))
else if (y <= 1.3d+51) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = t_1
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 = 9.0 * ((y / c) * (x / z));
double tmp;
if (y <= -200000.0) {
tmp = t_1;
} else if (y <= 7e-242) {
tmp = -4.0 / (c / (a * t));
} else if (y <= 3e-82) {
tmp = 1.0 / (c * (z / b));
} else if (y <= 1.3e+51) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c): t_1 = 9.0 * ((y / c) * (x / z)) tmp = 0 if y <= -200000.0: tmp = t_1 elif y <= 7e-242: tmp = -4.0 / (c / (a * t)) elif y <= 3e-82: tmp = 1.0 / (c * (z / b)) elif y <= 1.3e+51: tmp = -4.0 * (t * (a / c)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c) t_1 = Float64(9.0 * Float64(Float64(y / c) * Float64(x / z))) tmp = 0.0 if (y <= -200000.0) tmp = t_1; elseif (y <= 7e-242) tmp = Float64(-4.0 / Float64(c / Float64(a * t))); elseif (y <= 3e-82) tmp = Float64(1.0 / Float64(c * Float64(z / b))); elseif (y <= 1.3e+51) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) t_1 = 9.0 * ((y / c) * (x / z)); tmp = 0.0; if (y <= -200000.0) tmp = t_1; elseif (y <= 7e-242) tmp = -4.0 / (c / (a * t)); elseif (y <= 3e-82) tmp = 1.0 / (c * (z / b)); elseif (y <= 1.3e+51) tmp = -4.0 * (t * (a / c)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(9.0 * N[(N[(y / c), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -200000.0], t$95$1, If[LessEqual[y, 7e-242], N[(-4.0 / N[(c / N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e-82], N[(1.0 / N[(c * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+51], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 9 \cdot \left(\frac{y}{c} \cdot \frac{x}{z}\right)\\
\mathbf{if}\;y \leq -200000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{-242}:\\
\;\;\;\;\frac{-4}{\frac{c}{a \cdot t}}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-82}:\\
\;\;\;\;\frac{1}{c \cdot \frac{z}{b}}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+51}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2e5 or 1.3000000000000001e51 < y Initial program 73.9%
associate-*l*73.9%
associate-*l*73.1%
Simplified73.1%
Taylor expanded in x around inf 54.8%
times-frac66.0%
Simplified66.0%
if -2e5 < y < 6.9999999999999998e-242Initial program 80.6%
associate-*l*80.6%
associate-*l*82.3%
Simplified82.3%
Taylor expanded in z around inf 47.3%
*-commutative47.3%
associate-*r/47.3%
associate-/l*47.2%
*-commutative47.2%
Simplified47.2%
if 6.9999999999999998e-242 < y < 2.9999999999999999e-82Initial program 90.3%
associate-/r*87.2%
Simplified87.3%
div-inv87.3%
+-commutative87.3%
fma-def87.3%
Applied egg-rr87.3%
Taylor expanded in b around inf 51.4%
clear-num51.3%
frac-times54.4%
metadata-eval54.4%
Applied egg-rr54.4%
if 2.9999999999999999e-82 < y < 1.3000000000000001e51Initial program 65.9%
associate-/r*66.3%
Simplified84.5%
div-inv84.5%
+-commutative84.5%
fma-def84.5%
Applied egg-rr84.5%
Taylor expanded in t around inf 47.1%
associate-/l*50.0%
associate-/r/53.1%
Simplified53.1%
Final simplification57.6%
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -7.4e+124)
(* (/ a (/ c t)) -4.0)
(if (<= z 2.6e+134)
(/ (+ b (* 9.0 (* x y))) (* c z))
(/ (* -4.0 (* a t)) c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -7.4e+124) {
tmp = (a / (c / t)) * -4.0;
} else if (z <= 2.6e+134) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else {
tmp = (-4.0 * (a * t)) / c;
}
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) :: tmp
if (z <= (-7.4d+124)) then
tmp = (a / (c / t)) * (-4.0d0)
else if (z <= 2.6d+134) then
tmp = (b + (9.0d0 * (x * y))) / (c * z)
else
tmp = ((-4.0d0) * (a * t)) / c
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 tmp;
if (z <= -7.4e+124) {
tmp = (a / (c / t)) * -4.0;
} else if (z <= 2.6e+134) {
tmp = (b + (9.0 * (x * y))) / (c * z);
} else {
tmp = (-4.0 * (a * t)) / c;
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if z <= -7.4e+124: tmp = (a / (c / t)) * -4.0 elif z <= 2.6e+134: tmp = (b + (9.0 * (x * y))) / (c * z) else: tmp = (-4.0 * (a * t)) / c return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -7.4e+124) tmp = Float64(Float64(a / Float64(c / t)) * -4.0); elseif (z <= 2.6e+134) tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(c * z)); else tmp = Float64(Float64(-4.0 * Float64(a * t)) / c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (z <= -7.4e+124) tmp = (a / (c / t)) * -4.0; elseif (z <= 2.6e+134) tmp = (b + (9.0 * (x * y))) / (c * z); else tmp = (-4.0 * (a * t)) / c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -7.4e+124], N[(N[(a / N[(c / t), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[z, 2.6e+134], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{+124}:\\
\;\;\;\;\frac{a}{\frac{c}{t}} \cdot -4\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+134}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right)}{c}\\
\end{array}
\end{array}
if z < -7.40000000000000016e124Initial program 46.6%
associate-/r*56.4%
Simplified77.2%
div-inv77.2%
+-commutative77.2%
fma-def77.2%
Applied egg-rr77.2%
Taylor expanded in t around inf 59.5%
associate-/l*68.4%
Simplified68.4%
if -7.40000000000000016e124 < z < 2.6000000000000002e134Initial program 89.9%
associate-*l*89.9%
associate-*l*86.6%
Simplified86.6%
Taylor expanded in x around inf 74.5%
if 2.6000000000000002e134 < z Initial program 53.1%
associate-/r*58.4%
Simplified90.7%
Taylor expanded in z around inf 72.6%
Final simplification73.2%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -8e+30) (/ (/ b c) z) (if (<= b 3.5e+97) (* -4.0 (* t (/ a c))) (/ b (* c z)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -8e+30) {
tmp = (b / c) / z;
} else if (b <= 3.5e+97) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (c * z);
}
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) :: tmp
if (b <= (-8d+30)) then
tmp = (b / c) / z
else if (b <= 3.5d+97) then
tmp = (-4.0d0) * (t * (a / c))
else
tmp = b / (c * z)
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 tmp;
if (b <= -8e+30) {
tmp = (b / c) / z;
} else if (b <= 3.5e+97) {
tmp = -4.0 * (t * (a / c));
} else {
tmp = b / (c * z);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -8e+30: tmp = (b / c) / z elif b <= 3.5e+97: tmp = -4.0 * (t * (a / c)) else: tmp = b / (c * z) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -8e+30) tmp = Float64(Float64(b / c) / z); elseif (b <= 3.5e+97) tmp = Float64(-4.0 * Float64(t * Float64(a / c))); else tmp = Float64(b / Float64(c * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -8e+30) tmp = (b / c) / z; elseif (b <= 3.5e+97) tmp = -4.0 * (t * (a / c)); else tmp = b / (c * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -8e+30], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 3.5e+97], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{+30}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;b \leq 3.5 \cdot 10^{+97}:\\
\;\;\;\;-4 \cdot \left(t \cdot \frac{a}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\end{array}
\end{array}
if b < -8.0000000000000002e30Initial program 67.7%
associate-*l*67.7%
associate-*l*67.9%
Simplified67.9%
Taylor expanded in b around inf 61.1%
associate-/r*70.3%
Simplified70.3%
if -8.0000000000000002e30 < b < 3.5000000000000001e97Initial program 77.9%
associate-/r*77.5%
Simplified84.8%
div-inv84.7%
+-commutative84.7%
fma-def86.0%
Applied egg-rr86.0%
Taylor expanded in t around inf 42.7%
associate-/l*43.8%
associate-/r/44.5%
Simplified44.5%
if 3.5000000000000001e97 < b Initial program 81.2%
associate-*l*81.3%
associate-*l*79.5%
Simplified79.5%
Taylor expanded in b around inf 61.4%
Final simplification52.5%
(FPCore (x y z t a b c) :precision binary64 (if (<= b -4e-129) (/ (/ b c) z) (/ b (* c z))))
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (b <= -4e-129) {
tmp = (b / c) / z;
} else {
tmp = b / (c * z);
}
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) :: tmp
if (b <= (-4d-129)) then
tmp = (b / c) / z
else
tmp = b / (c * z)
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 tmp;
if (b <= -4e-129) {
tmp = (b / c) / z;
} else {
tmp = b / (c * z);
}
return tmp;
}
def code(x, y, z, t, a, b, c): tmp = 0 if b <= -4e-129: tmp = (b / c) / z else: tmp = b / (c * z) return tmp
function code(x, y, z, t, a, b, c) tmp = 0.0 if (b <= -4e-129) tmp = Float64(Float64(b / c) / z); else tmp = Float64(b / Float64(c * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c) tmp = 0.0; if (b <= -4e-129) tmp = (b / c) / z; else tmp = b / (c * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -4e-129], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4 \cdot 10^{-129}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c \cdot z}\\
\end{array}
\end{array}
if b < -3.9999999999999997e-129Initial program 77.4%
associate-*l*77.4%
associate-*l*76.4%
Simplified76.4%
Taylor expanded in b around inf 39.3%
associate-/r*45.4%
Simplified45.4%
if -3.9999999999999997e-129 < b Initial program 76.5%
associate-*l*76.5%
associate-*l*77.8%
Simplified77.8%
Taylor expanded in b around inf 35.9%
Final simplification38.9%
(FPCore (x y z t a b c) :precision binary64 (/ b (* c z)))
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (c * z);
}
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 / (c * z)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (c * z);
}
def code(x, y, z, t, a, b, c): return b / (c * z)
function code(x, y, z, t, a, b, c) return Float64(b / Float64(c * z)) end
function tmp = code(x, y, z, t, a, b, c) tmp = b / (c * z); end
code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{b}{c \cdot z}
\end{array}
Initial program 76.8%
associate-*l*76.8%
associate-*l*77.3%
Simplified77.3%
Taylor expanded in b around inf 36.9%
Final simplification36.9%
(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 2023238
(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)))