
(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 12 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))))
(fma
y
(+
3.13060547623
(/ (- (/ (+ t 457.9610022158428) z) 36.52704169880642) z))
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 + ((((t + 457.9610022158428) / z) - 36.52704169880642) / z)), 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, Float64(3.13060547623 + Float64(Float64(Float64(Float64(t + 457.9610022158428) / z) - 36.52704169880642) / z)), 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 * N[(3.13060547623 + N[(N[(N[(N[(t + 457.9610022158428), $MachinePrecision] / z), $MachinePrecision] - 36.52704169880642), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + 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 + \frac{\frac{t + 457.9610022158428}{z} - 36.52704169880642}{z}, x\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 95.9%
Simplified99.6%
Taylor expanded in y around 0 99.6%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 0.0%
Simplified0.0%
Taylor expanded in z around -inf 100.0%
mul-1-neg100.0%
unsub-neg100.0%
mul-1-neg100.0%
unsub-neg100.0%
+-commutative100.0%
Simplified100.0%
Final simplification99.8%
(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 #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 95.9%
Simplified99.6%
Taylor expanded in y around 0 99.6%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 0.0%
Simplified0.0%
Taylor expanded in z around inf 95.2%
Final simplification97.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
0.607771387771
(*
z
(+
11.9400905721
(* z (+ 31.4690115749 (* z (+ z 15.234687407))))))))))
(if (<= t_1 INFINITY) (+ t_1 x) (+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1 + x;
} 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 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407)))))));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1 + x;
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))) tmp = 0 if t_1 <= math.inf: tmp = t_1 + x else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) t_1 = 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 * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * Float64(z + 15.234687407)))))))) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * (z + 15.234687407))))))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1 + x; else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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 * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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 \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot \left(z + 15.234687407\right)\right)\right)}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) < +inf.0Initial program 95.9%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 313060547623/100000000000 binary64)) #s(literal 55833770631/5000000000 binary64)) z) t) z) a) z) b)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 z #s(literal 15234687407/1000000000 binary64)) z) #s(literal 314690115749/10000000000 binary64)) z) #s(literal 119400905721/10000000000 binary64)) z) #s(literal 607771387771/1000000000000 binary64))) Initial program 0.0%
Simplified0.0%
Taylor expanded in z around inf 95.2%
Final simplification95.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 1.6453555072203998 (* y b))) (t_2 (+ x (* y 3.13060547623))))
(if (<= z -2.1e+33)
t_2
(if (<= z -5e-199)
(+
x
(+
t_1
(*
z
(- (* 1.6453555072203998 (* y a)) (* (* y b) 32.324150453290734)))))
(if (<= z 1.52e-49)
(+ x t_1)
(if (<= z 1.55e+34)
(+
x
(*
a
(+
(/
(* y z)
(+
0.607771387771
(* z (+ 11.9400905721 (* z (+ 31.4690115749 (* z z)))))))
(/ (* y 3.13060547623) a))))
t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.6453555072203998 * (y * b);
double t_2 = x + (y * 3.13060547623);
double tmp;
if (z <= -2.1e+33) {
tmp = t_2;
} else if (z <= -5e-199) {
tmp = x + (t_1 + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734))));
} else if (z <= 1.52e-49) {
tmp = x + t_1;
} else if (z <= 1.55e+34) {
tmp = x + (a * (((y * z) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z))))))) + ((y * 3.13060547623) / a)));
} 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 = 1.6453555072203998d0 * (y * b)
t_2 = x + (y * 3.13060547623d0)
if (z <= (-2.1d+33)) then
tmp = t_2
else if (z <= (-5d-199)) then
tmp = x + (t_1 + (z * ((1.6453555072203998d0 * (y * a)) - ((y * b) * 32.324150453290734d0))))
else if (z <= 1.52d-49) then
tmp = x + t_1
else if (z <= 1.55d+34) then
tmp = x + (a * (((y * z) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * (31.4690115749d0 + (z * z))))))) + ((y * 3.13060547623d0) / a)))
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 = 1.6453555072203998 * (y * b);
double t_2 = x + (y * 3.13060547623);
double tmp;
if (z <= -2.1e+33) {
tmp = t_2;
} else if (z <= -5e-199) {
tmp = x + (t_1 + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734))));
} else if (z <= 1.52e-49) {
tmp = x + t_1;
} else if (z <= 1.55e+34) {
tmp = x + (a * (((y * z) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z))))))) + ((y * 3.13060547623) / a)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.6453555072203998 * (y * b) t_2 = x + (y * 3.13060547623) tmp = 0 if z <= -2.1e+33: tmp = t_2 elif z <= -5e-199: tmp = x + (t_1 + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734)))) elif z <= 1.52e-49: tmp = x + t_1 elif z <= 1.55e+34: tmp = x + (a * (((y * z) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z))))))) + ((y * 3.13060547623) / a))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.6453555072203998 * Float64(y * b)) t_2 = Float64(x + Float64(y * 3.13060547623)) tmp = 0.0 if (z <= -2.1e+33) tmp = t_2; elseif (z <= -5e-199) tmp = Float64(x + Float64(t_1 + Float64(z * Float64(Float64(1.6453555072203998 * Float64(y * a)) - Float64(Float64(y * b) * 32.324150453290734))))); elseif (z <= 1.52e-49) tmp = Float64(x + t_1); elseif (z <= 1.55e+34) tmp = Float64(x + Float64(a * Float64(Float64(Float64(y * z) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * Float64(31.4690115749 + Float64(z * z))))))) + Float64(Float64(y * 3.13060547623) / a)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.6453555072203998 * (y * b); t_2 = x + (y * 3.13060547623); tmp = 0.0; if (z <= -2.1e+33) tmp = t_2; elseif (z <= -5e-199) tmp = x + (t_1 + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734)))); elseif (z <= 1.52e-49) tmp = x + t_1; elseif (z <= 1.55e+34) tmp = x + (a * (((y * z) / (0.607771387771 + (z * (11.9400905721 + (z * (31.4690115749 + (z * z))))))) + ((y * 3.13060547623) / a))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.1e+33], t$95$2, If[LessEqual[z, -5e-199], N[(x + N[(t$95$1 + N[(z * N[(N[(1.6453555072203998 * N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] * 32.324150453290734), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.52e-49], N[(x + t$95$1), $MachinePrecision], If[LessEqual[z, 1.55e+34], N[(x + N[(a * N[(N[(N[(y * z), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * N[(31.4690115749 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y * 3.13060547623), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1.6453555072203998 \cdot \left(y \cdot b\right)\\
t_2 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-199}:\\
\;\;\;\;x + \left(t\_1 + z \cdot \left(1.6453555072203998 \cdot \left(y \cdot a\right) - \left(y \cdot b\right) \cdot 32.324150453290734\right)\right)\\
\mathbf{elif}\;z \leq 1.52 \cdot 10^{-49}:\\
\;\;\;\;x + t\_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+34}:\\
\;\;\;\;x + a \cdot \left(\frac{y \cdot z}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot \left(31.4690115749 + z \cdot z\right)\right)} + \frac{y \cdot 3.13060547623}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.1000000000000001e33 or 1.54999999999999989e34 < z Initial program 4.4%
Simplified8.3%
Taylor expanded in z around inf 92.3%
if -2.1000000000000001e33 < z < -4.9999999999999996e-199Initial program 99.7%
Simplified99.5%
Taylor expanded in z around 0 84.9%
if -4.9999999999999996e-199 < z < 1.52e-49Initial program 99.8%
Simplified99.8%
Taylor expanded in z around 0 93.7%
if 1.52e-49 < z < 1.54999999999999989e34Initial program 95.1%
Taylor expanded in a around inf 85.7%
Taylor expanded in z around inf 77.4%
associate-*r/77.4%
Simplified77.4%
Taylor expanded in z around inf 74.5%
Final simplification90.2%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -8.7e+30) (not (<= z 2e+21)))
(+ x (* y 3.13060547623))
(+
x
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
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 <= -8.7e+30) || !(z <= 2e+21)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + 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 <= (-8.7d+30)) .or. (.not. (z <= 2d+21))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623d0) + 11.1667541262d0)) + t)) + a)) + 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 <= -8.7e+30) || !(z <= 2e+21)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -8.7e+30) or not (z <= 2e+21): tmp = x + (y * 3.13060547623) else: tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8.7e+30) || !(z <= 2e+21)) tmp = Float64(x + Float64(y * 3.13060547623)); 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 * 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 <= -8.7e+30) || ~((z <= 2e+21))) tmp = x + (y * 3.13060547623); else tmp = x + ((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8.7e+30], N[Not[LessEqual[z, 2e+21]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $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 * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.7 \cdot 10^{+30} \lor \neg \left(z \leq 2 \cdot 10^{+21}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\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 \left(11.9400905721 + z \cdot 31.4690115749\right)}\\
\end{array}
\end{array}
if z < -8.7000000000000005e30 or 2e21 < z Initial program 6.0%
Simplified10.5%
Taylor expanded in z around inf 91.7%
if -8.7000000000000005e30 < z < 2e21Initial program 99.7%
Taylor expanded in z around 0 95.6%
*-commutative95.6%
Simplified95.6%
Final simplification93.7%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -34000000000.0) (not (<= z 1.45e+15)))
(+ x (* y 3.13060547623))
(+
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 <= -34000000000.0) || !(z <= 1.45e+15)) {
tmp = x + (y * 3.13060547623);
} 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 <= (-34000000000.0d0)) .or. (.not. (z <= 1.45d+15))) then
tmp = x + (y * 3.13060547623d0)
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 <= -34000000000.0) || !(z <= 1.45e+15)) {
tmp = x + (y * 3.13060547623);
} 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 <= -34000000000.0) or not (z <= 1.45e+15): tmp = x + (y * 3.13060547623) 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 <= -34000000000.0) || !(z <= 1.45e+15)) tmp = Float64(x + Float64(y * 3.13060547623)); 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 <= -34000000000.0) || ~((z <= 1.45e+15))) tmp = x + (y * 3.13060547623); 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, -34000000000.0], N[Not[LessEqual[z, 1.45e+15]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $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 -34000000000 \lor \neg \left(z \leq 1.45 \cdot 10^{+15}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\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 < -3.4e10 or 1.45e15 < z Initial program 11.7%
Simplified15.9%
Taylor expanded in z around inf 89.3%
if -3.4e10 < z < 1.45e15Initial program 99.7%
Taylor expanded in z around 0 98.3%
*-commutative98.3%
Simplified98.3%
Final simplification93.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 1.6453555072203998 (* y b))) (t_2 (+ x (* y 3.13060547623))))
(if (<= z -2.15e+33)
t_2
(if (<= z -2.7e-198)
(+
x
(+
t_1
(*
z
(- (* 1.6453555072203998 (* y a)) (* (* y b) 32.324150453290734)))))
(if (<= z 1850000000000.0) (+ x t_1) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.6453555072203998 * (y * b);
double t_2 = x + (y * 3.13060547623);
double tmp;
if (z <= -2.15e+33) {
tmp = t_2;
} else if (z <= -2.7e-198) {
tmp = x + (t_1 + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734))));
} else if (z <= 1850000000000.0) {
tmp = x + 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 = 1.6453555072203998d0 * (y * b)
t_2 = x + (y * 3.13060547623d0)
if (z <= (-2.15d+33)) then
tmp = t_2
else if (z <= (-2.7d-198)) then
tmp = x + (t_1 + (z * ((1.6453555072203998d0 * (y * a)) - ((y * b) * 32.324150453290734d0))))
else if (z <= 1850000000000.0d0) then
tmp = x + 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 = 1.6453555072203998 * (y * b);
double t_2 = x + (y * 3.13060547623);
double tmp;
if (z <= -2.15e+33) {
tmp = t_2;
} else if (z <= -2.7e-198) {
tmp = x + (t_1 + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734))));
} else if (z <= 1850000000000.0) {
tmp = x + t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.6453555072203998 * (y * b) t_2 = x + (y * 3.13060547623) tmp = 0 if z <= -2.15e+33: tmp = t_2 elif z <= -2.7e-198: tmp = x + (t_1 + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734)))) elif z <= 1850000000000.0: tmp = x + t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.6453555072203998 * Float64(y * b)) t_2 = Float64(x + Float64(y * 3.13060547623)) tmp = 0.0 if (z <= -2.15e+33) tmp = t_2; elseif (z <= -2.7e-198) tmp = Float64(x + Float64(t_1 + Float64(z * Float64(Float64(1.6453555072203998 * Float64(y * a)) - Float64(Float64(y * b) * 32.324150453290734))))); elseif (z <= 1850000000000.0) tmp = Float64(x + t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.6453555072203998 * (y * b); t_2 = x + (y * 3.13060547623); tmp = 0.0; if (z <= -2.15e+33) tmp = t_2; elseif (z <= -2.7e-198) tmp = x + (t_1 + (z * ((1.6453555072203998 * (y * a)) - ((y * b) * 32.324150453290734)))); elseif (z <= 1850000000000.0) tmp = x + t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.15e+33], t$95$2, If[LessEqual[z, -2.7e-198], N[(x + N[(t$95$1 + N[(z * N[(N[(1.6453555072203998 * N[(y * a), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] * 32.324150453290734), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1850000000000.0], N[(x + t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1.6453555072203998 \cdot \left(y \cdot b\right)\\
t_2 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-198}:\\
\;\;\;\;x + \left(t\_1 + z \cdot \left(1.6453555072203998 \cdot \left(y \cdot a\right) - \left(y \cdot b\right) \cdot 32.324150453290734\right)\right)\\
\mathbf{elif}\;z \leq 1850000000000:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.15000000000000014e33 or 1.85e12 < z Initial program 8.2%
Simplified12.6%
Taylor expanded in z around inf 90.4%
if -2.15000000000000014e33 < z < -2.7000000000000002e-198Initial program 99.7%
Simplified99.5%
Taylor expanded in z around 0 84.9%
if -2.7000000000000002e-198 < z < 1.85e12Initial program 99.8%
Simplified99.7%
Taylor expanded in z around 0 84.4%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y 3.13060547623))))
(if (<= z -7.5e-13)
t_1
(if (<= z -1.45e-77)
(* 1.6453555072203998 (* z (* y a)))
(if (<= z 2.6e-66) x t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * 3.13060547623);
double tmp;
if (z <= -7.5e-13) {
tmp = t_1;
} else if (z <= -1.45e-77) {
tmp = 1.6453555072203998 * (z * (y * a));
} else if (z <= 2.6e-66) {
tmp = x;
} 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 + (y * 3.13060547623d0)
if (z <= (-7.5d-13)) then
tmp = t_1
else if (z <= (-1.45d-77)) then
tmp = 1.6453555072203998d0 * (z * (y * a))
else if (z <= 2.6d-66) then
tmp = x
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 + (y * 3.13060547623);
double tmp;
if (z <= -7.5e-13) {
tmp = t_1;
} else if (z <= -1.45e-77) {
tmp = 1.6453555072203998 * (z * (y * a));
} else if (z <= 2.6e-66) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * 3.13060547623) tmp = 0 if z <= -7.5e-13: tmp = t_1 elif z <= -1.45e-77: tmp = 1.6453555072203998 * (z * (y * a)) elif z <= 2.6e-66: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * 3.13060547623)) tmp = 0.0 if (z <= -7.5e-13) tmp = t_1; elseif (z <= -1.45e-77) tmp = Float64(1.6453555072203998 * Float64(z * Float64(y * a))); elseif (z <= 2.6e-66) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * 3.13060547623); tmp = 0.0; if (z <= -7.5e-13) tmp = t_1; elseif (z <= -1.45e-77) tmp = 1.6453555072203998 * (z * (y * a)); elseif (z <= 2.6e-66) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e-13], t$95$1, If[LessEqual[z, -1.45e-77], N[(1.6453555072203998 * N[(z * N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-66], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot 3.13060547623\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-77}:\\
\;\;\;\;1.6453555072203998 \cdot \left(z \cdot \left(y \cdot a\right)\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-66}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.5000000000000004e-13 or 2.5999999999999999e-66 < z Initial program 25.8%
Simplified29.3%
Taylor expanded in z around inf 80.6%
if -7.5000000000000004e-13 < z < -1.4499999999999999e-77Initial program 99.5%
Simplified99.2%
Taylor expanded in a around inf 46.7%
Taylor expanded in z around 0 46.5%
associate-*r*52.8%
*-commutative52.8%
*-commutative52.8%
Simplified52.8%
if -1.4499999999999999e-77 < z < 2.5999999999999999e-66Initial program 99.8%
Simplified99.7%
Taylor expanded in y around 0 49.0%
Final simplification68.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.2e+19) (not (<= z 2.15e+14))) (+ x (* y 3.13060547623)) (+ x (* 1.6453555072203998 (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.2e+19) || !(z <= 2.15e+14)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (1.6453555072203998 * (y * b));
}
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 <= (-6.2d+19)) .or. (.not. (z <= 2.15d+14))) then
tmp = x + (y * 3.13060547623d0)
else
tmp = x + (1.6453555072203998d0 * (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 tmp;
if ((z <= -6.2e+19) || !(z <= 2.15e+14)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x + (1.6453555072203998 * (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.2e+19) or not (z <= 2.15e+14): tmp = x + (y * 3.13060547623) else: tmp = x + (1.6453555072203998 * (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.2e+19) || !(z <= 2.15e+14)) tmp = Float64(x + Float64(y * 3.13060547623)); else tmp = Float64(x + Float64(1.6453555072203998 * Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.2e+19) || ~((z <= 2.15e+14))) tmp = x + (y * 3.13060547623); else tmp = x + (1.6453555072203998 * (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.2e+19], N[Not[LessEqual[z, 2.15e+14]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], N[(x + N[(1.6453555072203998 * N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+19} \lor \neg \left(z \leq 2.15 \cdot 10^{+14}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + 1.6453555072203998 \cdot \left(y \cdot b\right)\\
\end{array}
\end{array}
if z < -6.2e19 or 2.15e14 < z Initial program 10.3%
Simplified14.6%
Taylor expanded in z around inf 89.8%
if -6.2e19 < z < 2.15e14Initial program 99.7%
Simplified99.7%
Taylor expanded in z around 0 78.6%
Final simplification84.2%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.1e+30) x (if (<= x 2.35e-123) (* y 3.13060547623) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.1e+30) {
tmp = x;
} else if (x <= 2.35e-123) {
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 (x <= (-1.1d+30)) then
tmp = x
else if (x <= 2.35d-123) 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 (x <= -1.1e+30) {
tmp = x;
} else if (x <= 2.35e-123) {
tmp = y * 3.13060547623;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.1e+30: tmp = x elif x <= 2.35e-123: tmp = y * 3.13060547623 else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.1e+30) tmp = x; elseif (x <= 2.35e-123) 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 (x <= -1.1e+30) tmp = x; elseif (x <= 2.35e-123) tmp = y * 3.13060547623; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.1e+30], x, If[LessEqual[x, 2.35e-123], N[(y * 3.13060547623), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{+30}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.35 \cdot 10^{-123}:\\
\;\;\;\;y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.1e30 or 2.3500000000000001e-123 < x Initial program 59.9%
Simplified61.7%
Taylor expanded in y around 0 59.7%
if -1.1e30 < x < 2.3500000000000001e-123Initial program 47.0%
Simplified49.6%
Taylor expanded in z around inf 55.7%
Taylor expanded in x around 0 43.8%
Final simplification53.2%
(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 54.7%
Simplified56.8%
Taylor expanded in z around inf 63.5%
Final simplification63.5%
(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 54.7%
Simplified56.8%
Taylor expanded in y around 0 41.6%
(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 2024172
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, D"
:precision binary64
:alt
(! :herbie-platform default (if (< z -649934499625263200000000000000000000000000000000000000) (+ x (* (+ (- 313060547623/100000000000 (/ 18263520849403207/500000000000000 z)) (/ t (* z z))) (/ y 1))) (if (< z 706696543691428700000000000000000000000000000000000000000000) (+ x (/ y (/ (+ (* (+ (* (+ (* (+ z 15234687407/1000000000) z) 314690115749/10000000000) z) 119400905721/10000000000) z) 607771387771/1000000000000) (+ (* (+ (* (+ (* (+ (* z 313060547623/100000000000) 55833770631/5000000000) z) t) z) a) z) b)))) (+ x (* (+ (- 313060547623/100000000000 (/ 18263520849403207/500000000000000 z)) (/ t (* z z))) (/ y 1))))))
(+ 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))))