
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
real(8) function code(x, y, z, t, a, b)
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
code = x + ((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b)
:precision binary64
(+
x
(/
(*
y
(+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b))
(+
(* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z)
0.607771387771))))
double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
real(8) function code(x, y, z, t, a, b)
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
code = x + ((y * ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771));
}
def code(x, y, z, t, a, b): return x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))
function code(x, y, z, t, a, b) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771))) end
function tmp = code(x, y, z, t, a, b) tmp = x + ((y * ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)) / (((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(N[(y * N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b\right)}{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407))))))))
(t_2
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))))
(if (<= (/ (* y (+ t_2 b)) t_1) INFINITY)
(+ x (* y (+ (/ b t_1) (/ t_2 t_1))))
(+
x
(fma
(/ y z)
-36.52704169880642
(fma y 3.13060547623 (/ y (/ (pow z 2.0) (+ t 457.9610022158428)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double t_2 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a);
double tmp;
if (((y * (t_2 + b)) / t_1) <= ((double) INFINITY)) {
tmp = x + (y * ((b / t_1) + (t_2 / t_1)));
} else {
tmp = x + fma((y / z), -36.52704169880642, fma(y, 3.13060547623, (y / (pow(z, 2.0) / (t + 457.9610022158428)))));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))) t_2 = Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) tmp = 0.0 if (Float64(Float64(y * Float64(t_2 + b)) / t_1) <= Inf) tmp = Float64(x + Float64(y * Float64(Float64(b / t_1) + Float64(t_2 / t_1)))); else tmp = Float64(x + fma(Float64(y / z), -36.52704169880642, fma(y, 3.13060547623, Float64(y / Float64((z ^ 2.0) / Float64(t + 457.9610022158428)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(t$95$2 + b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], Infinity], N[(x + N[(y * N[(N[(b / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / z), $MachinePrecision] * -36.52704169880642 + N[(y * 3.13060547623 + N[(y / N[(N[Power[z, 2.0], $MachinePrecision] / N[(t + 457.9610022158428), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\
t_2 := z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right)\\
\mathbf{if}\;\frac{y \cdot \left(t_2 + b\right)}{t_1} \leq \infty:\\
\;\;\;\;x + y \cdot \left(\frac{b}{t_1} + \frac{t_2}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \mathsf{fma}\left(\frac{y}{z}, -36.52704169880642, \mathsf{fma}\left(y, 3.13060547623, \frac{y}{\frac{{z}^{2}}{t + 457.9610022158428}}\right)\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) < +inf.0Initial program 93.4%
Simplified99.1%
Taylor expanded in y around 0 99.1%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) Initial program 0.0%
Simplified0.0%
Taylor expanded in z around inf 82.9%
*-commutative82.9%
fma-def82.9%
*-commutative82.9%
fma-def82.9%
associate-/l*98.8%
+-commutative98.8%
Simplified98.8%
Final simplification99.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a)))
(t_2
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407))))))))
(t_3 (/ b t_2)))
(if (<= (/ (* y (+ t_1 b)) t_2) INFINITY)
(+ x (* y (+ t_3 (/ t_1 t_2))))
(+
x
(*
y
(+
t_3
(+
(+ 3.13060547623 (/ (+ t 457.9610022158428) (pow z 2.0)))
(* 36.52704169880642 (/ -1.0 z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a);
double t_2 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double t_3 = b / t_2;
double tmp;
if (((y * (t_1 + b)) / t_2) <= ((double) INFINITY)) {
tmp = x + (y * (t_3 + (t_1 / t_2)));
} else {
tmp = x + (y * (t_3 + ((3.13060547623 + ((t + 457.9610022158428) / pow(z, 2.0))) + (36.52704169880642 * (-1.0 / z)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a);
double t_2 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double t_3 = b / t_2;
double tmp;
if (((y * (t_1 + b)) / t_2) <= Double.POSITIVE_INFINITY) {
tmp = x + (y * (t_3 + (t_1 / t_2)));
} else {
tmp = x + (y * (t_3 + ((3.13060547623 + ((t + 457.9610022158428) / Math.pow(z, 2.0))) + (36.52704169880642 * (-1.0 / z)))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a) t_2 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))) t_3 = b / t_2 tmp = 0 if ((y * (t_1 + b)) / t_2) <= math.inf: tmp = x + (y * (t_3 + (t_1 / t_2))) else: tmp = x + (y * (t_3 + ((3.13060547623 + ((t + 457.9610022158428) / math.pow(z, 2.0))) + (36.52704169880642 * (-1.0 / z))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) t_2 = Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))) t_3 = Float64(b / t_2) tmp = 0.0 if (Float64(Float64(y * Float64(t_1 + b)) / t_2) <= Inf) tmp = Float64(x + Float64(y * Float64(t_3 + Float64(t_1 / t_2)))); else tmp = Float64(x + Float64(y * Float64(t_3 + Float64(Float64(3.13060547623 + Float64(Float64(t + 457.9610022158428) / (z ^ 2.0))) + Float64(36.52704169880642 * Float64(-1.0 / z)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a); t_2 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))); t_3 = b / t_2; tmp = 0.0; if (((y * (t_1 + b)) / t_2) <= Inf) tmp = x + (y * (t_3 + (t_1 / t_2))); else tmp = x + (y * (t_3 + ((3.13060547623 + ((t + 457.9610022158428) / (z ^ 2.0))) + (36.52704169880642 * (-1.0 / z))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(b / t$95$2), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(t$95$1 + b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], Infinity], N[(x + N[(y * N[(t$95$3 + N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t$95$3 + N[(N[(3.13060547623 + N[(N[(t + 457.9610022158428), $MachinePrecision] / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(36.52704169880642 * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right)\\
t_2 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\
t_3 := \frac{b}{t_2}\\
\mathbf{if}\;\frac{y \cdot \left(t_1 + b\right)}{t_2} \leq \infty:\\
\;\;\;\;x + y \cdot \left(t_3 + \frac{t_1}{t_2}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(t_3 + \left(\left(3.13060547623 + \frac{t + 457.9610022158428}{{z}^{2}}\right) + 36.52704169880642 \cdot \frac{-1}{z}\right)\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) < +inf.0Initial program 93.4%
Simplified99.1%
Taylor expanded in y around 0 99.1%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) Initial program 0.0%
Simplified0.0%
Taylor expanded in y around 0 0.0%
Taylor expanded in z around -inf 98.8%
Final simplification99.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407))))))))
(t_2
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))))
(if (<= (/ (* y (+ t_2 b)) t_1) INFINITY)
(+ x (* y (+ (/ b t_1) (/ t_2 t_1))))
(fma y 3.13060547623 x))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double t_2 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a);
double tmp;
if (((y * (t_2 + b)) / t_1) <= ((double) INFINITY)) {
tmp = x + (y * ((b / t_1) + (t_2 / t_1)));
} else {
tmp = fma(y, 3.13060547623, x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))) t_2 = Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) tmp = 0.0 if (Float64(Float64(y * Float64(t_2 + b)) / t_1) <= Inf) tmp = Float64(x + Float64(y * Float64(Float64(b / t_1) + Float64(t_2 / t_1)))); else tmp = fma(y, 3.13060547623, x); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(t$95$2 + b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], Infinity], N[(x + N[(y * N[(N[(b / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * 3.13060547623 + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\
t_2 := z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right)\\
\mathbf{if}\;\frac{y \cdot \left(t_2 + b\right)}{t_1} \leq \infty:\\
\;\;\;\;x + y \cdot \left(\frac{b}{t_1} + \frac{t_2}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 3.13060547623, x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) < +inf.0Initial program 93.4%
Simplified99.1%
Taylor expanded in y around 0 99.1%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) Initial program 0.0%
Simplified0.0%
Taylor expanded in z around inf 97.7%
+-commutative97.7%
*-commutative97.7%
fma-def97.8%
Simplified97.8%
Final simplification98.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407))))))))
(t_2
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))))
(if (<= (/ (* y (+ t_2 b)) t_1) INFINITY)
(+ x (* y (+ (/ b t_1) (/ t_2 t_1))))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double t_2 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a);
double tmp;
if (((y * (t_2 + b)) / t_1) <= ((double) INFINITY)) {
tmp = x + (y * ((b / t_1) + (t_2 / t_1)));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double t_2 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a);
double tmp;
if (((y * (t_2 + b)) / t_1) <= Double.POSITIVE_INFINITY) {
tmp = x + (y * ((b / t_1) + (t_2 / t_1)));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))) t_2 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a) tmp = 0 if ((y * (t_2 + b)) / t_1) <= math.inf: tmp = x + (y * ((b / t_1) + (t_2 / t_1))) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))) t_2 = Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) tmp = 0.0 if (Float64(Float64(y * Float64(t_2 + b)) / t_1) <= Inf) tmp = Float64(x + Float64(y * Float64(Float64(b / t_1) + Float64(t_2 / t_1)))); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))); t_2 = z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a); tmp = 0.0; if (((y * (t_2 + b)) / t_1) <= Inf) tmp = x + (y * ((b / t_1) + (t_2 / t_1))); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(t$95$2 + b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], Infinity], N[(x + N[(y * N[(N[(b / t$95$1), $MachinePrecision] + N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\
t_2 := z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right)\\
\mathbf{if}\;\frac{y \cdot \left(t_2 + b\right)}{t_1} \leq \infty:\\
\;\;\;\;x + y \cdot \left(\frac{b}{t_1} + \frac{t_2}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) < +inf.0Initial program 93.4%
Simplified99.1%
Taylor expanded in y around 0 99.1%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000)) Initial program 0.0%
Simplified0.0%
Taylor expanded in z around inf 97.7%
+-commutative97.7%
*-commutative97.7%
Simplified97.7%
Final simplification98.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))
(if (<= z -2.9e+72)
(+ x (* y 3.13060547623))
(if (<= z 2.8e+25)
(+
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
t_1)
x)
(+ x (* y (+ 3.13060547623 (/ b t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double tmp;
if (z <= -2.9e+72) {
tmp = x + (y * 3.13060547623);
} else if (z <= 2.8e+25) {
tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / t_1) + x;
} else {
tmp = x + (y * (3.13060547623 + (b / t_1)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = 0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))
if (z <= (-2.9d+72)) then
tmp = x + (y * 3.13060547623d0)
else if (z <= 2.8d+25) then
tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + b)) / t_1) + x
else
tmp = x + (y * (3.13060547623d0 + (b / 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 t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double tmp;
if (z <= -2.9e+72) {
tmp = x + (y * 3.13060547623);
} else if (z <= 2.8e+25) {
tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / t_1) + x;
} else {
tmp = x + (y * (3.13060547623 + (b / t_1)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))) tmp = 0 if z <= -2.9e+72: tmp = x + (y * 3.13060547623) elif z <= 2.8e+25: tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / t_1) + x else: tmp = x + (y * (3.13060547623 + (b / t_1))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))) tmp = 0.0 if (z <= -2.9e+72) tmp = Float64(x + Float64(y * 3.13060547623)); elseif (z <= 2.8e+25) tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / t_1) + x); else tmp = Float64(x + Float64(y * Float64(3.13060547623 + Float64(b / t_1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))); tmp = 0.0; if (z <= -2.9e+72) tmp = x + (y * 3.13060547623); elseif (z <= 2.8e+25) tmp = ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / t_1) + x; else tmp = x + (y * (3.13060547623 + (b / t_1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+72], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+25], N[(N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y * N[(3.13060547623 + N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+72}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+25}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{t_1} + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(3.13060547623 + \frac{b}{t_1}\right)\\
\end{array}
\end{array}
if z < -2.90000000000000017e72Initial program 0.2%
Simplified2.4%
Taylor expanded in z around inf 97.5%
+-commutative97.5%
*-commutative97.5%
Simplified97.5%
if -2.90000000000000017e72 < z < 2.8000000000000002e25Initial program 97.8%
if 2.8000000000000002e25 < z Initial program 8.4%
Simplified17.2%
Taylor expanded in y around 0 17.2%
Taylor expanded in z around inf 94.7%
Final simplification97.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407))))))))
(t_2 (+ x (* y (+ 3.13060547623 (/ b t_1))))))
(if (<= z -0.27)
t_2
(if (<= z 1.85e-15)
(+
x
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+ 0.607771387771 (* z 11.9400905721))))
(if (<= z 8.5e+24)
(+ x (/ (* y (* z (+ a (* z (+ t (* z 11.1667541262)))))) t_1))
t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double t_2 = x + (y * (3.13060547623 + (b / t_1)));
double tmp;
if (z <= -0.27) {
tmp = t_2;
} else if (z <= 1.85e-15) {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)));
} else if (z <= 8.5e+24) {
tmp = x + ((y * (z * (a + (z * (t + (z * 11.1667541262)))))) / t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))
t_2 = x + (y * (3.13060547623d0 + (b / t_1)))
if (z <= (-0.27d0)) then
tmp = t_2
else if (z <= 1.85d-15) then
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + b)) / (0.607771387771d0 + (z * 11.9400905721d0)))
else if (z <= 8.5d+24) then
tmp = x + ((y * (z * (a + (z * (t + (z * 11.1667541262d0)))))) / t_1)
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 t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double t_2 = x + (y * (3.13060547623 + (b / t_1)));
double tmp;
if (z <= -0.27) {
tmp = t_2;
} else if (z <= 1.85e-15) {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)));
} else if (z <= 8.5e+24) {
tmp = x + ((y * (z * (a + (z * (t + (z * 11.1667541262)))))) / t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))) t_2 = x + (y * (3.13060547623 + (b / t_1))) tmp = 0 if z <= -0.27: tmp = t_2 elif z <= 1.85e-15: tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721))) elif z <= 8.5e+24: tmp = x + ((y * (z * (a + (z * (t + (z * 11.1667541262)))))) / t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))) t_2 = Float64(x + Float64(y * Float64(3.13060547623 + Float64(b / t_1)))) tmp = 0.0 if (z <= -0.27) tmp = t_2; elseif (z <= 1.85e-15) tmp = Float64(x + Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); elseif (z <= 8.5e+24) tmp = Float64(x + Float64(Float64(y * Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262)))))) / t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))); t_2 = x + (y * (3.13060547623 + (b / t_1))); tmp = 0.0; if (z <= -0.27) tmp = t_2; elseif (z <= 1.85e-15) tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721))); elseif (z <= 8.5e+24) tmp = x + ((y * (z * (a + (z * (t + (z * 11.1667541262)))))) / t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(3.13060547623 + N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.27], t$95$2, If[LessEqual[z, 1.85e-15], N[(x + N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+24], N[(x + N[(N[(y * N[(z * N[(a + N[(z * N[(t + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\
t_2 := x + y \cdot \left(3.13060547623 + \frac{b}{t_1}\right)\\
\mathbf{if}\;z \leq -0.27:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-15}:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+24}:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -0.27000000000000002 or 8.49999999999999959e24 < z Initial program 14.7%
Simplified22.4%
Taylor expanded in y around 0 22.4%
Taylor expanded in z around inf 91.9%
if -0.27000000000000002 < z < 1.85000000000000008e-15Initial program 99.7%
Taylor expanded in z around 0 99.0%
*-commutative99.0%
Simplified99.0%
if 1.85000000000000008e-15 < z < 8.49999999999999959e24Initial program 99.8%
Taylor expanded in b around 0 99.8%
Taylor expanded in z around 0 99.8%
*-commutative88.6%
Simplified99.8%
Final simplification95.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))
(if (or (<= z -2.2e+18) (not (<= z 3.4e+27)))
(+ x (* y (+ 3.13060547623 (/ b t_1))))
(+ x (/ (* y (+ b (* z (+ a (* z (+ t (* z 11.1667541262))))))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double tmp;
if ((z <= -2.2e+18) || !(z <= 3.4e+27)) {
tmp = x + (y * (3.13060547623 + (b / t_1)));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = 0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))
if ((z <= (-2.2d+18)) .or. (.not. (z <= 3.4d+27))) then
tmp = x + (y * (3.13060547623d0 + (b / t_1)))
else
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262d0))))))) / 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 t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))));
double tmp;
if ((z <= -2.2e+18) || !(z <= 3.4e+27)) {
tmp = x + (y * (3.13060547623 + (b / t_1)));
} else {
tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))) tmp = 0 if (z <= -2.2e+18) or not (z <= 3.4e+27): tmp = x + (y * (3.13060547623 + (b / t_1))) else: tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))) tmp = 0.0 if ((z <= -2.2e+18) || !(z <= 3.4e+27)) tmp = Float64(x + Float64(y * Float64(3.13060547623 + Float64(b / t_1)))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))))) / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))); tmp = 0.0; if ((z <= -2.2e+18) || ~((z <= 3.4e+27))) tmp = x + (y * (3.13060547623 + (b / t_1))); else tmp = x + ((y * (b + (z * (a + (z * (t + (z * 11.1667541262))))))) / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -2.2e+18], N[Not[LessEqual[z, 3.4e+27]], $MachinePrecision]], N[(x + N[(y * N[(3.13060547623 + N[(b / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * N[(a + N[(z * N[(t + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+18} \lor \neg \left(z \leq 3.4 \cdot 10^{+27}\right):\\
\;\;\;\;x + y \cdot \left(3.13060547623 + \frac{b}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{t_1}\\
\end{array}
\end{array}
if z < -2.2e18 or 3.4e27 < z Initial program 13.2%
Simplified21.1%
Taylor expanded in y around 0 21.1%
Taylor expanded in z around inf 92.6%
if -2.2e18 < z < 3.4e27Initial program 99.7%
Taylor expanded in z around 0 99.4%
*-commutative99.4%
Simplified99.4%
Final simplification96.3%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -13.0) (not (<= z 1.15e+24)))
(+
x
(*
y
(+
3.13060547623
(/
b
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))))
(+
x
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+ 0.607771387771 (* z 11.9400905721))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -13.0) || !(z <= 1.15e+24)) {
tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))))));
} else {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-13.0d0)) .or. (.not. (z <= 1.15d+24))) then
tmp = x + (y * (3.13060547623d0 + (b / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))))))
else
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + b)) / (0.607771387771d0 + (z * 11.9400905721d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -13.0) || !(z <= 1.15e+24)) {
tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))))));
} else {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -13.0) or not (z <= 1.15e+24): tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))))) else: tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -13.0) || !(z <= 1.15e+24)) tmp = Float64(x + Float64(y * Float64(3.13060547623 + Float64(b / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))))); else tmp = Float64(x + Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -13.0) || ~((z <= 1.15e+24))) tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))))); else tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * 11.9400905721))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -13.0], N[Not[LessEqual[z, 1.15e+24]], $MachinePrecision]], N[(x + N[(y * N[(3.13060547623 + N[(b / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(N[(z * N[(N[(z * N[(N[(z * N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -13 \lor \neg \left(z \leq 1.15 \cdot 10^{+24}\right):\\
\;\;\;\;x + y \cdot \left(3.13060547623 + \frac{b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(z \cdot \left(z \cdot \left(z \cdot 3.13060547623 + 11.1667541262\right) + t\right) + a\right) + b\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\end{array}
\end{array}
if z < -13 or 1.15e24 < z Initial program 14.7%
Simplified22.4%
Taylor expanded in y around 0 22.4%
Taylor expanded in z around inf 91.9%
if -13 < z < 1.15e24Initial program 99.7%
Taylor expanded in z around 0 95.5%
*-commutative95.5%
Simplified95.5%
Final simplification93.8%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -750000000.0) (not (<= z 52000000.0)))
(+
x
(*
y
(+
3.13060547623
(/
b
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))))
(+
x
(*
y
(+
(* b 1.6453555072203998)
(/
(* z (+ a (* z (+ t (* z 11.1667541262)))))
(+ 0.607771387771 (* z 11.9400905721))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -750000000.0) || !(z <= 52000000.0)) {
tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))))));
} else {
tmp = x + (y * ((b * 1.6453555072203998) + ((z * (a + (z * (t + (z * 11.1667541262))))) / (0.607771387771 + (z * 11.9400905721)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-750000000.0d0)) .or. (.not. (z <= 52000000.0d0))) then
tmp = x + (y * (3.13060547623d0 + (b / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))))))
else
tmp = x + (y * ((b * 1.6453555072203998d0) + ((z * (a + (z * (t + (z * 11.1667541262d0))))) / (0.607771387771d0 + (z * 11.9400905721d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -750000000.0) || !(z <= 52000000.0)) {
tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))))));
} else {
tmp = x + (y * ((b * 1.6453555072203998) + ((z * (a + (z * (t + (z * 11.1667541262))))) / (0.607771387771 + (z * 11.9400905721)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -750000000.0) or not (z <= 52000000.0): tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))))) else: tmp = x + (y * ((b * 1.6453555072203998) + ((z * (a + (z * (t + (z * 11.1667541262))))) / (0.607771387771 + (z * 11.9400905721))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -750000000.0) || !(z <= 52000000.0)) tmp = Float64(x + Float64(y * Float64(3.13060547623 + Float64(b / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))))); else tmp = Float64(x + Float64(y * Float64(Float64(b * 1.6453555072203998) + Float64(Float64(z * Float64(a + Float64(z * Float64(t + Float64(z * 11.1667541262))))) / Float64(0.607771387771 + Float64(z * 11.9400905721)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -750000000.0) || ~((z <= 52000000.0))) tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))))); else tmp = x + (y * ((b * 1.6453555072203998) + ((z * (a + (z * (t + (z * 11.1667541262))))) / (0.607771387771 + (z * 11.9400905721))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -750000000.0], N[Not[LessEqual[z, 52000000.0]], $MachinePrecision]], N[(x + N[(y * N[(3.13060547623 + N[(b / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(b * 1.6453555072203998), $MachinePrecision] + N[(N[(z * N[(a + N[(z * N[(t + N[(z * 11.1667541262), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -750000000 \lor \neg \left(z \leq 52000000\right):\\
\;\;\;\;x + y \cdot \left(3.13060547623 + \frac{b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998 + \frac{z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\right)\\
\end{array}
\end{array}
if z < -7.5e8 or 5.2e7 < z Initial program 17.4%
Simplified24.9%
Taylor expanded in y around 0 24.9%
Taylor expanded in z around inf 89.1%
if -7.5e8 < z < 5.2e7Initial program 99.7%
Simplified99.7%
Taylor expanded in y around 0 99.7%
Taylor expanded in z around 0 99.3%
Taylor expanded in z around 0 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in z around 0 97.5%
*-commutative97.5%
Simplified97.5%
Final simplification93.4%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -2.9e-8) (not (<= z 63000000.0)))
(+
x
(*
y
(+
3.13060547623
(/
b
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407)))))))))))
(+
x
(*
y
(+
(* b 1.6453555072203998)
(* z (- (* a 1.6453555072203998) (* b 32.324150453290734))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.9e-8) || !(z <= 63000000.0)) {
tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))))));
} else {
tmp = x + (y * ((b * 1.6453555072203998) + (z * ((a * 1.6453555072203998) - (b * 32.324150453290734)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-2.9d-8)) .or. (.not. (z <= 63000000.0d0))) then
tmp = x + (y * (3.13060547623d0 + (b / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * (z + 15.234687407d0))))))))))
else
tmp = x + (y * ((b * 1.6453555072203998d0) + (z * ((a * 1.6453555072203998d0) - (b * 32.324150453290734d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.9e-8) || !(z <= 63000000.0)) {
tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))))));
} else {
tmp = x + (y * ((b * 1.6453555072203998) + (z * ((a * 1.6453555072203998) - (b * 32.324150453290734)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.9e-8) or not (z <= 63000000.0): tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))))) else: tmp = x + (y * ((b * 1.6453555072203998) + (z * ((a * 1.6453555072203998) - (b * 32.324150453290734))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.9e-8) || !(z <= 63000000.0)) tmp = Float64(x + Float64(y * Float64(3.13060547623 + Float64(b / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407))))))))))); else tmp = Float64(x + Float64(y * Float64(Float64(b * 1.6453555072203998) + Float64(z * Float64(Float64(a * 1.6453555072203998) - Float64(b * 32.324150453290734)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.9e-8) || ~((z <= 63000000.0))) tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))))))); else tmp = x + (y * ((b * 1.6453555072203998) + (z * ((a * 1.6453555072203998) - (b * 32.324150453290734))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.9e-8], N[Not[LessEqual[z, 63000000.0]], $MachinePrecision]], N[(x + N[(y * N[(3.13060547623 + N[(b / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(b * 1.6453555072203998), $MachinePrecision] + N[(z * N[(N[(a * 1.6453555072203998), $MachinePrecision] - N[(b * 32.324150453290734), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.9 \cdot 10^{-8} \lor \neg \left(z \leq 63000000\right):\\
\;\;\;\;x + y \cdot \left(3.13060547623 + \frac{b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998 + z \cdot \left(a \cdot 1.6453555072203998 - b \cdot 32.324150453290734\right)\right)\\
\end{array}
\end{array}
if z < -2.9000000000000002e-8 or 6.3e7 < z Initial program 20.0%
Simplified27.2%
Taylor expanded in y around 0 27.2%
Taylor expanded in z around inf 87.1%
if -2.9000000000000002e-8 < z < 6.3e7Initial program 99.7%
Simplified99.7%
Taylor expanded in z around 0 91.6%
Taylor expanded in y around 0 94.7%
Final simplification90.9%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -1.5e+21) (not (<= z 3700000000.0)))
(+ x (* y 3.13060547623))
(+
x
(*
y
(+
(* b 1.6453555072203998)
(* z (- (* a 1.6453555072203998) (* b 32.324150453290734))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.5e+21) || !(z <= 3700000000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (y * ((b * 1.6453555072203998) + (z * ((a * 1.6453555072203998) - (b * 32.324150453290734)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-1.5d+21)) .or. (.not. (z <= 3700000000.0d0))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + (y * ((b * 1.6453555072203998d0) + (z * ((a * 1.6453555072203998d0) - (b * 32.324150453290734d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.5e+21) || !(z <= 3700000000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (y * ((b * 1.6453555072203998) + (z * ((a * 1.6453555072203998) - (b * 32.324150453290734)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.5e+21) or not (z <= 3700000000.0): tmp = x + (y * 3.13060547623) else: tmp = x + (y * ((b * 1.6453555072203998) + (z * ((a * 1.6453555072203998) - (b * 32.324150453290734))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.5e+21) || !(z <= 3700000000.0)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(y * Float64(Float64(b * 1.6453555072203998) + Float64(z * Float64(Float64(a * 1.6453555072203998) - Float64(b * 32.324150453290734)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.5e+21) || ~((z <= 3700000000.0))) tmp = x + (y * 3.13060547623); else tmp = x + (y * ((b * 1.6453555072203998) + (z * ((a * 1.6453555072203998) - (b * 32.324150453290734))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.5e+21], N[Not[LessEqual[z, 3700000000.0]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(b * 1.6453555072203998), $MachinePrecision] + N[(z * N[(N[(a * 1.6453555072203998), $MachinePrecision] - N[(b * 32.324150453290734), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+21} \lor \neg \left(z \leq 3700000000\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998 + z \cdot \left(a \cdot 1.6453555072203998 - b \cdot 32.324150453290734\right)\right)\\
\end{array}
\end{array}
if z < -1.5e21 or 3.7e9 < z Initial program 16.1%
Simplified23.7%
Taylor expanded in z around inf 88.9%
+-commutative88.9%
*-commutative88.9%
Simplified88.9%
if -1.5e21 < z < 3.7e9Initial program 99.7%
Simplified99.7%
Taylor expanded in z around 0 88.3%
Taylor expanded in y around 0 91.3%
Final simplification90.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.45e+20)
(+ x (* y 3.13060547623))
(if (<= z 26000000.0)
(+
x
(*
y
(+
(* b 1.6453555072203998)
(* z (- (* a 1.6453555072203998) (* b 32.324150453290734))))))
(+
x
(*
y
(+
3.13060547623
(/
b
(+ 0.607771387771 (* z (+ 11.9400905721 (* z 31.4690115749)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.45e+20) {
tmp = x + (y * 3.13060547623);
} else if (z <= 26000000.0) {
tmp = x + (y * ((b * 1.6453555072203998) + (z * ((a * 1.6453555072203998) - (b * 32.324150453290734)))));
} else {
tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if (z <= (-1.45d+20)) then
tmp = x + (y * 3.13060547623d0)
else if (z <= 26000000.0d0) then
tmp = x + (y * ((b * 1.6453555072203998d0) + (z * ((a * 1.6453555072203998d0) - (b * 32.324150453290734d0)))))
else
tmp = x + (y * (3.13060547623d0 + (b / (0.607771387771d0 + (z * (11.9400905721d0 + (z * 31.4690115749d0)))))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.45e+20) {
tmp = x + (y * 3.13060547623);
} else if (z <= 26000000.0) {
tmp = x + (y * ((b * 1.6453555072203998) + (z * ((a * 1.6453555072203998) - (b * 32.324150453290734)))));
} else {
tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.45e+20: tmp = x + (y * 3.13060547623) elif z <= 26000000.0: tmp = x + (y * ((b * 1.6453555072203998) + (z * ((a * 1.6453555072203998) - (b * 32.324150453290734))))) else: tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.45e+20) tmp = Float64(x + Float64(y * 3.13060547623)); elseif (z <= 26000000.0) tmp = Float64(x + Float64(y * Float64(Float64(b * 1.6453555072203998) + Float64(z * Float64(Float64(a * 1.6453555072203998) - Float64(b * 32.324150453290734)))))); else tmp = Float64(x + Float64(y * Float64(3.13060547623 + Float64(b / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * 31.4690115749)))))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.45e+20) tmp = x + (y * 3.13060547623); elseif (z <= 26000000.0) tmp = x + (y * ((b * 1.6453555072203998) + (z * ((a * 1.6453555072203998) - (b * 32.324150453290734))))); else tmp = x + (y * (3.13060547623 + (b / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.45e+20], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 26000000.0], N[(x + N[(y * N[(N[(b * 1.6453555072203998), $MachinePrecision] + N[(z * N[(N[(a * 1.6453555072203998), $MachinePrecision] - N[(b * 32.324150453290734), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(3.13060547623 + N[(b / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+20}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{elif}\;z \leq 26000000:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998 + z \cdot \left(a \cdot 1.6453555072203998 - b \cdot 32.324150453290734\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(3.13060547623 + \frac{b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\right)\\
\end{array}
\end{array}
if z < -1.45e20Initial program 17.4%
Simplified24.4%
Taylor expanded in z around inf 90.0%
+-commutative90.0%
*-commutative90.0%
Simplified90.0%
if -1.45e20 < z < 2.6e7Initial program 99.7%
Simplified99.7%
Taylor expanded in z around 0 88.3%
Taylor expanded in y around 0 91.3%
if 2.6e7 < z Initial program 15.0%
Simplified23.1%
Taylor expanded in y around 0 23.1%
Taylor expanded in z around inf 89.5%
Taylor expanded in z around 0 88.1%
*-commutative88.1%
Simplified88.1%
Final simplification90.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -7.9e+21) (not (<= z 1560000000.0))) (+ x (* y 3.13060547623)) (+ x (* b (+ (* -32.324150453290734 (* y z)) (* y 1.6453555072203998))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.9e+21) || !(z <= 1560000000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (b * ((-32.324150453290734 * (y * z)) + (y * 1.6453555072203998)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-7.9d+21)) .or. (.not. (z <= 1560000000.0d0))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + (b * (((-32.324150453290734d0) * (y * z)) + (y * 1.6453555072203998d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -7.9e+21) || !(z <= 1560000000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (b * ((-32.324150453290734 * (y * z)) + (y * 1.6453555072203998)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -7.9e+21) or not (z <= 1560000000.0): tmp = x + (y * 3.13060547623) else: tmp = x + (b * ((-32.324150453290734 * (y * z)) + (y * 1.6453555072203998))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -7.9e+21) || !(z <= 1560000000.0)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(b * Float64(Float64(-32.324150453290734 * Float64(y * z)) + Float64(y * 1.6453555072203998)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -7.9e+21) || ~((z <= 1560000000.0))) tmp = x + (y * 3.13060547623); else tmp = x + (b * ((-32.324150453290734 * (y * z)) + (y * 1.6453555072203998))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -7.9e+21], N[Not[LessEqual[z, 1560000000.0]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(b * N[(N[(-32.324150453290734 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.9 \cdot 10^{+21} \lor \neg \left(z \leq 1560000000\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + b \cdot \left(-32.324150453290734 \cdot \left(y \cdot z\right) + y \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -7.9e21 or 1.56e9 < z Initial program 16.1%
Simplified23.7%
Taylor expanded in z around inf 88.9%
+-commutative88.9%
*-commutative88.9%
Simplified88.9%
if -7.9e21 < z < 1.56e9Initial program 99.7%
Simplified99.7%
Taylor expanded in z around 0 88.3%
Taylor expanded in b around inf 80.6%
Final simplification84.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -5.5e+19) (not (<= z 1200000000.0))) (+ x (* y 3.13060547623)) (+ x (* y (+ (* b 1.6453555072203998) (* 1.6453555072203998 (* z a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.5e+19) || !(z <= 1200000000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (y * ((b * 1.6453555072203998) + (1.6453555072203998 * (z * a))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-5.5d+19)) .or. (.not. (z <= 1200000000.0d0))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + (y * ((b * 1.6453555072203998d0) + (1.6453555072203998d0 * (z * a))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -5.5e+19) || !(z <= 1200000000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (y * ((b * 1.6453555072203998) + (1.6453555072203998 * (z * a))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5.5e+19) or not (z <= 1200000000.0): tmp = x + (y * 3.13060547623) else: tmp = x + (y * ((b * 1.6453555072203998) + (1.6453555072203998 * (z * a)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5.5e+19) || !(z <= 1200000000.0)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(y * Float64(Float64(b * 1.6453555072203998) + Float64(1.6453555072203998 * Float64(z * a))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -5.5e+19) || ~((z <= 1200000000.0))) tmp = x + (y * 3.13060547623); else tmp = x + (y * ((b * 1.6453555072203998) + (1.6453555072203998 * (z * a)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5.5e+19], N[Not[LessEqual[z, 1200000000.0]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(b * 1.6453555072203998), $MachinePrecision] + N[(1.6453555072203998 * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+19} \lor \neg \left(z \leq 1200000000\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(b \cdot 1.6453555072203998 + 1.6453555072203998 \cdot \left(z \cdot a\right)\right)\\
\end{array}
\end{array}
if z < -5.5e19 or 1.2e9 < z Initial program 16.1%
Simplified23.7%
Taylor expanded in z around inf 88.9%
+-commutative88.9%
*-commutative88.9%
Simplified88.9%
if -5.5e19 < z < 1.2e9Initial program 99.7%
Simplified99.7%
Taylor expanded in y around 0 99.7%
Taylor expanded in z around 0 98.7%
Taylor expanded in z around 0 90.1%
Final simplification89.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1e+20) (not (<= z 290000000.0))) (+ x (* y 3.13060547623)) (+ x (* (* y b) (+ 1.6453555072203998 (* z -32.324150453290734))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1e+20) || !(z <= 290000000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + ((y * b) * (1.6453555072203998 + (z * -32.324150453290734)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-1d+20)) .or. (.not. (z <= 290000000.0d0))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + ((y * b) * (1.6453555072203998d0 + (z * (-32.324150453290734d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1e+20) || !(z <= 290000000.0)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + ((y * b) * (1.6453555072203998 + (z * -32.324150453290734)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1e+20) or not (z <= 290000000.0): tmp = x + (y * 3.13060547623) else: tmp = x + ((y * b) * (1.6453555072203998 + (z * -32.324150453290734))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1e+20) || !(z <= 290000000.0)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(Float64(y * b) * Float64(1.6453555072203998 + Float64(z * -32.324150453290734)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1e+20) || ~((z <= 290000000.0))) tmp = x + (y * 3.13060547623); else tmp = x + ((y * b) * (1.6453555072203998 + (z * -32.324150453290734))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1e+20], N[Not[LessEqual[z, 290000000.0]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * b), $MachinePrecision] * N[(1.6453555072203998 + N[(z * -32.324150453290734), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+20} \lor \neg \left(z \leq 290000000\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot b\right) \cdot \left(1.6453555072203998 + z \cdot -32.324150453290734\right)\\
\end{array}
\end{array}
if z < -1e20 or 2.9e8 < z Initial program 16.1%
Simplified23.7%
Taylor expanded in z around inf 88.9%
+-commutative88.9%
*-commutative88.9%
Simplified88.9%
if -1e20 < z < 2.9e8Initial program 99.7%
Simplified99.7%
Taylor expanded in z around 0 88.3%
Taylor expanded in y around 0 91.3%
Taylor expanded in b around inf 80.6%
associate-*r*80.5%
*-commutative80.5%
Simplified80.5%
Final simplification84.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.32e+19) (not (<= z 0.0135))) (+ x (* y 3.13060547623)) (+ x (* b (* y 1.6453555072203998)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.32e+19) || !(z <= 0.0135)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (b * (y * 1.6453555072203998));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((z <= (-1.32d+19)) .or. (.not. (z <= 0.0135d0))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + (b * (y * 1.6453555072203998d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.32e+19) || !(z <= 0.0135)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (b * (y * 1.6453555072203998));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.32e+19) or not (z <= 0.0135): tmp = x + (y * 3.13060547623) else: tmp = x + (b * (y * 1.6453555072203998)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.32e+19) || !(z <= 0.0135)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(b * Float64(y * 1.6453555072203998))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.32e+19) || ~((z <= 0.0135))) tmp = x + (y * 3.13060547623); else tmp = x + (b * (y * 1.6453555072203998)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.32e+19], N[Not[LessEqual[z, 0.0135]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(b * N[(y * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.32 \cdot 10^{+19} \lor \neg \left(z \leq 0.0135\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -1.32e19 or 0.0134999999999999998 < z Initial program 18.7%
Simplified26.1%
Taylor expanded in z around inf 87.0%
+-commutative87.0%
*-commutative87.0%
Simplified87.0%
if -1.32e19 < z < 0.0134999999999999998Initial program 99.7%
Simplified99.7%
Taylor expanded in z around 0 81.0%
associate-*r*81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in b around 0 81.0%
associate-*r*81.0%
*-commutative81.0%
associate-*r*81.0%
Simplified81.0%
Final simplification84.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -9.4e+67) (not (<= y 2.25e+46))) (* y 3.13060547623) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -9.4e+67) || !(y <= 2.25e+46)) {
tmp = y * 3.13060547623;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: tmp
if ((y <= (-9.4d+67)) .or. (.not. (y <= 2.25d+46))) then
tmp = y * 3.13060547623d0
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 tmp;
if ((y <= -9.4e+67) || !(y <= 2.25e+46)) {
tmp = y * 3.13060547623;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -9.4e+67) or not (y <= 2.25e+46): tmp = y * 3.13060547623 else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -9.4e+67) || !(y <= 2.25e+46)) tmp = Float64(y * 3.13060547623); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -9.4e+67) || ~((y <= 2.25e+46))) tmp = y * 3.13060547623; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -9.4e+67], N[Not[LessEqual[y, 2.25e+46]], $MachinePrecision]], N[(y * 3.13060547623), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.4 \cdot 10^{+67} \lor \neg \left(y \leq 2.25 \cdot 10^{+46}\right):\\
\;\;\;\;y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.40000000000000035e67 or 2.25000000000000005e46 < y Initial program 53.0%
Simplified61.4%
Taylor expanded in z around inf 48.7%
+-commutative48.7%
*-commutative48.7%
Simplified48.7%
add-cube-cbrt48.0%
pow348.0%
*-commutative48.0%
Applied egg-rr48.0%
Taylor expanded in x around 0 42.7%
pow-base-142.7%
*-lft-identity42.7%
*-commutative42.7%
Simplified42.7%
if -9.40000000000000035e67 < y < 2.25000000000000005e46Initial program 64.2%
Simplified64.8%
Taylor expanded in y around 0 67.6%
Final simplification58.0%
(FPCore (x y z t a b) :precision binary64 (+ x (* y 3.13060547623)))
double code(double x, double y, double z, double t, double a, double b) {
return x + (y * 3.13060547623);
}
real(8) function code(x, y, z, t, a, b)
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
code = x + (y * 3.13060547623d0)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (y * 3.13060547623);
}
def code(x, y, z, t, a, b): return x + (y * 3.13060547623)
function code(x, y, z, t, a, b) return Float64(x + Float64(y * 3.13060547623)) end
function tmp = code(x, y, z, t, a, b) tmp = x + (y * 3.13060547623); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot 3.13060547623
\end{array}
Initial program 59.8%
Simplified63.5%
Taylor expanded in z around inf 62.4%
+-commutative62.4%
*-commutative62.4%
Simplified62.4%
Final simplification62.4%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 59.8%
Simplified63.5%
Taylor expanded in y around 0 44.8%
Final simplification44.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
x
(*
(+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z)))
(/ y 1.0)))))
(if (< z -6.499344996252632e+53)
t_1
(if (< z 7.066965436914287e+59)
(+
x
(/
y
(/
(+
(*
(+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721)
z)
0.607771387771)
(+
(* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z)
b))))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0));
double tmp;
if (z < -6.499344996252632e+53) {
tmp = t_1;
} else if (z < 7.066965436914287e+59) {
tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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) :: t_1
real(8) :: tmp
t_1 = x + (((3.13060547623d0 - (36.527041698806414d0 / z)) + (t / (z * z))) * (y / 1.0d0))
if (z < (-6.499344996252632d+53)) then
tmp = t_1
else if (z < 7.066965436914287d+59) then
tmp = x + (y / ((((((((z + 15.234687407d0) * z) + 31.4690115749d0) * z) + 11.9400905721d0) * z) + 0.607771387771d0) / ((((((((z * 3.13060547623d0) + 11.1667541262d0) * z) + t) * z) + a) * z) + 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 t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0));
double tmp;
if (z < -6.499344996252632e+53) {
tmp = t_1;
} else if (z < 7.066965436914287e+59) {
tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0)) tmp = 0 if z < -6.499344996252632e+53: tmp = t_1 elif z < 7.066965436914287e+59: tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(Float64(3.13060547623 - Float64(36.527041698806414 / z)) + Float64(t / Float64(z * z))) * Float64(y / 1.0))) tmp = 0.0 if (z < -6.499344996252632e+53) tmp = t_1; elseif (z < 7.066965436914287e+59) tmp = Float64(x + Float64(y / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (((3.13060547623 - (36.527041698806414 / z)) + (t / (z * z))) * (y / 1.0)); tmp = 0.0; if (z < -6.499344996252632e+53) tmp = t_1; elseif (z < 7.066965436914287e+59) tmp = x + (y / ((((((((z + 15.234687407) * z) + 31.4690115749) * z) + 11.9400905721) * z) + 0.607771387771) / ((((((((z * 3.13060547623) + 11.1667541262) * z) + t) * z) + a) * z) + b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(N[(3.13060547623 - N[(36.527041698806414 / z), $MachinePrecision]), $MachinePrecision] + N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -6.499344996252632e+53], t$95$1, If[Less[z, 7.066965436914287e+59], N[(x + N[(y / N[(N[(N[(N[(N[(N[(N[(N[(z + 15.234687407), $MachinePrecision] * z), $MachinePrecision] + 31.4690115749), $MachinePrecision] * z), $MachinePrecision] + 11.9400905721), $MachinePrecision] * z), $MachinePrecision] + 0.607771387771), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(N[(z * 3.13060547623), $MachinePrecision] + 11.1667541262), $MachinePrecision] * z), $MachinePrecision] + t), $MachinePrecision] * z), $MachinePrecision] + a), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(\left(3.13060547623 - \frac{36.527041698806414}{z}\right) + \frac{t}{z \cdot z}\right) \cdot \frac{y}{1}\\
\mathbf{if}\;z < -6.499344996252632 \cdot 10^{+53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z < 7.066965436914287 \cdot 10^{+59}:\\
\;\;\;\;x + \frac{y}{\frac{\left(\left(\left(z + 15.234687407\right) \cdot z + 31.4690115749\right) \cdot z + 11.9400905721\right) \cdot z + 0.607771387771}{\left(\left(\left(z \cdot 3.13060547623 + 11.1667541262\right) \cdot z + t\right) \cdot z + a\right) \cdot z + b}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2024021
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D"
:precision binary64
:herbie-target
(if (< z -6.499344996252632e+53) (+ x (* (+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z))) (/ y 1.0))) (if (< z 7.066965436914287e+59) (+ x (/ y (/ (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771) (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)))) (+ x (* (+ (- 3.13060547623 (/ 36.527041698806414 z)) (/ t (* z z))) (/ y 1.0)))))
(+ x (/ (* y (+ (* (+ (* (+ (* (+ (* z 3.13060547623) 11.1667541262) z) t) z) a) z) b)) (+ (* (+ (* (+ (* (+ z 15.234687407) z) 31.4690115749) z) 11.9400905721) z) 0.607771387771))))