
(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
(/
(+
(* y (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
(if (<= t_1 INFINITY) t_1 (/ x (/ (+ a (+ y (/ b y))) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x / ((a + (y + (b / y))) / y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x / ((a + (y + (b / y))) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x / ((a + (y + (b / y))) / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z)))))) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x / Float64(Float64(a + Float64(y + Float64(b / y))) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((y * (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))))) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x / ((a + (y + (b / 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[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x / N[(N[(a + N[(y + N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{a + \left(y + \frac{b}{y}\right)}{y}}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 89.2%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) 54929528941/2000000) y) 28832688827/125000) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in t around 0 0.0%
Simplified0.4%
Taylor expanded in y around inf 60.2%
+-commutative60.2%
*-commutative60.2%
associate-*r/60.2%
metadata-eval60.2%
*-commutative60.2%
*-commutative60.2%
Simplified60.2%
Taylor expanded in x around inf 45.2%
associate-/l*80.2%
Simplified80.2%
Final simplification85.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y (+ (* y (+ y a)) b)) c))
(t_2 (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))))
(t_3 (/ x (/ (+ a (+ y (/ b y))) y))))
(if (<= y -5.5e+97)
t_3
(if (<= y -0.015)
(/ t_2 t_1)
(if (<= y -1.3e-55)
(/ (+ (* y t_2) t) (+ i (* y (+ c (* y b)))))
(if (<= y 0.06)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ (* y t_1) i))
t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = 230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))));
double t_3 = x / ((a + (y + (b / y))) / y);
double tmp;
if (y <= -5.5e+97) {
tmp = t_3;
} else if (y <= -0.015) {
tmp = t_2 / t_1;
} else if (y <= -1.3e-55) {
tmp = ((y * t_2) + t) / (i + (y * (c + (y * b))));
} else if (y <= 0.06) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * t_1) + i);
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (y * ((y * (y + a)) + b)) + c
t_2 = 230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))
t_3 = x / ((a + (y + (b / y))) / y)
if (y <= (-5.5d+97)) then
tmp = t_3
else if (y <= (-0.015d0)) then
tmp = t_2 / t_1
else if (y <= (-1.3d-55)) then
tmp = ((y * t_2) + t) / (i + (y * (c + (y * b))))
else if (y <= 0.06d0) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / ((y * t_1) + i)
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * ((y * (y + a)) + b)) + c;
double t_2 = 230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))));
double t_3 = x / ((a + (y + (b / y))) / y);
double tmp;
if (y <= -5.5e+97) {
tmp = t_3;
} else if (y <= -0.015) {
tmp = t_2 / t_1;
} else if (y <= -1.3e-55) {
tmp = ((y * t_2) + t) / (i + (y * (c + (y * b))));
} else if (y <= 0.06) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * t_1) + i);
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * ((y * (y + a)) + b)) + c t_2 = 230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))) t_3 = x / ((a + (y + (b / y))) / y) tmp = 0 if y <= -5.5e+97: tmp = t_3 elif y <= -0.015: tmp = t_2 / t_1 elif y <= -1.3e-55: tmp = ((y * t_2) + t) / (i + (y * (c + (y * b)))) elif y <= 0.06: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * t_1) + i) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c) t_2 = Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) t_3 = Float64(x / Float64(Float64(a + Float64(y + Float64(b / y))) / y)) tmp = 0.0 if (y <= -5.5e+97) tmp = t_3; elseif (y <= -0.015) tmp = Float64(t_2 / t_1); elseif (y <= -1.3e-55) tmp = Float64(Float64(Float64(y * t_2) + t) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); elseif (y <= 0.06) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(Float64(y * t_1) + i)); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * ((y * (y + a)) + b)) + c; t_2 = 230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))); t_3 = x / ((a + (y + (b / y))) / y); tmp = 0.0; if (y <= -5.5e+97) tmp = t_3; elseif (y <= -0.015) tmp = t_2 / t_1; elseif (y <= -1.3e-55) tmp = ((y * t_2) + t) / (i + (y * (c + (y * b)))); elseif (y <= 0.06) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / ((y * t_1) + i); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]}, Block[{t$95$2 = N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(N[(a + N[(y + N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+97], t$95$3, If[LessEqual[y, -0.015], N[(t$95$2 / t$95$1), $MachinePrecision], If[LessEqual[y, -1.3e-55], N[(N[(N[(y * t$95$2), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.06], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * t$95$1), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\\
t_2 := 230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\\
t_3 := \frac{x}{\frac{a + \left(y + \frac{b}{y}\right)}{y}}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+97}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -0.015:\\
\;\;\;\;\frac{t_2}{t_1}\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-55}:\\
\;\;\;\;\frac{y \cdot t_2 + t}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{elif}\;y \leq 0.06:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{y \cdot t_1 + i}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -5.50000000000000021e97 or 0.059999999999999998 < y Initial program 4.8%
Taylor expanded in t around 0 3.9%
Simplified5.0%
Taylor expanded in y around inf 56.8%
+-commutative56.8%
*-commutative56.8%
associate-*r/56.8%
metadata-eval56.8%
*-commutative56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in x around inf 43.4%
associate-/l*75.6%
Simplified75.6%
if -5.50000000000000021e97 < y < -0.014999999999999999Initial program 51.1%
Taylor expanded in t around 0 41.5%
Simplified51.2%
Taylor expanded in i around 0 61.3%
if -0.014999999999999999 < y < -1.2999999999999999e-55Initial program 99.6%
Taylor expanded in y around 0 90.6%
*-commutative90.6%
Simplified90.6%
if -1.2999999999999999e-55 < y < 0.059999999999999998Initial program 99.7%
Taylor expanded in x around 0 99.7%
Final simplification85.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z))))))
(t_2 (/ x (/ (+ a (+ y (/ b y))) y))))
(if (<= y -5.5e+97)
t_2
(if (<= y -0.0029)
(/ t_1 (+ (* y (+ (* y (+ y a)) b)) c))
(if (<= y 4500000000.0)
(/ (+ (* y t_1) t) (+ i (* y (+ c (* y b)))))
t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))));
double t_2 = x / ((a + (y + (b / y))) / y);
double tmp;
if (y <= -5.5e+97) {
tmp = t_2;
} else if (y <= -0.0029) {
tmp = t_1 / ((y * ((y * (y + a)) + b)) + c);
} else if (y <= 4500000000.0) {
tmp = ((y * t_1) + t) / (i + (y * (c + (y * b))));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))
t_2 = x / ((a + (y + (b / y))) / y)
if (y <= (-5.5d+97)) then
tmp = t_2
else if (y <= (-0.0029d0)) then
tmp = t_1 / ((y * ((y * (y + a)) + b)) + c)
else if (y <= 4500000000.0d0) then
tmp = ((y * t_1) + t) / (i + (y * (c + (y * b))))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))));
double t_2 = x / ((a + (y + (b / y))) / y);
double tmp;
if (y <= -5.5e+97) {
tmp = t_2;
} else if (y <= -0.0029) {
tmp = t_1 / ((y * ((y * (y + a)) + b)) + c);
} else if (y <= 4500000000.0) {
tmp = ((y * t_1) + t) / (i + (y * (c + (y * b))));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = 230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))) t_2 = x / ((a + (y + (b / y))) / y) tmp = 0 if y <= -5.5e+97: tmp = t_2 elif y <= -0.0029: tmp = t_1 / ((y * ((y * (y + a)) + b)) + c) elif y <= 4500000000.0: tmp = ((y * t_1) + t) / (i + (y * (c + (y * b)))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) t_2 = Float64(x / Float64(Float64(a + Float64(y + Float64(b / y))) / y)) tmp = 0.0 if (y <= -5.5e+97) tmp = t_2; elseif (y <= -0.0029) tmp = Float64(t_1 / Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)); elseif (y <= 4500000000.0) tmp = Float64(Float64(Float64(y * t_1) + t) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = 230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z)))); t_2 = x / ((a + (y + (b / y))) / y); tmp = 0.0; if (y <= -5.5e+97) tmp = t_2; elseif (y <= -0.0029) tmp = t_1 / ((y * ((y * (y + a)) + b)) + c); elseif (y <= 4500000000.0) tmp = ((y * t_1) + t) / (i + (y * (c + (y * b)))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(N[(a + N[(y + N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+97], t$95$2, If[LessEqual[y, -0.0029], N[(t$95$1 / N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4500000000.0], N[(N[(N[(y * t$95$1), $MachinePrecision] + t), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)\\
t_2 := \frac{x}{\frac{a + \left(y + \frac{b}{y}\right)}{y}}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+97}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -0.0029:\\
\;\;\;\;\frac{t_1}{y \cdot \left(y \cdot \left(y + a\right) + b\right) + c}\\
\mathbf{elif}\;y \leq 4500000000:\\
\;\;\;\;\frac{y \cdot t_1 + t}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -5.50000000000000021e97 or 4.5e9 < y Initial program 3.9%
Taylor expanded in t around 0 3.1%
Simplified4.2%
Taylor expanded in y around inf 56.4%
+-commutative56.4%
*-commutative56.4%
associate-*r/56.4%
metadata-eval56.4%
*-commutative56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in x around inf 42.9%
associate-/l*75.4%
Simplified75.4%
if -5.50000000000000021e97 < y < -0.0029Initial program 51.1%
Taylor expanded in t around 0 41.5%
Simplified51.2%
Taylor expanded in i around 0 61.3%
if -0.0029 < y < 4.5e9Initial program 99.7%
Taylor expanded in y around 0 95.7%
*-commutative95.7%
Simplified95.7%
Final simplification84.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (/ x (/ (+ a (+ y (/ b y))) y))))
(if (<= y -5.5e+97)
t_1
(if (<= y -0.095)
(/
(+ 230661.510616 (* y (+ 27464.7644705 (* y (+ (* x y) z)))))
(+ (* y (+ (* y (+ y a)) b)) c))
(if (<= y 0.06)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y b)))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x / ((a + (y + (b / y))) / y);
double tmp;
if (y <= -5.5e+97) {
tmp = t_1;
} else if (y <= -0.095) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / ((y * ((y * (y + a)) + b)) + c);
} else if (y <= 0.06) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
} else {
tmp = t_1;
}
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 = x / ((a + (y + (b / y))) / y)
if (y <= (-5.5d+97)) then
tmp = t_1
else if (y <= (-0.095d0)) then
tmp = (230661.510616d0 + (y * (27464.7644705d0 + (y * ((x * y) + z))))) / ((y * ((y * (y + a)) + b)) + c)
else if (y <= 0.06d0) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * b))))
else
tmp = t_1
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 = x / ((a + (y + (b / y))) / y);
double tmp;
if (y <= -5.5e+97) {
tmp = t_1;
} else if (y <= -0.095) {
tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / ((y * ((y * (y + a)) + b)) + c);
} else if (y <= 0.06) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x / ((a + (y + (b / y))) / y) tmp = 0 if y <= -5.5e+97: tmp = t_1 elif y <= -0.095: tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / ((y * ((y * (y + a)) + b)) + c) elif y <= 0.06: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x / Float64(Float64(a + Float64(y + Float64(b / y))) / y)) tmp = 0.0 if (y <= -5.5e+97) tmp = t_1; elseif (y <= -0.095) tmp = Float64(Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * Float64(Float64(x * y) + z))))) / Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)); elseif (y <= 0.06) 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 = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x / ((a + (y + (b / y))) / y); tmp = 0.0; if (y <= -5.5e+97) tmp = t_1; elseif (y <= -0.095) tmp = (230661.510616 + (y * (27464.7644705 + (y * ((x * y) + z))))) / ((y * ((y * (y + a)) + b)) + c); elseif (y <= 0.06) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x / N[(N[(a + N[(y + N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+97], t$95$1, If[LessEqual[y, -0.095], N[(N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.06], 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], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\frac{a + \left(y + \frac{b}{y}\right)}{y}}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+97}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -0.095:\\
\;\;\;\;\frac{230661.510616 + y \cdot \left(27464.7644705 + y \cdot \left(x \cdot y + z\right)\right)}{y \cdot \left(y \cdot \left(y + a\right) + b\right) + c}\\
\mathbf{elif}\;y \leq 0.06:\\
\;\;\;\;\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}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -5.50000000000000021e97 or 0.059999999999999998 < y Initial program 4.8%
Taylor expanded in t around 0 3.9%
Simplified5.0%
Taylor expanded in y around inf 56.8%
+-commutative56.8%
*-commutative56.8%
associate-*r/56.8%
metadata-eval56.8%
*-commutative56.8%
*-commutative56.8%
Simplified56.8%
Taylor expanded in x around inf 43.4%
associate-/l*75.6%
Simplified75.6%
if -5.50000000000000021e97 < y < -0.095000000000000001Initial program 51.1%
Taylor expanded in t around 0 41.5%
Simplified51.2%
Taylor expanded in i around 0 61.3%
if -0.095000000000000001 < y < 0.059999999999999998Initial program 99.7%
Taylor expanded in y around 0 95.7%
*-commutative95.7%
Simplified95.7%
Taylor expanded in x around 0 93.5%
Final simplification83.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= y -6.2e+34) (not (<= y 0.06)))
(/ x (/ (+ a (+ y (/ b 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 <= -6.2e+34) || !(y <= 0.06)) {
tmp = x / ((a + (y + (b / 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 <= (-6.2d+34)) .or. (.not. (y <= 0.06d0))) then
tmp = x / ((a + (y + (b / 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 <= -6.2e+34) || !(y <= 0.06)) {
tmp = x / ((a + (y + (b / 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 <= -6.2e+34) or not (y <= 0.06): tmp = x / ((a + (y + (b / 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 <= -6.2e+34) || !(y <= 0.06)) tmp = Float64(x / Float64(Float64(a + Float64(y + Float64(b / 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 <= -6.2e+34) || ~((y <= 0.06))) tmp = x / ((a + (y + (b / 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, -6.2e+34], N[Not[LessEqual[y, 0.06]], $MachinePrecision]], N[(x / N[(N[(a + N[(y + N[(b / 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 -6.2 \cdot 10^{+34} \lor \neg \left(y \leq 0.06\right):\\
\;\;\;\;\frac{x}{\frac{a + \left(y + \frac{b}{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 < -6.19999999999999955e34 or 0.059999999999999998 < y Initial program 6.9%
Taylor expanded in t around 0 5.3%
Simplified7.9%
Taylor expanded in y around inf 53.9%
+-commutative53.9%
*-commutative53.9%
associate-*r/53.9%
metadata-eval53.9%
*-commutative53.9%
*-commutative53.9%
Simplified53.9%
Taylor expanded in x around inf 42.3%
associate-/l*71.6%
Simplified71.6%
if -6.19999999999999955e34 < y < 0.059999999999999998Initial program 98.2%
Taylor expanded in y around 0 91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in x around 0 89.1%
Final simplification80.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -0.18) (not (<= y 1.02e-7))) (/ x (/ (+ a (+ y (/ b y))) y)) (/ (+ t (* y 230661.510616)) (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -0.18) || !(y <= 1.02e-7)) {
tmp = x / ((a + (y + (b / y))) / y);
} else {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 <= (-0.18d0)) .or. (.not. (y <= 1.02d-7))) then
tmp = x / ((a + (y + (b / y))) / y)
else
tmp = (t + (y * 230661.510616d0)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + 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 <= -0.18) || !(y <= 1.02e-7)) {
tmp = x / ((a + (y + (b / y))) / y);
} else {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -0.18) or not (y <= 1.02e-7): tmp = x / ((a + (y + (b / y))) / y) else: tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -0.18) || !(y <= 1.02e-7)) tmp = Float64(x / Float64(Float64(a + Float64(y + Float64(b / y))) / y)); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -0.18) || ~((y <= 1.02e-7))) tmp = x / ((a + (y + (b / y))) / y); else tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -0.18], N[Not[LessEqual[y, 1.02e-7]], $MachinePrecision]], N[(x / N[(N[(a + N[(y + N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.18 \lor \neg \left(y \leq 1.02 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{x}{\frac{a + \left(y + \frac{b}{y}\right)}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\end{array}
\end{array}
if y < -0.17999999999999999 or 1.02e-7 < y Initial program 12.3%
Taylor expanded in t around 0 10.2%
Simplified12.6%
Taylor expanded in y around inf 51.5%
+-commutative51.5%
*-commutative51.5%
associate-*r/51.5%
metadata-eval51.5%
*-commutative51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in x around inf 40.9%
associate-/l*68.0%
Simplified68.0%
if -0.17999999999999999 < y < 1.02e-7Initial program 99.7%
Taylor expanded in y around 0 90.5%
*-commutative88.0%
Simplified90.5%
Final simplification78.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -0.0021) (not (<= y 1.3e-8))) (/ x (/ (+ a (+ y (/ b 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 <= -0.0021) || !(y <= 1.3e-8)) {
tmp = x / ((a + (y + (b / 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 <= (-0.0021d0)) .or. (.not. (y <= 1.3d-8))) then
tmp = x / ((a + (y + (b / 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 <= -0.0021) || !(y <= 1.3e-8)) {
tmp = x / ((a + (y + (b / 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 <= -0.0021) or not (y <= 1.3e-8): tmp = x / ((a + (y + (b / 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 <= -0.0021) || !(y <= 1.3e-8)) tmp = Float64(x / Float64(Float64(a + Float64(y + Float64(b / 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 <= -0.0021) || ~((y <= 1.3e-8))) tmp = x / ((a + (y + (b / 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, -0.0021], N[Not[LessEqual[y, 1.3e-8]], $MachinePrecision]], N[(x / N[(N[(a + N[(y + N[(b / 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 -0.0021 \lor \neg \left(y \leq 1.3 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{x}{\frac{a + \left(y + \frac{b}{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 < -0.00209999999999999987 or 1.3000000000000001e-8 < y Initial program 12.3%
Taylor expanded in t around 0 10.2%
Simplified12.6%
Taylor expanded in y around inf 51.5%
+-commutative51.5%
*-commutative51.5%
associate-*r/51.5%
metadata-eval51.5%
*-commutative51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in x around inf 40.9%
associate-/l*68.0%
Simplified68.0%
if -0.00209999999999999987 < y < 1.3000000000000001e-8Initial program 99.7%
Taylor expanded in y around 0 95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in y around 0 88.0%
*-commutative88.0%
Simplified88.0%
Final simplification77.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.9e+32) (not (<= y 7.5e-5))) (+ x (- (/ z y) (/ a (/ y x)))) (/ t i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -2.9e+32) || !(y <= 7.5e-5)) {
tmp = x + ((z / y) - (a / (y / x)));
} 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 <= (-2.9d+32)) .or. (.not. (y <= 7.5d-5))) then
tmp = x + ((z / y) - (a / (y / x)))
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 <= -2.9e+32) || !(y <= 7.5e-5)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.9e+32) or not (y <= 7.5e-5): tmp = x + ((z / y) - (a / (y / x))) else: tmp = t / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.9e+32) || !(y <= 7.5e-5)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); 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 <= -2.9e+32) || ~((y <= 7.5e-5))) tmp = x + ((z / y) - (a / (y / x))); else tmp = t / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.9e+32], N[Not[LessEqual[y, 7.5e-5]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+32} \lor \neg \left(y \leq 7.5 \cdot 10^{-5}\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i}\\
\end{array}
\end{array}
if y < -2.90000000000000003e32 or 7.49999999999999934e-5 < y Initial program 8.4%
Taylor expanded in y around inf 59.4%
associate--l+59.4%
associate-/l*62.5%
Simplified62.5%
if -2.90000000000000003e32 < y < 7.49999999999999934e-5Initial program 98.2%
Taylor expanded in y around 0 45.1%
Final simplification53.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -2.55e+32) (not (<= y 0.055))) (+ x (- (/ z y) (/ a (/ y x)))) (/ t (+ 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 <= -2.55e+32) || !(y <= 0.055)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / (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 <= (-2.55d+32)) .or. (.not. (y <= 0.055d0))) then
tmp = x + ((z / y) - (a / (y / x)))
else
tmp = t / (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 <= -2.55e+32) || !(y <= 0.055)) {
tmp = x + ((z / y) - (a / (y / x)));
} else {
tmp = t / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -2.55e+32) or not (y <= 0.055): tmp = x + ((z / y) - (a / (y / x))) else: tmp = t / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -2.55e+32) || !(y <= 0.055)) tmp = Float64(x + Float64(Float64(z / y) - Float64(a / Float64(y / x)))); else tmp = Float64(t / 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 <= -2.55e+32) || ~((y <= 0.055))) tmp = x + ((z / y) - (a / (y / x))); else tmp = t / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -2.55e+32], N[Not[LessEqual[y, 0.055]], $MachinePrecision]], N[(x + N[(N[(z / y), $MachinePrecision] - N[(a / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.55 \cdot 10^{+32} \lor \neg \left(y \leq 0.055\right):\\
\;\;\;\;x + \left(\frac{z}{y} - \frac{a}{\frac{y}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -2.55000000000000002e32 or 0.0550000000000000003 < y Initial program 8.4%
Taylor expanded in y around inf 59.4%
associate--l+59.4%
associate-/l*62.5%
Simplified62.5%
if -2.55000000000000002e32 < y < 0.0550000000000000003Initial program 98.2%
Taylor expanded in y around 0 92.2%
*-commutative92.2%
Simplified92.2%
Taylor expanded in t around inf 69.2%
Final simplification65.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -6.3) (not (<= y 8.2e-8))) (/ x (/ (+ a (+ y (/ b y))) y)) (/ t (+ 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 <= -6.3) || !(y <= 8.2e-8)) {
tmp = x / ((a + (y + (b / y))) / y);
} else {
tmp = t / (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 <= (-6.3d0)) .or. (.not. (y <= 8.2d-8))) then
tmp = x / ((a + (y + (b / y))) / y)
else
tmp = t / (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 <= -6.3) || !(y <= 8.2e-8)) {
tmp = x / ((a + (y + (b / y))) / y);
} else {
tmp = t / (i + (y * (c + (y * b))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -6.3) or not (y <= 8.2e-8): tmp = x / ((a + (y + (b / y))) / y) else: tmp = t / (i + (y * (c + (y * b)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -6.3) || !(y <= 8.2e-8)) tmp = Float64(x / Float64(Float64(a + Float64(y + Float64(b / y))) / y)); else tmp = Float64(t / 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 <= -6.3) || ~((y <= 8.2e-8))) tmp = x / ((a + (y + (b / y))) / y); else tmp = t / (i + (y * (c + (y * b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -6.3], N[Not[LessEqual[y, 8.2e-8]], $MachinePrecision]], N[(x / N[(N[(a + N[(y + N[(b / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.3 \lor \neg \left(y \leq 8.2 \cdot 10^{-8}\right):\\
\;\;\;\;\frac{x}{\frac{a + \left(y + \frac{b}{y}\right)}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{i + y \cdot \left(c + y \cdot b\right)}\\
\end{array}
\end{array}
if y < -6.29999999999999982 or 8.20000000000000063e-8 < y Initial program 12.3%
Taylor expanded in t around 0 10.2%
Simplified12.6%
Taylor expanded in y around inf 51.5%
+-commutative51.5%
*-commutative51.5%
associate-*r/51.5%
metadata-eval51.5%
*-commutative51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in x around inf 40.9%
associate-/l*68.0%
Simplified68.0%
if -6.29999999999999982 < y < 8.20000000000000063e-8Initial program 99.7%
Taylor expanded in y around 0 95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in t around inf 72.6%
Final simplification70.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -19000000.0) x (if (<= y 1.8e-56) (/ 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 <= -19000000.0) {
tmp = x;
} else if (y <= 1.8e-56) {
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 <= (-19000000.0d0)) then
tmp = x
else if (y <= 1.8d-56) 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 <= -19000000.0) {
tmp = x;
} else if (y <= 1.8e-56) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -19000000.0: tmp = x elif y <= 1.8e-56: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -19000000.0) tmp = x; elseif (y <= 1.8e-56) 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 <= -19000000.0) tmp = x; elseif (y <= 1.8e-56) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -19000000.0], x, If[LessEqual[y, 1.8e-56], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -19000000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-56}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.9e7 or 1.79999999999999989e-56 < y Initial program 14.8%
Taylor expanded in y around inf 48.1%
if -1.9e7 < y < 1.79999999999999989e-56Initial program 99.7%
Taylor expanded in y around 0 49.4%
Final simplification48.7%
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
def code(x, y, z, t, a, b, c, i): return x
function code(x, y, z, t, a, b, c, i) return x end
function tmp = code(x, y, z, t, a, b, c, i) tmp = x; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 53.6%
Taylor expanded in y around inf 27.8%
Final simplification27.8%
herbie shell --seed 2024010
(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)))