
(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 11 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
(if (<=
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
INFINITY)
(fma
(/
y
(fma
z
(fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
0.607771387771))
(fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b)
x)
(+
x
(*
y
(+
(+ (/ 457.9610022158428 (* z z)) (/ (/ t z) z))
(+ 3.13060547623 (/ -36.52704169880642 z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= ((double) INFINITY)) {
tmp = fma((y / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b), x);
} else {
tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= Inf) tmp = fma(Float64(y / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)), fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b), x); else tmp = Float64(x + Float64(y * Float64(Float64(Float64(457.9610022158428 / Float64(z * z)) + Float64(Float64(t / z) / z)) + Float64(3.13060547623 + Float64(-36.52704169880642 / z))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(y / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] * N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y * N[(N[(N[(457.9610022158428 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(N[(t / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)}, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(\left(\frac{457.9610022158428}{z \cdot z} + \frac{\frac{t}{z}}{z}\right) + \left(3.13060547623 + \frac{-36.52704169880642}{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 96.9%
+-commutative96.9%
associate-*l/99.7%
fma-def99.7%
Simplified99.7%
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%
associate-*l/0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in z around -inf 89.7%
Simplified99.1%
Taylor expanded in y around 0 99.9%
sub-neg99.9%
+-commutative99.9%
associate-+l+99.9%
associate-*r/99.9%
metadata-eval99.9%
unpow299.9%
unpow299.9%
associate-/r*99.9%
associate-*r/99.9%
metadata-eval99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x y z t a b)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))
INFINITY)
(+
x
(*
(/
y
(fma
z
(fma z (fma z (+ z 15.234687407) 31.4690115749) 11.9400905721)
0.607771387771))
(fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b)))
(+
x
(*
y
(+
(+ (/ 457.9610022158428 (* z z)) (/ (/ t z) z))
(+ 3.13060547623 (/ -36.52704169880642 z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= ((double) INFINITY)) {
tmp = x + ((y / fma(z, fma(z, fma(z, (z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)) * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b));
} else {
tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z))));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) <= Inf) tmp = Float64(x + Float64(Float64(y / fma(z, fma(z, fma(z, Float64(z + 15.234687407), 31.4690115749), 11.9400905721), 0.607771387771)) * fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b))); else tmp = Float64(x + Float64(y * Float64(Float64(Float64(457.9610022158428 / Float64(z * z)) + Float64(Float64(t / z) / z)) + Float64(3.13060547623 + Float64(-36.52704169880642 / z))))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[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[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision], Infinity], N[(x + N[(N[(y / N[(z * N[(z * N[(z * N[(z + 15.234687407), $MachinePrecision] + 31.4690115749), $MachinePrecision] + 11.9400905721), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision] * N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(N[(457.9610022158428 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(N[(t / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771} \leq \infty:\\
\;\;\;\;x + \frac{y}{\mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, z + 15.234687407, 31.4690115749\right), 11.9400905721\right), 0.607771387771\right)} \cdot \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, \mathsf{fma}\left(z, 3.13060547623, 11.1667541262\right), t\right), a\right), b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(\left(\frac{457.9610022158428}{z \cdot z} + \frac{\frac{t}{z}}{z}\right) + \left(3.13060547623 + \frac{-36.52704169880642}{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 96.9%
associate-*l/99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
Simplified99.7%
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%
associate-*l/0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in z around -inf 89.7%
Simplified99.1%
Taylor expanded in y around 0 99.9%
sub-neg99.9%
+-commutative99.9%
associate-+l+99.9%
associate-*r/99.9%
metadata-eval99.9%
unpow299.9%
unpow299.9%
associate-/r*99.9%
associate-*r/99.9%
metadata-eval99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771))))
(if (<= t_1 INFINITY)
(+ t_1 x)
(+
x
(*
y
(+
(+ (/ 457.9610022158428 (* z z)) (/ (/ t z) z))
(+ 3.13060547623 (/ -36.52704169880642 z))))))))
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)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1 + x;
} else {
tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z))));
}
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)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1 + x;
} else {
tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) tmp = 0 if t_1 <= math.inf: tmp = t_1 + x else: tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z)))) 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(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771)) tmp = 0.0 if (t_1 <= Inf) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(y * Float64(Float64(Float64(457.9610022158428 / Float64(z * z)) + Float64(Float64(t / z) / z)) + Float64(3.13060547623 + Float64(-36.52704169880642 / z))))); 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)) / ((z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771); tmp = 0.0; if (t_1 <= Inf) tmp = t_1 + x; else tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z)))); 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[(N[(z * N[(N[(z * N[(N[(z * N[(z + 15.234687407), $MachinePrecision]), $MachinePrecision] + 31.4690115749), $MachinePrecision]), $MachinePrecision] + 11.9400905721), $MachinePrecision]), $MachinePrecision] + 0.607771387771), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(y * N[(N[(N[(457.9610022158428 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(N[(t / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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)}{z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771}\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(\left(\frac{457.9610022158428}{z \cdot z} + \frac{\frac{t}{z}}{z}\right) + \left(3.13060547623 + \frac{-36.52704169880642}{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 96.9%
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%
associate-*l/0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
*-commutative0.0%
fma-def0.0%
Simplified0.0%
Taylor expanded in z around -inf 89.7%
Simplified99.1%
Taylor expanded in y around 0 99.9%
sub-neg99.9%
+-commutative99.9%
associate-+l+99.9%
associate-*r/99.9%
metadata-eval99.9%
unpow299.9%
unpow299.9%
associate-/r*99.9%
associate-*r/99.9%
metadata-eval99.9%
distribute-neg-frac99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -12.8) (not (<= z 1e+17)))
(+
x
(*
y
(+
(+ (/ 457.9610022158428 (* z z)) (/ (/ t z) z))
(+ 3.13060547623 (/ -36.52704169880642 z)))))
(+
x
(/
(* y (+ b (* 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 <= -12.8) || !(z <= 1e+17)) {
tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z))));
} else {
tmp = x + ((y * (b + (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 <= (-12.8d0)) .or. (.not. (z <= 1d+17))) then
tmp = x + (y * (((457.9610022158428d0 / (z * z)) + ((t / z) / z)) + (3.13060547623d0 + ((-36.52704169880642d0) / z))))
else
tmp = x + ((y * (b + (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 <= -12.8) || !(z <= 1e+17)) {
tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z))));
} else {
tmp = x + ((y * (b + (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 <= -12.8) or not (z <= 1e+17): tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z)))) else: tmp = x + ((y * (b + (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 <= -12.8) || !(z <= 1e+17)) tmp = Float64(x + Float64(y * Float64(Float64(Float64(457.9610022158428 / Float64(z * z)) + Float64(Float64(t / z) / z)) + Float64(3.13060547623 + Float64(-36.52704169880642 / z))))); else tmp = Float64(x + Float64(Float64(y * Float64(b + 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 <= -12.8) || ~((z <= 1e+17))) tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z)))); else tmp = x + ((y * (b + (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, -12.8], N[Not[LessEqual[z, 1e+17]], $MachinePrecision]], N[(x + N[(y * N[(N[(N[(457.9610022158428 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(N[(t / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $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] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12.8 \lor \neg \left(z \leq 10^{+17}\right):\\
\;\;\;\;x + y \cdot \left(\left(\frac{457.9610022158428}{z \cdot z} + \frac{\frac{t}{z}}{z}\right) + \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot \left(a + z \cdot \left(t + z \cdot 11.1667541262\right)\right)\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\end{array}
\end{array}
if z < -12.800000000000001 or 1e17 < z Initial program 14.9%
associate-*l/18.0%
*-commutative18.0%
fma-def18.0%
*-commutative18.0%
fma-def18.0%
*-commutative18.0%
fma-def18.0%
*-commutative18.0%
fma-def18.0%
Simplified18.0%
Taylor expanded in z around -inf 87.8%
Simplified95.7%
Taylor expanded in y around 0 96.4%
sub-neg96.4%
+-commutative96.4%
associate-+l+96.4%
associate-*r/96.4%
metadata-eval96.4%
unpow296.4%
unpow296.4%
associate-/r*96.4%
associate-*r/96.4%
metadata-eval96.4%
distribute-neg-frac96.4%
metadata-eval96.4%
Simplified96.4%
if -12.800000000000001 < z < 1e17Initial program 99.1%
Taylor expanded in z around 0 97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in z around 0 97.9%
*-commutative97.9%
Simplified97.9%
Final simplification97.2%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -5.5e-22) (not (<= z 2e+16)))
(+
x
(*
y
(+
(+ (/ 457.9610022158428 (* z z)) (/ (/ t z) z))
(+ 3.13060547623 (/ -36.52704169880642 z)))))
(+ 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-22) || !(z <= 2e+16)) {
tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z))));
} 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-22)) .or. (.not. (z <= 2d+16))) then
tmp = x + (y * (((457.9610022158428d0 / (z * z)) + ((t / z) / z)) + (3.13060547623d0 + ((-36.52704169880642d0) / z))))
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-22) || !(z <= 2e+16)) {
tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z))));
} 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-22) or not (z <= 2e+16): tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z)))) 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-22) || !(z <= 2e+16)) tmp = Float64(x + Float64(y * Float64(Float64(Float64(457.9610022158428 / Float64(z * z)) + Float64(Float64(t / z) / z)) + Float64(3.13060547623 + Float64(-36.52704169880642 / z))))); 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-22) || ~((z <= 2e+16))) tmp = x + (y * (((457.9610022158428 / (z * z)) + ((t / z) / z)) + (3.13060547623 + (-36.52704169880642 / z)))); 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-22], N[Not[LessEqual[z, 2e+16]], $MachinePrecision]], N[(x + N[(y * N[(N[(N[(457.9610022158428 / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(N[(t / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] + N[(3.13060547623 + N[(-36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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^{-22} \lor \neg \left(z \leq 2 \cdot 10^{+16}\right):\\
\;\;\;\;x + y \cdot \left(\left(\frac{457.9610022158428}{z \cdot z} + \frac{\frac{t}{z}}{z}\right) + \left(3.13060547623 + \frac{-36.52704169880642}{z}\right)\right)\\
\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.5000000000000001e-22 or 2e16 < z Initial program 18.4%
associate-*l/21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
*-commutative21.4%
fma-def21.4%
Simplified21.4%
Taylor expanded in z around -inf 85.9%
Simplified93.5%
Taylor expanded in y around 0 94.2%
sub-neg94.2%
+-commutative94.2%
associate-+l+94.2%
associate-*r/94.2%
metadata-eval94.2%
unpow294.2%
unpow294.2%
associate-/r*94.2%
associate-*r/94.2%
metadata-eval94.2%
distribute-neg-frac94.2%
metadata-eval94.2%
Simplified94.2%
if -5.5000000000000001e-22 < z < 2e16Initial program 99.1%
associate-*l/99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in z around 0 78.4%
Taylor expanded in y around 0 94.9%
Taylor expanded in a around inf 95.0%
*-commutative95.0%
Simplified95.0%
Final simplification94.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8.6e+26) (not (<= z 4.2e+27))) (+ 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 <= -8.6e+26) || !(z <= 4.2e+27)) {
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 <= (-8.6d+26)) .or. (.not. (z <= 4.2d+27))) 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 <= -8.6e+26) || !(z <= 4.2e+27)) {
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 <= -8.6e+26) or not (z <= 4.2e+27): 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 <= -8.6e+26) || !(z <= 4.2e+27)) 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 <= -8.6e+26) || ~((z <= 4.2e+27))) 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, -8.6e+26], N[Not[LessEqual[z, 4.2e+27]], $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 -8.6 \cdot 10^{+26} \lor \neg \left(z \leq 4.2 \cdot 10^{+27}\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 < -8.5999999999999996e26 or 4.19999999999999989e27 < z Initial program 11.1%
+-commutative11.1%
associate-*l/14.4%
fma-def14.4%
Simplified14.4%
Taylor expanded in z around inf 93.5%
+-commutative93.5%
*-commutative93.5%
Simplified93.5%
if -8.5999999999999996e26 < z < 4.19999999999999989e27Initial program 99.1%
associate-*l/99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
*-commutative99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in z around 0 76.0%
Taylor expanded in y around 0 91.3%
Taylor expanded in a around inf 91.4%
*-commutative91.4%
Simplified91.4%
Final simplification92.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -12.8)
(+ x (/ y (+ 0.31942702700572795 (/ 3.7269864963038164 z))))
(if (<= z 2.2e+29)
(+ x (/ (* y b) (+ 0.607771387771 (* z 11.9400905721))))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -12.8) {
tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z)));
} else if (z <= 2.2e+29) {
tmp = x + ((y * b) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y * 3.13060547623);
}
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 <= (-12.8d0)) then
tmp = x + (y / (0.31942702700572795d0 + (3.7269864963038164d0 / z)))
else if (z <= 2.2d+29) then
tmp = x + ((y * b) / (0.607771387771d0 + (z * 11.9400905721d0)))
else
tmp = x + (y * 3.13060547623d0)
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 <= -12.8) {
tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z)));
} else if (z <= 2.2e+29) {
tmp = x + ((y * b) / (0.607771387771 + (z * 11.9400905721)));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -12.8: tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z))) elif z <= 2.2e+29: tmp = x + ((y * b) / (0.607771387771 + (z * 11.9400905721))) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -12.8) tmp = Float64(x + Float64(y / Float64(0.31942702700572795 + Float64(3.7269864963038164 / z)))); elseif (z <= 2.2e+29) tmp = Float64(x + Float64(Float64(y * b) / Float64(0.607771387771 + Float64(z * 11.9400905721)))); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -12.8) tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z))); elseif (z <= 2.2e+29) tmp = x + ((y * b) / (0.607771387771 + (z * 11.9400905721))); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -12.8], N[(x + N[(y / N[(0.31942702700572795 + N[(3.7269864963038164 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+29], N[(x + N[(N[(y * b), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12.8:\\
\;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164}{z}}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+29}:\\
\;\;\;\;x + \frac{y \cdot b}{0.607771387771 + z \cdot 11.9400905721}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -12.800000000000001Initial program 18.6%
associate-/l*21.5%
fma-def21.5%
fma-def21.4%
fma-def21.4%
fma-def21.4%
fma-def21.4%
fma-def21.4%
fma-def21.4%
Simplified21.4%
Taylor expanded in z around inf 86.6%
associate-*r/86.6%
metadata-eval86.6%
Simplified86.6%
if -12.800000000000001 < z < 2.2000000000000001e29Initial program 99.1%
Taylor expanded in z around 0 97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in z around 0 78.2%
*-commutative78.2%
Simplified78.2%
if 2.2000000000000001e29 < z Initial program 10.2%
+-commutative10.2%
associate-*l/13.7%
fma-def13.7%
Simplified13.7%
Taylor expanded in z around inf 96.2%
+-commutative96.2%
*-commutative96.2%
Simplified96.2%
Final simplification83.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.25e-9) (not (<= z 4.2e+27))) (+ 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.25e-9) || !(z <= 4.2e+27)) {
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.25d-9)) .or. (.not. (z <= 4.2d+27))) 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.25e-9) || !(z <= 4.2e+27)) {
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.25e-9) or not (z <= 4.2e+27): 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.25e-9) || !(z <= 4.2e+27)) 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.25e-9) || ~((z <= 4.2e+27))) 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.25e-9], N[Not[LessEqual[z, 4.2e+27]], $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.25 \cdot 10^{-9} \lor \neg \left(z \leq 4.2 \cdot 10^{+27}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\
\end{array}
\end{array}
if z < -1.25e-9 or 4.19999999999999989e27 < z Initial program 16.3%
+-commutative16.3%
associate-*l/19.4%
fma-def19.4%
Simplified19.4%
Taylor expanded in z around inf 89.2%
+-commutative89.2%
*-commutative89.2%
Simplified89.2%
if -1.25e-9 < z < 4.19999999999999989e27Initial program 99.1%
associate-/l*99.6%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in b around inf 79.9%
Taylor expanded in z around 0 79.2%
*-commutative79.2%
associate-*r*79.3%
Simplified79.3%
Final simplification83.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.55e-30)
(+ x (/ y (+ 0.31942702700572795 (/ 3.7269864963038164 z))))
(if (<= z 1.32e+20)
(+ x (* b (* y 1.6453555072203998)))
(+ x (* y 3.13060547623)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.55e-30) {
tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z)));
} else if (z <= 1.32e+20) {
tmp = x + (b * (y * 1.6453555072203998));
} else {
tmp = x + (y * 3.13060547623);
}
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.55d-30)) then
tmp = x + (y / (0.31942702700572795d0 + (3.7269864963038164d0 / z)))
else if (z <= 1.32d+20) then
tmp = x + (b * (y * 1.6453555072203998d0))
else
tmp = x + (y * 3.13060547623d0)
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.55e-30) {
tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z)));
} else if (z <= 1.32e+20) {
tmp = x + (b * (y * 1.6453555072203998));
} else {
tmp = x + (y * 3.13060547623);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.55e-30: tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z))) elif z <= 1.32e+20: tmp = x + (b * (y * 1.6453555072203998)) else: tmp = x + (y * 3.13060547623) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.55e-30) tmp = Float64(x + Float64(y / Float64(0.31942702700572795 + Float64(3.7269864963038164 / z)))); elseif (z <= 1.32e+20) tmp = Float64(x + Float64(b * Float64(y * 1.6453555072203998))); else tmp = Float64(x + Float64(y * 3.13060547623)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.55e-30) tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z))); elseif (z <= 1.32e+20) tmp = x + (b * (y * 1.6453555072203998)); else tmp = x + (y * 3.13060547623); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.55e-30], N[(x + N[(y / N[(0.31942702700572795 + N[(3.7269864963038164 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.32e+20], N[(x + N[(b * N[(y * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-30}:\\
\;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164}{z}}\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{+20}:\\
\;\;\;\;x + b \cdot \left(y \cdot 1.6453555072203998\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 3.13060547623\\
\end{array}
\end{array}
if z < -1.54999999999999995e-30Initial program 25.5%
associate-/l*28.1%
fma-def28.1%
fma-def28.0%
fma-def28.0%
fma-def28.0%
fma-def28.0%
fma-def28.0%
fma-def28.0%
Simplified28.0%
Taylor expanded in z around inf 81.0%
associate-*r/81.0%
metadata-eval81.0%
Simplified81.0%
if -1.54999999999999995e-30 < z < 1.32e20Initial program 99.1%
associate-/l*99.6%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in b around inf 81.4%
Taylor expanded in z around 0 80.7%
*-commutative80.7%
associate-*r*80.8%
Simplified80.8%
if 1.32e20 < z Initial program 10.2%
+-commutative10.2%
associate-*l/13.7%
fma-def13.7%
Simplified13.7%
Taylor expanded in z around inf 96.2%
+-commutative96.2%
*-commutative96.2%
Simplified96.2%
Final simplification83.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.06e-122) (not (<= z 2.7e-45))) (+ x (* y 3.13060547623)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.06e-122) || !(z <= 2.7e-45)) {
tmp = x + (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 ((z <= (-1.06d-122)) .or. (.not. (z <= 2.7d-45))) then
tmp = x + (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 ((z <= -1.06e-122) || !(z <= 2.7e-45)) {
tmp = x + (y * 3.13060547623);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.06e-122) or not (z <= 2.7e-45): tmp = x + (y * 3.13060547623) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.06e-122) || !(z <= 2.7e-45)) tmp = Float64(x + 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 ((z <= -1.06e-122) || ~((z <= 2.7e-45))) tmp = x + (y * 3.13060547623); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.06e-122], N[Not[LessEqual[z, 2.7e-45]], $MachinePrecision]], N[(x + N[(y * 3.13060547623), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.06 \cdot 10^{-122} \lor \neg \left(z \leq 2.7 \cdot 10^{-45}\right):\\
\;\;\;\;x + y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.05999999999999994e-122 or 2.69999999999999985e-45 < z Initial program 38.8%
+-commutative38.8%
associate-*l/41.6%
fma-def41.6%
Simplified41.6%
Taylor expanded in z around inf 74.0%
+-commutative74.0%
*-commutative74.0%
Simplified74.0%
if -1.05999999999999994e-122 < z < 2.69999999999999985e-45Initial program 99.7%
+-commutative99.7%
associate-*l/99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in y around 0 43.5%
Final simplification62.9%
(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 61.0%
+-commutative61.0%
associate-*l/62.7%
fma-def62.7%
Simplified62.7%
Taylor expanded in y around 0 42.9%
Final simplification42.9%
(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 2023279
(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))))