
(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 15 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)
(+
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
(-
(+ 3.13060547623 (+ (/ t (* z z)) (/ 457.9610022158428 (* z z))))
(/ 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 * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (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(3.13060547623 + Float64(Float64(t / Float64(z * z)) + Float64(457.9610022158428 / Float64(z * z)))) - 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[(3.13060547623 + N[(N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(457.9610022158428 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 / z), $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(3.13060547623 + \left(\frac{t}{z \cdot z} + \frac{457.9610022158428}{z \cdot z}\right)\right) - \frac{36.52704169880642}{z}\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.8%
associate-*l/98.5%
*-commutative98.5%
fma-def98.5%
*-commutative98.5%
fma-def98.5%
*-commutative98.5%
fma-def98.5%
*-commutative98.5%
fma-def98.5%
Simplified98.5%
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 84.9%
+-commutative84.9%
mul-1-neg84.9%
unsub-neg84.9%
+-commutative84.9%
*-commutative84.9%
fma-def84.9%
unpow284.9%
distribute-rgt-out--84.9%
metadata-eval84.9%
+-commutative84.9%
fma-def84.9%
Simplified84.9%
Taylor expanded in y around 0 84.9%
associate-*r/84.9%
unpow284.9%
Simplified84.9%
Taylor expanded in y around 0 99.9%
+-commutative99.9%
unpow299.9%
associate-*r/99.9%
metadata-eval99.9%
unpow299.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+
(*
z
(+ (* z (+ (* z (+ z 15.234687407)) 31.4690115749)) 11.9400905721))
0.607771387771)))
(if (<=
(/
(*
y
(+
(* z (+ (* z (+ (* z (+ (* z 3.13060547623) 11.1667541262)) t)) a))
b))
t_1)
INFINITY)
(+
x
(*
(fma z (fma z (fma z (fma z 3.13060547623 11.1667541262) t) a) b)
(/ y t_1)))
(+
x
(*
y
(-
(+ 3.13060547623 (+ (/ t (* z z)) (/ 457.9610022158428 (* z z))))
(/ 36.52704169880642 z)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((z * ((z * (z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771;
double tmp;
if (((y * ((z * ((z * ((z * ((z * 3.13060547623) + 11.1667541262)) + t)) + a)) + b)) / t_1) <= ((double) INFINITY)) {
tmp = x + (fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b) * (y / t_1));
} else {
tmp = x + (y * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (36.52704169880642 / z)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(Float64(z * Float64(Float64(z * Float64(z + 15.234687407)) + 31.4690115749)) + 11.9400905721)) + 0.607771387771) 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)) / t_1) <= Inf) tmp = Float64(x + Float64(fma(z, fma(z, fma(z, fma(z, 3.13060547623, 11.1667541262), t), a), b) * Float64(y / t_1))); else tmp = Float64(x + Float64(y * Float64(Float64(3.13060547623 + Float64(Float64(t / Float64(z * z)) + Float64(457.9610022158428 / Float64(z * z)))) - Float64(36.52704169880642 / z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = 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]}, 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] / t$95$1), $MachinePrecision], Infinity], N[(x + N[(N[(z * N[(z * N[(z * N[(z * 3.13060547623 + 11.1667541262), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + b), $MachinePrecision] * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(3.13060547623 + N[(N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(457.9610022158428 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(z \cdot \left(z \cdot \left(z + 15.234687407\right) + 31.4690115749\right) + 11.9400905721\right) + 0.607771387771\\
\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)}{t_1} \leq \infty:\\
\;\;\;\;x + \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) \cdot \frac{y}{t_1}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(\left(3.13060547623 + \left(\frac{t}{z \cdot z} + \frac{457.9610022158428}{z \cdot z}\right)\right) - \frac{36.52704169880642}{z}\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.8%
associate-*l/98.5%
*-commutative98.5%
fma-def98.5%
*-commutative98.5%
fma-def98.5%
*-commutative98.5%
fma-def98.5%
*-commutative98.5%
fma-def98.5%
Simplified98.5%
Taylor expanded in y around 0 98.5%
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 84.9%
+-commutative84.9%
mul-1-neg84.9%
unsub-neg84.9%
+-commutative84.9%
*-commutative84.9%
fma-def84.9%
unpow284.9%
distribute-rgt-out--84.9%
metadata-eval84.9%
+-commutative84.9%
fma-def84.9%
Simplified84.9%
Taylor expanded in y around 0 84.9%
associate-*r/84.9%
unpow284.9%
Simplified84.9%
Taylor expanded in y around 0 99.9%
+-commutative99.9%
unpow299.9%
associate-*r/99.9%
metadata-eval99.9%
unpow299.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.0%
(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
(-
(+ 3.13060547623 (+ (/ t (* z z)) (/ 457.9610022158428 (* z z))))
(/ 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 * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (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 * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (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 * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (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(3.13060547623 + Float64(Float64(t / Float64(z * z)) + Float64(457.9610022158428 / Float64(z * z)))) - 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 * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (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[(3.13060547623 + N[(N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(457.9610022158428 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 / z), $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(3.13060547623 + \left(\frac{t}{z \cdot z} + \frac{457.9610022158428}{z \cdot z}\right)\right) - \frac{36.52704169880642}{z}\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.8%
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 84.9%
+-commutative84.9%
mul-1-neg84.9%
unsub-neg84.9%
+-commutative84.9%
*-commutative84.9%
fma-def84.9%
unpow284.9%
distribute-rgt-out--84.9%
metadata-eval84.9%
+-commutative84.9%
fma-def84.9%
Simplified84.9%
Taylor expanded in y around 0 84.9%
associate-*r/84.9%
unpow284.9%
Simplified84.9%
Taylor expanded in y around 0 99.9%
+-commutative99.9%
unpow299.9%
associate-*r/99.9%
metadata-eval99.9%
unpow299.9%
associate-*r/99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -12.6) (not (<= z 37000000.0)))
(+
x
(*
y
(-
(+ 3.13060547623 (+ (/ t (* z z)) (/ 457.9610022158428 (* z z))))
(/ 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.6) || !(z <= 37000000.0)) {
tmp = x + (y * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (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.6d0)) .or. (.not. (z <= 37000000.0d0))) then
tmp = x + (y * ((3.13060547623d0 + ((t / (z * z)) + (457.9610022158428d0 / (z * z)))) - (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.6) || !(z <= 37000000.0)) {
tmp = x + (y * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (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.6) or not (z <= 37000000.0): tmp = x + (y * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (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.6) || !(z <= 37000000.0)) tmp = Float64(x + Float64(y * Float64(Float64(3.13060547623 + Float64(Float64(t / Float64(z * z)) + Float64(457.9610022158428 / Float64(z * z)))) - 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.6) || ~((z <= 37000000.0))) tmp = x + (y * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (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.6], N[Not[LessEqual[z, 37000000.0]], $MachinePrecision]], N[(x + N[(y * N[(N[(3.13060547623 + N[(N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(457.9610022158428 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 / z), $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.6 \lor \neg \left(z \leq 37000000\right):\\
\;\;\;\;x + y \cdot \left(\left(3.13060547623 + \left(\frac{t}{z \cdot z} + \frac{457.9610022158428}{z \cdot z}\right)\right) - \frac{36.52704169880642}{z}\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.5999999999999996 or 3.7e7 < z Initial program 17.2%
associate-*l/19.4%
*-commutative19.4%
fma-def19.4%
*-commutative19.4%
fma-def19.4%
*-commutative19.4%
fma-def19.4%
*-commutative19.4%
fma-def19.4%
Simplified19.4%
Taylor expanded in z around -inf 83.3%
+-commutative83.3%
mul-1-neg83.3%
unsub-neg83.3%
+-commutative83.3%
*-commutative83.3%
fma-def83.3%
unpow283.3%
distribute-rgt-out--83.3%
metadata-eval83.3%
+-commutative83.3%
fma-def83.3%
Simplified83.3%
Taylor expanded in y around 0 83.3%
associate-*r/83.3%
unpow283.3%
Simplified83.3%
Taylor expanded in y around 0 96.8%
+-commutative96.8%
unpow296.8%
associate-*r/96.8%
metadata-eval96.8%
unpow296.8%
associate-*r/96.8%
metadata-eval96.8%
Simplified96.8%
if -12.5999999999999996 < z < 3.7e7Initial program 99.7%
Taylor expanded in z around 0 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in z around 0 99.1%
*-commutative99.1%
Simplified99.1%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -3.3e+16) (not (<= z 4100000.0)))
(+
x
(*
y
(-
(+ 3.13060547623 (+ (/ t (* z z)) (/ 457.9610022158428 (* z z))))
(/ 36.52704169880642 z))))
(+
x
(/
(* y (+ b (* z a)))
(+ 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 <= -3.3e+16) || !(z <= 4100000.0)) {
tmp = x + (y * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (36.52704169880642 / z)));
} else {
tmp = x + ((y * (b + (z * a))) / (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 <= (-3.3d+16)) .or. (.not. (z <= 4100000.0d0))) then
tmp = x + (y * ((3.13060547623d0 + ((t / (z * z)) + (457.9610022158428d0 / (z * z)))) - (36.52704169880642d0 / z)))
else
tmp = x + ((y * (b + (z * a))) / (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 <= -3.3e+16) || !(z <= 4100000.0)) {
tmp = x + (y * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (36.52704169880642 / z)));
} else {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.3e+16) or not (z <= 4100000.0): tmp = x + (y * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (36.52704169880642 / z))) else: tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.3e+16) || !(z <= 4100000.0)) tmp = Float64(x + Float64(y * Float64(Float64(3.13060547623 + Float64(Float64(t / Float64(z * z)) + Float64(457.9610022158428 / Float64(z * z)))) - Float64(36.52704169880642 / z)))); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / 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 <= -3.3e+16) || ~((z <= 4100000.0))) tmp = x + (y * ((3.13060547623 + ((t / (z * z)) + (457.9610022158428 / (z * z)))) - (36.52704169880642 / z))); else tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.3e+16], N[Not[LessEqual[z, 4100000.0]], $MachinePrecision]], N[(x + N[(y * N[(N[(3.13060547623 + N[(N[(t / N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(457.9610022158428 / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(36.52704169880642 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * a), $MachinePrecision]), $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 -3.3 \cdot 10^{+16} \lor \neg \left(z \leq 4100000\right):\\
\;\;\;\;x + y \cdot \left(\left(3.13060547623 + \left(\frac{t}{z \cdot z} + \frac{457.9610022158428}{z \cdot z}\right)\right) - \frac{36.52704169880642}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\
\end{array}
\end{array}
if z < -3.3e16 or 4.1e6 < z Initial program 15.9%
associate-*l/18.1%
*-commutative18.1%
fma-def18.1%
*-commutative18.1%
fma-def18.1%
*-commutative18.1%
fma-def18.1%
*-commutative18.1%
fma-def18.1%
Simplified18.1%
Taylor expanded in z around -inf 84.5%
+-commutative84.5%
mul-1-neg84.5%
unsub-neg84.5%
+-commutative84.5%
*-commutative84.5%
fma-def84.5%
unpow284.5%
distribute-rgt-out--84.5%
metadata-eval84.5%
+-commutative84.5%
fma-def84.5%
Simplified84.5%
Taylor expanded in y around 0 84.5%
associate-*r/84.5%
unpow284.5%
Simplified84.5%
Taylor expanded in y around 0 98.2%
+-commutative98.2%
unpow298.2%
associate-*r/98.2%
metadata-eval98.2%
unpow298.2%
associate-*r/98.2%
metadata-eval98.2%
Simplified98.2%
if -3.3e16 < z < 4.1e6Initial program 99.7%
Taylor expanded in z around 0 90.4%
associate-*r*86.1%
*-commutative86.1%
associate-*r*91.8%
distribute-lft-out92.6%
*-commutative92.6%
Simplified92.6%
Taylor expanded in z around 0 91.3%
*-commutative91.3%
Simplified91.3%
Final simplification94.6%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -5e+18) (not (<= z 11500000000000.0)))
(+ x (/ y 0.31942702700572795))
(+
x
(/
(* y (+ b (* z a)))
(+ 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 <= -5e+18) || !(z <= 11500000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * (b + (z * a))) / (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 <= (-5d+18)) .or. (.not. (z <= 11500000000000.0d0))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + ((y * (b + (z * a))) / (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 <= -5e+18) || !(z <= 11500000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -5e+18) or not (z <= 11500000000000.0): tmp = x + (y / 0.31942702700572795) else: tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -5e+18) || !(z <= 11500000000000.0)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / 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 <= -5e+18) || ~((z <= 11500000000000.0))) tmp = x + (y / 0.31942702700572795); else tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -5e+18], N[Not[LessEqual[z, 11500000000000.0]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * a), $MachinePrecision]), $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 -5 \cdot 10^{+18} \lor \neg \left(z \leq 11500000000000\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\
\end{array}
\end{array}
if z < -5e18 or 1.15e13 < z Initial program 14.5%
associate-/l*16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
Simplified16.0%
Taylor expanded in z around inf 94.7%
if -5e18 < z < 1.15e13Initial program 99.1%
Taylor expanded in z around 0 89.3%
associate-*r*85.0%
*-commutative85.0%
associate-*r*90.6%
distribute-lft-out91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in z around 0 90.2%
*-commutative90.2%
Simplified90.2%
Final simplification92.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.25e+17)
(+ x (/ y 0.31942702700572795))
(if (<= z 2.05e+38)
(+
x
(/
(* y (+ b (* z a)))
(+ 0.607771387771 (* z (+ 11.9400905721 (* z 31.4690115749))))))
(+
x
(/
y
(+
(/ 3.7269864963038164 z)
(-
0.31942702700572795
(/ (+ 3.241970391368047 (* t 0.10203362558171805)) (* z z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.25e+17) {
tmp = x + (y / 0.31942702700572795);
} else if (z <= 2.05e+38) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
} else {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((3.241970391368047 + (t * 0.10203362558171805)) / (z * z)))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.25d+17)) then
tmp = x + (y / 0.31942702700572795d0)
else if (z <= 2.05d+38) then
tmp = x + ((y * (b + (z * a))) / (0.607771387771d0 + (z * (11.9400905721d0 + (z * 31.4690115749d0)))))
else
tmp = x + (y / ((3.7269864963038164d0 / z) + (0.31942702700572795d0 - ((3.241970391368047d0 + (t * 0.10203362558171805d0)) / (z * z)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.25e+17) {
tmp = x + (y / 0.31942702700572795);
} else if (z <= 2.05e+38) {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
} else {
tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((3.241970391368047 + (t * 0.10203362558171805)) / (z * z)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.25e+17: tmp = x + (y / 0.31942702700572795) elif z <= 2.05e+38: tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))) else: tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((3.241970391368047 + (t * 0.10203362558171805)) / (z * z))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.25e+17) tmp = Float64(x + Float64(y / 0.31942702700572795)); elseif (z <= 2.05e+38) tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / Float64(0.607771387771 + Float64(z * Float64(11.9400905721 + Float64(z * 31.4690115749)))))); else tmp = Float64(x + Float64(y / Float64(Float64(3.7269864963038164 / z) + Float64(0.31942702700572795 - Float64(Float64(3.241970391368047 + Float64(t * 0.10203362558171805)) / Float64(z * z)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.25e+17) tmp = x + (y / 0.31942702700572795); elseif (z <= 2.05e+38) tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))); else tmp = x + (y / ((3.7269864963038164 / z) + (0.31942702700572795 - ((3.241970391368047 + (t * 0.10203362558171805)) / (z * z))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.25e+17], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e+38], N[(x + N[(N[(y * N[(b + N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.607771387771 + N[(z * N[(11.9400905721 + N[(z * 31.4690115749), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(N[(3.7269864963038164 / z), $MachinePrecision] + N[(0.31942702700572795 - N[(N[(3.241970391368047 + N[(t * 0.10203362558171805), $MachinePrecision]), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+17}:\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+38}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{3.7269864963038164}{z} + \left(0.31942702700572795 - \frac{3.241970391368047 + t \cdot 0.10203362558171805}{z \cdot z}\right)}\\
\end{array}
\end{array}
if z < -2.25e17Initial program 11.4%
associate-/l*13.0%
fma-def13.0%
fma-def13.0%
fma-def13.0%
fma-def13.0%
fma-def13.0%
fma-def13.0%
fma-def13.0%
Simplified13.0%
Taylor expanded in z around inf 97.0%
if -2.25e17 < z < 2.0500000000000002e38Initial program 99.1%
Taylor expanded in z around 0 88.6%
associate-*r*84.6%
*-commutative84.6%
associate-*r*89.9%
distribute-lft-out90.6%
*-commutative90.6%
Simplified90.6%
Taylor expanded in z around 0 89.4%
*-commutative89.4%
Simplified89.4%
if 2.0500000000000002e38 < z Initial program 2.4%
associate-/l*4.3%
fma-def4.3%
fma-def4.3%
fma-def4.3%
fma-def4.3%
fma-def4.3%
fma-def4.3%
fma-def4.3%
Simplified4.3%
Taylor expanded in z around inf 95.4%
associate-*r/95.4%
metadata-eval95.4%
mul-1-neg95.4%
*-commutative95.4%
unpow295.4%
Simplified95.4%
Final simplification92.4%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -2.95e+14) (not (<= z 27000000000000.0)))
(+ x (/ y 0.31942702700572795))
(+
x
(/
(* y 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 <= -2.95e+14) || !(z <= 27000000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * 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 <= (-2.95d+14)) .or. (.not. (z <= 27000000000000.0d0))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + ((y * 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 <= -2.95e+14) || !(z <= 27000000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749)))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.95e+14) or not (z <= 27000000000000.0): tmp = x + (y / 0.31942702700572795) else: tmp = x + ((y * b) / (0.607771387771 + (z * (11.9400905721 + (z * 31.4690115749))))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.95e+14) || !(z <= 27000000000000.0)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(Float64(y * 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 <= -2.95e+14) || ~((z <= 27000000000000.0))) tmp = x + (y / 0.31942702700572795); else tmp = x + ((y * 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, -2.95e+14], N[Not[LessEqual[z, 27000000000000.0]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * b), $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 -2.95 \cdot 10^{+14} \lor \neg \left(z \leq 27000000000000\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot b}{0.607771387771 + z \cdot \left(11.9400905721 + z \cdot 31.4690115749\right)}\\
\end{array}
\end{array}
if z < -2.95e14 or 2.7e13 < z Initial program 15.2%
associate-/l*17.4%
fma-def17.4%
fma-def17.4%
fma-def17.4%
fma-def17.4%
fma-def17.4%
fma-def17.4%
fma-def17.4%
Simplified17.4%
Taylor expanded in z around inf 93.2%
if -2.95e14 < z < 2.7e13Initial program 99.7%
Taylor expanded in z around 0 89.8%
associate-*r*85.5%
*-commutative85.5%
associate-*r*91.2%
distribute-lft-out91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in z around 0 90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in b around inf 78.7%
Final simplification85.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -12.6) (not (<= z 540000000000.0))) (+ x (/ y 0.31942702700572795)) (+ x (/ (* y (+ b (* z a))) (+ 0.607771387771 (* z 11.9400905721))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -12.6) || !(z <= 540000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * (b + (z * a))) / (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.6d0)) .or. (.not. (z <= 540000000000.0d0))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + ((y * (b + (z * a))) / (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.6) || !(z <= 540000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -12.6) or not (z <= 540000000000.0): tmp = x + (y / 0.31942702700572795) else: tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -12.6) || !(z <= 540000000000.0)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(Float64(y * Float64(b + Float64(z * a))) / 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.6) || ~((z <= 540000000000.0))) tmp = x + (y / 0.31942702700572795); else tmp = x + ((y * (b + (z * a))) / (0.607771387771 + (z * 11.9400905721))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -12.6], N[Not[LessEqual[z, 540000000000.0]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(b + N[(z * a), $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.6 \lor \neg \left(z \leq 540000000000\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(b + z \cdot a\right)}{0.607771387771 + z \cdot 11.9400905721}\\
\end{array}
\end{array}
if z < -12.5999999999999996 or 5.4e11 < z Initial program 15.9%
associate-/l*18.1%
fma-def18.1%
fma-def18.1%
fma-def18.1%
fma-def18.1%
fma-def18.1%
fma-def18.1%
fma-def18.1%
Simplified18.1%
Taylor expanded in z around inf 92.5%
if -12.5999999999999996 < z < 5.4e11Initial program 99.7%
Taylor expanded in z around 0 89.7%
associate-*r*85.4%
*-commutative85.4%
associate-*r*91.1%
distribute-lft-out91.9%
*-commutative91.9%
Simplified91.9%
Taylor expanded in z around 0 91.3%
*-commutative91.3%
Simplified91.3%
Taylor expanded in z around 0 91.3%
*-commutative91.3%
Simplified91.3%
Final simplification91.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8.2e+16) (not (<= z 980000000000.0))) (+ x (/ y 0.31942702700572795)) (+ x (/ (* y b) (+ 0.607771387771 (* z 11.9400905721))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8.2e+16) || !(z <= 980000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * 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 <= (-8.2d+16)) .or. (.not. (z <= 980000000000.0d0))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + ((y * 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 <= -8.2e+16) || !(z <= 980000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * b) / (0.607771387771 + (z * 11.9400905721)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -8.2e+16) or not (z <= 980000000000.0): tmp = x + (y / 0.31942702700572795) else: tmp = x + ((y * b) / (0.607771387771 + (z * 11.9400905721))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8.2e+16) || !(z <= 980000000000.0)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(Float64(y * 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 <= -8.2e+16) || ~((z <= 980000000000.0))) tmp = x + (y / 0.31942702700572795); else tmp = x + ((y * b) / (0.607771387771 + (z * 11.9400905721))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8.2e+16], N[Not[LessEqual[z, 980000000000.0]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * b), $MachinePrecision] / N[(0.607771387771 + N[(z * 11.9400905721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+16} \lor \neg \left(z \leq 980000000000\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot b}{0.607771387771 + z \cdot 11.9400905721}\\
\end{array}
\end{array}
if z < -8.2e16 or 9.8e11 < z Initial program 14.5%
associate-/l*16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
fma-def16.0%
Simplified16.0%
Taylor expanded in z around inf 94.7%
if -8.2e16 < z < 9.8e11Initial program 99.1%
Taylor expanded in z around 0 96.3%
*-commutative96.3%
Simplified96.3%
Taylor expanded in z around 0 77.6%
Final simplification85.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -0.06) (not (<= z 16000000000000.0))) (+ x (/ y 0.31942702700572795)) (+ x (* (* y b) 1.6453555072203998))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -0.06) || !(z <= 16000000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * b) * 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 <= (-0.06d0)) .or. (.not. (z <= 16000000000000.0d0))) then
tmp = x + (y / 0.31942702700572795d0)
else
tmp = x + ((y * b) * 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 <= -0.06) || !(z <= 16000000000000.0)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x + ((y * b) * 1.6453555072203998);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -0.06) or not (z <= 16000000000000.0): tmp = x + (y / 0.31942702700572795) else: tmp = x + ((y * b) * 1.6453555072203998) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -0.06) || !(z <= 16000000000000.0)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = Float64(x + Float64(Float64(y * b) * 1.6453555072203998)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -0.06) || ~((z <= 16000000000000.0))) tmp = x + (y / 0.31942702700572795); else tmp = x + ((y * b) * 1.6453555072203998); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -0.06], N[Not[LessEqual[z, 16000000000000.0]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * b), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.06 \lor \neg \left(z \leq 16000000000000\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\
\end{array}
\end{array}
if z < -0.059999999999999998 or 1.6e13 < z Initial program 17.2%
associate-/l*19.4%
fma-def19.4%
fma-def19.4%
fma-def19.4%
fma-def19.4%
fma-def19.4%
fma-def19.4%
fma-def19.4%
Simplified19.4%
Taylor expanded in z around inf 91.9%
if -0.059999999999999998 < z < 1.6e13Initial program 99.7%
associate-*l/99.6%
*-commutative99.6%
fma-def99.6%
*-commutative99.6%
fma-def99.6%
*-commutative99.6%
fma-def99.6%
*-commutative99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in z around 0 79.3%
Final simplification85.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.8e-13)
(+ x (/ y (+ 0.31942702700572795 (/ 3.7269864963038164 z))))
(if (<= z 680000000000.0)
(+ x (* (* y b) 1.6453555072203998))
(+ x (/ y 0.31942702700572795)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.8e-13) {
tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z)));
} else if (z <= 680000000000.0) {
tmp = x + ((y * b) * 1.6453555072203998);
} else {
tmp = x + (y / 0.31942702700572795);
}
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 <= (-3.8d-13)) then
tmp = x + (y / (0.31942702700572795d0 + (3.7269864963038164d0 / z)))
else if (z <= 680000000000.0d0) then
tmp = x + ((y * b) * 1.6453555072203998d0)
else
tmp = x + (y / 0.31942702700572795d0)
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 <= -3.8e-13) {
tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z)));
} else if (z <= 680000000000.0) {
tmp = x + ((y * b) * 1.6453555072203998);
} else {
tmp = x + (y / 0.31942702700572795);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.8e-13: tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z))) elif z <= 680000000000.0: tmp = x + ((y * b) * 1.6453555072203998) else: tmp = x + (y / 0.31942702700572795) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.8e-13) tmp = Float64(x + Float64(y / Float64(0.31942702700572795 + Float64(3.7269864963038164 / z)))); elseif (z <= 680000000000.0) tmp = Float64(x + Float64(Float64(y * b) * 1.6453555072203998)); else tmp = Float64(x + Float64(y / 0.31942702700572795)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.8e-13) tmp = x + (y / (0.31942702700572795 + (3.7269864963038164 / z))); elseif (z <= 680000000000.0) tmp = x + ((y * b) * 1.6453555072203998); else tmp = x + (y / 0.31942702700572795); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.8e-13], N[(x + N[(y / N[(0.31942702700572795 + N[(3.7269864963038164 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 680000000000.0], N[(x + N[(N[(y * b), $MachinePrecision] * 1.6453555072203998), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{-13}:\\
\;\;\;\;x + \frac{y}{0.31942702700572795 + \frac{3.7269864963038164}{z}}\\
\mathbf{elif}\;z \leq 680000000000:\\
\;\;\;\;x + \left(y \cdot b\right) \cdot 1.6453555072203998\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\end{array}
\end{array}
if z < -3.8e-13Initial program 17.9%
associate-/l*20.6%
fma-def20.6%
fma-def20.6%
fma-def20.6%
fma-def20.6%
fma-def20.6%
fma-def20.6%
fma-def20.6%
Simplified20.6%
Taylor expanded in z around inf 90.4%
associate-*r/90.4%
metadata-eval90.4%
Simplified90.4%
if -3.8e-13 < z < 6.8e11Initial program 99.7%
associate-*l/99.6%
*-commutative99.6%
fma-def99.6%
*-commutative99.6%
fma-def99.6%
*-commutative99.6%
fma-def99.6%
*-commutative99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in z around 0 79.9%
if 6.8e11 < z Initial program 17.8%
associate-/l*19.3%
fma-def19.3%
fma-def19.3%
fma-def19.3%
fma-def19.3%
fma-def19.3%
fma-def19.3%
fma-def19.3%
Simplified19.3%
Taylor expanded in z around inf 92.2%
Final simplification85.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.5e+17) (not (<= z 5e-53))) (+ x (/ y 0.31942702700572795)) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.5e+17) || !(z <= 5e-53)) {
tmp = x + (y / 0.31942702700572795);
} 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 <= (-3.5d+17)) .or. (.not. (z <= 5d-53))) then
tmp = x + (y / 0.31942702700572795d0)
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 <= -3.5e+17) || !(z <= 5e-53)) {
tmp = x + (y / 0.31942702700572795);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.5e+17) or not (z <= 5e-53): tmp = x + (y / 0.31942702700572795) else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.5e+17) || !(z <= 5e-53)) tmp = Float64(x + Float64(y / 0.31942702700572795)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.5e+17) || ~((z <= 5e-53))) tmp = x + (y / 0.31942702700572795); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.5e+17], N[Not[LessEqual[z, 5e-53]], $MachinePrecision]], N[(x + N[(y / 0.31942702700572795), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+17} \lor \neg \left(z \leq 5 \cdot 10^{-53}\right):\\
\;\;\;\;x + \frac{y}{0.31942702700572795}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -3.5e17 or 5e-53 < z Initial program 21.7%
associate-/l*23.1%
fma-def23.1%
fma-def23.1%
fma-def23.1%
fma-def23.1%
fma-def23.1%
fma-def23.1%
fma-def23.1%
Simplified23.1%
Taylor expanded in z around inf 89.9%
if -3.5e17 < z < 5e-53Initial program 99.0%
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 z around inf 31.7%
Taylor expanded in x around inf 38.5%
Final simplification64.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.4e+83) (not (<= y 1.45e-65))) (* y 3.13060547623) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.4e+83) || !(y <= 1.45e-65)) {
tmp = y * 3.13060547623;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-4.4d+83)) .or. (.not. (y <= 1.45d-65))) then
tmp = y * 3.13060547623d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.4e+83) || !(y <= 1.45e-65)) {
tmp = y * 3.13060547623;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.4e+83) or not (y <= 1.45e-65): tmp = y * 3.13060547623 else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.4e+83) || !(y <= 1.45e-65)) tmp = Float64(y * 3.13060547623); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.4e+83) || ~((y <= 1.45e-65))) tmp = y * 3.13060547623; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.4e+83], N[Not[LessEqual[y, 1.45e-65]], $MachinePrecision]], N[(y * 3.13060547623), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+83} \lor \neg \left(y \leq 1.45 \cdot 10^{-65}\right):\\
\;\;\;\;y \cdot 3.13060547623\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -4.39999999999999997e83 or 1.4499999999999999e-65 < y Initial program 55.7%
associate-/l*57.9%
fma-def57.9%
fma-def57.9%
fma-def57.9%
fma-def57.9%
fma-def57.9%
fma-def57.9%
fma-def57.9%
Simplified57.9%
Taylor expanded in z around inf 52.7%
flip-+22.6%
div-inv22.6%
metadata-eval22.6%
div-inv22.6%
metadata-eval22.6%
div-inv22.6%
metadata-eval22.6%
Applied egg-rr22.6%
swap-sqr22.5%
metadata-eval22.5%
Simplified22.5%
Taylor expanded in x around 0 37.1%
*-commutative37.1%
Simplified37.1%
if -4.39999999999999997e83 < y < 1.4499999999999999e-65Initial program 63.3%
associate-/l*63.3%
fma-def63.3%
fma-def63.3%
fma-def63.3%
fma-def63.3%
fma-def63.3%
fma-def63.3%
fma-def63.3%
Simplified63.3%
Taylor expanded in z around inf 68.7%
Taylor expanded in x around inf 65.0%
Final simplification52.0%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 59.8%
associate-/l*60.8%
fma-def60.8%
fma-def60.8%
fma-def60.8%
fma-def60.8%
fma-def60.8%
fma-def60.8%
fma-def60.8%
Simplified60.8%
Taylor expanded in z around inf 61.2%
Taylor expanded in x around inf 44.0%
Final simplification44.0%
(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 2023229
(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))))