
(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 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ c (* y (+ b (* y (+ y a))))))
(t_2 (* y t_1))
(t_3 (- x (/ (* z (+ -1.0 (/ a y))) y))))
(if (<= y -3.25e+50)
t_3
(if (<= y 9.5e+22)
(/
(+
(* y (+ (* y (+ (* y (+ z (* y x))) 27464.7644705)) 230661.510616))
t)
(+ i t_2))
(if (<= y 1.9e+93)
(*
x
(fma
230661.510616
(/ 1.0 (* x t_1))
(+
(/ t (* x t_2))
(+
(* (/ y x) (/ (+ 27464.7644705 (* y z)) t_1))
(/ (pow y 3.0) t_1)))))
t_3)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = c + (y * (b + (y * (y + a))));
double t_2 = y * t_1;
double t_3 = x - ((z * (-1.0 + (a / y))) / y);
double tmp;
if (y <= -3.25e+50) {
tmp = t_3;
} else if (y <= 9.5e+22) {
tmp = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + t_2);
} else if (y <= 1.9e+93) {
tmp = x * fma(230661.510616, (1.0 / (x * t_1)), ((t / (x * t_2)) + (((y / x) * ((27464.7644705 + (y * z)) / t_1)) + (pow(y, 3.0) / t_1))));
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a))))) t_2 = Float64(y * t_1) t_3 = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y)) tmp = 0.0 if (y <= -3.25e+50) tmp = t_3; elseif (y <= 9.5e+22) tmp = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(z + Float64(y * x))) + 27464.7644705)) + 230661.510616)) + t) / Float64(i + t_2)); elseif (y <= 1.9e+93) tmp = Float64(x * fma(230661.510616, Float64(1.0 / Float64(x * t_1)), Float64(Float64(t / Float64(x * t_2)) + Float64(Float64(Float64(y / x) * Float64(Float64(27464.7644705 + Float64(y * z)) / t_1)) + Float64((y ^ 3.0) / t_1))))); else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.25e+50], t$95$3, If[LessEqual[y, 9.5e+22], N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+93], N[(x * N[(230661.510616 * N[(1.0 / N[(x * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(x * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y / x), $MachinePrecision] * N[(N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[Power[y, 3.0], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\\
t_2 := y \cdot t\_1\\
t_3 := x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\
\mathbf{if}\;y \leq -3.25 \cdot 10^{+50}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+22}:\\
\;\;\;\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + t\_2}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+93}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(230661.510616, \frac{1}{x \cdot t\_1}, \frac{t}{x \cdot t\_2} + \left(\frac{y}{x} \cdot \frac{27464.7644705 + y \cdot z}{t\_1} + \frac{{y}^{3}}{t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if y < -3.2500000000000001e50 or 1.8999999999999999e93 < y Initial program 1.2%
Taylor expanded in y around -inf 54.8%
Taylor expanded in z around inf 71.0%
if -3.2500000000000001e50 < y < 9.49999999999999937e22Initial program 98.9%
if 9.49999999999999937e22 < y < 1.8999999999999999e93Initial program 18.5%
Taylor expanded in x around inf 34.2%
Taylor expanded in i around 0 67.2%
fma-define67.2%
times-frac72.7%
Simplified72.7%
Final simplification84.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* y (+ (* y (+ (* y (+ z (* y x))) 27464.7644705)) 230661.510616))
t)
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
(if (<= t_1 5e+286) t_1 (- x (/ (* z (+ -1.0 (/ a y))) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= 5e+286) {
tmp = t_1;
} else {
tmp = x - ((z * (-1.0 + (a / y))) / 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 * ((y * ((y * (z + (y * x))) + 27464.7644705d0)) + 230661.510616d0)) + t) / (i + (y * (c + (y * (b + (y * (y + a)))))))
if (t_1 <= 5d+286) then
tmp = t_1
else
tmp = x - ((z * ((-1.0d0) + (a / y))) / 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 * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * (y + a)))))));
double tmp;
if (t_1 <= 5e+286) {
tmp = t_1;
} else {
tmp = x - ((z * (-1.0 + (a / y))) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * (y + a))))))) tmp = 0 if t_1 <= 5e+286: tmp = t_1 else: tmp = x - ((z * (-1.0 + (a / y))) / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(z + Float64(y * x))) + 27464.7644705)) + 230661.510616)) + t) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))) tmp = 0.0 if (t_1 <= 5e+286) tmp = t_1; else tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((y * ((y * ((y * (z + (y * x))) + 27464.7644705)) + 230661.510616)) + t) / (i + (y * (c + (y * (b + (y * (y + a))))))); tmp = 0.0; if (t_1 <= 5e+286) tmp = t_1; else tmp = x - ((z * (-1.0 + (a / y))) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+286], t$95$1, N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(y \cdot \left(y \cdot \left(z + y \cdot x\right) + 27464.7644705\right) + 230661.510616\right) + t}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < 5.0000000000000004e286Initial program 92.0%
if 5.0000000000000004e286 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 2.7%
Taylor expanded in y around -inf 53.2%
Taylor expanded in z around inf 69.2%
Final simplification81.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -2.3e+50) (not (<= y 5e+51)))
(- x (/ (* z (+ -1.0 (/ a y))) y))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.3e+50) || !(y <= 5e+51)) {
tmp = x - ((z * (-1.0 + (a / y))) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-2.3d+50)) .or. (.not. (y <= 5d+51))) then
tmp = x - ((z * ((-1.0d0) + (a / y))) / y)
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.3e+50) || !(y <= 5e+51)) {
tmp = x - ((z * (-1.0 + (a / y))) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.3e+50) or not (y <= 5e+51): tmp = x - ((z * (-1.0 + (a / y))) / y) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.3e+50) || !(y <= 5e+51)) tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y)); else 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)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.3e+50) || ~((y <= 5e+51))) tmp = x - ((z * (-1.0 + (a / y))) / y); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.3e+50], N[Not[LessEqual[y, 5e+51]], $MachinePrecision]], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+50} \lor \neg \left(y \leq 5 \cdot 10^{+51}\right):\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\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)}\\
\end{array}
\end{array}
if y < -2.29999999999999997e50 or 5e51 < y Initial program 1.3%
Taylor expanded in y around -inf 54.2%
Taylor expanded in z around inf 69.6%
if -2.29999999999999997e50 < y < 5e51Initial program 93.2%
Taylor expanded in x around 0 89.0%
Final simplification79.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -3.6e+48) (not (<= y 15000000000000.0)))
(- x (/ (* z (+ -1.0 (/ a y))) y))
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -3.6e+48) || !(y <= 15000000000000.0)) {
tmp = x - ((z * (-1.0 + (a / y))) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
}
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.6d+48)) .or. (.not. (y <= 15000000000000.0d0))) then
tmp = x - ((z * ((-1.0d0) + (a / y))) / y)
else
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * b))))
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.6e+48) || !(y <= 15000000000000.0)) {
tmp = x - ((z * (-1.0 + (a / y))) / y);
} else {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -3.6e+48) or not (y <= 15000000000000.0): tmp = x - ((z * (-1.0 + (a / y))) / y) else: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -3.6e+48) || !(y <= 15000000000000.0)) tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y)); else 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))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -3.6e+48) || ~((y <= 15000000000000.0))) tmp = x - ((z * (-1.0 + (a / y))) / y); else tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -3.6e+48], N[Not[LessEqual[y, 15000000000000.0]], $MachinePrecision]], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+48} \lor \neg \left(y \leq 15000000000000\right):\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\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)}\\
\end{array}
\end{array}
if y < -3.59999999999999983e48 or 1.5e13 < y Initial program 5.0%
Taylor expanded in y around -inf 51.5%
Taylor expanded in z around inf 65.3%
if -3.59999999999999983e48 < y < 1.5e13Initial program 99.7%
Taylor expanded in x around 0 95.7%
Taylor expanded in y around 0 89.3%
Final simplification76.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -7.2e+43) (not (<= y 9.2e+21))) (- x (/ (* z (+ -1.0 (/ a y))) y)) (/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y (+ b (* y (+ y a))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -7.2e+43) || !(y <= 9.2e+21)) {
tmp = x - ((z * (-1.0 + (a / y))) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-7.2d+43)) .or. (.not. (y <= 9.2d+21))) then
tmp = x - ((z * ((-1.0d0) + (a / y))) / y)
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * (b + (y * (y + a)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -7.2e+43) || !(y <= 9.2e+21)) {
tmp = x - ((z * (-1.0 + (a / y))) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a)))))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -7.2e+43) or not (y <= 9.2e+21): tmp = x - ((z * (-1.0 + (a / y))) / y) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -7.2e+43) || !(y <= 9.2e+21)) tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y)); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * Float64(y + a)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -7.2e+43) || ~((y <= 9.2e+21))) tmp = x - ((z * (-1.0 + (a / y))) / y); else tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * (b + (y * (y + a))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -7.2e+43], N[Not[LessEqual[y, 9.2e+21]], $MachinePrecision]], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+43} \lor \neg \left(y \leq 9.2 \cdot 10^{+21}\right):\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot \left(b + y \cdot \left(y + a\right)\right)\right)}\\
\end{array}
\end{array}
if y < -7.2000000000000002e43 or 9.2e21 < y Initial program 5.1%
Taylor expanded in y around -inf 51.9%
Taylor expanded in z around inf 65.8%
if -7.2000000000000002e43 < y < 9.2e21Initial program 98.9%
Taylor expanded in y around 0 85.8%
*-commutative85.8%
Simplified85.8%
Final simplification75.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.35e+40) (not (<= y 3.65e+19))) (- x (/ (* z (+ -1.0 (/ a y))) y)) (/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y b)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.35e+40) || !(y <= 3.65e+19)) {
tmp = x - ((z * (-1.0 + (a / y))) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
}
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.35d+40)) .or. (.not. (y <= 3.65d+19))) then
tmp = x - ((z * ((-1.0d0) + (a / y))) / y)
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * b))))
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.35e+40) || !(y <= 3.65e+19)) {
tmp = x - ((z * (-1.0 + (a / y))) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.35e+40) or not (y <= 3.65e+19): tmp = x - ((z * (-1.0 + (a / y))) / y) else: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.35e+40) || !(y <= 3.65e+19)) tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y)); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.35e+40) || ~((y <= 3.65e+19))) tmp = x - ((z * (-1.0 + (a / y))) / y); else tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.35e+40], N[Not[LessEqual[y, 3.65e+19]], $MachinePrecision]], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{+40} \lor \neg \left(y \leq 3.65 \cdot 10^{+19}\right):\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -1.35000000000000005e40 or 3.65e19 < y Initial program 5.1%
Taylor expanded in y around -inf 51.9%
Taylor expanded in z around inf 65.8%
if -1.35000000000000005e40 < y < 3.65e19Initial program 98.9%
Taylor expanded in y around 0 85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in y around 0 79.7%
Final simplification72.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.8e+37) (not (<= y 15500000000.0))) (- x (/ (* z (+ -1.0 (/ a y))) y)) (/ (+ t (* y 230661.510616)) (+ i (* y c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.8e+37) || !(y <= 15500000000.0)) {
tmp = x - ((z * (-1.0 + (a / y))) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
}
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+37)) .or. (.not. (y <= 15500000000.0d0))) then
tmp = x - ((z * ((-1.0d0) + (a / y))) / y)
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * c))
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+37) || !(y <= 15500000000.0)) {
tmp = x - ((z * (-1.0 + (a / y))) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.8e+37) or not (y <= 15500000000.0): tmp = x - ((z * (-1.0 + (a / y))) / y) else: tmp = (t + (y * 230661.510616)) / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.8e+37) || !(y <= 15500000000.0)) tmp = Float64(x - Float64(Float64(z * Float64(-1.0 + Float64(a / y))) / y)); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2.8e+37) || ~((y <= 15500000000.0))) tmp = x - ((z * (-1.0 + (a / y))) / y); else tmp = (t + (y * 230661.510616)) / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.8e+37], N[Not[LessEqual[y, 15500000000.0]], $MachinePrecision]], N[(x - N[(N[(z * N[(-1.0 + N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+37} \lor \neg \left(y \leq 15500000000\right):\\
\;\;\;\;x - \frac{z \cdot \left(-1 + \frac{a}{y}\right)}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -2.7999999999999998e37 or 1.55e10 < y Initial program 5.0%
Taylor expanded in y around -inf 51.5%
Taylor expanded in z around inf 65.3%
if -2.7999999999999998e37 < y < 1.55e10Initial program 99.7%
Taylor expanded in y around 0 86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in y around 0 77.4%
Final simplification71.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2e+41) (not (<= y 102000000000.0))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) (+ i (* y c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2e+41) || !(y <= 102000000000.0)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
}
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+41)) .or. (.not. (y <= 102000000000.0d0))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * c))
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+41) || !(y <= 102000000000.0)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2e+41) or not (y <= 102000000000.0): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2e+41) || !(y <= 102000000000.0)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -2e+41) || ~((y <= 102000000000.0))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2e+41], N[Not[LessEqual[y, 102000000000.0]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+41} \lor \neg \left(y \leq 102000000000\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -2.00000000000000001e41 or 1.02e11 < y Initial program 5.0%
Taylor expanded in y around inf 61.3%
associate--l+61.3%
associate-/l*65.0%
Simplified65.0%
if -2.00000000000000001e41 < y < 1.02e11Initial program 99.7%
Taylor expanded in y around 0 86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in y around 0 77.4%
Final simplification70.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.75e+21) (not (<= y 4e-10))) (+ x (- (/ z y) (* a (/ x y)))) (/ (+ t (* y 230661.510616)) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.75e+21) || !(y <= 4e-10)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.75d+21)) .or. (.not. (y <= 4d-10))) then
tmp = x + ((z / y) - (a * (x / y)))
else
tmp = (t + (y * 230661.510616d0)) / i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.75e+21) || !(y <= 4e-10)) {
tmp = x + ((z / y) - (a * (x / y)));
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.75e+21) or not (y <= 4e-10): tmp = x + ((z / y) - (a * (x / y))) else: tmp = (t + (y * 230661.510616)) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.75e+21) || !(y <= 4e-10)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a * Float64(x / y)))); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.75e+21) || ~((y <= 4e-10))) tmp = x + ((z / y) - (a * (x / y))); else tmp = (t + (y * 230661.510616)) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.75e+21], N[Not[LessEqual[y, 4e-10]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+21} \lor \neg \left(y \leq 4 \cdot 10^{-10}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - a \cdot \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\end{array}
\end{array}
if y < -1.75e21 or 4.00000000000000015e-10 < y Initial program 8.4%
Taylor expanded in y around inf 59.3%
associate--l+59.3%
associate-/l*62.8%
Simplified62.8%
if -1.75e21 < y < 4.00000000000000015e-10Initial program 99.7%
Taylor expanded in y around 0 88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in i around inf 58.7%
Final simplification60.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -8e+49) x (if (<= y 4e+39) (/ (+ 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 <= -8e+49) {
tmp = x;
} else if (y <= 4e+39) {
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 <= (-8d+49)) then
tmp = x
else if (y <= 4d+39) 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 <= -8e+49) {
tmp = x;
} else if (y <= 4e+39) {
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 <= -8e+49: tmp = x elif y <= 4e+39: 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 <= -8e+49) tmp = x; elseif (y <= 4e+39) 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 <= -8e+49) tmp = x; elseif (y <= 4e+39) 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, -8e+49], x, If[LessEqual[y, 4e+39], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+49}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4 \cdot 10^{+39}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7.99999999999999957e49 or 3.99999999999999976e39 < y Initial program 3.7%
Taylor expanded in y around inf 54.3%
if -7.99999999999999957e49 < y < 3.99999999999999976e39Initial program 95.9%
Taylor expanded in y around 0 82.0%
*-commutative82.0%
Simplified82.0%
Taylor expanded in i around inf 53.6%
Final simplification53.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.7e+22) x (if (<= y 1.22e+30) (/ 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.7e+22) {
tmp = x;
} else if (y <= 1.22e+30) {
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.7d+22)) then
tmp = x
else if (y <= 1.22d+30) 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.7e+22) {
tmp = x;
} else if (y <= 1.22e+30) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.7e+22: tmp = x elif y <= 1.22e+30: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.7e+22) tmp = x; elseif (y <= 1.22e+30) 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.7e+22) tmp = x; elseif (y <= 1.22e+30) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.7e+22], x, If[LessEqual[y, 1.22e+30], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+22}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.22 \cdot 10^{+30}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.7e22 or 1.22e30 < y Initial program 5.1%
Taylor expanded in y around inf 52.8%
if -1.7e22 < y < 1.22e30Initial program 97.3%
Taylor expanded in y around 0 51.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 50.1%
Taylor expanded in y around inf 28.7%
herbie shell --seed 2024163
(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)))