
(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, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -7e-23)
(* (/ 1.0 c) (/ (+ b (fma x (* 9.0 y) (* z (* a (* t -4.0))))) z))
(if (<= z 2250000000000.0)
(/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))
(*
(/ 1.0 c)
(* y (+ (* -4.0 (/ (* a t) y)) (+ (* 9.0 (/ x z)) (/ b (* z y)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -7e-23) {
tmp = (1.0 / c) * ((b + fma(x, (9.0 * y), (z * (a * (t * -4.0))))) / z);
} else if (z <= 2250000000000.0) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (1.0 / c) * (y * ((-4.0 * ((a * t) / y)) + ((9.0 * (x / z)) + (b / (z * y)))));
}
return tmp;
}
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -7e-23) tmp = Float64(Float64(1.0 / c) * Float64(Float64(b + fma(x, Float64(9.0 * y), Float64(z * Float64(a * Float64(t * -4.0))))) / z)); elseif (z <= 2250000000000.0) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(Float64(1.0 / c) * Float64(y * Float64(Float64(-4.0 * Float64(Float64(a * t) / y)) + Float64(Float64(9.0 * Float64(x / z)) + Float64(b / Float64(z * y)))))); end return tmp end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -7e-23], N[(N[(1.0 / c), $MachinePrecision] * N[(N[(b + N[(x * N[(9.0 * y), $MachinePrecision] + N[(z * N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2250000000000.0], 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[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / c), $MachinePrecision] * N[(y * N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-23}:\\
\;\;\;\;\frac{1}{c} \cdot \frac{b + \mathsf{fma}\left(x, 9 \cdot y, z \cdot \left(a \cdot \left(t \cdot -4\right)\right)\right)}{z}\\
\mathbf{elif}\;z \leq 2250000000000:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{c} \cdot \left(y \cdot \left(-4 \cdot \frac{a \cdot t}{y} + \left(9 \cdot \frac{x}{z} + \frac{b}{z \cdot y}\right)\right)\right)\\
\end{array}
\end{array}
if z < -6.99999999999999987e-23Initial program 67.1%
Simplified74.3%
*-un-lft-identity74.3%
*-commutative74.3%
times-frac88.9%
+-commutative88.9%
Applied egg-rr88.9%
if -6.99999999999999987e-23 < z < 2.25e12Initial program 93.7%
if 2.25e12 < z Initial program 56.4%
Simplified71.6%
*-un-lft-identity71.6%
*-commutative71.6%
times-frac76.6%
+-commutative76.6%
Applied egg-rr76.6%
Taylor expanded in y around inf 88.5%
Final simplification91.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -1.52e+91)
(/ (+ (* -4.0 (* a t)) (/ b z)) c)
(if (<= z 1000000.0)
(/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))
(*
(/ 1.0 c)
(* y (+ (* -4.0 (/ (* a t) y)) (+ (* 9.0 (/ x z)) (/ b (* z y)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.52e+91) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (z <= 1000000.0) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (1.0 / c) * (y * ((-4.0 * ((a * t) / y)) + ((9.0 * (x / z)) + (b / (z * y)))));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c 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.52d+91)) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else if (z <= 1000000.0d0) then
tmp = (b + ((y * (x * 9.0d0)) - (a * (t * (z * 4.0d0))))) / (z * c)
else
tmp = (1.0d0 / c) * (y * (((-4.0d0) * ((a * t) / y)) + ((9.0d0 * (x / z)) + (b / (z * y)))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -1.52e+91) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (z <= 1000000.0) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (1.0 / c) * (y * ((-4.0 * ((a * t) / y)) + ((9.0 * (x / z)) + (b / (z * y)))));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -1.52e+91: tmp = ((-4.0 * (a * t)) + (b / z)) / c elif z <= 1000000.0: tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c) else: tmp = (1.0 / c) * (y * ((-4.0 * ((a * t) / y)) + ((9.0 * (x / z)) + (b / (z * y))))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -1.52e+91) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); elseif (z <= 1000000.0) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(Float64(1.0 / c) * Float64(y * Float64(Float64(-4.0 * Float64(Float64(a * t) / y)) + Float64(Float64(9.0 * Float64(x / z)) + Float64(b / Float64(z * y)))))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -1.52e+91)
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
elseif (z <= 1000000.0)
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
else
tmp = (1.0 / c) * (y * ((-4.0 * ((a * t) / y)) + ((9.0 * (x / z)) + (b / (z * y)))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1.52e+91], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 1000000.0], 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[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / c), $MachinePrecision] * N[(y * N[(N[(-4.0 * N[(N[(a * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(9.0 * N[(x / z), $MachinePrecision]), $MachinePrecision] + N[(b / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.52 \cdot 10^{+91}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{elif}\;z \leq 1000000:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{c} \cdot \left(y \cdot \left(-4 \cdot \frac{a \cdot t}{y} + \left(9 \cdot \frac{x}{z} + \frac{b}{z \cdot y}\right)\right)\right)\\
\end{array}
\end{array}
if z < -1.52e91Initial program 54.5%
Simplified65.4%
*-un-lft-identity65.4%
*-commutative65.4%
times-frac87.4%
+-commutative87.4%
Applied egg-rr87.4%
Taylor expanded in y around inf 79.1%
Taylor expanded in y around 0 87.3%
if -1.52e91 < z < 1e6Initial program 93.4%
if 1e6 < z Initial program 56.4%
Simplified71.6%
*-un-lft-identity71.6%
*-commutative71.6%
times-frac76.6%
+-commutative76.6%
Applied egg-rr76.6%
Taylor expanded in y around inf 88.5%
Final simplification91.2%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (/ 1.0 (* z c)))))
(if (<= z -2.9e+14)
(* (* a t) (/ -4.0 c))
(if (<= z 5.2e-272)
t_1
(if (<= z 2.6e-242)
(/ (* 9.0 (/ (* x y) c)) z)
(if (<= z 1.6e-87)
t_1
(if (<= z 0.00024)
(* 9.0 (* y (/ x (* z c))))
(* a (/ (* t -4.0) c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (1.0 / (z * c));
double tmp;
if (z <= -2.9e+14) {
tmp = (a * t) * (-4.0 / c);
} else if (z <= 5.2e-272) {
tmp = t_1;
} else if (z <= 2.6e-242) {
tmp = (9.0 * ((x * y) / c)) / z;
} else if (z <= 1.6e-87) {
tmp = t_1;
} else if (z <= 0.00024) {
tmp = 9.0 * (y * (x / (z * c)));
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c 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 * (1.0d0 / (z * c))
if (z <= (-2.9d+14)) then
tmp = (a * t) * ((-4.0d0) / c)
else if (z <= 5.2d-272) then
tmp = t_1
else if (z <= 2.6d-242) then
tmp = (9.0d0 * ((x * y) / c)) / z
else if (z <= 1.6d-87) then
tmp = t_1
else if (z <= 0.00024d0) then
tmp = 9.0d0 * (y * (x / (z * c)))
else
tmp = a * ((t * (-4.0d0)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (1.0 / (z * c));
double tmp;
if (z <= -2.9e+14) {
tmp = (a * t) * (-4.0 / c);
} else if (z <= 5.2e-272) {
tmp = t_1;
} else if (z <= 2.6e-242) {
tmp = (9.0 * ((x * y) / c)) / z;
} else if (z <= 1.6e-87) {
tmp = t_1;
} else if (z <= 0.00024) {
tmp = 9.0 * (y * (x / (z * c)));
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = b * (1.0 / (z * c)) tmp = 0 if z <= -2.9e+14: tmp = (a * t) * (-4.0 / c) elif z <= 5.2e-272: tmp = t_1 elif z <= 2.6e-242: tmp = (9.0 * ((x * y) / c)) / z elif z <= 1.6e-87: tmp = t_1 elif z <= 0.00024: tmp = 9.0 * (y * (x / (z * c))) else: tmp = a * ((t * -4.0) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(b * Float64(1.0 / Float64(z * c))) tmp = 0.0 if (z <= -2.9e+14) tmp = Float64(Float64(a * t) * Float64(-4.0 / c)); elseif (z <= 5.2e-272) tmp = t_1; elseif (z <= 2.6e-242) tmp = Float64(Float64(9.0 * Float64(Float64(x * y) / c)) / z); elseif (z <= 1.6e-87) tmp = t_1; elseif (z <= 0.00024) tmp = Float64(9.0 * Float64(y * Float64(x / Float64(z * c)))); else tmp = Float64(a * Float64(Float64(t * -4.0) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = b * (1.0 / (z * c));
tmp = 0.0;
if (z <= -2.9e+14)
tmp = (a * t) * (-4.0 / c);
elseif (z <= 5.2e-272)
tmp = t_1;
elseif (z <= 2.6e-242)
tmp = (9.0 * ((x * y) / c)) / z;
elseif (z <= 1.6e-87)
tmp = t_1;
elseif (z <= 0.00024)
tmp = 9.0 * (y * (x / (z * c)));
else
tmp = a * ((t * -4.0) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c 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[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+14], N[(N[(a * t), $MachinePrecision] * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-272], t$95$1, If[LessEqual[z, 2.6e-242], N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.6e-87], t$95$1, If[LessEqual[z, 0.00024], N[(9.0 * N[(y * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := b \cdot \frac{1}{z \cdot c}\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+14}:\\
\;\;\;\;\left(a \cdot t\right) \cdot \frac{-4}{c}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-272}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-242}:\\
\;\;\;\;\frac{9 \cdot \frac{x \cdot y}{c}}{z}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.00024:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\end{array}
\end{array}
if z < -2.9e14Initial program 64.7%
associate-+l-64.7%
*-commutative64.7%
associate-*r*60.6%
*-commutative60.6%
associate-+l-60.6%
associate-*l*60.6%
associate-*l*71.0%
*-commutative71.0%
Simplified71.0%
Taylor expanded in z around inf 61.7%
*-commutative61.7%
associate-*r/61.7%
*-commutative61.7%
*-commutative61.7%
associate-*r*61.7%
Simplified61.7%
associate-/l*56.1%
associate-*r/56.0%
associate-*r*61.7%
Applied egg-rr61.7%
if -2.9e14 < z < 5.19999999999999983e-272 or 2.60000000000000017e-242 < z < 1.59999999999999989e-87Initial program 93.5%
associate-+l-93.5%
*-commutative93.5%
associate-*r*95.2%
*-commutative95.2%
associate-+l-95.2%
associate-*l*95.2%
associate-*l*92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in b around inf 56.6%
*-commutative56.6%
Simplified56.6%
div-inv57.6%
Applied egg-rr57.6%
if 5.19999999999999983e-272 < z < 2.60000000000000017e-242Initial program 99.8%
associate-+l-99.8%
*-commutative99.8%
associate-*r*99.8%
*-commutative99.8%
associate-+l-99.8%
associate-*l*99.8%
associate-*l*87.3%
*-commutative87.3%
Simplified87.3%
Taylor expanded in z around 0 99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in x around inf 87.6%
if 1.59999999999999989e-87 < z < 2.40000000000000006e-4Initial program 99.9%
Simplified100.0%
fma-undefine100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 81.4%
associate-*r/81.5%
*-commutative81.5%
associate-*r*81.5%
associate-*l/75.0%
*-commutative75.0%
associate-*r/75.1%
associate-*l*75.0%
*-commutative75.0%
Simplified75.0%
if 2.40000000000000006e-4 < z Initial program 56.3%
associate-+l-56.3%
*-commutative56.3%
associate-*r*66.0%
*-commutative66.0%
associate-+l-66.0%
associate-*l*66.1%
associate-*l*67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in z around inf 60.5%
*-commutative60.5%
associate-/l*58.1%
associate-*r*58.1%
*-commutative58.1%
associate-*r/58.1%
*-commutative58.1%
Simplified58.1%
Final simplification60.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (/ 1.0 (* z c)))) (t_2 (* 9.0 (* y (/ x (* z c))))))
(if (<= z -2.6e+14)
(* (* a t) (/ -4.0 c))
(if (<= z 3.5e-273)
t_1
(if (<= z 1e-242)
t_2
(if (<= z 1.95e-87)
t_1
(if (<= z 0.105) t_2 (* a (/ (* t -4.0) c)))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (1.0 / (z * c));
double t_2 = 9.0 * (y * (x / (z * c)));
double tmp;
if (z <= -2.6e+14) {
tmp = (a * t) * (-4.0 / c);
} else if (z <= 3.5e-273) {
tmp = t_1;
} else if (z <= 1e-242) {
tmp = t_2;
} else if (z <= 1.95e-87) {
tmp = t_1;
} else if (z <= 0.105) {
tmp = t_2;
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b * (1.0d0 / (z * c))
t_2 = 9.0d0 * (y * (x / (z * c)))
if (z <= (-2.6d+14)) then
tmp = (a * t) * ((-4.0d0) / c)
else if (z <= 3.5d-273) then
tmp = t_1
else if (z <= 1d-242) then
tmp = t_2
else if (z <= 1.95d-87) then
tmp = t_1
else if (z <= 0.105d0) then
tmp = t_2
else
tmp = a * ((t * (-4.0d0)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (1.0 / (z * c));
double t_2 = 9.0 * (y * (x / (z * c)));
double tmp;
if (z <= -2.6e+14) {
tmp = (a * t) * (-4.0 / c);
} else if (z <= 3.5e-273) {
tmp = t_1;
} else if (z <= 1e-242) {
tmp = t_2;
} else if (z <= 1.95e-87) {
tmp = t_1;
} else if (z <= 0.105) {
tmp = t_2;
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = b * (1.0 / (z * c)) t_2 = 9.0 * (y * (x / (z * c))) tmp = 0 if z <= -2.6e+14: tmp = (a * t) * (-4.0 / c) elif z <= 3.5e-273: tmp = t_1 elif z <= 1e-242: tmp = t_2 elif z <= 1.95e-87: tmp = t_1 elif z <= 0.105: tmp = t_2 else: tmp = a * ((t * -4.0) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(b * Float64(1.0 / Float64(z * c))) t_2 = Float64(9.0 * Float64(y * Float64(x / Float64(z * c)))) tmp = 0.0 if (z <= -2.6e+14) tmp = Float64(Float64(a * t) * Float64(-4.0 / c)); elseif (z <= 3.5e-273) tmp = t_1; elseif (z <= 1e-242) tmp = t_2; elseif (z <= 1.95e-87) tmp = t_1; elseif (z <= 0.105) tmp = t_2; else tmp = Float64(a * Float64(Float64(t * -4.0) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = b * (1.0 / (z * c));
t_2 = 9.0 * (y * (x / (z * c)));
tmp = 0.0;
if (z <= -2.6e+14)
tmp = (a * t) * (-4.0 / c);
elseif (z <= 3.5e-273)
tmp = t_1;
elseif (z <= 1e-242)
tmp = t_2;
elseif (z <= 1.95e-87)
tmp = t_1;
elseif (z <= 0.105)
tmp = t_2;
else
tmp = a * ((t * -4.0) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c 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[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(9.0 * N[(y * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+14], N[(N[(a * t), $MachinePrecision] * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e-273], t$95$1, If[LessEqual[z, 1e-242], t$95$2, If[LessEqual[z, 1.95e-87], t$95$1, If[LessEqual[z, 0.105], t$95$2, N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := b \cdot \frac{1}{z \cdot c}\\
t_2 := 9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+14}:\\
\;\;\;\;\left(a \cdot t\right) \cdot \frac{-4}{c}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-273}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{-242}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{-87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.105:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\end{array}
\end{array}
if z < -2.6e14Initial program 64.7%
associate-+l-64.7%
*-commutative64.7%
associate-*r*60.6%
*-commutative60.6%
associate-+l-60.6%
associate-*l*60.6%
associate-*l*71.0%
*-commutative71.0%
Simplified71.0%
Taylor expanded in z around inf 61.7%
*-commutative61.7%
associate-*r/61.7%
*-commutative61.7%
*-commutative61.7%
associate-*r*61.7%
Simplified61.7%
associate-/l*56.1%
associate-*r/56.0%
associate-*r*61.7%
Applied egg-rr61.7%
if -2.6e14 < z < 3.49999999999999992e-273 or 1e-242 < z < 1.9499999999999999e-87Initial program 93.5%
associate-+l-93.5%
*-commutative93.5%
associate-*r*95.2%
*-commutative95.2%
associate-+l-95.2%
associate-*l*95.2%
associate-*l*92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in b around inf 56.6%
*-commutative56.6%
Simplified56.6%
div-inv57.6%
Applied egg-rr57.6%
if 3.49999999999999992e-273 < z < 1e-242 or 1.9499999999999999e-87 < z < 0.104999999999999996Initial program 99.9%
Simplified99.9%
fma-undefine99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 83.6%
associate-*r/83.7%
*-commutative83.7%
associate-*r*83.7%
associate-*l/79.6%
*-commutative79.6%
associate-*r/79.7%
associate-*l*79.5%
*-commutative79.5%
Simplified79.5%
if 0.104999999999999996 < z Initial program 56.3%
associate-+l-56.3%
*-commutative56.3%
associate-*r*66.0%
*-commutative66.0%
associate-+l-66.0%
associate-*l*66.1%
associate-*l*67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in z around inf 60.5%
*-commutative60.5%
associate-/l*58.1%
associate-*r*58.1%
*-commutative58.1%
associate-*r/58.1%
*-commutative58.1%
Simplified58.1%
Final simplification60.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= z -7e+90)
(/ (+ (* -4.0 (* a t)) (/ b z)) c)
(if (<= z 2.15e+45)
(/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))
(+ (* -4.0 (* a (/ t c))) (* y (/ (- (/ b y) (* x -9.0)) (* z c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -7e+90) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (z <= 2.15e+45) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (-4.0 * (a * (t / c))) + (y * (((b / y) - (x * -9.0)) / (z * c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c 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 <= (-7d+90)) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else if (z <= 2.15d+45) then
tmp = (b + ((y * (x * 9.0d0)) - (a * (t * (z * 4.0d0))))) / (z * c)
else
tmp = ((-4.0d0) * (a * (t / c))) + (y * (((b / y) - (x * (-9.0d0))) / (z * c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -7e+90) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else if (z <= 2.15e+45) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (-4.0 * (a * (t / c))) + (y * (((b / y) - (x * -9.0)) / (z * c)));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -7e+90: tmp = ((-4.0 * (a * t)) + (b / z)) / c elif z <= 2.15e+45: tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c) else: tmp = (-4.0 * (a * (t / c))) + (y * (((b / y) - (x * -9.0)) / (z * c))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -7e+90) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); elseif (z <= 2.15e+45) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(Float64(-4.0 * Float64(a * Float64(t / c))) + Float64(y * Float64(Float64(Float64(b / y) - Float64(x * -9.0)) / Float64(z * c)))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -7e+90)
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
elseif (z <= 2.15e+45)
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
else
tmp = (-4.0 * (a * (t / c))) + (y * (((b / y) - (x * -9.0)) / (z * c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -7e+90], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 2.15e+45], 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[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(N[(b / y), $MachinePrecision] - N[(x * -9.0), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+90}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+45}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(a \cdot \frac{t}{c}\right) + y \cdot \frac{\frac{b}{y} - x \cdot -9}{z \cdot c}\\
\end{array}
\end{array}
if z < -6.9999999999999997e90Initial program 54.5%
Simplified65.4%
*-un-lft-identity65.4%
*-commutative65.4%
times-frac87.4%
+-commutative87.4%
Applied egg-rr87.4%
Taylor expanded in y around inf 79.1%
Taylor expanded in y around 0 87.3%
if -6.9999999999999997e90 < z < 2.1500000000000002e45Initial program 92.5%
if 2.1500000000000002e45 < z Initial program 53.5%
Simplified67.0%
*-un-lft-identity67.0%
*-commutative67.0%
times-frac72.9%
+-commutative72.9%
Applied egg-rr72.9%
Taylor expanded in y around inf 86.7%
Taylor expanded in z around -inf 79.3%
fma-define79.3%
mul-1-neg79.3%
fma-neg79.3%
associate-/l*71.9%
associate-/l*77.3%
mul-1-neg77.3%
unsub-neg77.3%
*-commutative77.3%
*-commutative77.3%
Simplified77.3%
Final simplification88.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -4.2e+90) (not (<= z 3.9e+179))) (/ (+ (* -4.0 (* a t)) (/ b z)) c) (/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -4.2e+90) || !(z <= 3.9e+179)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c 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 <= (-4.2d+90)) .or. (.not. (z <= 3.9d+179))) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else
tmp = (b + ((y * (x * 9.0d0)) - (a * (t * (z * 4.0d0))))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -4.2e+90) || !(z <= 3.9e+179)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -4.2e+90) or not (z <= 3.9e+179): tmp = ((-4.0 * (a * t)) + (b / z)) / c else: tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -4.2e+90) || !(z <= 3.9e+179)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -4.2e+90) || ~((z <= 3.9e+179)))
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
else
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -4.2e+90], N[Not[LessEqual[z, 3.9e+179]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $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[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+90} \lor \neg \left(z \leq 3.9 \cdot 10^{+179}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(y \cdot \left(x \cdot 9\right) - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -4.19999999999999961e90 or 3.89999999999999974e179 < z Initial program 47.4%
Simplified61.3%
*-un-lft-identity61.3%
*-commutative61.3%
times-frac79.7%
+-commutative79.7%
Applied egg-rr79.7%
Taylor expanded in y around inf 82.4%
Taylor expanded in y around 0 87.8%
if -4.19999999999999961e90 < z < 3.89999999999999974e179Initial program 89.8%
Final simplification89.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.4e+79) (not (<= z 3.7e+179))) (/ (+ (* -4.0 (* a t)) (/ b z)) c) (/ (+ b (+ (* x (* 9.0 y)) (* t (* a (* z -4.0))))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.4e+79) || !(z <= 3.7e+179)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + ((x * (9.0 * y)) + (t * (a * (z * -4.0))))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c 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.4d+79)) .or. (.not. (z <= 3.7d+179))) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else
tmp = (b + ((x * (9.0d0 * y)) + (t * (a * (z * (-4.0d0)))))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.4e+79) || !(z <= 3.7e+179)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + ((x * (9.0 * y)) + (t * (a * (z * -4.0))))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.4e+79) or not (z <= 3.7e+179): tmp = ((-4.0 * (a * t)) + (b / z)) / c else: tmp = (b + ((x * (9.0 * y)) + (t * (a * (z * -4.0))))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.4e+79) || !(z <= 3.7e+179)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + Float64(Float64(x * Float64(9.0 * y)) + Float64(t * Float64(a * Float64(z * -4.0))))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.4e+79) || ~((z <= 3.7e+179)))
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
else
tmp = (b + ((x * (9.0 * y)) + (t * (a * (z * -4.0))))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.4e+79], N[Not[LessEqual[z, 3.7e+179]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(N[(x * N[(9.0 * y), $MachinePrecision]), $MachinePrecision] + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+79} \lor \neg \left(z \leq 3.7 \cdot 10^{+179}\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + \left(x \cdot \left(9 \cdot y\right) + t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.4000000000000001e79 or 3.6999999999999999e179 < z Initial program 49.5%
Simplified62.8%
*-un-lft-identity62.8%
*-commutative62.8%
times-frac80.5%
+-commutative80.5%
Applied egg-rr80.5%
Taylor expanded in y around inf 81.9%
Taylor expanded in y around 0 87.0%
if -1.4000000000000001e79 < z < 3.6999999999999999e179Initial program 89.7%
Simplified92.8%
fma-undefine91.7%
Applied egg-rr91.7%
Final simplification90.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(let* ((t_1 (* b (/ 1.0 (* z c)))))
(if (<= z -48000000000.0)
(* (* a t) (/ -4.0 c))
(if (<= z 2.8e-272)
t_1
(if (<= z 2.45e-247)
(* 9.0 (* x (/ (/ y c) z)))
(if (<= z 1.6e-14) t_1 (* a (/ (* t -4.0) c))))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (1.0 / (z * c));
double tmp;
if (z <= -48000000000.0) {
tmp = (a * t) * (-4.0 / c);
} else if (z <= 2.8e-272) {
tmp = t_1;
} else if (z <= 2.45e-247) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 1.6e-14) {
tmp = t_1;
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c 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 * (1.0d0 / (z * c))
if (z <= (-48000000000.0d0)) then
tmp = (a * t) * ((-4.0d0) / c)
else if (z <= 2.8d-272) then
tmp = t_1
else if (z <= 2.45d-247) then
tmp = 9.0d0 * (x * ((y / c) / z))
else if (z <= 1.6d-14) then
tmp = t_1
else
tmp = a * ((t * (-4.0d0)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double t_1 = b * (1.0 / (z * c));
double tmp;
if (z <= -48000000000.0) {
tmp = (a * t) * (-4.0 / c);
} else if (z <= 2.8e-272) {
tmp = t_1;
} else if (z <= 2.45e-247) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (z <= 1.6e-14) {
tmp = t_1;
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): t_1 = b * (1.0 / (z * c)) tmp = 0 if z <= -48000000000.0: tmp = (a * t) * (-4.0 / c) elif z <= 2.8e-272: tmp = t_1 elif z <= 2.45e-247: tmp = 9.0 * (x * ((y / c) / z)) elif z <= 1.6e-14: tmp = t_1 else: tmp = a * ((t * -4.0) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) t_1 = Float64(b * Float64(1.0 / Float64(z * c))) tmp = 0.0 if (z <= -48000000000.0) tmp = Float64(Float64(a * t) * Float64(-4.0 / c)); elseif (z <= 2.8e-272) tmp = t_1; elseif (z <= 2.45e-247) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); elseif (z <= 1.6e-14) tmp = t_1; else tmp = Float64(a * Float64(Float64(t * -4.0) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
t_1 = b * (1.0 / (z * c));
tmp = 0.0;
if (z <= -48000000000.0)
tmp = (a * t) * (-4.0 / c);
elseif (z <= 2.8e-272)
tmp = t_1;
elseif (z <= 2.45e-247)
tmp = 9.0 * (x * ((y / c) / z));
elseif (z <= 1.6e-14)
tmp = t_1;
else
tmp = a * ((t * -4.0) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c 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[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -48000000000.0], N[(N[(a * t), $MachinePrecision] * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-272], t$95$1, If[LessEqual[z, 2.45e-247], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-14], t$95$1, N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := b \cdot \frac{1}{z \cdot c}\\
\mathbf{if}\;z \leq -48000000000:\\
\;\;\;\;\left(a \cdot t\right) \cdot \frac{-4}{c}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-272}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-247}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\end{array}
\end{array}
if z < -4.8e10Initial program 64.7%
associate-+l-64.7%
*-commutative64.7%
associate-*r*60.6%
*-commutative60.6%
associate-+l-60.6%
associate-*l*60.6%
associate-*l*71.0%
*-commutative71.0%
Simplified71.0%
Taylor expanded in z around inf 61.7%
*-commutative61.7%
associate-*r/61.7%
*-commutative61.7%
*-commutative61.7%
associate-*r*61.7%
Simplified61.7%
associate-/l*56.1%
associate-*r/56.0%
associate-*r*61.7%
Applied egg-rr61.7%
if -4.8e10 < z < 2.79999999999999994e-272 or 2.45e-247 < z < 1.6000000000000001e-14Initial program 94.1%
associate-+l-94.1%
*-commutative94.1%
associate-*r*95.6%
*-commutative95.6%
associate-+l-95.6%
associate-*l*95.6%
associate-*l*93.2%
*-commutative93.2%
Simplified93.2%
Taylor expanded in b around inf 57.0%
*-commutative57.0%
Simplified57.0%
div-inv57.9%
Applied egg-rr57.9%
if 2.79999999999999994e-272 < z < 2.45e-247Initial program 99.8%
Simplified87.3%
*-un-lft-identity87.3%
*-commutative87.3%
times-frac63.8%
+-commutative63.8%
Applied egg-rr63.8%
Taylor expanded in x around inf 87.4%
associate-/l*75.9%
associate-/r*75.9%
Simplified75.9%
if 1.6000000000000001e-14 < z Initial program 59.0%
associate-+l-59.0%
*-commutative59.0%
associate-*r*68.1%
*-commutative68.1%
associate-+l-68.1%
associate-*l*68.2%
associate-*l*69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in z around inf 58.4%
*-commutative58.4%
associate-/l*57.7%
associate-*r*57.6%
*-commutative57.6%
associate-*r/57.6%
*-commutative57.6%
Simplified57.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -1.75e-28) (not (<= z 15.2))) (/ (+ (* -4.0 (* a t)) (/ b z)) c) (/ (+ b (* y (* x 9.0))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.75e-28) || !(z <= 15.2)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + (y * (x * 9.0))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c 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.75d-28)) .or. (.not. (z <= 15.2d0))) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else
tmp = (b + (y * (x * 9.0d0))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -1.75e-28) || !(z <= 15.2)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + (y * (x * 9.0))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -1.75e-28) or not (z <= 15.2): tmp = ((-4.0 * (a * t)) + (b / z)) / c else: tmp = (b + (y * (x * 9.0))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -1.75e-28) || !(z <= 15.2)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + Float64(y * Float64(x * 9.0))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -1.75e-28) || ~((z <= 15.2)))
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
else
tmp = (b + (y * (x * 9.0))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -1.75e-28], N[Not[LessEqual[z, 15.2]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{-28} \lor \neg \left(z \leq 15.2\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + y \cdot \left(x \cdot 9\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -1.75e-28 or 15.199999999999999 < z Initial program 63.2%
Simplified73.7%
*-un-lft-identity73.7%
*-commutative73.7%
times-frac83.7%
+-commutative83.7%
Applied egg-rr83.7%
Taylor expanded in y around inf 84.6%
Taylor expanded in y around 0 79.7%
if -1.75e-28 < z < 15.199999999999999Initial program 93.6%
Simplified92.0%
*-un-lft-identity92.0%
*-commutative92.0%
times-frac83.8%
+-commutative83.8%
Applied egg-rr83.8%
Taylor expanded in z around 0 84.3%
+-commutative84.3%
associate-*r*84.3%
*-commutative84.3%
Simplified84.3%
Final simplification81.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= z -8e-28) (not (<= z 2.2))) (/ (+ (* -4.0 (* a t)) (/ b z)) c) (/ (+ b (* 9.0 (* x y))) (* z c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -8e-28) || !(z <= 2.2)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c 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 <= (-8d-28)) .or. (.not. (z <= 2.2d0))) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else
tmp = (b + (9.0d0 * (x * y))) / (z * c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((z <= -8e-28) || !(z <= 2.2)) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = (b + (9.0 * (x * y))) / (z * c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (z <= -8e-28) or not (z <= 2.2): tmp = ((-4.0 * (a * t)) + (b / z)) / c else: tmp = (b + (9.0 * (x * y))) / (z * c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((z <= -8e-28) || !(z <= 2.2)) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); else tmp = Float64(Float64(b + Float64(9.0 * Float64(x * y))) / Float64(z * c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((z <= -8e-28) || ~((z <= 2.2)))
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
else
tmp = (b + (9.0 * (x * y))) / (z * c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[z, -8e-28], N[Not[LessEqual[z, 2.2]], $MachinePrecision]], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[(b + N[(9.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-28} \lor \neg \left(z \leq 2.2\right):\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;\frac{b + 9 \cdot \left(x \cdot y\right)}{z \cdot c}\\
\end{array}
\end{array}
if z < -7.99999999999999977e-28 or 2.2000000000000002 < z Initial program 63.2%
Simplified73.7%
*-un-lft-identity73.7%
*-commutative73.7%
times-frac83.7%
+-commutative83.7%
Applied egg-rr83.7%
Taylor expanded in y around inf 84.6%
Taylor expanded in y around 0 79.7%
if -7.99999999999999977e-28 < z < 2.2000000000000002Initial program 93.6%
associate-+l-93.6%
*-commutative93.6%
associate-*r*95.1%
*-commutative95.1%
associate-+l-95.1%
associate-*l*95.1%
associate-*l*92.0%
*-commutative92.0%
Simplified92.0%
Taylor expanded in x around inf 84.3%
Final simplification81.9%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c)
:precision binary64
(if (<= y -4.6e+58)
(* 9.0 (* x (/ (/ y c) z)))
(if (<= y 4e+184)
(/ (+ (* -4.0 (* a t)) (/ b z)) c)
(* 9.0 (* y (/ x (* z c)))))))assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -4.6e+58) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (y <= 4e+184) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = 9.0 * (y * (x / (z * c)));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c 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 (y <= (-4.6d+58)) then
tmp = 9.0d0 * (x * ((y / c) / z))
else if (y <= 4d+184) then
tmp = (((-4.0d0) * (a * t)) + (b / z)) / c
else
tmp = 9.0d0 * (y * (x / (z * c)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (y <= -4.6e+58) {
tmp = 9.0 * (x * ((y / c) / z));
} else if (y <= 4e+184) {
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
} else {
tmp = 9.0 * (y * (x / (z * c)));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if y <= -4.6e+58: tmp = 9.0 * (x * ((y / c) / z)) elif y <= 4e+184: tmp = ((-4.0 * (a * t)) + (b / z)) / c else: tmp = 9.0 * (y * (x / (z * c))) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (y <= -4.6e+58) tmp = Float64(9.0 * Float64(x * Float64(Float64(y / c) / z))); elseif (y <= 4e+184) tmp = Float64(Float64(Float64(-4.0 * Float64(a * t)) + Float64(b / z)) / c); else tmp = Float64(9.0 * Float64(y * Float64(x / Float64(z * c)))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (y <= -4.6e+58)
tmp = 9.0 * (x * ((y / c) / z));
elseif (y <= 4e+184)
tmp = ((-4.0 * (a * t)) + (b / z)) / c;
else
tmp = 9.0 * (y * (x / (z * c)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -4.6e+58], N[(9.0 * N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e+184], N[(N[(N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(9.0 * N[(y * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{+58}:\\
\;\;\;\;9 \cdot \left(x \cdot \frac{\frac{y}{c}}{z}\right)\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+184}:\\
\;\;\;\;\frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c}\\
\mathbf{else}:\\
\;\;\;\;9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\
\end{array}
\end{array}
if y < -4.60000000000000005e58Initial program 76.4%
Simplified81.1%
*-un-lft-identity81.1%
*-commutative81.1%
times-frac85.9%
+-commutative85.9%
Applied egg-rr85.9%
Taylor expanded in x around inf 46.3%
associate-/l*55.4%
associate-/r*60.1%
Simplified60.1%
if -4.60000000000000005e58 < y < 4.00000000000000007e184Initial program 78.8%
Simplified84.2%
*-un-lft-identity84.2%
*-commutative84.2%
times-frac84.8%
+-commutative84.8%
Applied egg-rr84.8%
Taylor expanded in y around inf 72.6%
Taylor expanded in y around 0 77.7%
if 4.00000000000000007e184 < y Initial program 74.6%
Simplified74.7%
fma-undefine74.7%
Applied egg-rr74.7%
Taylor expanded in x around inf 68.1%
associate-*r/68.2%
*-commutative68.2%
associate-*r*68.2%
associate-*l/80.8%
*-commutative80.8%
associate-*r/80.8%
associate-*l*80.8%
*-commutative80.8%
Simplified80.8%
Final simplification75.3%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= b -360000.0) (not (<= b 1.12e-13))) (/ (/ b c) z) (* a (/ (* t -4.0) c))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -360000.0) || !(b <= 1.12e-13)) {
tmp = (b / c) / z;
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c 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 ((b <= (-360000.0d0)) .or. (.not. (b <= 1.12d-13))) then
tmp = (b / c) / z
else
tmp = a * ((t * (-4.0d0)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -360000.0) || !(b <= 1.12e-13)) {
tmp = (b / c) / z;
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -360000.0) or not (b <= 1.12e-13): tmp = (b / c) / z else: tmp = a * ((t * -4.0) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -360000.0) || !(b <= 1.12e-13)) tmp = Float64(Float64(b / c) / z); else tmp = Float64(a * Float64(Float64(t * -4.0) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((b <= -360000.0) || ~((b <= 1.12e-13)))
tmp = (b / c) / z;
else
tmp = a * ((t * -4.0) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -360000.0], N[Not[LessEqual[b, 1.12e-13]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -360000 \lor \neg \left(b \leq 1.12 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\end{array}
\end{array}
if b < -3.6e5 or 1.12e-13 < b Initial program 83.8%
associate-+l-83.8%
*-commutative83.8%
associate-*r*83.3%
*-commutative83.3%
associate-+l-83.3%
associate-*l*83.3%
associate-*l*85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in b around inf 54.5%
associate-/r*58.9%
Simplified58.9%
if -3.6e5 < b < 1.12e-13Initial program 71.1%
associate-+l-71.1%
*-commutative71.1%
associate-*r*75.9%
*-commutative75.9%
associate-+l-75.9%
associate-*l*75.8%
associate-*l*76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in z around inf 57.2%
*-commutative57.2%
associate-/l*54.9%
associate-*r*54.9%
*-commutative54.9%
associate-*r/54.9%
*-commutative54.9%
Simplified54.9%
Final simplification57.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (or (<= b -13500.0) (not (<= b 1.55e-9))) (/ (/ b c) z) (* a (* t (/ -4.0 c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -13500.0) || !(b <= 1.55e-9)) {
tmp = (b / c) / z;
} else {
tmp = a * (t * (-4.0 / c));
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c 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 ((b <= (-13500.0d0)) .or. (.not. (b <= 1.55d-9))) then
tmp = (b / c) / z
else
tmp = a * (t * ((-4.0d0) / c))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if ((b <= -13500.0) || !(b <= 1.55e-9)) {
tmp = (b / c) / z;
} else {
tmp = a * (t * (-4.0 / c));
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if (b <= -13500.0) or not (b <= 1.55e-9): tmp = (b / c) / z else: tmp = a * (t * (-4.0 / c)) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if ((b <= -13500.0) || !(b <= 1.55e-9)) tmp = Float64(Float64(b / c) / z); else tmp = Float64(a * Float64(t * Float64(-4.0 / c))); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if ((b <= -13500.0) || ~((b <= 1.55e-9)))
tmp = (b / c) / z;
else
tmp = a * (t * (-4.0 / c));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[Or[LessEqual[b, -13500.0], N[Not[LessEqual[b, 1.55e-9]], $MachinePrecision]], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], N[(a * N[(t * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -13500 \lor \neg \left(b \leq 1.55 \cdot 10^{-9}\right):\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t \cdot \frac{-4}{c}\right)\\
\end{array}
\end{array}
if b < -13500 or 1.55000000000000002e-9 < b Initial program 83.8%
associate-+l-83.8%
*-commutative83.8%
associate-*r*83.3%
*-commutative83.3%
associate-+l-83.3%
associate-*l*83.3%
associate-*l*85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in b around inf 54.5%
associate-/r*58.9%
Simplified58.9%
if -13500 < b < 1.55000000000000002e-9Initial program 71.1%
Simplified79.4%
*-un-lft-identity79.4%
*-commutative79.4%
times-frac85.2%
+-commutative85.2%
Applied egg-rr85.2%
Taylor expanded in z around inf 57.2%
*-commutative57.2%
associate-/l*54.9%
associate-*r*54.9%
*-commutative54.9%
associate-*r/54.9%
*-commutative54.9%
associate-/l*54.8%
Simplified54.8%
Final simplification57.0%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (if (<= z -780000000000.0) (* (* a t) (/ -4.0 c)) (if (<= z 1.05e-11) (* b (/ 1.0 (* z c))) (* a (/ (* t -4.0) c)))))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -780000000000.0) {
tmp = (a * t) * (-4.0 / c);
} else if (z <= 1.05e-11) {
tmp = b * (1.0 / (z * c));
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
NOTE: x, y, z, t, a, b, and c 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 <= (-780000000000.0d0)) then
tmp = (a * t) * ((-4.0d0) / c)
else if (z <= 1.05d-11) then
tmp = b * (1.0d0 / (z * c))
else
tmp = a * ((t * (-4.0d0)) / c)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
double tmp;
if (z <= -780000000000.0) {
tmp = (a * t) * (-4.0 / c);
} else if (z <= 1.05e-11) {
tmp = b * (1.0 / (z * c));
} else {
tmp = a * ((t * -4.0) / c);
}
return tmp;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): tmp = 0 if z <= -780000000000.0: tmp = (a * t) * (-4.0 / c) elif z <= 1.05e-11: tmp = b * (1.0 / (z * c)) else: tmp = a * ((t * -4.0) / c) return tmp
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) tmp = 0.0 if (z <= -780000000000.0) tmp = Float64(Float64(a * t) * Float64(-4.0 / c)); elseif (z <= 1.05e-11) tmp = Float64(b * Float64(1.0 / Float64(z * c))); else tmp = Float64(a * Float64(Float64(t * -4.0) / c)); end return tmp end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp_2 = code(x, y, z, t, a, b, c)
tmp = 0.0;
if (z <= -780000000000.0)
tmp = (a * t) * (-4.0 / c);
elseif (z <= 1.05e-11)
tmp = b * (1.0 / (z * c));
else
tmp = a * ((t * -4.0) / c);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -780000000000.0], N[(N[(a * t), $MachinePrecision] * N[(-4.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e-11], N[(b * N[(1.0 / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t * -4.0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -780000000000:\\
\;\;\;\;\left(a \cdot t\right) \cdot \frac{-4}{c}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-11}:\\
\;\;\;\;b \cdot \frac{1}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t \cdot -4}{c}\\
\end{array}
\end{array}
if z < -7.8e11Initial program 64.7%
associate-+l-64.7%
*-commutative64.7%
associate-*r*60.6%
*-commutative60.6%
associate-+l-60.6%
associate-*l*60.6%
associate-*l*71.0%
*-commutative71.0%
Simplified71.0%
Taylor expanded in z around inf 61.7%
*-commutative61.7%
associate-*r/61.7%
*-commutative61.7%
*-commutative61.7%
associate-*r*61.7%
Simplified61.7%
associate-/l*56.1%
associate-*r/56.0%
associate-*r*61.7%
Applied egg-rr61.7%
if -7.8e11 < z < 1.0499999999999999e-11Initial program 94.4%
associate-+l-94.4%
*-commutative94.4%
associate-*r*95.9%
*-commutative95.9%
associate-+l-95.9%
associate-*l*95.9%
associate-*l*92.9%
*-commutative92.9%
Simplified92.9%
Taylor expanded in b around inf 55.0%
*-commutative55.0%
Simplified55.0%
div-inv55.8%
Applied egg-rr55.8%
if 1.0499999999999999e-11 < z Initial program 59.0%
associate-+l-59.0%
*-commutative59.0%
associate-*r*68.1%
*-commutative68.1%
associate-+l-68.1%
associate-*l*68.2%
associate-*l*69.6%
*-commutative69.6%
Simplified69.6%
Taylor expanded in z around inf 58.4%
*-commutative58.4%
associate-/l*57.7%
associate-*r*57.6%
*-commutative57.6%
associate-*r/57.6%
*-commutative57.6%
Simplified57.6%
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. (FPCore (x y z t a b c) :precision binary64 (/ (/ b c) z))
assert(x < y && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
NOTE: x, y, z, t, a, b, and c 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 / c) / z
end function
assert x < y && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return (b / c) / z;
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return (b / c) / z
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(Float64(b / c) / z) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = (b / c) / z;
end
NOTE: x, y, z, t, a, b, and c should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{\frac{b}{c}}{z}
\end{array}
Initial program 77.9%
associate-+l-77.9%
*-commutative77.9%
associate-*r*79.8%
*-commutative79.8%
associate-+l-79.8%
associate-*l*79.8%
associate-*l*81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in b around inf 37.6%
associate-/r*39.1%
Simplified39.1%
NOTE: x, y, z, t, a, b, and c 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 && y < z && z < t && t < a && a < b && b < c);
double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
NOTE: x, y, z, t, a, b, and c 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 && y < z && z < t && t < a && a < b && b < c;
public static double code(double x, double y, double z, double t, double a, double b, double c) {
return b / (z * c);
}
[x, y, z, t, a, b, c] = sort([x, y, z, t, a, b, c]) def code(x, y, z, t, a, b, c): return b / (z * c)
x, y, z, t, a, b, c = sort([x, y, z, t, a, b, c]) function code(x, y, z, t, a, b, c) return Float64(b / Float64(z * c)) end
x, y, z, t, a, b, c = num2cell(sort([x, y, z, t, a, b, c])){:}
function tmp = code(x, y, z, t, a, b, c)
tmp = b / (z * c);
end
NOTE: x, y, z, t, a, b, and c 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, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\frac{b}{z \cdot c}
\end{array}
Initial program 77.9%
associate-+l-77.9%
*-commutative77.9%
associate-*r*79.8%
*-commutative79.8%
associate-+l-79.8%
associate-*l*79.8%
associate-*l*81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in b around inf 37.6%
*-commutative37.6%
Simplified37.6%
(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 2024096
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(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)))