
(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 15 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
(let* ((t_1
(/ (* x (- (/ (+ (* t (* -4.0 a)) (/ b z)) x) (* -9.0 (/ y z)))) c)))
(if (<= z -1.5e+21)
t_1
(if (<= z 2.8e-22)
(/ (/ (+ (+ b (* t (* a (* z -4.0)))) (* x (* y 9.0))) c) z)
t_1))))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 = (x * ((((t * (-4.0 * a)) + (b / z)) / x) - (-9.0 * (y / z)))) / c;
double tmp;
if (z <= -1.5e+21) {
tmp = t_1;
} else if (z <= 2.8e-22) {
tmp = (((b + (t * (a * (z * -4.0)))) + (x * (y * 9.0))) / c) / z;
} else {
tmp = t_1;
}
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 = (x * ((((t * ((-4.0d0) * a)) + (b / z)) / x) - ((-9.0d0) * (y / z)))) / c
if (z <= (-1.5d+21)) then
tmp = t_1
else if (z <= 2.8d-22) then
tmp = (((b + (t * (a * (z * (-4.0d0))))) + (x * (y * 9.0d0))) / c) / z
else
tmp = t_1
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 = (x * ((((t * (-4.0 * a)) + (b / z)) / x) - (-9.0 * (y / z)))) / c;
double tmp;
if (z <= -1.5e+21) {
tmp = t_1;
} else if (z <= 2.8e-22) {
tmp = (((b + (t * (a * (z * -4.0)))) + (x * (y * 9.0))) / c) / z;
} else {
tmp = t_1;
}
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 = (x * ((((t * (-4.0 * a)) + (b / z)) / x) - (-9.0 * (y / z)))) / c tmp = 0 if z <= -1.5e+21: tmp = t_1 elif z <= 2.8e-22: tmp = (((b + (t * (a * (z * -4.0)))) + (x * (y * 9.0))) / c) / z else: tmp = t_1 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(Float64(x * Float64(Float64(Float64(Float64(t * Float64(-4.0 * a)) + Float64(b / z)) / x) - Float64(-9.0 * Float64(y / z)))) / c) tmp = 0.0 if (z <= -1.5e+21) tmp = t_1; elseif (z <= 2.8e-22) tmp = Float64(Float64(Float64(Float64(b + Float64(t * Float64(a * Float64(z * -4.0)))) + Float64(x * Float64(y * 9.0))) / c) / z); else tmp = t_1; 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 = (x * ((((t * (-4.0 * a)) + (b / z)) / x) - (-9.0 * (y / z)))) / c;
tmp = 0.0;
if (z <= -1.5e+21)
tmp = t_1;
elseif (z <= 2.8e-22)
tmp = (((b + (t * (a * (z * -4.0)))) + (x * (y * 9.0))) / c) / z;
else
tmp = t_1;
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[(N[(x * N[(N[(N[(N[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] - N[(-9.0 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.5e+21], t$95$1, If[LessEqual[z, 2.8e-22], N[(N[(N[(N[(b + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{x \cdot \left(\frac{t \cdot \left(-4 \cdot a\right) + \frac{b}{z}}{x} - -9 \cdot \frac{y}{z}\right)}{c}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-22}:\\
\;\;\;\;\frac{\frac{\left(b + t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right) + x \cdot \left(y \cdot 9\right)}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.5e21 or 2.79999999999999995e-22 < z Initial program 57.6%
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr70.0%
Taylor expanded in x around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
*-lowering-*.f64N/A
Simplified89.4%
if -1.5e21 < z < 2.79999999999999995e-22Initial program 93.2%
associate-/l/N/A
/-lowering-/.f64N/A
Applied egg-rr96.6%
Final simplification93.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
(let* ((t_1 (* y (* x 9.0))))
(if (<= t_1 -2e+298)
(* (/ (* y 9.0) z) (/ x c))
(if (<= t_1 -5e-163)
(/ (/ (+ (+ b (* t (* a (* z -4.0)))) (* x (* y 9.0))) c) z)
(if (<= t_1 5e-106)
(/ (+ (/ b z) (* -4.0 (* t a))) c)
(if (<= t_1 2e+286)
(/ (+ b (- t_1 (* a (* t (* z 4.0))))) (* z c))
(* (/ x c) (/ 9.0 (/ 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 t_1 = y * (x * 9.0);
double tmp;
if (t_1 <= -2e+298) {
tmp = ((y * 9.0) / z) * (x / c);
} else if (t_1 <= -5e-163) {
tmp = (((b + (t * (a * (z * -4.0)))) + (x * (y * 9.0))) / c) / z;
} else if (t_1 <= 5e-106) {
tmp = ((b / z) + (-4.0 * (t * a))) / c;
} else if (t_1 <= 2e+286) {
tmp = (b + (t_1 - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (x / c) * (9.0 / (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) :: t_1
real(8) :: tmp
t_1 = y * (x * 9.0d0)
if (t_1 <= (-2d+298)) then
tmp = ((y * 9.0d0) / z) * (x / c)
else if (t_1 <= (-5d-163)) then
tmp = (((b + (t * (a * (z * (-4.0d0))))) + (x * (y * 9.0d0))) / c) / z
else if (t_1 <= 5d-106) then
tmp = ((b / z) + ((-4.0d0) * (t * a))) / c
else if (t_1 <= 2d+286) then
tmp = (b + (t_1 - (a * (t * (z * 4.0d0))))) / (z * c)
else
tmp = (x / c) * (9.0d0 / (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 t_1 = y * (x * 9.0);
double tmp;
if (t_1 <= -2e+298) {
tmp = ((y * 9.0) / z) * (x / c);
} else if (t_1 <= -5e-163) {
tmp = (((b + (t * (a * (z * -4.0)))) + (x * (y * 9.0))) / c) / z;
} else if (t_1 <= 5e-106) {
tmp = ((b / z) + (-4.0 * (t * a))) / c;
} else if (t_1 <= 2e+286) {
tmp = (b + (t_1 - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = (x / c) * (9.0 / (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): t_1 = y * (x * 9.0) tmp = 0 if t_1 <= -2e+298: tmp = ((y * 9.0) / z) * (x / c) elif t_1 <= -5e-163: tmp = (((b + (t * (a * (z * -4.0)))) + (x * (y * 9.0))) / c) / z elif t_1 <= 5e-106: tmp = ((b / z) + (-4.0 * (t * a))) / c elif t_1 <= 2e+286: tmp = (b + (t_1 - (a * (t * (z * 4.0))))) / (z * c) else: tmp = (x / c) * (9.0 / (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) t_1 = Float64(y * Float64(x * 9.0)) tmp = 0.0 if (t_1 <= -2e+298) tmp = Float64(Float64(Float64(y * 9.0) / z) * Float64(x / c)); elseif (t_1 <= -5e-163) tmp = Float64(Float64(Float64(Float64(b + Float64(t * Float64(a * Float64(z * -4.0)))) + Float64(x * Float64(y * 9.0))) / c) / z); elseif (t_1 <= 5e-106) tmp = Float64(Float64(Float64(b / z) + Float64(-4.0 * Float64(t * a))) / c); elseif (t_1 <= 2e+286) tmp = Float64(Float64(b + Float64(t_1 - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = Float64(Float64(x / c) * Float64(9.0 / 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)
t_1 = y * (x * 9.0);
tmp = 0.0;
if (t_1 <= -2e+298)
tmp = ((y * 9.0) / z) * (x / c);
elseif (t_1 <= -5e-163)
tmp = (((b + (t * (a * (z * -4.0)))) + (x * (y * 9.0))) / c) / z;
elseif (t_1 <= 5e-106)
tmp = ((b / z) + (-4.0 * (t * a))) / c;
elseif (t_1 <= 2e+286)
tmp = (b + (t_1 - (a * (t * (z * 4.0))))) / (z * c);
else
tmp = (x / c) * (9.0 / (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_] := Block[{t$95$1 = N[(y * N[(x * 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+298], N[(N[(N[(y * 9.0), $MachinePrecision] / z), $MachinePrecision] * N[(x / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-163], N[(N[(N[(N[(b + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 5e-106], N[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 2e+286], N[(N[(b + N[(t$95$1 - N[(a * N[(t * N[(z * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(x / c), $MachinePrecision] * N[(9.0 / N[(z / y), $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}
t_1 := y \cdot \left(x \cdot 9\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+298}:\\
\;\;\;\;\frac{y \cdot 9}{z} \cdot \frac{x}{c}\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-163}:\\
\;\;\;\;\frac{\frac{\left(b + t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right) + x \cdot \left(y \cdot 9\right)}{c}}{z}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-106}:\\
\;\;\;\;\frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+286}:\\
\;\;\;\;\frac{b + \left(t\_1 - a \cdot \left(t \cdot \left(z \cdot 4\right)\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{c} \cdot \frac{9}{\frac{z}{y}}\\
\end{array}
\end{array}
if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.9999999999999999e298Initial program 35.7%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr41.2%
Taylor expanded in x around inf
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6472.5%
Simplified72.5%
associate-*r/N/A
associate-*r/N/A
*-commutativeN/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6488.5%
Applied egg-rr88.5%
if -1.9999999999999999e298 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.99999999999999977e-163Initial program 82.1%
associate-/l/N/A
/-lowering-/.f64N/A
Applied egg-rr90.1%
if -4.99999999999999977e-163 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.99999999999999983e-106Initial program 73.4%
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr83.2%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6478.3%
Simplified78.3%
Taylor expanded in b around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6493.5%
Simplified93.5%
if 4.99999999999999983e-106 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.00000000000000007e286Initial program 88.7%
if 2.00000000000000007e286 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) Initial program 61.8%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr61.9%
Taylor expanded in x around inf
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6486.6%
Simplified86.6%
associate-*r*N/A
clear-numN/A
un-div-invN/A
associate-/l*N/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6487.1%
Applied egg-rr87.1%
Final simplification90.7%
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 z) (* -4.0 (* t a))) c)) (t_2 (* x (* y 9.0))))
(if (<= z -1.6e+200)
t_1
(if (<= z -3.6e-32)
(* (/ (+ b (+ t_2 (* (* z -4.0) (* t a)))) z) (/ 1.0 c))
(if (<= z 3.7e+84)
(/ 1.0 (/ z (/ (+ (+ b (* t (* a (* z -4.0)))) t_2) c)))
t_1)))))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 / z) + (-4.0 * (t * a))) / c;
double t_2 = x * (y * 9.0);
double tmp;
if (z <= -1.6e+200) {
tmp = t_1;
} else if (z <= -3.6e-32) {
tmp = ((b + (t_2 + ((z * -4.0) * (t * a)))) / z) * (1.0 / c);
} else if (z <= 3.7e+84) {
tmp = 1.0 / (z / (((b + (t * (a * (z * -4.0)))) + t_2) / c));
} else {
tmp = t_1;
}
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 / z) + ((-4.0d0) * (t * a))) / c
t_2 = x * (y * 9.0d0)
if (z <= (-1.6d+200)) then
tmp = t_1
else if (z <= (-3.6d-32)) then
tmp = ((b + (t_2 + ((z * (-4.0d0)) * (t * a)))) / z) * (1.0d0 / c)
else if (z <= 3.7d+84) then
tmp = 1.0d0 / (z / (((b + (t * (a * (z * (-4.0d0))))) + t_2) / c))
else
tmp = t_1
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 / z) + (-4.0 * (t * a))) / c;
double t_2 = x * (y * 9.0);
double tmp;
if (z <= -1.6e+200) {
tmp = t_1;
} else if (z <= -3.6e-32) {
tmp = ((b + (t_2 + ((z * -4.0) * (t * a)))) / z) * (1.0 / c);
} else if (z <= 3.7e+84) {
tmp = 1.0 / (z / (((b + (t * (a * (z * -4.0)))) + t_2) / c));
} else {
tmp = t_1;
}
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 / z) + (-4.0 * (t * a))) / c t_2 = x * (y * 9.0) tmp = 0 if z <= -1.6e+200: tmp = t_1 elif z <= -3.6e-32: tmp = ((b + (t_2 + ((z * -4.0) * (t * a)))) / z) * (1.0 / c) elif z <= 3.7e+84: tmp = 1.0 / (z / (((b + (t * (a * (z * -4.0)))) + t_2) / c)) else: tmp = t_1 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(Float64(Float64(b / z) + Float64(-4.0 * Float64(t * a))) / c) t_2 = Float64(x * Float64(y * 9.0)) tmp = 0.0 if (z <= -1.6e+200) tmp = t_1; elseif (z <= -3.6e-32) tmp = Float64(Float64(Float64(b + Float64(t_2 + Float64(Float64(z * -4.0) * Float64(t * a)))) / z) * Float64(1.0 / c)); elseif (z <= 3.7e+84) tmp = Float64(1.0 / Float64(z / Float64(Float64(Float64(b + Float64(t * Float64(a * Float64(z * -4.0)))) + t_2) / c))); else tmp = t_1; 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 / z) + (-4.0 * (t * a))) / c;
t_2 = x * (y * 9.0);
tmp = 0.0;
if (z <= -1.6e+200)
tmp = t_1;
elseif (z <= -3.6e-32)
tmp = ((b + (t_2 + ((z * -4.0) * (t * a)))) / z) * (1.0 / c);
elseif (z <= 3.7e+84)
tmp = 1.0 / (z / (((b + (t * (a * (z * -4.0)))) + t_2) / c));
else
tmp = t_1;
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[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+200], t$95$1, If[LessEqual[z, -3.6e-32], N[(N[(N[(b + N[(t$95$2 + N[(N[(z * -4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e+84], N[(1.0 / N[(z / N[(N[(N[(b + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\
t_2 := x \cdot \left(y \cdot 9\right)\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+200}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.6 \cdot 10^{-32}:\\
\;\;\;\;\frac{b + \left(t\_2 + \left(z \cdot -4\right) \cdot \left(t \cdot a\right)\right)}{z} \cdot \frac{1}{c}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+84}:\\
\;\;\;\;\frac{1}{\frac{z}{\frac{\left(b + t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right) + t\_2}{c}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.60000000000000016e200 or 3.7e84 < z Initial program 46.0%
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr56.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6449.4%
Simplified49.4%
Taylor expanded in b around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6478.5%
Simplified78.5%
if -1.60000000000000016e200 < z < -3.59999999999999993e-32Initial program 71.5%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr79.4%
associate-/l/N/A
associate-/r/N/A
clear-numN/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr87.6%
if -3.59999999999999993e-32 < z < 3.7e84Initial program 92.1%
associate-/l/N/A
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
Applied egg-rr96.0%
Final simplification89.8%
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 z) (* -4.0 (* t a))) c)) (t_2 (* x (* y 9.0))))
(if (<= z -2.7e+201)
t_1
(if (<= z -1e-13)
(* (/ (+ b (+ t_2 (* (* z -4.0) (* t a)))) z) (/ 1.0 c))
(if (<= z 5.2e+98)
(/ (/ (+ (+ b (* t (* a (* z -4.0)))) t_2) c) z)
t_1)))))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 / z) + (-4.0 * (t * a))) / c;
double t_2 = x * (y * 9.0);
double tmp;
if (z <= -2.7e+201) {
tmp = t_1;
} else if (z <= -1e-13) {
tmp = ((b + (t_2 + ((z * -4.0) * (t * a)))) / z) * (1.0 / c);
} else if (z <= 5.2e+98) {
tmp = (((b + (t * (a * (z * -4.0)))) + t_2) / c) / z;
} else {
tmp = t_1;
}
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 / z) + ((-4.0d0) * (t * a))) / c
t_2 = x * (y * 9.0d0)
if (z <= (-2.7d+201)) then
tmp = t_1
else if (z <= (-1d-13)) then
tmp = ((b + (t_2 + ((z * (-4.0d0)) * (t * a)))) / z) * (1.0d0 / c)
else if (z <= 5.2d+98) then
tmp = (((b + (t * (a * (z * (-4.0d0))))) + t_2) / c) / z
else
tmp = t_1
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 / z) + (-4.0 * (t * a))) / c;
double t_2 = x * (y * 9.0);
double tmp;
if (z <= -2.7e+201) {
tmp = t_1;
} else if (z <= -1e-13) {
tmp = ((b + (t_2 + ((z * -4.0) * (t * a)))) / z) * (1.0 / c);
} else if (z <= 5.2e+98) {
tmp = (((b + (t * (a * (z * -4.0)))) + t_2) / c) / z;
} else {
tmp = t_1;
}
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 / z) + (-4.0 * (t * a))) / c t_2 = x * (y * 9.0) tmp = 0 if z <= -2.7e+201: tmp = t_1 elif z <= -1e-13: tmp = ((b + (t_2 + ((z * -4.0) * (t * a)))) / z) * (1.0 / c) elif z <= 5.2e+98: tmp = (((b + (t * (a * (z * -4.0)))) + t_2) / c) / z else: tmp = t_1 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(Float64(Float64(b / z) + Float64(-4.0 * Float64(t * a))) / c) t_2 = Float64(x * Float64(y * 9.0)) tmp = 0.0 if (z <= -2.7e+201) tmp = t_1; elseif (z <= -1e-13) tmp = Float64(Float64(Float64(b + Float64(t_2 + Float64(Float64(z * -4.0) * Float64(t * a)))) / z) * Float64(1.0 / c)); elseif (z <= 5.2e+98) tmp = Float64(Float64(Float64(Float64(b + Float64(t * Float64(a * Float64(z * -4.0)))) + t_2) / c) / z); else tmp = t_1; 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 / z) + (-4.0 * (t * a))) / c;
t_2 = x * (y * 9.0);
tmp = 0.0;
if (z <= -2.7e+201)
tmp = t_1;
elseif (z <= -1e-13)
tmp = ((b + (t_2 + ((z * -4.0) * (t * a)))) / z) * (1.0 / c);
elseif (z <= 5.2e+98)
tmp = (((b + (t * (a * (z * -4.0)))) + t_2) / c) / z;
else
tmp = t_1;
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[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+201], t$95$1, If[LessEqual[z, -1e-13], N[(N[(N[(b + N[(t$95$2 + N[(N[(z * -4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+98], N[(N[(N[(N[(b + N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\
t_2 := x \cdot \left(y \cdot 9\right)\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+201}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-13}:\\
\;\;\;\;\frac{b + \left(t\_2 + \left(z \cdot -4\right) \cdot \left(t \cdot a\right)\right)}{z} \cdot \frac{1}{c}\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+98}:\\
\;\;\;\;\frac{\frac{\left(b + t \cdot \left(a \cdot \left(z \cdot -4\right)\right)\right) + t\_2}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.7e201 or 5.1999999999999999e98 < z Initial program 45.2%
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr55.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6448.6%
Simplified48.6%
Taylor expanded in b around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6478.2%
Simplified78.2%
if -2.7e201 < z < -1e-13Initial program 71.7%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr80.1%
associate-/l/N/A
associate-/r/N/A
clear-numN/A
div-invN/A
*-lowering-*.f64N/A
Applied egg-rr88.9%
if -1e-13 < z < 5.1999999999999999e98Initial program 91.7%
associate-/l/N/A
/-lowering-/.f64N/A
Applied egg-rr95.5%
Final simplification89.8%
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 z) (* -4.0 (* t a))) c)))
(if (<= z -4.8e+182)
t_1
(if (<= z 3.5e+19)
(/ (+ b (- (* y (* x 9.0)) (* a (* t (* z 4.0))))) (* z c))
t_1))))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 / z) + (-4.0 * (t * a))) / c;
double tmp;
if (z <= -4.8e+182) {
tmp = t_1;
} else if (z <= 3.5e+19) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = t_1;
}
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 / z) + ((-4.0d0) * (t * a))) / c
if (z <= (-4.8d+182)) then
tmp = t_1
else if (z <= 3.5d+19) then
tmp = (b + ((y * (x * 9.0d0)) - (a * (t * (z * 4.0d0))))) / (z * c)
else
tmp = t_1
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 / z) + (-4.0 * (t * a))) / c;
double tmp;
if (z <= -4.8e+182) {
tmp = t_1;
} else if (z <= 3.5e+19) {
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
} else {
tmp = t_1;
}
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 / z) + (-4.0 * (t * a))) / c tmp = 0 if z <= -4.8e+182: tmp = t_1 elif z <= 3.5e+19: tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c) else: tmp = t_1 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(Float64(Float64(b / z) + Float64(-4.0 * Float64(t * a))) / c) tmp = 0.0 if (z <= -4.8e+182) tmp = t_1; elseif (z <= 3.5e+19) tmp = Float64(Float64(b + Float64(Float64(y * Float64(x * 9.0)) - Float64(a * Float64(t * Float64(z * 4.0))))) / Float64(z * c)); else tmp = t_1; 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 / z) + (-4.0 * (t * a))) / c;
tmp = 0.0;
if (z <= -4.8e+182)
tmp = t_1;
elseif (z <= 3.5e+19)
tmp = (b + ((y * (x * 9.0)) - (a * (t * (z * 4.0))))) / (z * c);
else
tmp = t_1;
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[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -4.8e+182], t$95$1, If[LessEqual[z, 3.5e+19], 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], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+182}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+19}:\\
\;\;\;\;\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}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.80000000000000019e182 or 3.5e19 < z Initial program 50.5%
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr63.3%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6453.2%
Simplified53.2%
Taylor expanded in b around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6479.7%
Simplified79.7%
if -4.80000000000000019e182 < z < 3.5e19Initial program 88.2%
Final simplification85.5%
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 z) (* -4.0 (* t a))) c)))
(if (<= z -3.7e+94)
t_1
(if (<= z 9.5e+99)
(/ (+ b (+ (* t (* a (* z -4.0))) (* x (* y 9.0)))) (* z c))
t_1))))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 / z) + (-4.0 * (t * a))) / c;
double tmp;
if (z <= -3.7e+94) {
tmp = t_1;
} else if (z <= 9.5e+99) {
tmp = (b + ((t * (a * (z * -4.0))) + (x * (y * 9.0)))) / (z * c);
} else {
tmp = t_1;
}
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 / z) + ((-4.0d0) * (t * a))) / c
if (z <= (-3.7d+94)) then
tmp = t_1
else if (z <= 9.5d+99) then
tmp = (b + ((t * (a * (z * (-4.0d0)))) + (x * (y * 9.0d0)))) / (z * c)
else
tmp = t_1
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 / z) + (-4.0 * (t * a))) / c;
double tmp;
if (z <= -3.7e+94) {
tmp = t_1;
} else if (z <= 9.5e+99) {
tmp = (b + ((t * (a * (z * -4.0))) + (x * (y * 9.0)))) / (z * c);
} else {
tmp = t_1;
}
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 / z) + (-4.0 * (t * a))) / c tmp = 0 if z <= -3.7e+94: tmp = t_1 elif z <= 9.5e+99: tmp = (b + ((t * (a * (z * -4.0))) + (x * (y * 9.0)))) / (z * c) else: tmp = t_1 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(Float64(Float64(b / z) + Float64(-4.0 * Float64(t * a))) / c) tmp = 0.0 if (z <= -3.7e+94) tmp = t_1; elseif (z <= 9.5e+99) tmp = Float64(Float64(b + Float64(Float64(t * Float64(a * Float64(z * -4.0))) + Float64(x * Float64(y * 9.0)))) / Float64(z * c)); else tmp = t_1; 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 / z) + (-4.0 * (t * a))) / c;
tmp = 0.0;
if (z <= -3.7e+94)
tmp = t_1;
elseif (z <= 9.5e+99)
tmp = (b + ((t * (a * (z * -4.0))) + (x * (y * 9.0)))) / (z * c);
else
tmp = t_1;
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[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -3.7e+94], t$95$1, If[LessEqual[z, 9.5e+99], N[(N[(b + N[(N[(t * N[(a * N[(z * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+99}:\\
\;\;\;\;\frac{b + \left(t \cdot \left(a \cdot \left(z \cdot -4\right)\right) + x \cdot \left(y \cdot 9\right)\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.7000000000000001e94 or 9.49999999999999908e99 < z Initial program 47.9%
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr63.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6449.5%
Simplified49.5%
Taylor expanded in b around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6474.9%
Simplified74.9%
if -3.7000000000000001e94 < z < 9.49999999999999908e99Initial program 91.1%
+-lowering-+.f64N/A
sub-negN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-lft-neg-inN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval91.9%
Applied egg-rr91.9%
Final simplification86.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 (<= b -8.2e+96)
(/ (/ b c) z)
(if (<= b 1.5e-246)
(/ (* t (* -4.0 a)) c)
(if (<= b 1.95e+93) (/ (/ 9.0 (/ (/ c y) x)) z) (* (/ b c) (/ 1.0 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) {
double tmp;
if (b <= -8.2e+96) {
tmp = (b / c) / z;
} else if (b <= 1.5e-246) {
tmp = (t * (-4.0 * a)) / c;
} else if (b <= 1.95e+93) {
tmp = (9.0 / ((c / y) / x)) / z;
} else {
tmp = (b / c) * (1.0 / z);
}
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 <= (-8.2d+96)) then
tmp = (b / c) / z
else if (b <= 1.5d-246) then
tmp = (t * ((-4.0d0) * a)) / c
else if (b <= 1.95d+93) then
tmp = (9.0d0 / ((c / y) / x)) / z
else
tmp = (b / c) * (1.0d0 / z)
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 <= -8.2e+96) {
tmp = (b / c) / z;
} else if (b <= 1.5e-246) {
tmp = (t * (-4.0 * a)) / c;
} else if (b <= 1.95e+93) {
tmp = (9.0 / ((c / y) / x)) / z;
} else {
tmp = (b / c) * (1.0 / z);
}
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 <= -8.2e+96: tmp = (b / c) / z elif b <= 1.5e-246: tmp = (t * (-4.0 * a)) / c elif b <= 1.95e+93: tmp = (9.0 / ((c / y) / x)) / z else: tmp = (b / c) * (1.0 / z) 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 <= -8.2e+96) tmp = Float64(Float64(b / c) / z); elseif (b <= 1.5e-246) tmp = Float64(Float64(t * Float64(-4.0 * a)) / c); elseif (b <= 1.95e+93) tmp = Float64(Float64(9.0 / Float64(Float64(c / y) / x)) / z); else tmp = Float64(Float64(b / c) * Float64(1.0 / z)); 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 <= -8.2e+96)
tmp = (b / c) / z;
elseif (b <= 1.5e-246)
tmp = (t * (-4.0 * a)) / c;
elseif (b <= 1.95e+93)
tmp = (9.0 / ((c / y) / x)) / z;
else
tmp = (b / c) * (1.0 / z);
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[b, -8.2e+96], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 1.5e-246], N[(N[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[b, 1.95e+93], N[(N[(9.0 / N[(N[(c / y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $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 -8.2 \cdot 10^{+96}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{-246}:\\
\;\;\;\;\frac{t \cdot \left(-4 \cdot a\right)}{c}\\
\mathbf{elif}\;b \leq 1.95 \cdot 10^{+93}:\\
\;\;\;\;\frac{\frac{9}{\frac{\frac{c}{y}}{x}}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
\end{array}
\end{array}
if b < -8.19999999999999996e96Initial program 88.3%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6470.8%
Simplified70.8%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6472.0%
Applied egg-rr72.0%
if -8.19999999999999996e96 < b < 1.5e-246Initial program 69.4%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6451.8%
Simplified51.8%
if 1.5e-246 < b < 1.9500000000000001e93Initial program 75.6%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr82.4%
Taylor expanded in x around inf
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6446.8%
Simplified46.8%
associate-/l/N/A
associate-/r*N/A
/-lowering-/.f64N/A
associate-/r*N/A
metadata-evalN/A
/-lowering-/.f64N/A
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6446.9%
Applied egg-rr46.9%
if 1.9500000000000001e93 < b Initial program 76.2%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6454.7%
Simplified54.7%
div-invN/A
associate-*r/N/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6460.9%
Applied egg-rr60.9%
Final simplification56.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 (<= b -8.2e+96)
(/ (/ b c) z)
(if (<= b 6.8e-280)
(/ (* t (* -4.0 a)) c)
(if (<= b 1.25e+92) (* x (/ (/ 9.0 z) (/ c y))) (* (/ b c) (/ 1.0 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) {
double tmp;
if (b <= -8.2e+96) {
tmp = (b / c) / z;
} else if (b <= 6.8e-280) {
tmp = (t * (-4.0 * a)) / c;
} else if (b <= 1.25e+92) {
tmp = x * ((9.0 / z) / (c / y));
} else {
tmp = (b / c) * (1.0 / z);
}
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 <= (-8.2d+96)) then
tmp = (b / c) / z
else if (b <= 6.8d-280) then
tmp = (t * ((-4.0d0) * a)) / c
else if (b <= 1.25d+92) then
tmp = x * ((9.0d0 / z) / (c / y))
else
tmp = (b / c) * (1.0d0 / z)
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 <= -8.2e+96) {
tmp = (b / c) / z;
} else if (b <= 6.8e-280) {
tmp = (t * (-4.0 * a)) / c;
} else if (b <= 1.25e+92) {
tmp = x * ((9.0 / z) / (c / y));
} else {
tmp = (b / c) * (1.0 / z);
}
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 <= -8.2e+96: tmp = (b / c) / z elif b <= 6.8e-280: tmp = (t * (-4.0 * a)) / c elif b <= 1.25e+92: tmp = x * ((9.0 / z) / (c / y)) else: tmp = (b / c) * (1.0 / z) 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 <= -8.2e+96) tmp = Float64(Float64(b / c) / z); elseif (b <= 6.8e-280) tmp = Float64(Float64(t * Float64(-4.0 * a)) / c); elseif (b <= 1.25e+92) tmp = Float64(x * Float64(Float64(9.0 / z) / Float64(c / y))); else tmp = Float64(Float64(b / c) * Float64(1.0 / z)); 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 <= -8.2e+96)
tmp = (b / c) / z;
elseif (b <= 6.8e-280)
tmp = (t * (-4.0 * a)) / c;
elseif (b <= 1.25e+92)
tmp = x * ((9.0 / z) / (c / y));
else
tmp = (b / c) * (1.0 / z);
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[b, -8.2e+96], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[b, 6.8e-280], N[(N[(t * N[(-4.0 * a), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[b, 1.25e+92], N[(x * N[(N[(9.0 / z), $MachinePrecision] / N[(c / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $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 -8.2 \cdot 10^{+96}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{elif}\;b \leq 6.8 \cdot 10^{-280}:\\
\;\;\;\;\frac{t \cdot \left(-4 \cdot a\right)}{c}\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{+92}:\\
\;\;\;\;x \cdot \frac{\frac{9}{z}}{\frac{c}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
\end{array}
\end{array}
if b < -8.19999999999999996e96Initial program 88.3%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6470.8%
Simplified70.8%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6472.0%
Applied egg-rr72.0%
if -8.19999999999999996e96 < b < 6.7999999999999995e-280Initial program 69.9%
Taylor expanded in z around inf
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6453.6%
Simplified53.6%
if 6.7999999999999995e-280 < b < 1.25000000000000005e92Initial program 74.7%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr81.0%
Taylor expanded in x around inf
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6440.6%
Simplified40.6%
associate-*r/N/A
*-commutativeN/A
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6444.2%
Applied egg-rr44.2%
if 1.25000000000000005e92 < b Initial program 76.2%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6454.7%
Simplified54.7%
div-invN/A
associate-*r/N/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6460.9%
Applied egg-rr60.9%
Final simplification55.7%
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 (* t (/ (* -4.0 a) c))))
(if (<= a -4.3e-128)
t_1
(if (<= a 1e-36)
(* (/ b c) (/ 1.0 z))
(if (<= a 102000.0) (* x (* 9.0 (/ y (* z c)))) t_1)))))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 = t * ((-4.0 * a) / c);
double tmp;
if (a <= -4.3e-128) {
tmp = t_1;
} else if (a <= 1e-36) {
tmp = (b / c) * (1.0 / z);
} else if (a <= 102000.0) {
tmp = x * (9.0 * (y / (z * c)));
} else {
tmp = t_1;
}
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 = t * (((-4.0d0) * a) / c)
if (a <= (-4.3d-128)) then
tmp = t_1
else if (a <= 1d-36) then
tmp = (b / c) * (1.0d0 / z)
else if (a <= 102000.0d0) then
tmp = x * (9.0d0 * (y / (z * c)))
else
tmp = t_1
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 = t * ((-4.0 * a) / c);
double tmp;
if (a <= -4.3e-128) {
tmp = t_1;
} else if (a <= 1e-36) {
tmp = (b / c) * (1.0 / z);
} else if (a <= 102000.0) {
tmp = x * (9.0 * (y / (z * c)));
} else {
tmp = t_1;
}
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 = t * ((-4.0 * a) / c) tmp = 0 if a <= -4.3e-128: tmp = t_1 elif a <= 1e-36: tmp = (b / c) * (1.0 / z) elif a <= 102000.0: tmp = x * (9.0 * (y / (z * c))) else: tmp = t_1 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(t * Float64(Float64(-4.0 * a) / c)) tmp = 0.0 if (a <= -4.3e-128) tmp = t_1; elseif (a <= 1e-36) tmp = Float64(Float64(b / c) * Float64(1.0 / z)); elseif (a <= 102000.0) tmp = Float64(x * Float64(9.0 * Float64(y / Float64(z * c)))); else tmp = t_1; 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 = t * ((-4.0 * a) / c);
tmp = 0.0;
if (a <= -4.3e-128)
tmp = t_1;
elseif (a <= 1e-36)
tmp = (b / c) * (1.0 / z);
elseif (a <= 102000.0)
tmp = x * (9.0 * (y / (z * c)));
else
tmp = t_1;
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[(t * N[(N[(-4.0 * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.3e-128], t$95$1, If[LessEqual[a, 1e-36], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 102000.0], N[(x * N[(9.0 * N[(y / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{-4 \cdot a}{c}\\
\mathbf{if}\;a \leq -4.3 \cdot 10^{-128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 10^{-36}:\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
\mathbf{elif}\;a \leq 102000:\\
\;\;\;\;x \cdot \left(9 \cdot \frac{y}{z \cdot c}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -4.29999999999999994e-128 or 102000 < a Initial program 79.1%
Taylor expanded in z around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6442.5%
Simplified42.5%
associate-*l*N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
times-fracN/A
*-inversesN/A
clear-numN/A
div-invN/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6454.7%
Applied egg-rr54.7%
if -4.29999999999999994e-128 < a < 9.9999999999999994e-37Initial program 70.9%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6442.7%
Simplified42.7%
div-invN/A
associate-*r/N/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6448.3%
Applied egg-rr48.3%
if 9.9999999999999994e-37 < a < 102000Initial program 82.7%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr82.0%
Taylor expanded in x around inf
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6455.9%
Simplified55.9%
Final simplification52.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 z) (* -4.0 (* t a))) c)))
(if (<= z -9e-30)
t_1
(if (<= z 4.6e-171) (/ (+ b (* 9.0 (* y x))) (* z c)) t_1))))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 / z) + (-4.0 * (t * a))) / c;
double tmp;
if (z <= -9e-30) {
tmp = t_1;
} else if (z <= 4.6e-171) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = t_1;
}
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 / z) + ((-4.0d0) * (t * a))) / c
if (z <= (-9d-30)) then
tmp = t_1
else if (z <= 4.6d-171) then
tmp = (b + (9.0d0 * (y * x))) / (z * c)
else
tmp = t_1
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 / z) + (-4.0 * (t * a))) / c;
double tmp;
if (z <= -9e-30) {
tmp = t_1;
} else if (z <= 4.6e-171) {
tmp = (b + (9.0 * (y * x))) / (z * c);
} else {
tmp = t_1;
}
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 / z) + (-4.0 * (t * a))) / c tmp = 0 if z <= -9e-30: tmp = t_1 elif z <= 4.6e-171: tmp = (b + (9.0 * (y * x))) / (z * c) else: tmp = t_1 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(Float64(Float64(b / z) + Float64(-4.0 * Float64(t * a))) / c) tmp = 0.0 if (z <= -9e-30) tmp = t_1; elseif (z <= 4.6e-171) tmp = Float64(Float64(b + Float64(9.0 * Float64(y * x))) / Float64(z * c)); else tmp = t_1; 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 / z) + (-4.0 * (t * a))) / c;
tmp = 0.0;
if (z <= -9e-30)
tmp = t_1;
elseif (z <= 4.6e-171)
tmp = (b + (9.0 * (y * x))) / (z * c);
else
tmp = t_1;
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[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -9e-30], t$95$1, If[LessEqual[z, 4.6e-171], N[(N[(b + N[(9.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := \frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{if}\;z \leq -9 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{-171}:\\
\;\;\;\;\frac{b + 9 \cdot \left(y \cdot x\right)}{z \cdot c}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.99999999999999935e-30 or 4.59999999999999956e-171 < z Initial program 67.6%
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr75.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6463.0%
Simplified63.0%
Taylor expanded in b around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6477.4%
Simplified77.4%
if -8.99999999999999935e-30 < z < 4.59999999999999956e-171Initial program 91.3%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6482.6%
Simplified82.6%
Final simplification79.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 (<= y -3.5e-7)
(* x (/ (/ (* y 9.0) c) z))
(if (<= y 1.12e+193)
(/ (+ (/ b z) (* -4.0 (* t a))) c)
(* x (/ (/ 9.0 z) (/ c 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 (y <= -3.5e-7) {
tmp = x * (((y * 9.0) / c) / z);
} else if (y <= 1.12e+193) {
tmp = ((b / z) + (-4.0 * (t * a))) / c;
} else {
tmp = x * ((9.0 / z) / (c / 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 (y <= (-3.5d-7)) then
tmp = x * (((y * 9.0d0) / c) / z)
else if (y <= 1.12d+193) then
tmp = ((b / z) + ((-4.0d0) * (t * a))) / c
else
tmp = x * ((9.0d0 / z) / (c / 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 (y <= -3.5e-7) {
tmp = x * (((y * 9.0) / c) / z);
} else if (y <= 1.12e+193) {
tmp = ((b / z) + (-4.0 * (t * a))) / c;
} else {
tmp = x * ((9.0 / z) / (c / 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 y <= -3.5e-7: tmp = x * (((y * 9.0) / c) / z) elif y <= 1.12e+193: tmp = ((b / z) + (-4.0 * (t * a))) / c else: tmp = x * ((9.0 / z) / (c / 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 (y <= -3.5e-7) tmp = Float64(x * Float64(Float64(Float64(y * 9.0) / c) / z)); elseif (y <= 1.12e+193) tmp = Float64(Float64(Float64(b / z) + Float64(-4.0 * Float64(t * a))) / c); else tmp = Float64(x * Float64(Float64(9.0 / z) / Float64(c / 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 (y <= -3.5e-7)
tmp = x * (((y * 9.0) / c) / z);
elseif (y <= 1.12e+193)
tmp = ((b / z) + (-4.0 * (t * a))) / c;
else
tmp = x * ((9.0 / z) / (c / 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[y, -3.5e-7], N[(x * N[(N[(N[(y * 9.0), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e+193], N[(N[(N[(b / z), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(x * N[(N[(9.0 / z), $MachinePrecision] / N[(c / y), $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 -3.5 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \frac{\frac{y \cdot 9}{c}}{z}\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{+193}:\\
\;\;\;\;\frac{\frac{b}{z} + -4 \cdot \left(t \cdot a\right)}{c}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{\frac{9}{z}}{\frac{c}{y}}\\
\end{array}
\end{array}
if y < -3.49999999999999984e-7Initial program 77.0%
Taylor expanded in x around inf
*-lowering-*.f64N/A
associate--l+N/A
associate-/r*N/A
associate-/l/N/A
associate-/r*N/A
associate-/r*N/A
associate-*r/N/A
div-subN/A
+-lowering-+.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified73.5%
Taylor expanded in z around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6464.6%
Simplified64.6%
Taylor expanded in y around inf
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
associate-*r/N/A
/-lowering-/.f64N/A
*-lowering-*.f6450.7%
Simplified50.7%
if -3.49999999999999984e-7 < y < 1.1199999999999999e193Initial program 76.3%
associate-/r*N/A
/-lowering-/.f64N/A
Applied egg-rr79.8%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6465.6%
Simplified65.6%
Taylor expanded in b around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6476.4%
Simplified76.4%
if 1.1199999999999999e193 < y Initial program 72.0%
clear-numN/A
associate-/l*N/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
+-commutativeN/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
Applied egg-rr68.3%
Taylor expanded in x around inf
associate-/l*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6471.8%
Simplified71.8%
associate-*r/N/A
*-commutativeN/A
times-fracN/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6472.0%
Applied egg-rr72.0%
Final simplification69.7%
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 (* t (/ (* -4.0 a) c)))) (if (<= a -2.3e-128) t_1 (if (<= a 1.26e+92) (* (/ b c) (/ 1.0 z)) t_1))))
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 = t * ((-4.0 * a) / c);
double tmp;
if (a <= -2.3e-128) {
tmp = t_1;
} else if (a <= 1.26e+92) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = t_1;
}
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 = t * (((-4.0d0) * a) / c)
if (a <= (-2.3d-128)) then
tmp = t_1
else if (a <= 1.26d+92) then
tmp = (b / c) * (1.0d0 / z)
else
tmp = t_1
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 = t * ((-4.0 * a) / c);
double tmp;
if (a <= -2.3e-128) {
tmp = t_1;
} else if (a <= 1.26e+92) {
tmp = (b / c) * (1.0 / z);
} else {
tmp = t_1;
}
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 = t * ((-4.0 * a) / c) tmp = 0 if a <= -2.3e-128: tmp = t_1 elif a <= 1.26e+92: tmp = (b / c) * (1.0 / z) else: tmp = t_1 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(t * Float64(Float64(-4.0 * a) / c)) tmp = 0.0 if (a <= -2.3e-128) tmp = t_1; elseif (a <= 1.26e+92) tmp = Float64(Float64(b / c) * Float64(1.0 / z)); else tmp = t_1; 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 = t * ((-4.0 * a) / c);
tmp = 0.0;
if (a <= -2.3e-128)
tmp = t_1;
elseif (a <= 1.26e+92)
tmp = (b / c) * (1.0 / z);
else
tmp = t_1;
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[(t * N[(N[(-4.0 * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.3e-128], t$95$1, If[LessEqual[a, 1.26e+92], N[(N[(b / c), $MachinePrecision] * N[(1.0 / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{-4 \cdot a}{c}\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{-128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.26 \cdot 10^{+92}:\\
\;\;\;\;\frac{b}{c} \cdot \frac{1}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.3000000000000001e-128 or 1.26e92 < a Initial program 78.8%
Taylor expanded in z around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6441.7%
Simplified41.7%
associate-*l*N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
times-fracN/A
*-inversesN/A
clear-numN/A
div-invN/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6454.7%
Applied egg-rr54.7%
if -2.3000000000000001e-128 < a < 1.26e92Initial program 73.3%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6442.6%
Simplified42.6%
div-invN/A
associate-*r/N/A
*-commutativeN/A
times-fracN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
/-lowering-/.f6447.8%
Applied egg-rr47.8%
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 (* t (/ (* -4.0 a) c)))) (if (<= a -4.3e-128) t_1 (if (<= a 1.75e+92) (/ (/ b c) z) t_1))))
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 = t * ((-4.0 * a) / c);
double tmp;
if (a <= -4.3e-128) {
tmp = t_1;
} else if (a <= 1.75e+92) {
tmp = (b / c) / z;
} else {
tmp = t_1;
}
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 = t * (((-4.0d0) * a) / c)
if (a <= (-4.3d-128)) then
tmp = t_1
else if (a <= 1.75d+92) then
tmp = (b / c) / z
else
tmp = t_1
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 = t * ((-4.0 * a) / c);
double tmp;
if (a <= -4.3e-128) {
tmp = t_1;
} else if (a <= 1.75e+92) {
tmp = (b / c) / z;
} else {
tmp = t_1;
}
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 = t * ((-4.0 * a) / c) tmp = 0 if a <= -4.3e-128: tmp = t_1 elif a <= 1.75e+92: tmp = (b / c) / z else: tmp = t_1 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(t * Float64(Float64(-4.0 * a) / c)) tmp = 0.0 if (a <= -4.3e-128) tmp = t_1; elseif (a <= 1.75e+92) tmp = Float64(Float64(b / c) / z); else tmp = t_1; 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 = t * ((-4.0 * a) / c);
tmp = 0.0;
if (a <= -4.3e-128)
tmp = t_1;
elseif (a <= 1.75e+92)
tmp = (b / c) / z;
else
tmp = t_1;
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[(t * N[(N[(-4.0 * a), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.3e-128], t$95$1, If[LessEqual[a, 1.75e+92], N[(N[(b / c), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b, c] = \mathsf{sort}([x, y, z, t, a, b, c])\\
\\
\begin{array}{l}
t_1 := t \cdot \frac{-4 \cdot a}{c}\\
\mathbf{if}\;a \leq -4.3 \cdot 10^{-128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{+92}:\\
\;\;\;\;\frac{\frac{b}{c}}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -4.29999999999999994e-128 or 1.74999999999999993e92 < a Initial program 78.8%
Taylor expanded in z around inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6441.7%
Simplified41.7%
associate-*l*N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
times-fracN/A
*-inversesN/A
clear-numN/A
div-invN/A
clear-numN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6454.7%
Applied egg-rr54.7%
if -4.29999999999999994e-128 < a < 1.74999999999999993e92Initial program 73.3%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6442.6%
Simplified42.6%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6447.8%
Applied egg-rr47.8%
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 76.1%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6436.9%
Simplified36.9%
*-commutativeN/A
associate-/r*N/A
/-lowering-/.f64N/A
/-lowering-/.f6438.6%
Applied egg-rr38.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 (* 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 76.1%
Taylor expanded in b around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6436.9%
Simplified36.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 2024191
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -220031348160821/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 365902434742109/31250000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 28768236795461370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 138385150424563190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c)))))))))
(/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))