
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (- (/ z y) (* a (/ x y)))))
(t_2 (+ c (* y (+ b (* y (+ y a))))))
(t_3 (pow t_2 2.0)))
(if (<= y -2.5e+87)
t_1
(if (<= y -1.3e+38)
(*
y
(-
(+
(* 230661.510616 (/ 1.0 (* y t_2)))
(/ (+ 27464.7644705 (* y (+ z (* y x)))) t_2))
(*
i
(+
(* 27464.7644705 (/ 1.0 (* y t_3)))
(+
(* 230661.510616 (/ 1.0 (* t_3 (pow y 2.0))))
(+ (/ z t_3) (/ (* y x) t_3)))))))
(if (<= y 4.5e+63)
(/
(fma (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ y a) y b) y c) y i))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z / y) - (a * (x / y)));
double t_2 = c + (y * (b + (y * (y + a))));
double t_3 = pow(t_2, 2.0);
double tmp;
if (y <= -2.5e+87) {
tmp = t_1;
} else if (y <= -1.3e+38) {
tmp = y * (((230661.510616 * (1.0 / (y * t_2))) + ((27464.7644705 + (y * (z + (y * x)))) / t_2)) - (i * ((27464.7644705 * (1.0 / (y * t_3))) + ((230661.510616 * (1.0 / (t_3 * pow(y, 2.0)))) + ((z / t_3) + ((y * x) / t_3))))));
} else if (y <= 4.5e+63) {
tmp = fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((y + a), y, b), y, c), y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) t_2 = Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))) t_3 = t_2 ^ 2.0 tmp = 0.0 if (y <= -2.5e+87) tmp = t_1; elseif (y <= -1.3e+38) tmp = Float64(y * Float64(Float64(Float64(230661.510616 * Float64(1.0 / Float64(y * t_2))) + Float64(Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))) / t_2)) - Float64(i * Float64(Float64(27464.7644705 * Float64(1.0 / Float64(y * t_3))) + Float64(Float64(230661.510616 * Float64(1.0 / Float64(t_3 * (y ^ 2.0)))) + Float64(Float64(z / t_3) + Float64(Float64(y * x) / t_3))))))); elseif (y <= 4.5e+63) tmp = Float64(fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(y + a), y, b), y, c), y, i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[t$95$2, 2.0], $MachinePrecision]}, If[LessEqual[y, -2.5e+87], t$95$1, If[LessEqual[y, -1.3e+38], N[(y * N[(N[(N[(230661.510616 * N[(1.0 / N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] - N[(i * N[(N[(27464.7644705 * N[(1.0 / N[(y * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(230661.510616 * N[(1.0 / N[(t$95$3 * N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z / t$95$3), $MachinePrecision] + N[(N[(y * x), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+63], N[(N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(y + a), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
t_2 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\
t_3 := {t\_2}^{2}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{+38}:\\
\;\;\;\;y \cdot \left(\left(230661.510616 \cdot \frac{1}{y \cdot t\_2} + \frac{27464.7644705 + y \cdot \left(z + y \cdot x\right)}{t\_2}\right) - i \cdot \left(27464.7644705 \cdot \frac{1}{y \cdot t\_3} + \left(230661.510616 \cdot \frac{1}{t\_3 \cdot {y}^{2}} + \left(\frac{z}{t\_3} + \frac{y \cdot x}{t\_3}\right)\right)\right)\right)\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+63}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.4999999999999999e87 or 4.50000000000000017e63 < y Initial program 0.5%
Taylor expanded in y around inf 70.4%
associate--l+70.4%
associate-/l*75.3%
Simplified75.3%
if -2.4999999999999999e87 < y < -1.3e38Initial program 12.1%
Taylor expanded in t around 0 12.1%
Simplified21.4%
Taylor expanded in i around 0 73.5%
if -1.3e38 < y < 4.50000000000000017e63Initial program 92.5%
fma-define92.5%
fma-define92.5%
fma-define92.5%
fma-define92.5%
fma-define92.5%
fma-define92.5%
fma-define92.5%
Simplified92.5%
Final simplification85.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ 27464.7644705 (* y (+ z (* y x)))))
(t_2 (+ x (- (/ z y) (* a (/ x y)))))
(t_3 (+ c (* y (+ b (* y (+ y a))))))
(t_4 (pow t_3 2.0))
(t_5 (* y t_3)))
(if (<= y -3.4e+86)
t_2
(if (<= y -6.8e+41)
(*
y
(-
(+ (* 230661.510616 (/ 1.0 t_5)) (/ t_1 t_3))
(*
i
(+
(* 27464.7644705 (/ 1.0 (* y t_4)))
(+
(* 230661.510616 (/ 1.0 (* t_4 (pow y 2.0))))
(+ (/ z t_4) (/ (* y x) t_4)))))))
(if (<= y 7.5e+62)
(/ (+ t (* y (+ 230661.510616 (* y t_1)))) (+ i t_5))
t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 27464.7644705 + (y * (z + (y * x)));
double t_2 = x + ((z / y) - (a * (x / y)));
double t_3 = c + (y * (b + (y * (y + a))));
double t_4 = pow(t_3, 2.0);
double t_5 = y * t_3;
double tmp;
if (y <= -3.4e+86) {
tmp = t_2;
} else if (y <= -6.8e+41) {
tmp = y * (((230661.510616 * (1.0 / t_5)) + (t_1 / t_3)) - (i * ((27464.7644705 * (1.0 / (y * t_4))) + ((230661.510616 * (1.0 / (t_4 * pow(y, 2.0)))) + ((z / t_4) + ((y * x) / t_4))))));
} else if (y <= 7.5e+62) {
tmp = (t + (y * (230661.510616 + (y * t_1)))) / (i + t_5);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = 27464.7644705d0 + (y * (z + (y * x)))
t_2 = x + ((z / y) - (a * (x / y)))
t_3 = c + (y * (b + (y * (y + a))))
t_4 = t_3 ** 2.0d0
t_5 = y * t_3
if (y <= (-3.4d+86)) then
tmp = t_2
else if (y <= (-6.8d+41)) then
tmp = y * (((230661.510616d0 * (1.0d0 / t_5)) + (t_1 / t_3)) - (i * ((27464.7644705d0 * (1.0d0 / (y * t_4))) + ((230661.510616d0 * (1.0d0 / (t_4 * (y ** 2.0d0)))) + ((z / t_4) + ((y * x) / t_4))))))
else if (y <= 7.5d+62) then
tmp = (t + (y * (230661.510616d0 + (y * t_1)))) / (i + t_5)
else
tmp = 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 i) {
double t_1 = 27464.7644705 + (y * (z + (y * x)));
double t_2 = x + ((z / y) - (a * (x / y)));
double t_3 = c + (y * (b + (y * (y + a))));
double t_4 = Math.pow(t_3, 2.0);
double t_5 = y * t_3;
double tmp;
if (y <= -3.4e+86) {
tmp = t_2;
} else if (y <= -6.8e+41) {
tmp = y * (((230661.510616 * (1.0 / t_5)) + (t_1 / t_3)) - (i * ((27464.7644705 * (1.0 / (y * t_4))) + ((230661.510616 * (1.0 / (t_4 * Math.pow(y, 2.0)))) + ((z / t_4) + ((y * x) / t_4))))));
} else if (y <= 7.5e+62) {
tmp = (t + (y * (230661.510616 + (y * t_1)))) / (i + t_5);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 27464.7644705 + (y * (z + (y * x))) t_2 = x + ((z / y) - (a * (x / y))) t_3 = c + (y * (b + (y * (y + a)))) t_4 = math.pow(t_3, 2.0) t_5 = y * t_3 tmp = 0 if y <= -3.4e+86: tmp = t_2 elif y <= -6.8e+41: tmp = y * (((230661.510616 * (1.0 / t_5)) + (t_1 / t_3)) - (i * ((27464.7644705 * (1.0 / (y * t_4))) + ((230661.510616 * (1.0 / (t_4 * math.pow(y, 2.0)))) + ((z / t_4) + ((y * x) / t_4)))))) elif y <= 7.5e+62: tmp = (t + (y * (230661.510616 + (y * t_1)))) / (i + t_5) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))) t_2 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) t_3 = Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))) t_4 = t_3 ^ 2.0 t_5 = Float64(y * t_3) tmp = 0.0 if (y <= -3.4e+86) tmp = t_2; elseif (y <= -6.8e+41) tmp = Float64(y * Float64(Float64(Float64(230661.510616 * Float64(1.0 / t_5)) + Float64(t_1 / t_3)) - Float64(i * Float64(Float64(27464.7644705 * Float64(1.0 / Float64(y * t_4))) + Float64(Float64(230661.510616 * Float64(1.0 / Float64(t_4 * (y ^ 2.0)))) + Float64(Float64(z / t_4) + Float64(Float64(y * x) / t_4))))))); elseif (y <= 7.5e+62) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * t_1)))) / Float64(i + t_5)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 27464.7644705 + (y * (z + (y * x))); t_2 = x + ((z / y) - (a * (x / y))); t_3 = c + (y * (b + (y * (y + a)))); t_4 = t_3 ^ 2.0; t_5 = y * t_3; tmp = 0.0; if (y <= -3.4e+86) tmp = t_2; elseif (y <= -6.8e+41) tmp = y * (((230661.510616 * (1.0 / t_5)) + (t_1 / t_3)) - (i * ((27464.7644705 * (1.0 / (y * t_4))) + ((230661.510616 * (1.0 / (t_4 * (y ^ 2.0)))) + ((z / t_4) + ((y * x) / t_4)))))); elseif (y <= 7.5e+62) tmp = (t + (y * (230661.510616 + (y * t_1)))) / (i + t_5); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Power[t$95$3, 2.0], $MachinePrecision]}, Block[{t$95$5 = N[(y * t$95$3), $MachinePrecision]}, If[LessEqual[y, -3.4e+86], t$95$2, If[LessEqual[y, -6.8e+41], N[(y * N[(N[(N[(230661.510616 * N[(1.0 / t$95$5), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 / t$95$3), $MachinePrecision]), $MachinePrecision] - N[(i * N[(N[(27464.7644705 * N[(1.0 / N[(y * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(230661.510616 * N[(1.0 / N[(t$95$4 * N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z / t$95$4), $MachinePrecision] + N[(N[(y * x), $MachinePrecision] / t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+62], N[(N[(t + N[(y * N[(230661.510616 + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + t$95$5), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 27464.7644705 + y \cdot \left(z + y \cdot x\right)\\
t_2 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
t_3 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\
t_4 := {t\_3}^{2}\\
t_5 := y \cdot t\_3\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+86}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -6.8 \cdot 10^{+41}:\\
\;\;\;\;y \cdot \left(\left(230661.510616 \cdot \frac{1}{t\_5} + \frac{t\_1}{t\_3}\right) - i \cdot \left(27464.7644705 \cdot \frac{1}{y \cdot t\_4} + \left(230661.510616 \cdot \frac{1}{t\_4 \cdot {y}^{2}} + \left(\frac{z}{t\_4} + \frac{y \cdot x}{t\_4}\right)\right)\right)\right)\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+62}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot t\_1\right)}{i + t\_5}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -3.3999999999999998e86 or 7.49999999999999998e62 < y Initial program 0.5%
Taylor expanded in y around inf 70.4%
associate--l+70.4%
associate-/l*75.3%
Simplified75.3%
if -3.3999999999999998e86 < y < -6.79999999999999996e41Initial program 12.1%
Taylor expanded in t around 0 12.1%
Simplified21.4%
Taylor expanded in i around 0 73.5%
if -6.79999999999999996e41 < y < 7.49999999999999998e62Initial program 92.5%
Final simplification84.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
t
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
(if (<= t_1 5e+292) t_1 (+ x (- (/ z y) (* a (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= 5e+292) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (a * (x / y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
if (t_1 <= 5d+292) then
tmp = t_1
else
tmp = x + ((z / y) - (a * (x / y)))
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 i) {
double t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= 5e+292) {
tmp = t_1;
} else {
tmp = x + ((z / y) - (a * (x / y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) tmp = 0 if t_1 <= 5e+292: tmp = t_1 else: tmp = x + ((z / y) - (a * (x / y))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))) tmp = 0.0 if (t_1 <= 5e+292) tmp = t_1; else tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); tmp = 0.0; if (t_1 <= 5e+292) tmp = t_1; else tmp = x + ((z / y) - (a * (x / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+292], t$95$1, N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+292}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 4.9999999999999996e292Initial program 89.1%
if 4.9999999999999996e292 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 1.3%
Taylor expanded in y around inf 66.4%
associate--l+66.4%
associate-/l*71.1%
Simplified71.1%
Final simplification81.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ c (* y (+ b (* y (+ y a))))))
(t_2
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x)))))) t_1))
(t_3 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -1.35e+77)
t_3
(if (<= y -0.002)
t_2
(if (<= y 300000.0)
(/ (+ t (* y 230661.510616)) (+ i (* y t_1)))
(if (<= y 2.45e+64) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c + (y * (b + (y * (y + a))));
double t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.35e+77) {
tmp = t_3;
} else if (y <= -0.002) {
tmp = t_2;
} else if (y <= 300000.0) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 2.45e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c + (y * (b + (y * (y + a))))
t_2 = (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))) / t_1
t_3 = x + ((z / y) - (a * (x / y)))
if (y <= (-1.35d+77)) then
tmp = t_3
else if (y <= (-0.002d0)) then
tmp = t_2
else if (y <= 300000.0d0) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * t_1))
else if (y <= 2.45d+64) then
tmp = t_2
else
tmp = t_3
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 i) {
double t_1 = c + (y * (b + (y * (y + a))));
double t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.35e+77) {
tmp = t_3;
} else if (y <= -0.002) {
tmp = t_2;
} else if (y <= 300000.0) {
tmp = (t + (y * 230661.510616)) / (i + (y * t_1));
} else if (y <= 2.45e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c + (y * (b + (y * (y + a)))) t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1 t_3 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -1.35e+77: tmp = t_3 elif y <= -0.002: tmp = t_2 elif y <= 300000.0: tmp = (t + (y * 230661.510616)) / (i + (y * t_1)) elif y <= 2.45e+64: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))) t_2 = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))) / t_1) t_3 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -1.35e+77) tmp = t_3; elseif (y <= -0.002) tmp = t_2; elseif (y <= 300000.0) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * t_1))); elseif (y <= 2.45e+64) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c + (y * (b + (y * (y + a)))); t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1; t_3 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -1.35e+77) tmp = t_3; elseif (y <= -0.002) tmp = t_2; elseif (y <= 300000.0) tmp = (t + (y * 230661.510616)) / (i + (y * t_1)); elseif (y <= 2.45e+64) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.35e+77], t$95$3, If[LessEqual[y, -0.002], t$95$2, If[LessEqual[y, 300000.0], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.45e+64], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\
t_2 := \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{t\_1}\\
t_3 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.35 \cdot 10^{+77}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -0.002:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 300000:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot t\_1}\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{+64}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -1.3499999999999999e77 or 2.4500000000000001e64 < y Initial program 0.5%
Taylor expanded in y around inf 69.2%
associate--l+69.2%
associate-/l*74.0%
Simplified74.0%
if -1.3499999999999999e77 < y < -2e-3 or 3e5 < y < 2.4500000000000001e64Initial program 47.9%
Taylor expanded in t around 0 45.2%
Taylor expanded in i around 0 59.0%
if -2e-3 < y < 3e5Initial program 99.7%
Taylor expanded in y around 0 89.6%
*-commutative89.6%
Simplified89.6%
Final simplification79.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ c (* y (+ b (* y (+ y a))))))
(t_2
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x)))))) t_1))
(t_3 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -2.35e+77)
t_3
(if (<= y -1.85e+27)
t_2
(if (<= y 1950000.0)
(/ (+ t (* y (+ 230661.510616 (* y 27464.7644705)))) (+ i (* y t_1)))
(if (<= y 2.7e+65) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c + (y * (b + (y * (y + a))));
double t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -2.35e+77) {
tmp = t_3;
} else if (y <= -1.85e+27) {
tmp = t_2;
} else if (y <= 1950000.0) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1));
} else if (y <= 2.7e+65) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c + (y * (b + (y * (y + a))))
t_2 = (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))) / t_1
t_3 = x + ((z / y) - (a * (x / y)))
if (y <= (-2.35d+77)) then
tmp = t_3
else if (y <= (-1.85d+27)) then
tmp = t_2
else if (y <= 1950000.0d0) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * t_1))
else if (y <= 2.7d+65) then
tmp = t_2
else
tmp = t_3
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 i) {
double t_1 = c + (y * (b + (y * (y + a))));
double t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -2.35e+77) {
tmp = t_3;
} else if (y <= -1.85e+27) {
tmp = t_2;
} else if (y <= 1950000.0) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1));
} else if (y <= 2.7e+65) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c + (y * (b + (y * (y + a)))) t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1 t_3 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -2.35e+77: tmp = t_3 elif y <= -1.85e+27: tmp = t_2 elif y <= 1950000.0: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1)) elif y <= 2.7e+65: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))) t_2 = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))) / t_1) t_3 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -2.35e+77) tmp = t_3; elseif (y <= -1.85e+27) tmp = t_2; elseif (y <= 1950000.0) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * t_1))); elseif (y <= 2.7e+65) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c + (y * (b + (y * (y + a)))); t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1; t_3 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -2.35e+77) tmp = t_3; elseif (y <= -1.85e+27) tmp = t_2; elseif (y <= 1950000.0) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * t_1)); elseif (y <= 2.7e+65) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.35e+77], t$95$3, If[LessEqual[y, -1.85e+27], t$95$2, If[LessEqual[y, 1950000.0], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+65], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\
t_2 := \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{t\_1}\\
t_3 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2.35 \cdot 10^{+77}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -1.85 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1950000:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot t\_1}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+65}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -2.35e77 or 2.70000000000000019e65 < y Initial program 0.5%
Taylor expanded in y around inf 69.2%
associate--l+69.2%
associate-/l*74.0%
Simplified74.0%
if -2.35e77 < y < -1.85000000000000001e27 or 1.95e6 < y < 2.70000000000000019e65Initial program 47.6%
Taylor expanded in t around 0 44.7%
Taylor expanded in i around 0 59.4%
if -1.85000000000000001e27 < y < 1.95e6Initial program 98.9%
Taylor expanded in y around 0 89.4%
*-commutative89.4%
Simplified89.4%
Final simplification79.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x)))))))
(t_2 (/ t_1 (+ c (* y (+ b (* y (+ y a)))))))
(t_3 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -2e+77)
t_3
(if (<= y -75000.0)
t_2
(if (<= y 290000.0)
(/ (+ t (* y t_1)) (+ i (* y (+ c (* y b)))))
(if (<= y 1.2e+64) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))));
double t_2 = t_1 / (c + (y * (b + (y * (y + a)))));
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -2e+77) {
tmp = t_3;
} else if (y <= -75000.0) {
tmp = t_2;
} else if (y <= 290000.0) {
tmp = (t + (y * t_1)) / (i + (y * (c + (y * b))));
} else if (y <= 1.2e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))
t_2 = t_1 / (c + (y * (b + (y * (y + a)))))
t_3 = x + ((z / y) - (a * (x / y)))
if (y <= (-2d+77)) then
tmp = t_3
else if (y <= (-75000.0d0)) then
tmp = t_2
else if (y <= 290000.0d0) then
tmp = (t + (y * t_1)) / (i + (y * (c + (y * b))))
else if (y <= 1.2d+64) then
tmp = t_2
else
tmp = t_3
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 i) {
double t_1 = 230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))));
double t_2 = t_1 / (c + (y * (b + (y * (y + a)))));
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -2e+77) {
tmp = t_3;
} else if (y <= -75000.0) {
tmp = t_2;
} else if (y <= 290000.0) {
tmp = (t + (y * t_1)) / (i + (y * (c + (y * b))));
} else if (y <= 1.2e+64) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))) t_2 = t_1 / (c + (y * (b + (y * (y + a))))) t_3 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -2e+77: tmp = t_3 elif y <= -75000.0: tmp = t_2 elif y <= 290000.0: tmp = (t + (y * t_1)) / (i + (y * (c + (y * b)))) elif y <= 1.2e+64: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))) t_2 = Float64(t_1 / Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))) t_3 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -2e+77) tmp = t_3; elseif (y <= -75000.0) tmp = t_2; elseif (y <= 290000.0) tmp = Float64(Float64(t + Float64(y * t_1)) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); elseif (y <= 1.2e+64) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))); t_2 = t_1 / (c + (y * (b + (y * (y + a))))); t_3 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -2e+77) tmp = t_3; elseif (y <= -75000.0) tmp = t_2; elseif (y <= 290000.0) tmp = (t + (y * t_1)) / (i + (y * (c + (y * b)))); elseif (y <= 1.2e+64) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e+77], t$95$3, If[LessEqual[y, -75000.0], t$95$2, If[LessEqual[y, 290000.0], N[(N[(t + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+64], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)\\
t_2 := \frac{t\_1}{c + y \cdot \left(b + y \cdot \left(y + a\right)\right)}\\
t_3 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -2 \cdot 10^{+77}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -75000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 290000:\\
\;\;\;\;\frac{t + y \cdot t\_1}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+64}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -1.99999999999999997e77 or 1.2e64 < y Initial program 0.5%
Taylor expanded in y around inf 69.2%
associate--l+69.2%
associate-/l*74.0%
Simplified74.0%
if -1.99999999999999997e77 < y < -75000 or 2.9e5 < y < 1.2e64Initial program 49.3%
Taylor expanded in t around 0 44.0%
Taylor expanded in i around 0 57.4%
if -75000 < y < 2.9e5Initial program 99.7%
Taylor expanded in y around 0 93.2%
*-commutative93.2%
Simplified93.2%
Final simplification80.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ c (* y (+ b (* y (+ y a))))))
(t_2
(/ (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x)))))) t_1))
(t_3 (+ x (- (/ z y) (* a (/ x y))))))
(if (<= y -1.9e+77)
t_3
(if (<= y -2.05e+27)
t_2
(if (<= y 3900000.0)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y t_1)))
(if (<= y 2.75e+65) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c + (y * (b + (y * (y + a))));
double t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.9e+77) {
tmp = t_3;
} else if (y <= -2.05e+27) {
tmp = t_2;
} else if (y <= 3900000.0) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1));
} else if (y <= 2.75e+65) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = c + (y * (b + (y * (y + a))))
t_2 = (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))) / t_1
t_3 = x + ((z / y) - (a * (x / y)))
if (y <= (-1.9d+77)) then
tmp = t_3
else if (y <= (-2.05d+27)) then
tmp = t_2
else if (y <= 3900000.0d0) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * t_1))
else if (y <= 2.75d+65) then
tmp = t_2
else
tmp = t_3
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 i) {
double t_1 = c + (y * (b + (y * (y + a))));
double t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1;
double t_3 = x + ((z / y) - (a * (x / y)));
double tmp;
if (y <= -1.9e+77) {
tmp = t_3;
} else if (y <= -2.05e+27) {
tmp = t_2;
} else if (y <= 3900000.0) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1));
} else if (y <= 2.75e+65) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = c + (y * (b + (y * (y + a)))) t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1 t_3 = x + ((z / y) - (a * (x / y))) tmp = 0 if y <= -1.9e+77: tmp = t_3 elif y <= -2.05e+27: tmp = t_2 elif y <= 3900000.0: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1)) elif y <= 2.75e+65: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))) t_2 = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))) / t_1) t_3 = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))) tmp = 0.0 if (y <= -1.9e+77) tmp = t_3; elseif (y <= -2.05e+27) tmp = t_2; elseif (y <= 3900000.0) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * t_1))); elseif (y <= 2.75e+65) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = c + (y * (b + (y * (y + a)))); t_2 = (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))) / t_1; t_3 = x + ((z / y) - (a * (x / y))); tmp = 0.0; if (y <= -1.9e+77) tmp = t_3; elseif (y <= -2.05e+27) tmp = t_2; elseif (y <= 3900000.0) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * t_1)); elseif (y <= 2.75e+65) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.9e+77], t$95$3, If[LessEqual[y, -2.05e+27], t$95$2, If[LessEqual[y, 3900000.0], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.75e+65], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\
t_2 := \frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)}{t\_1}\\
t_3 := x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+77}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq -2.05 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 3900000:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot t\_1}\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{+65}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -1.9000000000000001e77 or 2.7499999999999998e65 < y Initial program 0.5%
Taylor expanded in y around inf 69.2%
associate--l+69.2%
associate-/l*74.0%
Simplified74.0%
if -1.9000000000000001e77 < y < -2.0500000000000001e27 or 3.9e6 < y < 2.7499999999999998e65Initial program 47.6%
Taylor expanded in t around 0 44.7%
Taylor expanded in i around 0 59.4%
if -2.0500000000000001e27 < y < 3.9e6Initial program 98.9%
Taylor expanded in x around 0 95.4%
Final simplification82.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.95e+27) (not (<= y 2.2e+29))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.95e+27) || !(y <= 2.2e+29)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.95d+27)) .or. (.not. (y <= 2.2d+29))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * (b + (y * (y + a)))))))
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 i) {
double tmp;
if ((y <= -1.95e+27) || !(y <= 2.2e+29)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.95e+27) or not (y <= 2.2e+29): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.95e+27) || !(y <= 2.2e+29)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.95e+27) || ~((y <= 2.2e+29))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.95e+27], N[Not[LessEqual[y, 2.2e+29]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+27} \lor \neg \left(y \leq 2.2 \cdot 10^{+29}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -1.9499999999999999e27 or 2.2000000000000001e29 < y Initial program 9.5%
Taylor expanded in y around inf 58.8%
associate--l+58.8%
associate-/l*62.7%
Simplified62.7%
if -1.9499999999999999e27 < y < 2.2000000000000001e29Initial program 95.3%
Taylor expanded in y around 0 83.2%
*-commutative83.2%
Simplified83.2%
Final simplification73.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -3.4e+27) (not (<= y 6.1e+29))) (+ x (- (/ z y) (* a (/ x y)))) (/ t (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.4e+27) || !(y <= 6.1e+29)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: tmp
if ((y <= (-3.4d+27)) .or. (.not. (y <= 6.1d+29))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))))
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 i) {
double tmp;
if ((y <= -3.4e+27) || !(y <= 6.1e+29)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3.4e+27) or not (y <= 6.1e+29): tmp = x + ((z / y) - (a * (x / y))) else: tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.4e+27) || !(y <= 6.1e+29)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -3.4e+27) || ~((y <= 6.1e+29))) tmp = x + ((z / y) - (a * (x / y))); else tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.4e+27], N[Not[LessEqual[y, 6.1e+29]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.4 \cdot 10^{+27} \lor \neg \left(y \leq 6.1 \cdot 10^{+29}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -3.4e27 or 6.0999999999999998e29 < y Initial program 9.5%
Taylor expanded in y around inf 58.8%
associate--l+58.8%
associate-/l*62.7%
Simplified62.7%
if -3.4e27 < y < 6.0999999999999998e29Initial program 95.3%
Taylor expanded in t around inf 70.4%
Final simplification66.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.85e+27) (not (<= y 95.0))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.85e+27) || !(y <= 95.0)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.85d+27)) .or. (.not. (y <= 95.0d0))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / i
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 i) {
double tmp;
if ((y <= -1.85e+27) || !(y <= 95.0)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.85e+27) or not (y <= 95.0): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.85e+27) || !(y <= 95.0)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.85e+27) || ~((y <= 95.0))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.85e+27], N[Not[LessEqual[y, 95.0]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+27} \lor \neg \left(y \leq 95\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\end{array}
\end{array}
if y < -1.85000000000000001e27 or 95 < y Initial program 13.3%
Taylor expanded in y around inf 54.5%
associate--l+54.5%
associate-/l*58.1%
Simplified58.1%
if -1.85000000000000001e27 < y < 95Initial program 98.9%
Taylor expanded in y around 0 45.8%
fma-define45.8%
associate-*r/45.8%
metadata-eval45.8%
associate-/l*50.1%
Simplified50.1%
Taylor expanded in i around inf 55.0%
Final simplification56.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.8e+27) (not (<= y 6e-7))) (+ x (/ (- z (* x a)) y)) (/ (+ t (* y 230661.510616)) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.8e+27) || !(y <= 6e-7)) {
tmp = x + ((z - (x * a)) / y);
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: tmp
if ((y <= (-2.8d+27)) .or. (.not. (y <= 6d-7))) then
tmp = x + ((z - (x * a)) / y)
else
tmp = (t + (y * 230661.510616d0)) / i
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 i) {
double tmp;
if ((y <= -2.8e+27) || !(y <= 6e-7)) {
tmp = x + ((z - (x * a)) / y);
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.8e+27) or not (y <= 6e-7): tmp = x + ((z - (x * a)) / y) else: tmp = (t + (y * 230661.510616)) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.8e+27) || !(y <= 6e-7)) tmp = Float64(x + Float64(Float64(z - Float64(x * a)) / y)); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.8e+27) || ~((y <= 6e-7))) tmp = x + ((z - (x * a)) / y); else tmp = (t + (y * 230661.510616)) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.8e+27], N[Not[LessEqual[y, 6e-7]], $MachinePrecision]], N[(x + N[(N[(z - N[(x * a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+27} \lor \neg \left(y \leq 6 \cdot 10^{-7}\right):\\
\;\;\;\;x + \frac{z - x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\end{array}
\end{array}
if y < -2.7999999999999999e27 or 5.9999999999999997e-7 < y Initial program 15.1%
Taylor expanded in t around 0 12.5%
Taylor expanded in y around inf 53.4%
associate--l+53.4%
div-sub53.4%
*-commutative53.4%
Simplified53.4%
if -2.7999999999999999e27 < y < 5.9999999999999997e-7Initial program 98.9%
Taylor expanded in y around 0 46.9%
fma-define47.0%
associate-*r/47.0%
metadata-eval47.0%
associate-/l*51.4%
Simplified51.4%
Taylor expanded in i around inf 56.3%
Final simplification54.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.75e+27) x (if (<= y 2.05e-7) (/ (+ t (* y 230661.510616)) i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.75e+27) {
tmp = x;
} else if (y <= 2.05e-7) {
tmp = (t + (y * 230661.510616)) / i;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: tmp
if (y <= (-1.75d+27)) then
tmp = x
else if (y <= 2.05d-7) then
tmp = (t + (y * 230661.510616d0)) / i
else
tmp = x
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 i) {
double tmp;
if (y <= -1.75e+27) {
tmp = x;
} else if (y <= 2.05e-7) {
tmp = (t + (y * 230661.510616)) / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.75e+27: tmp = x elif y <= 2.05e-7: tmp = (t + (y * 230661.510616)) / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.75e+27) tmp = x; elseif (y <= 2.05e-7) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -1.75e+27) tmp = x; elseif (y <= 2.05e-7) tmp = (t + (y * 230661.510616)) / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.75e+27], x, If[LessEqual[y, 2.05e-7], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+27}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-7}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.7500000000000001e27 or 2.05e-7 < y Initial program 15.7%
Taylor expanded in y around inf 41.0%
if -1.7500000000000001e27 < y < 2.05e-7Initial program 98.9%
Taylor expanded in y around 0 47.4%
fma-define47.4%
associate-*r/47.4%
metadata-eval47.4%
associate-/l*51.8%
Simplified51.8%
Taylor expanded in i around inf 56.8%
Final simplification48.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -3e+27) x (if (<= y 2.25e-7) (/ t i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -3e+27) {
tmp = x;
} else if (y <= 2.25e-7) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
real(8) :: tmp
if (y <= (-3d+27)) then
tmp = x
else if (y <= 2.25d-7) then
tmp = t / i
else
tmp = x
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 i) {
double tmp;
if (y <= -3e+27) {
tmp = x;
} else if (y <= 2.25e-7) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -3e+27: tmp = x elif y <= 2.25e-7: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -3e+27) tmp = x; elseif (y <= 2.25e-7) tmp = Float64(t / i); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -3e+27) tmp = x; elseif (y <= 2.25e-7) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -3e+27], x, If[LessEqual[y, 2.25e-7], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+27}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{-7}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.99999999999999976e27 or 2.2499999999999999e-7 < y Initial program 15.7%
Taylor expanded in y around inf 41.0%
if -2.99999999999999976e27 < y < 2.2499999999999999e-7Initial program 98.9%
Taylor expanded in y around 0 49.2%
Final simplification44.7%
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: i
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
def code(x, y, z, t, a, b, c, i): return x
function code(x, y, z, t, a, b, c, i) return x end
function tmp = code(x, y, z, t, a, b, c, i) tmp = x; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 53.1%
Taylor expanded in y around inf 24.2%
Final simplification24.2%
herbie shell --seed 2024077
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2"
:precision binary64
(/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))