
(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 11 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 -2.2e+26)
(/ x (+ 1.0 (/ a y)))
(if (<= y 1.05e+53)
(/
(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))
(+ x (- (/ z y) (/ a (/ y x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.2e+26) {
tmp = x / (1.0 + (a / y));
} else if (y <= 1.05e+53) {
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 = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.2e+26) tmp = Float64(x / Float64(1.0 + Float64(a / y))); elseif (y <= 1.05e+53) 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 = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.2e+26], N[(x / N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+53], 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], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{1 + \frac{a}{y}}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+53}:\\
\;\;\;\;\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}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\end{array}
\end{array}
if y < -2.20000000000000007e26Initial program 5.4%
clear-num5.4%
inv-pow5.4%
Applied egg-rr5.4%
unpow-15.4%
fma-udef5.4%
*-commutative5.4%
fma-def5.4%
Simplified5.4%
Taylor expanded in y around -inf 63.6%
+-commutative63.6%
mul-1-neg63.6%
unsub-neg63.6%
*-commutative63.6%
fma-neg63.6%
mul-1-neg63.6%
remove-double-neg63.6%
unpow263.6%
Simplified63.6%
Taylor expanded in x around inf 77.9%
cancel-sign-sub-inv77.9%
metadata-eval77.9%
*-lft-identity77.9%
Simplified77.9%
if -2.20000000000000007e26 < y < 1.0500000000000001e53Initial program 96.9%
fma-def96.9%
fma-def96.9%
fma-def96.9%
fma-def96.9%
fma-def96.9%
fma-def96.9%
fma-def96.9%
Simplified96.9%
if 1.0500000000000001e53 < y Initial program 0.3%
Taylor expanded in y around inf 79.3%
associate--l+79.3%
associate-/l*85.8%
Simplified85.8%
Final simplification89.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -2.2e+26)
(/ x (+ 1.0 (/ a y)))
(if (<= y 1.45e+53)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ z (* y x))))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(+ x (- (/ z y) (/ a (/ y x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.2e+26) {
tmp = x / (1.0 + (a / y));
} else if (y <= 1.45e+53) {
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) - (a / (y / 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 <= (-2.2d+26)) then
tmp = x / (1.0d0 + (a / y))
else if (y <= 1.45d+53) 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) - (a / (y / 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 <= -2.2e+26) {
tmp = x / (1.0 + (a / y));
} else if (y <= 1.45e+53) {
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) - (a / (y / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.2e+26: tmp = x / (1.0 + (a / y)) elif y <= 1.45e+53: 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) - (a / (y / x))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.2e+26) tmp = Float64(x / Float64(1.0 + Float64(a / y))); elseif (y <= 1.45e+53) 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(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2.2e+26) tmp = x / (1.0 + (a / y)); elseif (y <= 1.45e+53) 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) - (a / (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.2e+26], N[(x / N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+53], 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[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{1 + \frac{a}{y}}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+53}:\\
\;\;\;\;\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}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\end{array}
\end{array}
if y < -2.20000000000000007e26Initial program 5.4%
clear-num5.4%
inv-pow5.4%
Applied egg-rr5.4%
unpow-15.4%
fma-udef5.4%
*-commutative5.4%
fma-def5.4%
Simplified5.4%
Taylor expanded in y around -inf 63.6%
+-commutative63.6%
mul-1-neg63.6%
unsub-neg63.6%
*-commutative63.6%
fma-neg63.6%
mul-1-neg63.6%
remove-double-neg63.6%
unpow263.6%
Simplified63.6%
Taylor expanded in x around inf 77.9%
cancel-sign-sub-inv77.9%
metadata-eval77.9%
*-lft-identity77.9%
Simplified77.9%
if -2.20000000000000007e26 < y < 1.4500000000000001e53Initial program 96.9%
if 1.4500000000000001e53 < y Initial program 0.3%
Taylor expanded in y around inf 79.3%
associate--l+79.3%
associate-/l*85.8%
Simplified85.8%
Final simplification89.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -2e+26)
(/ x (+ 1.0 (/ a y)))
(if (<= y 2.1e+59)
(/
(+ t (* y (+ 230661.510616 (* y (* y z)))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(+ x (- (/ z y) (/ a (/ y x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2e+26) {
tmp = x / (1.0 + (a / y));
} else if (y <= 2.1e+59) {
tmp = (t + (y * (230661.510616 + (y * (y * z))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + ((z / y) - (a / (y / 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 <= (-2d+26)) then
tmp = x / (1.0d0 + (a / y))
else if (y <= 2.1d+59) then
tmp = (t + (y * (230661.510616d0 + (y * (y * z))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else
tmp = x + ((z / y) - (a / (y / 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 <= -2e+26) {
tmp = x / (1.0 + (a / y));
} else if (y <= 2.1e+59) {
tmp = (t + (y * (230661.510616 + (y * (y * z))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2e+26: tmp = x / (1.0 + (a / y)) elif y <= 2.1e+59: tmp = (t + (y * (230661.510616 + (y * (y * z))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) else: tmp = x + ((z / y) - (a / (y / x))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2e+26) tmp = Float64(x / Float64(1.0 + Float64(a / y))); elseif (y <= 2.1e+59) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(y * z))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); else tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2e+26) tmp = x / (1.0 + (a / y)); elseif (y <= 2.1e+59) tmp = (t + (y * (230661.510616 + (y * (y * z))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); else tmp = x + ((z / y) - (a / (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2e+26], N[(x / N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+59], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(y * z), $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[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{1 + \frac{a}{y}}\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+59}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\end{array}
\end{array}
if y < -2.0000000000000001e26Initial program 5.4%
clear-num5.4%
inv-pow5.4%
Applied egg-rr5.4%
unpow-15.4%
fma-udef5.4%
*-commutative5.4%
fma-def5.4%
Simplified5.4%
Taylor expanded in y around -inf 63.6%
+-commutative63.6%
mul-1-neg63.6%
unsub-neg63.6%
*-commutative63.6%
fma-neg63.6%
mul-1-neg63.6%
remove-double-neg63.6%
unpow263.6%
Simplified63.6%
Taylor expanded in x around inf 77.9%
cancel-sign-sub-inv77.9%
metadata-eval77.9%
*-lft-identity77.9%
Simplified77.9%
if -2.0000000000000001e26 < y < 2.09999999999999984e59Initial program 96.2%
Taylor expanded in z around inf 91.2%
unpow291.2%
associate-*l*91.2%
Simplified91.2%
if 2.09999999999999984e59 < y Initial program 0.3%
Taylor expanded in y around inf 80.6%
associate--l+80.6%
associate-/l*87.2%
Simplified87.2%
Final simplification87.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -1.28e+32)
(/ x (+ 1.0 (/ a y)))
(if (<= y 1.5e+59)
(/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(+ x (- (/ z y) (/ a (/ y x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.28e+32) {
tmp = x / (1.0 + (a / y));
} else if (y <= 1.5e+59) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + ((z / y) - (a / (y / 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.28d+32)) then
tmp = x / (1.0d0 + (a / y))
else if (y <= 1.5d+59) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * (b + (y * (y + a)))))))
else
tmp = x + ((z / y) - (a / (y / 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.28e+32) {
tmp = x / (1.0 + (a / y));
} else if (y <= 1.5e+59) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.28e+32: tmp = x / (1.0 + (a / y)) elif y <= 1.5e+59: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))) else: tmp = x + ((z / y) - (a / (y / x))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.28e+32) tmp = Float64(x / Float64(1.0 + Float64(a / y))); elseif (y <= 1.5e+59) 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(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -1.28e+32) tmp = x / (1.0 + (a / y)); elseif (y <= 1.5e+59) tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))); else tmp = x + ((z / y) - (a / (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.28e+32], N[(x / N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+59], 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[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.28 \cdot 10^{+32}:\\
\;\;\;\;\frac{x}{1 + \frac{a}{y}}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+59}:\\
\;\;\;\;\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}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\end{array}
\end{array}
if y < -1.28e32Initial program 5.5%
clear-num5.5%
inv-pow5.5%
Applied egg-rr5.5%
unpow-15.5%
fma-udef5.5%
*-commutative5.5%
fma-def5.5%
Simplified5.5%
Taylor expanded in y around -inf 64.6%
+-commutative64.6%
mul-1-neg64.6%
unsub-neg64.6%
*-commutative64.6%
fma-neg64.6%
mul-1-neg64.6%
remove-double-neg64.6%
unpow264.6%
Simplified64.6%
Taylor expanded in x around inf 79.2%
cancel-sign-sub-inv79.2%
metadata-eval79.2%
*-lft-identity79.2%
Simplified79.2%
if -1.28e32 < y < 1.5e59Initial program 95.5%
Taylor expanded in y around 0 81.9%
*-commutative81.9%
Simplified81.9%
if 1.5e59 < y Initial program 0.3%
Taylor expanded in y around inf 80.6%
associate--l+80.6%
associate-/l*87.2%
Simplified87.2%
Final simplification82.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -2.75e+26)
(/ x (+ 1.0 (/ a y)))
(if (<= y 1.75e+22)
(/
(+ t (* y (+ 230661.510616 (* y 27464.7644705))))
(+ i (* y (+ c (* y b)))))
(+ x (- (/ z y) (/ a (/ y x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -2.75e+26) {
tmp = x / (1.0 + (a / y));
} else if (y <= 1.75e+22) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b))));
} else {
tmp = x + ((z / y) - (a / (y / 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 <= (-2.75d+26)) then
tmp = x / (1.0d0 + (a / y))
else if (y <= 1.75d+22) then
tmp = (t + (y * (230661.510616d0 + (y * 27464.7644705d0)))) / (i + (y * (c + (y * b))))
else
tmp = x + ((z / y) - (a / (y / 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 <= -2.75e+26) {
tmp = x / (1.0 + (a / y));
} else if (y <= 1.75e+22) {
tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b))));
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -2.75e+26: tmp = x / (1.0 + (a / y)) elif y <= 1.75e+22: tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))) else: tmp = x + ((z / y) - (a / (y / x))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -2.75e+26) tmp = Float64(x / Float64(1.0 + Float64(a / y))); elseif (y <= 1.75e+22) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * 27464.7644705)))) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); else tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -2.75e+26) tmp = x / (1.0 + (a / y)); elseif (y <= 1.75e+22) tmp = (t + (y * (230661.510616 + (y * 27464.7644705)))) / (i + (y * (c + (y * b)))); else tmp = x + ((z / y) - (a / (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -2.75e+26], N[(x / N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+22], N[(N[(t + N[(y * N[(230661.510616 + N[(y * 27464.7644705), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.75 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{1 + \frac{a}{y}}\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+22}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot 27464.7644705\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\end{array}
\end{array}
if y < -2.7499999999999998e26Initial program 5.5%
clear-num5.5%
inv-pow5.5%
Applied egg-rr5.5%
unpow-15.5%
fma-udef5.5%
*-commutative5.5%
fma-def5.5%
Simplified5.5%
Taylor expanded in y around -inf 64.6%
+-commutative64.6%
mul-1-neg64.6%
unsub-neg64.6%
*-commutative64.6%
fma-neg64.6%
mul-1-neg64.6%
remove-double-neg64.6%
unpow264.6%
Simplified64.6%
Taylor expanded in x around inf 79.2%
cancel-sign-sub-inv79.2%
metadata-eval79.2%
*-lft-identity79.2%
Simplified79.2%
if -2.7499999999999998e26 < y < 1.75e22Initial program 97.5%
Taylor expanded in y around 0 83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in y around 0 80.1%
*-commutative80.1%
Simplified80.1%
if 1.75e22 < y Initial program 3.5%
Taylor expanded in y around inf 74.6%
associate--l+74.6%
associate-/l*80.7%
Simplified80.7%
Final simplification80.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -6.5e+34)
(/ x (+ 1.0 (/ a y)))
(if (<= y 1.4e+55)
(/ t (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))
(+ x (- (/ z y) (/ a (/ y x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -6.5e+34) {
tmp = x / (1.0 + (a / y));
} else if (y <= 1.4e+55) {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + ((z / y) - (a / (y / 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 <= (-6.5d+34)) then
tmp = x / (1.0d0 + (a / y))
else if (y <= 1.4d+55) then
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))))
else
tmp = x + ((z / y) - (a / (y / 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 <= -6.5e+34) {
tmp = x / (1.0 + (a / y));
} else if (y <= 1.4e+55) {
tmp = t / (i + (y * (c + (y * (b + (y * (y + a)))))));
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -6.5e+34: tmp = x / (1.0 + (a / y)) elif y <= 1.4e+55: tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))) else: tmp = x + ((z / y) - (a / (y / x))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -6.5e+34) tmp = Float64(x / Float64(1.0 + Float64(a / y))); elseif (y <= 1.4e+55) tmp = Float64(t / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); else tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -6.5e+34) tmp = x / (1.0 + (a / y)); elseif (y <= 1.4e+55) tmp = t / (i + (y * (c + (y * (b + (y * (y + a))))))); else tmp = x + ((z / y) - (a / (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -6.5e+34], N[(x / N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.4e+55], 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[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.5 \cdot 10^{+34}:\\
\;\;\;\;\frac{x}{1 + \frac{a}{y}}\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+55}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\end{array}
\end{array}
if y < -6.50000000000000017e34Initial program 5.5%
clear-num5.5%
inv-pow5.5%
Applied egg-rr5.5%
unpow-15.5%
fma-udef5.5%
*-commutative5.5%
fma-def5.5%
Simplified5.5%
Taylor expanded in y around -inf 64.6%
+-commutative64.6%
mul-1-neg64.6%
unsub-neg64.6%
*-commutative64.6%
fma-neg64.6%
mul-1-neg64.6%
remove-double-neg64.6%
unpow264.6%
Simplified64.6%
Taylor expanded in x around inf 79.2%
cancel-sign-sub-inv79.2%
metadata-eval79.2%
*-lft-identity79.2%
Simplified79.2%
if -6.50000000000000017e34 < y < 1.4e55Initial program 95.5%
Taylor expanded in t around inf 67.7%
if 1.4e55 < y Initial program 0.3%
Taylor expanded in y around inf 80.6%
associate--l+80.6%
associate-/l*87.2%
Simplified87.2%
Final simplification74.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -4.4e+18)
(/ x (+ 1.0 (/ a y)))
(if (<= y 1.3e+21)
(/ (+ t (* y 230661.510616)) i)
(+ x (- (/ z y) (/ a (/ y x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -4.4e+18) {
tmp = x / (1.0 + (a / y));
} else if (y <= 1.3e+21) {
tmp = (t + (y * 230661.510616)) / i;
} else {
tmp = x + ((z / y) - (a / (y / 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 <= (-4.4d+18)) then
tmp = x / (1.0d0 + (a / y))
else if (y <= 1.3d+21) then
tmp = (t + (y * 230661.510616d0)) / i
else
tmp = x + ((z / y) - (a / (y / 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 <= -4.4e+18) {
tmp = x / (1.0 + (a / y));
} else if (y <= 1.3e+21) {
tmp = (t + (y * 230661.510616)) / i;
} else {
tmp = x + ((z / y) - (a / (y / x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -4.4e+18: tmp = x / (1.0 + (a / y)) elif y <= 1.3e+21: tmp = (t + (y * 230661.510616)) / i else: tmp = x + ((z / y) - (a / (y / x))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -4.4e+18) tmp = Float64(x / Float64(1.0 + Float64(a / y))); elseif (y <= 1.3e+21) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); else tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -4.4e+18) tmp = x / (1.0 + (a / y)); elseif (y <= 1.3e+21) tmp = (t + (y * 230661.510616)) / i; else tmp = x + ((z / y) - (a / (y / x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -4.4e+18], N[(x / N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+21], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+18}:\\
\;\;\;\;\frac{x}{1 + \frac{a}{y}}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+21}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\end{array}
\end{array}
if y < -4.4e18Initial program 5.4%
clear-num5.4%
inv-pow5.4%
Applied egg-rr5.4%
unpow-15.4%
fma-udef5.4%
*-commutative5.4%
fma-def5.4%
Simplified5.4%
Taylor expanded in y around -inf 63.6%
+-commutative63.6%
mul-1-neg63.6%
unsub-neg63.6%
*-commutative63.6%
fma-neg63.6%
mul-1-neg63.6%
remove-double-neg63.6%
unpow263.6%
Simplified63.6%
Taylor expanded in x around inf 77.9%
cancel-sign-sub-inv77.9%
metadata-eval77.9%
*-lft-identity77.9%
Simplified77.9%
if -4.4e18 < y < 1.3e21Initial program 98.3%
Taylor expanded in y around 0 84.0%
*-commutative84.0%
Simplified84.0%
Taylor expanded in i around inf 54.5%
Taylor expanded in y around 0 54.5%
*-commutative54.5%
Simplified54.5%
if 1.3e21 < y Initial program 3.5%
Taylor expanded in y around inf 74.6%
associate--l+74.6%
associate-/l*80.7%
Simplified80.7%
Final simplification66.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -10000000000000.0) (not (<= y 3.8e-27))) (/ x (+ 1.0 (/ a y))) (/ t i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -10000000000000.0) || !(y <= 3.8e-27)) {
tmp = x / (1.0 + (a / y));
} else {
tmp = t / 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 <= (-10000000000000.0d0)) .or. (.not. (y <= 3.8d-27))) then
tmp = x / (1.0d0 + (a / y))
else
tmp = t / 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 <= -10000000000000.0) || !(y <= 3.8e-27)) {
tmp = x / (1.0 + (a / y));
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -10000000000000.0) or not (y <= 3.8e-27): tmp = x / (1.0 + (a / y)) else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -10000000000000.0) || !(y <= 3.8e-27)) tmp = Float64(x / Float64(1.0 + Float64(a / y))); else tmp = Float64(t / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -10000000000000.0) || ~((y <= 3.8e-27))) tmp = x / (1.0 + (a / y)); else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -10000000000000.0], N[Not[LessEqual[y, 3.8e-27]], $MachinePrecision]], N[(x / N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -10000000000000 \lor \neg \left(y \leq 3.8 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{x}{1 + \frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -1e13 or 3.8e-27 < y Initial program 11.4%
clear-num11.4%
inv-pow11.4%
Applied egg-rr11.4%
unpow-111.4%
fma-udef11.4%
*-commutative11.4%
fma-def11.4%
Simplified11.4%
Taylor expanded in y around -inf 60.4%
+-commutative60.4%
mul-1-neg60.4%
unsub-neg60.4%
*-commutative60.4%
fma-neg60.4%
mul-1-neg60.4%
remove-double-neg60.4%
unpow260.4%
Simplified60.4%
Taylor expanded in x around inf 69.9%
cancel-sign-sub-inv69.9%
metadata-eval69.9%
*-lft-identity69.9%
Simplified69.9%
if -1e13 < y < 3.8e-27Initial program 99.7%
Taylor expanded in y around 0 53.7%
Final simplification62.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -320000000000.0) (not (<= y 6.2e-27))) (/ x (+ 1.0 (/ 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 <= -320000000000.0) || !(y <= 6.2e-27)) {
tmp = x / (1.0 + (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 <= (-320000000000.0d0)) .or. (.not. (y <= 6.2d-27))) then
tmp = x / (1.0d0 + (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 <= -320000000000.0) || !(y <= 6.2e-27)) {
tmp = x / (1.0 + (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 <= -320000000000.0) or not (y <= 6.2e-27): tmp = x / (1.0 + (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 <= -320000000000.0) || !(y <= 6.2e-27)) tmp = Float64(x / Float64(1.0 + Float64(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 <= -320000000000.0) || ~((y <= 6.2e-27))) tmp = x / (1.0 + (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, -320000000000.0], N[Not[LessEqual[y, 6.2e-27]], $MachinePrecision]], N[(x / N[(1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -320000000000 \lor \neg \left(y \leq 6.2 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{x}{1 + \frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\end{array}
\end{array}
if y < -3.2e11 or 6.1999999999999997e-27 < y Initial program 11.4%
clear-num11.4%
inv-pow11.4%
Applied egg-rr11.4%
unpow-111.4%
fma-udef11.4%
*-commutative11.4%
fma-def11.4%
Simplified11.4%
Taylor expanded in y around -inf 60.4%
+-commutative60.4%
mul-1-neg60.4%
unsub-neg60.4%
*-commutative60.4%
fma-neg60.4%
mul-1-neg60.4%
remove-double-neg60.4%
unpow260.4%
Simplified60.4%
Taylor expanded in x around inf 69.9%
cancel-sign-sub-inv69.9%
metadata-eval69.9%
*-lft-identity69.9%
Simplified69.9%
if -3.2e11 < y < 6.1999999999999997e-27Initial program 99.7%
Taylor expanded in y around 0 87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in i around inf 59.7%
Taylor expanded in y around 0 59.7%
*-commutative59.7%
Simplified59.7%
Final simplification65.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.2e-18) x (if (<= y 0.00036) (/ 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 <= -1.2e-18) {
tmp = x;
} else if (y <= 0.00036) {
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 <= (-1.2d-18)) then
tmp = x
else if (y <= 0.00036d0) 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 <= -1.2e-18) {
tmp = x;
} else if (y <= 0.00036) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.2e-18: tmp = x elif y <= 0.00036: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.2e-18) tmp = x; elseif (y <= 0.00036) 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 <= -1.2e-18) tmp = x; elseif (y <= 0.00036) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.2e-18], x, If[LessEqual[y, 0.00036], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 0.00036:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.19999999999999997e-18 or 3.60000000000000023e-4 < y Initial program 12.6%
Taylor expanded in y around inf 55.6%
if -1.19999999999999997e-18 < y < 3.60000000000000023e-4Initial program 99.8%
Taylor expanded in y around 0 54.5%
Final simplification55.1%
(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 52.5%
Taylor expanded in y around inf 31.6%
Final simplification31.6%
herbie shell --seed 2023271
(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)))