
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z)))
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
INFINITY)
(+
x
(*
y
(/
(fma
(/
(- 0.24180012482592123 (* (pow z 2.0) 0.004801250986110448))
(- 0.4917317610505968 (* z 0.0692910599291889)))
z
0.279195317918525)
(fma (+ z 6.012459259764103) z 3.350343815022304))))
(+
x
(/
(* y (- 0.004801250986110448 (pow t_0 2.0)))
(+ 0.0692910599291889 t_0))))))
double code(double x, double y, double z) {
double t_0 = ((0.4046220386999212 / z) + -0.07512208616047561) / z;
double tmp;
if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= ((double) INFINITY)) {
tmp = x + (y * (fma(((0.24180012482592123 - (pow(z, 2.0) * 0.004801250986110448)) / (0.4917317610505968 - (z * 0.0692910599291889))), z, 0.279195317918525) / fma((z + 6.012459259764103), z, 3.350343815022304)));
} else {
tmp = x + ((y * (0.004801250986110448 - pow(t_0, 2.0))) / (0.0692910599291889 + t_0));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= Inf) tmp = Float64(x + Float64(y * Float64(fma(Float64(Float64(0.24180012482592123 - Float64((z ^ 2.0) * 0.004801250986110448)) / Float64(0.4917317610505968 - Float64(z * 0.0692910599291889))), z, 0.279195317918525) / fma(Float64(z + 6.012459259764103), z, 3.350343815022304)))); else tmp = Float64(x + Float64(Float64(y * Float64(0.004801250986110448 - (t_0 ^ 2.0))) / Float64(0.0692910599291889 + t_0))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], Infinity], N[(x + N[(y * N[(N[(N[(N[(0.24180012482592123 - N[(N[Power[z, 2.0], $MachinePrecision] * 0.004801250986110448), $MachinePrecision]), $MachinePrecision] / N[(0.4917317610505968 - N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z + 0.279195317918525), $MachinePrecision] / N[(N[(z + 6.012459259764103), $MachinePrecision] * z + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(0.004801250986110448 - N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0692910599291889 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\\
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq \infty:\\
\;\;\;\;x + y \cdot \frac{\mathsf{fma}\left(\frac{0.24180012482592123 - {z}^{2} \cdot 0.004801250986110448}{0.4917317610505968 - z \cdot 0.0692910599291889}, z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(0.004801250986110448 - {t\_0}^{2}\right)}{0.0692910599291889 + t\_0}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < +inf.0Initial program 95.2%
remove-double-neg95.2%
associate-/l*99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
fma-define99.8%
+-commutative99.8%
flip-+99.8%
metadata-eval99.8%
swap-sqr99.7%
pow299.7%
metadata-eval99.8%
Applied egg-rr99.8%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.0%
remove-double-neg0.0%
associate-/l*0.0%
distribute-rgt-neg-in0.0%
distribute-lft-neg-in0.0%
distribute-lft-neg-in0.0%
distribute-rgt-neg-in0.0%
remove-double-neg0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
Simplified0.0%
Taylor expanded in z around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
sub-neg99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
flip--99.6%
metadata-eval99.2%
pow299.2%
Applied egg-rr99.2%
associate-*r/99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z)))
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
INFINITY)
(+
x
(*
y
(/
(fma (fma z 0.0692910599291889 0.4917317610505968) z 0.279195317918525)
(fma (+ z 6.012459259764103) z 3.350343815022304))))
(+
x
(/
(* y (- 0.004801250986110448 (pow t_0 2.0)))
(+ 0.0692910599291889 t_0))))))
double code(double x, double y, double z) {
double t_0 = ((0.4046220386999212 / z) + -0.07512208616047561) / z;
double tmp;
if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= ((double) INFINITY)) {
tmp = x + (y * (fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma((z + 6.012459259764103), z, 3.350343815022304)));
} else {
tmp = x + ((y * (0.004801250986110448 - pow(t_0, 2.0))) / (0.0692910599291889 + t_0));
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= Inf) tmp = Float64(x + Float64(y * Float64(fma(fma(z, 0.0692910599291889, 0.4917317610505968), z, 0.279195317918525) / fma(Float64(z + 6.012459259764103), z, 3.350343815022304)))); else tmp = Float64(x + Float64(Float64(y * Float64(0.004801250986110448 - (t_0 ^ 2.0))) / Float64(0.0692910599291889 + t_0))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], Infinity], N[(x + N[(y * N[(N[(N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] * z + 0.279195317918525), $MachinePrecision] / N[(N[(z + 6.012459259764103), $MachinePrecision] * z + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(0.004801250986110448 - N[Power[t$95$0, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0692910599291889 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\\
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq \infty:\\
\;\;\;\;x + y \cdot \frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(z + 6.012459259764103, z, 3.350343815022304\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(0.004801250986110448 - {t\_0}^{2}\right)}{0.0692910599291889 + t\_0}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < +inf.0Initial program 95.2%
remove-double-neg95.2%
associate-/l*99.8%
distribute-rgt-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
if +inf.0 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.0%
remove-double-neg0.0%
associate-/l*0.0%
distribute-rgt-neg-in0.0%
distribute-lft-neg-in0.0%
distribute-lft-neg-in0.0%
distribute-rgt-neg-in0.0%
remove-double-neg0.0%
fma-define0.0%
fma-define0.0%
fma-define0.0%
Simplified0.0%
Taylor expanded in z around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
sub-neg99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
flip--99.6%
metadata-eval99.2%
pow299.2%
Applied egg-rr99.2%
associate-*r/99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
(t_1
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(t_2 (/ (* y t_1) t_0))
(t_3 (/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z)))
(if (<= t_2 -100.0)
(* y (+ (/ x y) (/ t_1 t_0)))
(if (<= t_2 2e+295)
(+ t_2 x)
(+
x
(/
(* y (- 0.004801250986110448 (pow t_3 2.0)))
(+ 0.0692910599291889 t_3)))))))
double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525;
double t_2 = (y * t_1) / t_0;
double t_3 = ((0.4046220386999212 / z) + -0.07512208616047561) / z;
double tmp;
if (t_2 <= -100.0) {
tmp = y * ((x / y) + (t_1 / t_0));
} else if (t_2 <= 2e+295) {
tmp = t_2 + x;
} else {
tmp = x + ((y * (0.004801250986110448 - pow(t_3, 2.0))) / (0.0692910599291889 + t_3));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_0 = (z * (z + 6.012459259764103d0)) + 3.350343815022304d0
t_1 = (z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0
t_2 = (y * t_1) / t_0
t_3 = ((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z
if (t_2 <= (-100.0d0)) then
tmp = y * ((x / y) + (t_1 / t_0))
else if (t_2 <= 2d+295) then
tmp = t_2 + x
else
tmp = x + ((y * (0.004801250986110448d0 - (t_3 ** 2.0d0))) / (0.0692910599291889d0 + t_3))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525;
double t_2 = (y * t_1) / t_0;
double t_3 = ((0.4046220386999212 / z) + -0.07512208616047561) / z;
double tmp;
if (t_2 <= -100.0) {
tmp = y * ((x / y) + (t_1 / t_0));
} else if (t_2 <= 2e+295) {
tmp = t_2 + x;
} else {
tmp = x + ((y * (0.004801250986110448 - Math.pow(t_3, 2.0))) / (0.0692910599291889 + t_3));
}
return tmp;
}
def code(x, y, z): t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304 t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525 t_2 = (y * t_1) / t_0 t_3 = ((0.4046220386999212 / z) + -0.07512208616047561) / z tmp = 0 if t_2 <= -100.0: tmp = y * ((x / y) + (t_1 / t_0)) elif t_2 <= 2e+295: tmp = t_2 + x else: tmp = x + ((y * (0.004801250986110448 - math.pow(t_3, 2.0))) / (0.0692910599291889 + t_3)) return tmp
function code(x, y, z) t_0 = Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304) t_1 = Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525) t_2 = Float64(Float64(y * t_1) / t_0) t_3 = Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z) tmp = 0.0 if (t_2 <= -100.0) tmp = Float64(y * Float64(Float64(x / y) + Float64(t_1 / t_0))); elseif (t_2 <= 2e+295) tmp = Float64(t_2 + x); else tmp = Float64(x + Float64(Float64(y * Float64(0.004801250986110448 - (t_3 ^ 2.0))) / Float64(0.0692910599291889 + t_3))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304; t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525; t_2 = (y * t_1) / t_0; t_3 = ((0.4046220386999212 / z) + -0.07512208616047561) / z; tmp = 0.0; if (t_2 <= -100.0) tmp = y * ((x / y) + (t_1 / t_0)); elseif (t_2 <= 2e+295) tmp = t_2 + x; else tmp = x + ((y * (0.004801250986110448 - (t_3 ^ 2.0))) / (0.0692910599291889 + t_3)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]}, Block[{t$95$1 = N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$2, -100.0], N[(y * N[(N[(x / y), $MachinePrecision] + N[(t$95$1 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+295], N[(t$95$2 + x), $MachinePrecision], N[(x + N[(N[(y * N[(0.004801250986110448 - N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(0.0692910599291889 + t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\\
t_1 := z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\\
t_2 := \frac{y \cdot t\_1}{t\_0}\\
t_3 := \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\\
\mathbf{if}\;t\_2 \leq -100:\\
\;\;\;\;y \cdot \left(\frac{x}{y} + \frac{t\_1}{t\_0}\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;t\_2 + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(0.004801250986110448 - {t\_3}^{2}\right)}{0.0692910599291889 + t\_3}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < -100Initial program 87.6%
+-commutative87.6%
*-commutative87.6%
associate-/l*99.4%
fma-define99.4%
*-commutative99.4%
fma-define99.4%
fma-define99.4%
*-commutative99.4%
fma-define99.4%
Simplified99.4%
Taylor expanded in y around -inf 99.6%
if -100 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 2e295Initial program 99.7%
if 2e295 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.2%
remove-double-neg0.2%
associate-/l*2.8%
distribute-rgt-neg-in2.8%
distribute-lft-neg-in2.8%
distribute-lft-neg-in2.8%
distribute-rgt-neg-in2.8%
remove-double-neg2.8%
fma-define2.8%
fma-define2.8%
fma-define2.8%
Simplified2.8%
Taylor expanded in z around -inf 99.6%
mul-1-neg99.6%
unsub-neg99.6%
sub-neg99.6%
associate-*r/99.6%
metadata-eval99.6%
metadata-eval99.6%
Simplified99.6%
flip--99.6%
metadata-eval99.2%
pow299.2%
Applied egg-rr99.2%
associate-*r/99.6%
Applied egg-rr99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
(t_1
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(t_2 (/ (* y t_1) t_0)))
(if (<= t_2 -100.0)
(* y (+ (/ x y) (/ t_1 t_0)))
(if (<= t_2 2e+295) (+ t_2 x) (+ x (* y 0.0692910599291889))))))
double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525;
double t_2 = (y * t_1) / t_0;
double tmp;
if (t_2 <= -100.0) {
tmp = y * ((x / y) + (t_1 / t_0));
} else if (t_2 <= 2e+295) {
tmp = t_2 + x;
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (z * (z + 6.012459259764103d0)) + 3.350343815022304d0
t_1 = (z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0
t_2 = (y * t_1) / t_0
if (t_2 <= (-100.0d0)) then
tmp = y * ((x / y) + (t_1 / t_0))
else if (t_2 <= 2d+295) then
tmp = t_2 + x
else
tmp = x + (y * 0.0692910599291889d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525;
double t_2 = (y * t_1) / t_0;
double tmp;
if (t_2 <= -100.0) {
tmp = y * ((x / y) + (t_1 / t_0));
} else if (t_2 <= 2e+295) {
tmp = t_2 + x;
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304 t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525 t_2 = (y * t_1) / t_0 tmp = 0 if t_2 <= -100.0: tmp = y * ((x / y) + (t_1 / t_0)) elif t_2 <= 2e+295: tmp = t_2 + x else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) t_0 = Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304) t_1 = Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525) t_2 = Float64(Float64(y * t_1) / t_0) tmp = 0.0 if (t_2 <= -100.0) tmp = Float64(y * Float64(Float64(x / y) + Float64(t_1 / t_0))); elseif (t_2 <= 2e+295) tmp = Float64(t_2 + x); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304; t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525; t_2 = (y * t_1) / t_0; tmp = 0.0; if (t_2 <= -100.0) tmp = y * ((x / y) + (t_1 / t_0)); elseif (t_2 <= 2e+295) tmp = t_2 + x; else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]}, Block[{t$95$1 = N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[t$95$2, -100.0], N[(y * N[(N[(x / y), $MachinePrecision] + N[(t$95$1 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+295], N[(t$95$2 + x), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\\
t_1 := z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\\
t_2 := \frac{y \cdot t\_1}{t\_0}\\
\mathbf{if}\;t\_2 \leq -100:\\
\;\;\;\;y \cdot \left(\frac{x}{y} + \frac{t\_1}{t\_0}\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;t\_2 + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < -100Initial program 87.6%
+-commutative87.6%
*-commutative87.6%
associate-/l*99.4%
fma-define99.4%
*-commutative99.4%
fma-define99.4%
fma-define99.4%
*-commutative99.4%
fma-define99.4%
Simplified99.4%
Taylor expanded in y around -inf 99.6%
if -100 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) < 2e295Initial program 99.7%
if 2e295 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.2%
+-commutative0.2%
*-commutative0.2%
associate-/l*2.9%
fma-define2.9%
*-commutative2.9%
fma-define2.9%
fma-define2.9%
*-commutative2.9%
fma-define2.9%
Simplified2.9%
Taylor expanded in z around inf 99.6%
+-commutative99.6%
*-commutative99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (or (<= z -4.6e+32) (not (<= z 1.3e+16)))
(+ x (* y 0.0692910599291889))
(+
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -4.6e+32) || !(z <= 1.3e+16)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-4.6d+32)) .or. (.not. (z <= 1.3d+16))) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)) + x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -4.6e+32) || !(z <= 1.3e+16)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -4.6e+32) or not (z <= 1.3e+16): tmp = x + (y * 0.0692910599291889) else: tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -4.6e+32) || !(z <= 1.3e+16)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) + x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -4.6e+32) || ~((z <= 1.3e+16))) tmp = x + (y * 0.0692910599291889); else tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -4.6e+32], N[Not[LessEqual[z, 1.3e+16]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+32} \lor \neg \left(z \leq 1.3 \cdot 10^{+16}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} + x\\
\end{array}
\end{array}
if z < -4.5999999999999999e32 or 1.3e16 < z Initial program 34.6%
+-commutative34.6%
*-commutative34.6%
associate-/l*39.8%
fma-define39.8%
*-commutative39.8%
fma-define39.8%
fma-define39.8%
*-commutative39.8%
fma-define39.8%
Simplified39.8%
Taylor expanded in z around inf 99.6%
+-commutative99.6%
*-commutative99.6%
Simplified99.6%
if -4.5999999999999999e32 < z < 1.3e16Initial program 99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= z -800.0)
(+
x
(*
y
(-
0.0692910599291889
(/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z))))
(if (<= z 3.1)
(+
x
(*
y
(+
0.08333333333333323
(*
z
(-
(* z (+ 0.0007936505811533442 (* z -0.0005951669793454025)))
0.00277777777751721)))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -800.0) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (z <= 3.1) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-800.0d0)) then
tmp = x + (y * (0.0692910599291889d0 - (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
else if (z <= 3.1d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * (0.0007936505811533442d0 + (z * (-0.0005951669793454025d0)))) - 0.00277777777751721d0))))
else
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -800.0) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (z <= 3.1) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721))));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -800.0: tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))) elif z <= 3.1: tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721)))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -800.0) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z)))); elseif (z <= 3.1) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * Float64(0.0007936505811533442 + Float64(z * -0.0005951669793454025))) - 0.00277777777751721))))); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -800.0) tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))); elseif (z <= 3.1) tmp = x + (y * (0.08333333333333323 + (z * ((z * (0.0007936505811533442 + (z * -0.0005951669793454025))) - 0.00277777777751721)))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -800.0], N[(x + N[(y * N[(0.0692910599291889 - N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * N[(0.0007936505811533442 + N[(z * -0.0005951669793454025), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -800:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 3.1:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot \left(0.0007936505811533442 + z \cdot -0.0005951669793454025\right) - 0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -800Initial program 41.7%
remove-double-neg41.7%
associate-/l*49.0%
distribute-rgt-neg-in49.0%
distribute-lft-neg-in49.0%
distribute-lft-neg-in49.0%
distribute-rgt-neg-in49.0%
remove-double-neg49.0%
fma-define49.0%
fma-define49.0%
fma-define49.0%
Simplified49.0%
Taylor expanded in z around -inf 99.1%
mul-1-neg99.1%
unsub-neg99.1%
sub-neg99.1%
associate-*r/99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
if -800 < z < 3.10000000000000009Initial program 99.7%
remove-double-neg99.7%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 99.8%
if 3.10000000000000009 < z Initial program 36.7%
remove-double-neg36.7%
associate-/l*42.6%
distribute-rgt-neg-in42.6%
distribute-lft-neg-in42.6%
distribute-lft-neg-in42.6%
distribute-rgt-neg-in42.6%
remove-double-neg42.6%
fma-define42.6%
fma-define42.6%
fma-define42.6%
Simplified42.6%
Taylor expanded in z around inf 98.4%
associate-*r/98.4%
metadata-eval98.4%
Simplified98.4%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (or (<= z -800.0) (not (<= z 4.4)))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z))))
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -800.0) || !(z <= 4.4)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-800.0d0)) .or. (.not. (z <= 4.4d0))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -800.0) || !(z <= 4.4)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -800.0) or not (z <= 4.4): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -800.0) || !(z <= 4.4)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -800.0) || ~((z <= 4.4))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -800.0], N[Not[LessEqual[z, 4.4]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * 0.0007936505811533442), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -800 \lor \neg \left(z \leq 4.4\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\
\end{array}
\end{array}
if z < -800 or 4.4000000000000004 < z Initial program 39.2%
remove-double-neg39.2%
associate-/l*45.8%
distribute-rgt-neg-in45.8%
distribute-lft-neg-in45.8%
distribute-lft-neg-in45.8%
distribute-rgt-neg-in45.8%
remove-double-neg45.8%
fma-define45.8%
fma-define45.8%
fma-define45.8%
Simplified45.8%
Taylor expanded in z around inf 98.6%
associate-*r/98.6%
metadata-eval98.6%
Simplified98.6%
if -800 < z < 4.4000000000000004Initial program 99.7%
remove-double-neg99.7%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 99.6%
Final simplification99.1%
(FPCore (x y z)
:precision binary64
(if (<= z -800.0)
(+
x
(*
y
(-
0.0692910599291889
(/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z))))
(if (<= z 4.4)
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -800.0) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (z <= 4.4) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-800.0d0)) then
tmp = x + (y * (0.0692910599291889d0 - (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
else if (z <= 4.4d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
else
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -800.0) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (z <= 4.4) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -800.0: tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))) elif z <= 4.4: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -800.0) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z)))); elseif (z <= 4.4) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721))))); else tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -800.0) tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))); elseif (z <= 4.4) tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -800.0], N[(x + N[(y * N[(0.0692910599291889 - N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4], N[(x + N[(y * N[(0.08333333333333323 + N[(z * N[(N[(z * 0.0007936505811533442), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -800:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 4.4:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -800Initial program 41.7%
remove-double-neg41.7%
associate-/l*49.0%
distribute-rgt-neg-in49.0%
distribute-lft-neg-in49.0%
distribute-lft-neg-in49.0%
distribute-rgt-neg-in49.0%
remove-double-neg49.0%
fma-define49.0%
fma-define49.0%
fma-define49.0%
Simplified49.0%
Taylor expanded in z around -inf 99.1%
mul-1-neg99.1%
unsub-neg99.1%
sub-neg99.1%
associate-*r/99.1%
metadata-eval99.1%
metadata-eval99.1%
Simplified99.1%
if -800 < z < 4.4000000000000004Initial program 99.7%
remove-double-neg99.7%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 99.6%
if 4.4000000000000004 < z Initial program 36.7%
remove-double-neg36.7%
associate-/l*42.6%
distribute-rgt-neg-in42.6%
distribute-lft-neg-in42.6%
distribute-lft-neg-in42.6%
distribute-rgt-neg-in42.6%
remove-double-neg42.6%
fma-define42.6%
fma-define42.6%
fma-define42.6%
Simplified42.6%
Taylor expanded in z around inf 98.4%
associate-*r/98.4%
metadata-eval98.4%
Simplified98.4%
Final simplification99.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -800.0) (not (<= z 5.0))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (+ (* -0.00277777777751721 (* y z)) (* y 0.08333333333333323)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -800.0) || !(z <= 5.0)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + ((-0.00277777777751721 * (y * z)) + (y * 0.08333333333333323));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-800.0d0)) .or. (.not. (z <= 5.0d0))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (((-0.00277777777751721d0) * (y * z)) + (y * 0.08333333333333323d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -800.0) || !(z <= 5.0)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + ((-0.00277777777751721 * (y * z)) + (y * 0.08333333333333323));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -800.0) or not (z <= 5.0): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + ((-0.00277777777751721 * (y * z)) + (y * 0.08333333333333323)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -800.0) || !(z <= 5.0)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(Float64(-0.00277777777751721 * Float64(y * z)) + Float64(y * 0.08333333333333323))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -800.0) || ~((z <= 5.0))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + ((-0.00277777777751721 * (y * z)) + (y * 0.08333333333333323)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -800.0], N[Not[LessEqual[z, 5.0]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-0.00277777777751721 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -800 \lor \neg \left(z \leq 5\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(-0.00277777777751721 \cdot \left(y \cdot z\right) + y \cdot 0.08333333333333323\right)\\
\end{array}
\end{array}
if z < -800 or 5 < z Initial program 39.2%
remove-double-neg39.2%
associate-/l*45.8%
distribute-rgt-neg-in45.8%
distribute-lft-neg-in45.8%
distribute-lft-neg-in45.8%
distribute-rgt-neg-in45.8%
remove-double-neg45.8%
fma-define45.8%
fma-define45.8%
fma-define45.8%
Simplified45.8%
Taylor expanded in z around inf 98.6%
associate-*r/98.6%
metadata-eval98.6%
Simplified98.6%
if -800 < z < 5Initial program 99.7%
remove-double-neg99.7%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 99.6%
Taylor expanded in z around 0 99.4%
Final simplification99.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -800.0) (not (<= z 5.2))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -800.0) || !(z <= 5.2)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-800.0d0)) .or. (.not. (z <= 5.2d0))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -800.0) || !(z <= 5.2)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -800.0) or not (z <= 5.2): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -800.0) || !(z <= 5.2)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -800.0) || ~((z <= 5.2))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -800.0], N[Not[LessEqual[z, 5.2]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -800 \lor \neg \left(z \leq 5.2\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\end{array}
\end{array}
if z < -800 or 5.20000000000000018 < z Initial program 39.2%
remove-double-neg39.2%
associate-/l*45.8%
distribute-rgt-neg-in45.8%
distribute-lft-neg-in45.8%
distribute-lft-neg-in45.8%
distribute-rgt-neg-in45.8%
remove-double-neg45.8%
fma-define45.8%
fma-define45.8%
fma-define45.8%
Simplified45.8%
Taylor expanded in z around inf 98.6%
associate-*r/98.6%
metadata-eval98.6%
Simplified98.6%
if -800 < z < 5.20000000000000018Initial program 99.7%
remove-double-neg99.7%
associate-/l*99.9%
distribute-rgt-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-lft-neg-in99.9%
distribute-rgt-neg-in99.9%
remove-double-neg99.9%
fma-define99.9%
fma-define99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 99.4%
*-commutative99.4%
Simplified99.4%
Final simplification99.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -800.0) (not (<= z 5.3))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -800.0) || !(z <= 5.3)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-800.0d0)) .or. (.not. (z <= 5.3d0))) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else
tmp = x + (y * 0.08333333333333323d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -800.0) || !(z <= 5.3)) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -800.0) or not (z <= 5.3): tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -800.0) || !(z <= 5.3)) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); else tmp = Float64(x + Float64(y * 0.08333333333333323)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -800.0) || ~((z <= 5.3))) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -800.0], N[Not[LessEqual[z, 5.3]], $MachinePrecision]], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -800 \lor \neg \left(z \leq 5.3\right):\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -800 or 5.29999999999999982 < z Initial program 38.7%
remove-double-neg38.7%
associate-/l*45.4%
distribute-rgt-neg-in45.4%
distribute-lft-neg-in45.4%
distribute-lft-neg-in45.4%
distribute-rgt-neg-in45.4%
remove-double-neg45.4%
fma-define45.4%
fma-define45.4%
fma-define45.4%
Simplified45.4%
Taylor expanded in z around inf 99.2%
associate-*r/99.2%
metadata-eval99.2%
Simplified99.2%
if -800 < z < 5.29999999999999982Initial program 99.7%
+-commutative99.7%
*-commutative99.7%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around 0 98.3%
+-commutative98.3%
*-commutative98.3%
Simplified98.3%
Final simplification98.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -800.0) (not (<= z 6.0))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -800.0) || !(z <= 6.0)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-800.0d0)) .or. (.not. (z <= 6.0d0))) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = x + (y * 0.08333333333333323d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -800.0) || !(z <= 6.0)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -800.0) or not (z <= 6.0): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -800.0) || !(z <= 6.0)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(x + Float64(y * 0.08333333333333323)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -800.0) || ~((z <= 6.0))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -800.0], N[Not[LessEqual[z, 6.0]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -800 \lor \neg \left(z \leq 6\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -800 or 6 < z Initial program 38.7%
+-commutative38.7%
*-commutative38.7%
associate-/l*43.6%
fma-define43.6%
*-commutative43.6%
fma-define43.6%
fma-define43.6%
*-commutative43.6%
fma-define43.6%
Simplified43.6%
Taylor expanded in z around inf 98.9%
+-commutative98.9%
*-commutative98.9%
Simplified98.9%
if -800 < z < 6Initial program 99.7%
+-commutative99.7%
*-commutative99.7%
associate-/l*99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
Taylor expanded in z around 0 98.3%
+-commutative98.3%
*-commutative98.3%
Simplified98.3%
Final simplification98.6%
(FPCore (x y z) :precision binary64 (if (or (<= z 1.05e-271) (not (<= z 8.8e-91))) (+ x (* y 0.0692910599291889)) (* y 0.08333333333333323)))
double code(double x, double y, double z) {
double tmp;
if ((z <= 1.05e-271) || !(z <= 8.8e-91)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= 1.05d-271) .or. (.not. (z <= 8.8d-91))) then
tmp = x + (y * 0.0692910599291889d0)
else
tmp = y * 0.08333333333333323d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= 1.05e-271) || !(z <= 8.8e-91)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = y * 0.08333333333333323;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= 1.05e-271) or not (z <= 8.8e-91): tmp = x + (y * 0.0692910599291889) else: tmp = y * 0.08333333333333323 return tmp
function code(x, y, z) tmp = 0.0 if ((z <= 1.05e-271) || !(z <= 8.8e-91)) tmp = Float64(x + Float64(y * 0.0692910599291889)); else tmp = Float64(y * 0.08333333333333323); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= 1.05e-271) || ~((z <= 8.8e-91))) tmp = x + (y * 0.0692910599291889); else tmp = y * 0.08333333333333323; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, 1.05e-271], N[Not[LessEqual[z, 8.8e-91]], $MachinePrecision]], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], N[(y * 0.08333333333333323), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.05 \cdot 10^{-271} \lor \neg \left(z \leq 8.8 \cdot 10^{-91}\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < 1.05e-271 or 8.8000000000000003e-91 < z Initial program 64.1%
+-commutative64.1%
*-commutative64.1%
associate-/l*67.0%
fma-define67.0%
*-commutative67.0%
fma-define67.0%
fma-define67.0%
*-commutative67.0%
fma-define67.0%
Simplified67.0%
Taylor expanded in z around inf 84.4%
+-commutative84.4%
*-commutative84.4%
Simplified84.4%
if 1.05e-271 < z < 8.8000000000000003e-91Initial program 99.4%
+-commutative99.4%
*-commutative99.4%
associate-/l*99.5%
fma-define99.5%
*-commutative99.5%
fma-define99.5%
fma-define99.5%
*-commutative99.5%
fma-define99.5%
Simplified99.5%
Taylor expanded in z around 0 99.8%
+-commutative99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 88.3%
Taylor expanded in x around 0 75.0%
*-commutative75.0%
Simplified75.0%
Final simplification82.9%
(FPCore (x y z) :precision binary64 (if (or (<= y -1360.0) (not (<= y 8e+29))) (* y 0.08333333333333323) x))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1360.0) || !(y <= 8e+29)) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-1360.0d0)) .or. (.not. (y <= 8d+29))) then
tmp = y * 0.08333333333333323d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1360.0) || !(y <= 8e+29)) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1360.0) or not (y <= 8e+29): tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1360.0) || !(y <= 8e+29)) tmp = Float64(y * 0.08333333333333323); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1360.0) || ~((y <= 8e+29))) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1360.0], N[Not[LessEqual[y, 8e+29]], $MachinePrecision]], N[(y * 0.08333333333333323), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1360 \lor \neg \left(y \leq 8 \cdot 10^{+29}\right):\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1360 or 7.99999999999999931e29 < y Initial program 66.2%
+-commutative66.2%
*-commutative66.2%
associate-/l*72.8%
fma-define72.8%
*-commutative72.8%
fma-define72.8%
fma-define72.8%
*-commutative72.8%
fma-define72.8%
Simplified72.8%
Taylor expanded in z around 0 67.5%
+-commutative67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in x around inf 56.1%
Taylor expanded in x around 0 48.2%
*-commutative48.2%
Simplified48.2%
if -1360 < y < 7.99999999999999931e29Initial program 73.5%
+-commutative73.5%
*-commutative73.5%
associate-/l*71.8%
fma-define71.8%
*-commutative71.8%
fma-define71.8%
fma-define71.8%
*-commutative71.8%
fma-define71.8%
Simplified71.8%
Taylor expanded in y around 0 70.3%
Final simplification59.3%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 69.9%
+-commutative69.9%
*-commutative69.9%
associate-/l*72.3%
fma-define72.3%
*-commutative72.3%
fma-define72.3%
fma-define72.3%
*-commutative72.3%
fma-define72.3%
Simplified72.3%
Taylor expanded in y around 0 45.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(-
(* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y)
(- (/ (* 0.40462203869992125 y) (* z z)) x))))
(if (< z -8120153.652456675)
t_0
(if (< z 6.576118972787377e+20)
(+
x
(*
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
t_0))))
double code(double x, double y, double z) {
double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
double tmp;
if (z < -8120153.652456675) {
tmp = t_0;
} else if (z < 6.576118972787377e+20) {
tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = (((0.07512208616047561d0 / z) + 0.0692910599291889d0) * y) - (((0.40462203869992125d0 * y) / (z * z)) - x)
if (z < (-8120153.652456675d0)) then
tmp = t_0
else if (z < 6.576118972787377d+20) then
tmp = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) * (1.0d0 / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0)))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x);
double tmp;
if (z < -8120153.652456675) {
tmp = t_0;
} else if (z < 6.576118972787377e+20) {
tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304)));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x) tmp = 0 if z < -8120153.652456675: tmp = t_0 elif z < 6.576118972787377e+20: tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304))) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(0.07512208616047561 / z) + 0.0692910599291889) * y) - Float64(Float64(Float64(0.40462203869992125 * y) / Float64(z * z)) - x)) tmp = 0.0 if (z < -8120153.652456675) tmp = t_0; elseif (z < 6.576118972787377e+20) tmp = Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * Float64(1.0 / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304)))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (((0.07512208616047561 / z) + 0.0692910599291889) * y) - (((0.40462203869992125 * y) / (z * z)) - x); tmp = 0.0; if (z < -8120153.652456675) tmp = t_0; elseif (z < 6.576118972787377e+20) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) * (1.0 / (((z + 6.012459259764103) * z) + 3.350343815022304))); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(0.07512208616047561 / z), $MachinePrecision] + 0.0692910599291889), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(0.40462203869992125 * y), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -8120153.652456675], t$95$0, If[Less[z, 6.576118972787377e+20], N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{0.07512208616047561}{z} + 0.0692910599291889\right) \cdot y - \left(\frac{0.40462203869992125 \cdot y}{z \cdot z} - x\right)\\
\mathbf{if}\;z < -8120153.652456675:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;z < 6.576118972787377 \cdot 10^{+20}:\\
\;\;\;\;x + \left(y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)\right) \cdot \frac{1}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
herbie shell --seed 2024141
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
:precision binary64
:alt
(! :herbie-platform default (if (< z -324806146098267/40000000) (- (* (+ (/ 7512208616047561/100000000000000000 z) 692910599291889/10000000000000000) y) (- (/ (* 323697630959937/800000000000000 y) (* z z)) x)) (if (< z 657611897278737700000) (+ x (* (* y (+ (* (+ (* z 692910599291889/10000000000000000) 307332350656623/625000000000000) z) 11167812716741/40000000000000)) (/ 1 (+ (* (+ z 6012459259764103/1000000000000000) z) 104698244219447/31250000000000)))) (- (* (+ (/ 7512208616047561/100000000000000000 z) 692910599291889/10000000000000000) y) (- (/ (* 323697630959937/800000000000000 y) (* z z)) x)))))
(+ x (/ (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))