
(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
(if (<= y -9.2e+48)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 7.5e+21)
(+
(/ t (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(*
(/ y (fma y (fma y (fma y (+ y a) b) c) i))
(fma y (fma y (fma y x z) 27464.7644705) 230661.510616)))
(- (+ x (/ z y)) (/ (* x a) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -9.2e+48) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 7.5e+21) {
tmp = (t / (i + (y * (c + (y * (b + (y * (y + a)))))))) + ((y / fma(y, fma(y, fma(y, (y + a), b), c), i)) * fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616));
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -9.2e+48) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 7.5e+21) tmp = Float64(Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))) + Float64(Float64(y / fma(y, fma(y, fma(y, Float64(y + a), b), c), i)) * fma(y, fma(y, fma(y, x, z), 27464.7644705), 230661.510616))); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -9.2e+48], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+21], N[(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] + N[(N[(y / N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision] * N[(y * N[(y * N[(y * x + z), $MachinePrecision] + 27464.7644705), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+48}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)} + \frac{y}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)} \cdot \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, x, z\right), 27464.7644705\right), 230661.510616\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -9.2000000000000001e48Initial program 0.9%
Taylor expanded in y around inf 72.2%
associate--l+72.2%
associate-/l*78.2%
Simplified78.2%
if -9.2000000000000001e48 < y < 7.5e21Initial program 97.8%
Taylor expanded in t around 0 97.8%
Applied egg-rr71.6%
expm1-def90.5%
expm1-log1p99.0%
associate-/r/99.0%
Simplified99.0%
if 7.5e21 < y Initial program 3.1%
Taylor expanded in y around inf 60.2%
Final simplification87.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ i (* y (+ c (* y (+ b (* y (+ y a)))))))))
(if (<= y -9.2e+48)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 7.5e+21)
(+
(/ t t_1)
(/
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x)))))))
t_1))
(- (+ x (/ z y)) (/ (* x a) y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i + (y * (c + (y * (b + (y * (y + a))))));
double tmp;
if (y <= -9.2e+48) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 7.5e+21) {
tmp = (t / t_1) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_1);
} else {
tmp = (x + (z / y)) - ((x * a) / 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 = i + (y * (c + (y * (b + (y * (y + a))))))
if (y <= (-9.2d+48)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 7.5d+21) then
tmp = (t / t_1) + ((y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x))))))) / t_1)
else
tmp = (x + (z / y)) - ((x * a) / 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 = i + (y * (c + (y * (b + (y * (y + a))))));
double tmp;
if (y <= -9.2e+48) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 7.5e+21) {
tmp = (t / t_1) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_1);
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = i + (y * (c + (y * (b + (y * (y + a)))))) tmp = 0 if y <= -9.2e+48: tmp = x + ((z / y) - (a / (y / x))) elif y <= 7.5e+21: tmp = (t / t_1) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_1) else: tmp = (x + (z / y)) - ((x * a) / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))))) tmp = 0.0 if (y <= -9.2e+48) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 7.5e+21) tmp = Float64(Float64(t / t_1) + Float64(Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x))))))) / t_1)); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = i + (y * (c + (y * (b + (y * (y + a)))))); tmp = 0.0; if (y <= -9.2e+48) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 7.5e+21) tmp = (t / t_1) + ((y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x))))))) / t_1); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.2e+48], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+21], N[(N[(t / t$95$1), $MachinePrecision] + N[(N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{+48}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+21}:\\
\;\;\;\;\frac{t}{t_1} + \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)\right)}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -9.2000000000000001e48Initial program 0.9%
Taylor expanded in y around inf 72.2%
associate--l+72.2%
associate-/l*78.2%
Simplified78.2%
if -9.2000000000000001e48 < y < 7.5e21Initial program 97.8%
Taylor expanded in t around 0 97.8%
if 7.5e21 < y Initial program 3.1%
Taylor expanded in y around inf 60.2%
Final simplification86.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -9.2e+48)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 7.5e+21)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(- (+ x (/ z y)) (/ (* x a) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -9.2e+48) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 7.5e+21) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = (x + (z / y)) - ((x * a) / 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) :: tmp
if (y <= (-9.2d+48)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 7.5d+21) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else
tmp = (x + (z / y)) - ((x * a) / 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 tmp;
if (y <= -9.2e+48) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 7.5e+21) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -9.2e+48: tmp = x + ((z / y) - (a / (y / x))) elif y <= 7.5e+21: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) else: tmp = (x + (z / y)) - ((x * a) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -9.2e+48) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 7.5e+21) tmp = 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)))))))); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -9.2e+48) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 7.5e+21) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -9.2e+48], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+21], 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], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+48}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+21}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -9.2000000000000001e48Initial program 0.9%
Taylor expanded in y around inf 72.2%
associate--l+72.2%
associate-/l*78.2%
Simplified78.2%
if -9.2000000000000001e48 < y < 7.5e21Initial program 97.8%
if 7.5e21 < y Initial program 3.1%
Taylor expanded in y around inf 60.2%
Final simplification86.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* y (+ c (* y (+ b (* y (+ y a))))))))
(if (<= y -9.2e+48)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y -5e-19)
(/
(+
t
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
t_1)
(if (<= y 2.4e+15)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i t_1))
(- (+ x (/ z y)) (/ (* x a) y)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = y * (c + (y * (b + (y * (y + a)))));
double tmp;
if (y <= -9.2e+48) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= -5e-19) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / t_1;
} else if (y <= 2.4e+15) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + t_1);
} else {
tmp = (x + (z / y)) - ((x * a) / 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 = y * (c + (y * (b + (y * (y + a)))))
if (y <= (-9.2d+48)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= (-5d-19)) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * (z + (y * x)))))))) / t_1
else if (y <= 2.4d+15) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + t_1)
else
tmp = (x + (z / y)) - ((x * a) / 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 = y * (c + (y * (b + (y * (y + a)))));
double tmp;
if (y <= -9.2e+48) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= -5e-19) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / t_1;
} else if (y <= 2.4e+15) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + t_1);
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = y * (c + (y * (b + (y * (y + a))))) tmp = 0 if y <= -9.2e+48: tmp = x + ((z / y) - (a / (y / x))) elif y <= -5e-19: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / t_1 elif y <= 2.4e+15: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + t_1) else: tmp = (x + (z / y)) - ((x * a) / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))) tmp = 0.0 if (y <= -9.2e+48) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= -5e-19) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(z + Float64(y * x)))))))) / t_1); elseif (y <= 2.4e+15) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + t_1)); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = y * (c + (y * (b + (y * (y + a))))); tmp = 0.0; if (y <= -9.2e+48) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= -5e-19) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * (z + (y * x)))))))) / t_1; elseif (y <= 2.4e+15) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + t_1); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9.2e+48], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5e-19], 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] / t$95$1), $MachinePrecision], If[LessEqual[y, 2.4e+15], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{+48}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-19}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(z + y \cdot x\right)\right)\right)}{t_1}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+15}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + t_1}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -9.2000000000000001e48Initial program 0.9%
Taylor expanded in y around inf 72.2%
associate--l+72.2%
associate-/l*78.2%
Simplified78.2%
if -9.2000000000000001e48 < y < -5.0000000000000004e-19Initial program 89.5%
Taylor expanded in i around 0 81.1%
if -5.0000000000000004e-19 < y < 2.4e15Initial program 99.8%
Taylor expanded in x around 0 93.0%
if 2.4e15 < y Initial program 6.6%
Taylor expanded in y around inf 59.1%
Final simplification82.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -5.1e+51)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 2.4e+15)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(- (+ x (/ z y)) (/ (* x a) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -5.1e+51) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 2.4e+15) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = (x + (z / y)) - ((x * a) / 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) :: tmp
if (y <= (-5.1d+51)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 2.4d+15) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else
tmp = (x + (z / y)) - ((x * a) / 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 tmp;
if (y <= -5.1e+51) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 2.4e+15) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -5.1e+51: tmp = x + ((z / y) - (a / (y / x))) elif y <= 2.4e+15: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) else: tmp = (x + (z / y)) - ((x * a) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -5.1e+51) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 2.4e+15) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -5.1e+51) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 2.4e+15) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -5.1e+51], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+15], 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 * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{+51}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+15}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -5.1000000000000001e51Initial program 0.9%
Taylor expanded in y around inf 73.8%
associate--l+73.8%
associate-/l*79.8%
Simplified79.8%
if -5.1000000000000001e51 < y < 2.4e15Initial program 97.8%
Taylor expanded in x around 0 87.7%
if 2.4e15 < y Initial program 6.6%
Taylor expanded in y around inf 59.1%
Final simplification80.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -6.5e+29)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 5.5)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y b)))))
(- (+ x (/ z y)) (/ (* x a) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -6.5e+29) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 5.5) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
} else {
tmp = (x + (z / y)) - ((x * a) / 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) :: tmp
if (y <= (-6.5d+29)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 5.5d0) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * b))))
else
tmp = (x + (z / y)) - ((x * a) / 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 tmp;
if (y <= -6.5e+29) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 5.5) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -6.5e+29: tmp = x + ((z / y) - (a / (y / x))) elif y <= 5.5: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))) else: tmp = (x + (z / y)) - ((x * a) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -6.5e+29) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 5.5) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -6.5e+29) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 5.5) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -6.5e+29], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5], 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 * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+29}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 5.5:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -6.49999999999999971e29Initial program 8.1%
Taylor expanded in y around inf 68.1%
associate--l+68.1%
associate-/l*73.4%
Simplified73.4%
if -6.49999999999999971e29 < y < 5.5Initial program 99.7%
Taylor expanded in x around 0 90.9%
Taylor expanded in y around 0 88.4%
*-commutative85.0%
Simplified88.4%
if 5.5 < y Initial program 9.9%
Taylor expanded in y around inf 57.1%
Final simplification78.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -2.3e+29)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 2.3e+17)
(/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(- (+ x (/ z y)) (/ (* x a) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.3e+29) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 2.3e+17) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = (x + (z / y)) - ((x * a) / 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) :: tmp
if (y <= (-2.3d+29)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 2.3d+17) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else
tmp = (x + (z / y)) - ((x * a) / 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 tmp;
if (y <= -2.3e+29) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 2.3e+17) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.3e+29: tmp = x + ((z / y) - (a / (y / x))) elif y <= 2.3e+17: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))) else: tmp = (x + (z / y)) - ((x * a) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.3e+29) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 2.3e+17) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2.3e+29) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 2.3e+17) tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.3e+29], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.3e+17], 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], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+29}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 2.3 \cdot 10^{+17}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -2.3000000000000001e29Initial program 8.1%
Taylor expanded in y around inf 68.1%
associate--l+68.1%
associate-/l*73.4%
Simplified73.4%
if -2.3000000000000001e29 < y < 2.3e17Initial program 99.1%
Taylor expanded in y around 0 85.5%
*-commutative85.5%
Simplified85.5%
if 2.3e17 < y Initial program 6.6%
Taylor expanded in y around inf 60.1%
Final simplification77.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -1500000000.0)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 4.4)
(/ (+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z)))))) i)
(- (+ x (/ z y)) (/ (* x a) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1500000000.0) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 4.4) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i;
} else {
tmp = (x + (z / y)) - ((x * a) / 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) :: tmp
if (y <= (-1500000000.0d0)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 4.4d0) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / i
else
tmp = (x + (z / y)) - ((x * a) / 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 tmp;
if (y <= -1500000000.0) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 4.4) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i;
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1500000000.0: tmp = x + ((z / y) - (a / (y / x))) elif y <= 4.4: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i else: tmp = (x + (z / y)) - ((x * a) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1500000000.0) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 4.4) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / i); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -1500000000.0) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 4.4) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / i; else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1500000000.0], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.4], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1500000000:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 4.4:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -1.5e9Initial program 17.3%
Taylor expanded in y around inf 61.5%
associate--l+61.5%
associate-/l*66.3%
Simplified66.3%
if -1.5e9 < y < 4.4000000000000004Initial program 99.7%
Taylor expanded in x around 0 91.9%
Taylor expanded in i around inf 60.5%
if 4.4000000000000004 < y Initial program 9.9%
Taylor expanded in y around inf 57.1%
Final simplification61.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -2.2e+24)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 1.95e+17)
(/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y b)))))
(- (+ x (/ z y)) (/ (* x a) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.2e+24) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 1.95e+17) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
} else {
tmp = (x + (z / y)) - ((x * a) / 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) :: tmp
if (y <= (-2.2d+24)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 1.95d+17) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * b))))
else
tmp = (x + (z / y)) - ((x * a) / 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 tmp;
if (y <= -2.2e+24) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 1.95e+17) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.2e+24: tmp = x + ((z / y) - (a / (y / x))) elif y <= 1.95e+17: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))) else: tmp = (x + (z / y)) - ((x * a) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.2e+24) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 1.95e+17) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2.2e+24) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 1.95e+17) tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))); else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.2e+24], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e+17], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+24}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{+17}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -2.20000000000000002e24Initial program 8.1%
Taylor expanded in y around inf 68.1%
associate--l+68.1%
associate-/l*73.4%
Simplified73.4%
if -2.20000000000000002e24 < y < 1.95e17Initial program 99.1%
Taylor expanded in y around 0 85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y around 0 83.4%
*-commutative83.4%
Simplified83.4%
if 1.95e17 < y Initial program 6.6%
Taylor expanded in y around inf 60.1%
Final simplification76.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.8e+23) (not (<= y 5.5))) (+ x (- (/ z y) (/ a (/ y x)))) (/ (+ 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+23) || !(y <= 5.5)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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+23)) .or. (.not. (y <= 5.5d0))) then
tmp = x + ((z / y) - (a / (y / x)))
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+23) || !(y <= 5.5)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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+23) or not (y <= 5.5): tmp = x + ((z / y) - (a / (y / x))) 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+23) || !(y <= 5.5)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); 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+23) || ~((y <= 5.5))) tmp = x + ((z / y) - (a / (y / x))); 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+23], N[Not[LessEqual[y, 5.5]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $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 -2.8 \cdot 10^{+23} \lor \neg \left(y \leq 5.5\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\end{array}
\end{array}
if y < -2.8e23 or 5.5 < y Initial program 9.0%
Taylor expanded in y around inf 62.5%
associate--l+62.5%
associate-/l*64.8%
Simplified64.8%
if -2.8e23 < y < 5.5Initial program 99.7%
Taylor expanded in y around 0 87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in i around inf 57.5%
Final simplification60.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -4.2e+24)
(+ x (- (/ z y) (/ a (/ y x))))
(if (<= y 5.0)
(/ (+ t (* y 230661.510616)) i)
(- (+ x (/ z y)) (/ (* x a) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -4.2e+24) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 5.0) {
tmp = (t + (y * 230661.510616)) / i;
} else {
tmp = (x + (z / y)) - ((x * a) / 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) :: tmp
if (y <= (-4.2d+24)) then
tmp = x + ((z / y) - (a / (y / x)))
else if (y <= 5.0d0) then
tmp = (t + (y * 230661.510616d0)) / i
else
tmp = (x + (z / y)) - ((x * a) / 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 tmp;
if (y <= -4.2e+24) {
tmp = x + ((z / y) - (a / (y / x)));
} else if (y <= 5.0) {
tmp = (t + (y * 230661.510616)) / i;
} else {
tmp = (x + (z / y)) - ((x * a) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -4.2e+24: tmp = x + ((z / y) - (a / (y / x))) elif y <= 5.0: tmp = (t + (y * 230661.510616)) / i else: tmp = (x + (z / y)) - ((x * a) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -4.2e+24) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); elseif (y <= 5.0) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); else tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -4.2e+24) tmp = x + ((z / y) - (a / (y / x))); elseif (y <= 5.0) tmp = (t + (y * 230661.510616)) / i; else tmp = (x + (z / y)) - ((x * a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -4.2e+24], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.0], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{+24}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{elif}\;y \leq 5:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\end{array}
\end{array}
if y < -4.2000000000000003e24Initial program 8.1%
Taylor expanded in y around inf 68.1%
associate--l+68.1%
associate-/l*73.4%
Simplified73.4%
if -4.2000000000000003e24 < y < 5Initial program 99.7%
Taylor expanded in y around 0 87.2%
*-commutative87.2%
Simplified87.2%
Taylor expanded in i around inf 57.5%
if 5 < y Initial program 9.9%
Taylor expanded in y around inf 57.1%
Final simplification60.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -3.7e+19) x (if (<= y 5.5) (/ (+ 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 <= -3.7e+19) {
tmp = x;
} else if (y <= 5.5) {
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 <= (-3.7d+19)) then
tmp = x
else if (y <= 5.5d0) 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 <= -3.7e+19) {
tmp = x;
} else if (y <= 5.5) {
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 <= -3.7e+19: tmp = x elif y <= 5.5: 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 <= -3.7e+19) tmp = x; elseif (y <= 5.5) 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 <= -3.7e+19) tmp = x; elseif (y <= 5.5) 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, -3.7e+19], x, If[LessEqual[y, 5.5], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{+19}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 5.5:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.7e19 or 5.5 < y Initial program 11.4%
Taylor expanded in y around inf 50.3%
if -3.7e19 < y < 5.5Initial program 99.7%
Taylor expanded in y around 0 88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in i around inf 58.7%
Final simplification55.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -250000000.0) x (if (<= y 0.49) (/ 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 <= -250000000.0) {
tmp = x;
} else if (y <= 0.49) {
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 <= (-250000000.0d0)) then
tmp = x
else if (y <= 0.49d0) 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 <= -250000000.0) {
tmp = x;
} else if (y <= 0.49) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -250000000.0: tmp = x elif y <= 0.49: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -250000000.0) tmp = x; elseif (y <= 0.49) 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 <= -250000000.0) tmp = x; elseif (y <= 0.49) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -250000000.0], x, If[LessEqual[y, 0.49], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -250000000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 0.49:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.5e8 or 0.48999999999999999 < y Initial program 13.7%
Taylor expanded in y around inf 49.1%
if -2.5e8 < y < 0.48999999999999999Initial program 99.7%
Taylor expanded in y around 0 54.4%
Final simplification52.0%
(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 60.4%
Taylor expanded in y around inf 24.7%
Final simplification24.7%
herbie shell --seed 2023308
(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)))