
(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
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
4e+303)
(+
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.0692910599291889 (/ 0.07512208616047561 z))))))
double code(double x, double y, double z) {
double tmp;
if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 4e+303) {
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.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
function code(x, y, 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)) <= 4e+303) 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(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); end return tmp end
code[x_, y_, z_] := 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], 4e+303], 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[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\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 4 \cdot 10^{+303}:\\
\;\;\;\;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 + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\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))) < 4e303Initial program 96.1%
remove-double-neg96.1%
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.8%
pow299.8%
metadata-eval99.8%
Applied egg-rr99.8%
if 4e303 < (/.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.7%
remove-double-neg0.7%
associate-/l*12.6%
distribute-rgt-neg-in12.6%
distribute-lft-neg-in12.6%
distribute-lft-neg-in12.6%
distribute-rgt-neg-in12.6%
remove-double-neg12.6%
fma-define12.6%
fma-define12.6%
fma-define12.6%
Simplified12.6%
Taylor expanded in z around inf 99.7%
associate-*r/99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(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.0692910599291889))))
double code(double x, double y, double 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.0692910599291889);
}
return tmp;
}
function code(x, y, 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(y * 0.0692910599291889)); end return tmp end
code[x_, y_, z_] := 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[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\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 + 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))) < +inf.0Initial program 91.9%
remove-double-neg91.9%
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%
+-commutative0.0%
*-commutative0.0%
associate-/l*0.0%
fma-define0.0%
*-commutative0.0%
fma-define0.0%
fma-define0.0%
*-commutative0.0%
fma-define0.0%
Simplified0.0%
Taylor expanded in z around inf 99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(if (<= z -14000000.0)
(+
x
(*
y
(-
0.0692910599291889
(/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z))))
(if (<= z 30500000000.0)
(+
x
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+
3.350343815022304
(*
z
(/
(+ (pow z 3.0) 217.34839618538297)
(+ 36.1496663503231 (* z (- z 6.012459259764103))))))))
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -14000000.0) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (z <= 30500000000.0) {
tmp = x + ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / (3.350343815022304 + (z * ((pow(z, 3.0) + 217.34839618538297) / (36.1496663503231 + (z * (z - 6.012459259764103)))))));
} 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 <= (-14000000.0d0)) then
tmp = x + (y * (0.0692910599291889d0 - (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
else if (z <= 30500000000.0d0) then
tmp = x + ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / (3.350343815022304d0 + (z * (((z ** 3.0d0) + 217.34839618538297d0) / (36.1496663503231d0 + (z * (z - 6.012459259764103d0)))))))
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 <= -14000000.0) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (z <= 30500000000.0) {
tmp = x + ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / (3.350343815022304 + (z * ((Math.pow(z, 3.0) + 217.34839618538297) / (36.1496663503231 + (z * (z - 6.012459259764103)))))));
} else {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -14000000.0: tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))) elif z <= 30500000000.0: tmp = x + ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / (3.350343815022304 + (z * ((math.pow(z, 3.0) + 217.34839618538297) / (36.1496663503231 + (z * (z - 6.012459259764103))))))) else: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -14000000.0) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z)))); elseif (z <= 30500000000.0) tmp = Float64(x + Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(3.350343815022304 + Float64(z * Float64(Float64((z ^ 3.0) + 217.34839618538297) / Float64(36.1496663503231 + Float64(z * Float64(z - 6.012459259764103)))))))); 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 <= -14000000.0) tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))); elseif (z <= 30500000000.0) tmp = x + ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / (3.350343815022304 + (z * (((z ^ 3.0) + 217.34839618538297) / (36.1496663503231 + (z * (z - 6.012459259764103))))))); else tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -14000000.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, 30500000000.0], N[(x + N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(3.350343815022304 + N[(z * N[(N[(N[Power[z, 3.0], $MachinePrecision] + 217.34839618538297), $MachinePrecision] / N[(36.1496663503231 + N[(z * N[(z - 6.012459259764103), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -14000000:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 30500000000:\\
\;\;\;\;x + \frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{3.350343815022304 + z \cdot \frac{{z}^{3} + 217.34839618538297}{36.1496663503231 + z \cdot \left(z - 6.012459259764103\right)}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\end{array}
\end{array}
if z < -1.4e7Initial program 40.4%
remove-double-neg40.4%
associate-/l*49.1%
distribute-rgt-neg-in49.1%
distribute-lft-neg-in49.1%
distribute-lft-neg-in49.1%
distribute-rgt-neg-in49.1%
remove-double-neg49.1%
fma-define49.1%
fma-define49.1%
fma-define49.1%
Simplified49.1%
Taylor expanded in z around -inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
sub-neg99.7%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
if -1.4e7 < z < 3.05e10Initial program 99.6%
+-commutative99.6%
flip3-+99.7%
+-commutative99.7%
metadata-eval99.7%
metadata-eval99.7%
pow299.7%
*-commutative99.7%
Applied egg-rr99.7%
unpow299.7%
distribute-lft-out--99.7%
Simplified99.7%
if 3.05e10 < z Initial program 39.8%
remove-double-neg39.8%
associate-/l*54.4%
distribute-rgt-neg-in54.4%
distribute-lft-neg-in54.4%
distribute-lft-neg-in54.4%
distribute-rgt-neg-in54.4%
remove-double-neg54.4%
fma-define54.4%
fma-define54.4%
fma-define54.4%
Simplified54.4%
Taylor expanded in z around inf 99.7%
associate-*r/99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= z -2.1e+17)
(+ x (* y 0.0692910599291889))
(if (<= z 820.0)
(+
x
(/
(*
y
(+
0.279195317918525
(+ (* z (* z 0.0692910599291889)) (* z 0.4917317610505968))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304)))
(+ x (- (* y 0.0692910599291889) (* -0.07512208616047561 (/ y z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -2.1e+17) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 820.0) {
tmp = x + ((y * (0.279195317918525 + ((z * (z * 0.0692910599291889)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / 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 <= (-2.1d+17)) then
tmp = x + (y * 0.0692910599291889d0)
else if (z <= 820.0d0) then
tmp = x + ((y * (0.279195317918525d0 + ((z * (z * 0.0692910599291889d0)) + (z * 0.4917317610505968d0)))) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0))
else
tmp = x + ((y * 0.0692910599291889d0) - ((-0.07512208616047561d0) * (y / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -2.1e+17) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 820.0) {
tmp = x + ((y * (0.279195317918525 + ((z * (z * 0.0692910599291889)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -2.1e+17: tmp = x + (y * 0.0692910599291889) elif z <= 820.0: tmp = x + ((y * (0.279195317918525 + ((z * (z * 0.0692910599291889)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) else: tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -2.1e+17) tmp = Float64(x + Float64(y * 0.0692910599291889)); elseif (z <= 820.0) tmp = Float64(x + Float64(Float64(y * Float64(0.279195317918525 + Float64(Float64(z * Float64(z * 0.0692910599291889)) + Float64(z * 0.4917317610505968)))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304))); else tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(-0.07512208616047561 * Float64(y / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -2.1e+17) tmp = x + (y * 0.0692910599291889); elseif (z <= 820.0) tmp = x + ((y * (0.279195317918525 + ((z * (z * 0.0692910599291889)) + (z * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)); else tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -2.1e+17], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 820.0], N[(x + N[(N[(y * N[(0.279195317918525 + N[(N[(z * N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision] + N[(z * 0.4917317610505968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(-0.07512208616047561 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+17}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{elif}\;z \leq 820:\\
\;\;\;\;x + \frac{y \cdot \left(0.279195317918525 + \left(z \cdot \left(z \cdot 0.0692910599291889\right) + z \cdot 0.4917317610505968\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - -0.07512208616047561 \cdot \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -2.1e17Initial program 37.5%
+-commutative37.5%
*-commutative37.5%
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 99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
if -2.1e17 < z < 820Initial program 99.7%
*-commutative99.7%
distribute-rgt-in99.7%
Applied egg-rr99.7%
if 820 < z Initial program 41.6%
remove-double-neg41.6%
associate-/l*55.8%
distribute-rgt-neg-in55.8%
distribute-lft-neg-in55.8%
distribute-lft-neg-in55.8%
distribute-rgt-neg-in55.8%
remove-double-neg55.8%
fma-define55.8%
fma-define55.8%
fma-define55.8%
Simplified55.8%
Taylor expanded in z around -inf 99.7%
+-commutative99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
distribute-rgt-out--99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= z -5e+22)
(+ x (* y 0.0692910599291889))
(if (<= z 820.0)
(+
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
x)
(+ x (- (* y 0.0692910599291889) (* -0.07512208616047561 (/ y z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5e+22) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 820.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / 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 <= (-5d+22)) then
tmp = x + (y * 0.0692910599291889d0)
else if (z <= 820.0d0) then
tmp = ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)) + x
else
tmp = x + ((y * 0.0692910599291889d0) - ((-0.07512208616047561d0) * (y / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5e+22) {
tmp = x + (y * 0.0692910599291889);
} else if (z <= 820.0) {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
} else {
tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5e+22: tmp = x + (y * 0.0692910599291889) elif z <= 820.0: tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x else: tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5e+22) tmp = Float64(x + Float64(y * 0.0692910599291889)); elseif (z <= 820.0) 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); else tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(-0.07512208616047561 * Float64(y / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5e+22) tmp = x + (y * 0.0692910599291889); elseif (z <= 820.0) tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x; else tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5e+22], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 820.0], 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], N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(-0.07512208616047561 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+22}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{elif}\;z \leq 820:\\
\;\;\;\;\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\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - -0.07512208616047561 \cdot \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -4.9999999999999996e22Initial program 37.5%
+-commutative37.5%
*-commutative37.5%
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 99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
if -4.9999999999999996e22 < z < 820Initial program 99.7%
if 820 < z Initial program 41.6%
remove-double-neg41.6%
associate-/l*55.8%
distribute-rgt-neg-in55.8%
distribute-lft-neg-in55.8%
distribute-lft-neg-in55.8%
distribute-rgt-neg-in55.8%
remove-double-neg55.8%
fma-define55.8%
fma-define55.8%
fma-define55.8%
Simplified55.8%
Taylor expanded in z around -inf 99.7%
+-commutative99.7%
mul-1-neg99.7%
unsub-neg99.7%
*-commutative99.7%
distribute-rgt-out--99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= z -12500000.0)
(+
x
(*
y
(-
0.0692910599291889
(/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z))))
(if (<= z 0.0033)
(+
x
(+
(* y 0.08333333333333323)
(* y (* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))
(+ x (- (* y 0.0692910599291889) (* -0.07512208616047561 (/ y z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -12500000.0) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (z <= 0.0033) {
tmp = x + ((y * 0.08333333333333323) + (y * (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / 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 <= (-12500000.0d0)) then
tmp = x + (y * (0.0692910599291889d0 - (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
else if (z <= 0.0033d0) then
tmp = x + ((y * 0.08333333333333323d0) + (y * (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
else
tmp = x + ((y * 0.0692910599291889d0) - ((-0.07512208616047561d0) * (y / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -12500000.0) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (z <= 0.0033) {
tmp = x + ((y * 0.08333333333333323) + (y * (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -12500000.0: tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))) elif z <= 0.0033: tmp = x + ((y * 0.08333333333333323) + (y * (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) else: tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -12500000.0) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z)))); elseif (z <= 0.0033) tmp = Float64(x + Float64(Float64(y * 0.08333333333333323) + Float64(y * Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721))))); else tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(-0.07512208616047561 * Float64(y / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -12500000.0) tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))); elseif (z <= 0.0033) tmp = x + ((y * 0.08333333333333323) + (y * (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); else tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -12500000.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, 0.0033], N[(x + N[(N[(y * 0.08333333333333323), $MachinePrecision] + N[(y * N[(z * N[(N[(z * 0.0007936505811533442), $MachinePrecision] - 0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(-0.07512208616047561 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12500000:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 0.0033:\\
\;\;\;\;x + \left(y \cdot 0.08333333333333323 + y \cdot \left(z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - -0.07512208616047561 \cdot \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -1.25e7Initial program 40.4%
remove-double-neg40.4%
associate-/l*49.1%
distribute-rgt-neg-in49.1%
distribute-lft-neg-in49.1%
distribute-lft-neg-in49.1%
distribute-rgt-neg-in49.1%
remove-double-neg49.1%
fma-define49.1%
fma-define49.1%
fma-define49.1%
Simplified49.1%
Taylor expanded in z around -inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
sub-neg99.7%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
if -1.25e7 < z < 0.0033Initial 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.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in y around 0 99.9%
if 0.0033 < z Initial program 43.3%
remove-double-neg43.3%
associate-/l*57.1%
distribute-rgt-neg-in57.1%
distribute-lft-neg-in57.1%
distribute-lft-neg-in57.1%
distribute-rgt-neg-in57.1%
remove-double-neg57.1%
fma-define57.1%
fma-define57.1%
fma-define57.1%
Simplified57.1%
Taylor expanded in z around -inf 98.6%
+-commutative98.6%
mul-1-neg98.6%
unsub-neg98.6%
*-commutative98.6%
distribute-rgt-out--98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in y around 0 98.6%
*-commutative98.6%
Simplified98.6%
Final simplification99.5%
(FPCore (x y z)
:precision binary64
(if (<= z -12500000.0)
(+
x
(*
y
(-
0.0692910599291889
(/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z))))
(if (<= z 0.0033)
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))
(+ x (- (* y 0.0692910599291889) (* -0.07512208616047561 (/ y z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -12500000.0) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (z <= 0.0033) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / 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 <= (-12500000.0d0)) then
tmp = x + (y * (0.0692910599291889d0 - (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
else if (z <= 0.0033d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
else
tmp = x + ((y * 0.0692910599291889d0) - ((-0.07512208616047561d0) * (y / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -12500000.0) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (z <= 0.0033) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -12500000.0: tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))) elif z <= 0.0033: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) else: tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -12500000.0) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z)))); elseif (z <= 0.0033) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721))))); else tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(-0.07512208616047561 * Float64(y / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -12500000.0) tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))); elseif (z <= 0.0033) tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); else tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -12500000.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, 0.0033], 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[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(-0.07512208616047561 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12500000:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 0.0033:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - -0.07512208616047561 \cdot \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -1.25e7Initial program 40.4%
remove-double-neg40.4%
associate-/l*49.1%
distribute-rgt-neg-in49.1%
distribute-lft-neg-in49.1%
distribute-lft-neg-in49.1%
distribute-rgt-neg-in49.1%
remove-double-neg49.1%
fma-define49.1%
fma-define49.1%
fma-define49.1%
Simplified49.1%
Taylor expanded in z around -inf 99.7%
mul-1-neg99.7%
unsub-neg99.7%
sub-neg99.7%
associate-*r/99.7%
metadata-eval99.7%
metadata-eval99.7%
Simplified99.7%
if -1.25e7 < z < 0.0033Initial 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.9%
if 0.0033 < z Initial program 43.3%
remove-double-neg43.3%
associate-/l*57.1%
distribute-rgt-neg-in57.1%
distribute-lft-neg-in57.1%
distribute-lft-neg-in57.1%
distribute-rgt-neg-in57.1%
remove-double-neg57.1%
fma-define57.1%
fma-define57.1%
fma-define57.1%
Simplified57.1%
Taylor expanded in z around -inf 98.6%
+-commutative98.6%
mul-1-neg98.6%
unsub-neg98.6%
*-commutative98.6%
distribute-rgt-out--98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in y around 0 98.6%
*-commutative98.6%
Simplified98.6%
Final simplification99.5%
(FPCore (x y z)
:precision binary64
(if (<= z -12500000.0)
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z))))
(if (<= z 0.0033)
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))
(+ x (- (* y 0.0692910599291889) (* -0.07512208616047561 (/ y z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -12500000.0) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else if (z <= 0.0033) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / 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 <= (-12500000.0d0)) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else if (z <= 0.0033d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
else
tmp = x + ((y * 0.0692910599291889d0) - ((-0.07512208616047561d0) * (y / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -12500000.0) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else if (z <= 0.0033) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -12500000.0: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) elif z <= 0.0033: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) else: tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -12500000.0) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); elseif (z <= 0.0033) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721))))); else tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(-0.07512208616047561 * Float64(y / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -12500000.0) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); elseif (z <= 0.0033) tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); else tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -12500000.0], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0033], 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[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(-0.07512208616047561 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12500000:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 0.0033:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - -0.07512208616047561 \cdot \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -1.25e7Initial program 40.4%
remove-double-neg40.4%
associate-/l*49.1%
distribute-rgt-neg-in49.1%
distribute-lft-neg-in49.1%
distribute-lft-neg-in49.1%
distribute-rgt-neg-in49.1%
remove-double-neg49.1%
fma-define49.1%
fma-define49.1%
fma-define49.1%
Simplified49.1%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
if -1.25e7 < z < 0.0033Initial 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.9%
if 0.0033 < z Initial program 43.3%
remove-double-neg43.3%
associate-/l*57.1%
distribute-rgt-neg-in57.1%
distribute-lft-neg-in57.1%
distribute-lft-neg-in57.1%
distribute-rgt-neg-in57.1%
remove-double-neg57.1%
fma-define57.1%
fma-define57.1%
fma-define57.1%
Simplified57.1%
Taylor expanded in z around -inf 98.6%
+-commutative98.6%
mul-1-neg98.6%
unsub-neg98.6%
*-commutative98.6%
distribute-rgt-out--98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in y around 0 98.6%
*-commutative98.6%
Simplified98.6%
Final simplification99.5%
(FPCore (x y z)
:precision binary64
(if (<= z -12500000.0)
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z))))
(if (<= z 0.0033)
(+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))
(+ x (- (* y 0.0692910599291889) (* -0.07512208616047561 (/ y z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -12500000.0) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else if (z <= 0.0033) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / 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 <= (-12500000.0d0)) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else if (z <= 0.0033d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
else
tmp = x + ((y * 0.0692910599291889d0) - ((-0.07512208616047561d0) * (y / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -12500000.0) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else if (z <= 0.0033) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -12500000.0: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) elif z <= 0.0033: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) else: tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -12500000.0) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); elseif (z <= 0.0033) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); else tmp = Float64(x + Float64(Float64(y * 0.0692910599291889) - Float64(-0.07512208616047561 * Float64(y / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -12500000.0) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); elseif (z <= 0.0033) tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); else tmp = x + ((y * 0.0692910599291889) - (-0.07512208616047561 * (y / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -12500000.0], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0033], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * 0.0692910599291889), $MachinePrecision] - N[(-0.07512208616047561 * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -12500000:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 0.0033:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(y \cdot 0.0692910599291889 - -0.07512208616047561 \cdot \frac{y}{z}\right)\\
\end{array}
\end{array}
if z < -1.25e7Initial program 40.4%
remove-double-neg40.4%
associate-/l*49.1%
distribute-rgt-neg-in49.1%
distribute-lft-neg-in49.1%
distribute-lft-neg-in49.1%
distribute-rgt-neg-in49.1%
remove-double-neg49.1%
fma-define49.1%
fma-define49.1%
fma-define49.1%
Simplified49.1%
Taylor expanded in z around inf 99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
if -1.25e7 < z < 0.0033Initial 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.9%
*-commutative99.9%
Simplified99.9%
if 0.0033 < z Initial program 43.3%
remove-double-neg43.3%
associate-/l*57.1%
distribute-rgt-neg-in57.1%
distribute-lft-neg-in57.1%
distribute-lft-neg-in57.1%
distribute-rgt-neg-in57.1%
remove-double-neg57.1%
fma-define57.1%
fma-define57.1%
fma-define57.1%
Simplified57.1%
Taylor expanded in z around -inf 98.6%
+-commutative98.6%
mul-1-neg98.6%
unsub-neg98.6%
*-commutative98.6%
distribute-rgt-out--98.6%
metadata-eval98.6%
Simplified98.6%
Taylor expanded in y around 0 98.6%
*-commutative98.6%
Simplified98.6%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -12500000.0) (not (<= z 0.0033))) (+ 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 <= -12500000.0) || !(z <= 0.0033)) {
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 <= (-12500000.0d0)) .or. (.not. (z <= 0.0033d0))) 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 <= -12500000.0) || !(z <= 0.0033)) {
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 <= -12500000.0) or not (z <= 0.0033): 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 <= -12500000.0) || !(z <= 0.0033)) 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 <= -12500000.0) || ~((z <= 0.0033))) 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, -12500000.0], N[Not[LessEqual[z, 0.0033]], $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 -12500000 \lor \neg \left(z \leq 0.0033\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 < -1.25e7 or 0.0033 < z Initial program 41.9%
remove-double-neg41.9%
associate-/l*53.2%
distribute-rgt-neg-in53.2%
distribute-lft-neg-in53.2%
distribute-lft-neg-in53.2%
distribute-rgt-neg-in53.2%
remove-double-neg53.2%
fma-define53.2%
fma-define53.2%
fma-define53.2%
Simplified53.2%
Taylor expanded in z around inf 99.1%
associate-*r/99.1%
metadata-eval99.1%
Simplified99.1%
if -1.25e7 < z < 0.0033Initial 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.9%
*-commutative99.9%
Simplified99.9%
Final simplification99.5%
(FPCore (x y z) :precision binary64 (if (or (<= z -12500000.0) (not (<= z 0.0033))) (+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z)))) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -12500000.0) || !(z <= 0.0033)) {
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 <= (-12500000.0d0)) .or. (.not. (z <= 0.0033d0))) 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 <= -12500000.0) || !(z <= 0.0033)) {
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 <= -12500000.0) or not (z <= 0.0033): 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 <= -12500000.0) || !(z <= 0.0033)) 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 <= -12500000.0) || ~((z <= 0.0033))) 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, -12500000.0], N[Not[LessEqual[z, 0.0033]], $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 -12500000 \lor \neg \left(z \leq 0.0033\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 < -1.25e7 or 0.0033 < z Initial program 41.9%
remove-double-neg41.9%
associate-/l*53.2%
distribute-rgt-neg-in53.2%
distribute-lft-neg-in53.2%
distribute-lft-neg-in53.2%
distribute-rgt-neg-in53.2%
remove-double-neg53.2%
fma-define53.2%
fma-define53.2%
fma-define53.2%
Simplified53.2%
Taylor expanded in z around inf 99.1%
associate-*r/99.1%
metadata-eval99.1%
Simplified99.1%
if -1.25e7 < z < 0.0033Initial 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.9%
+-commutative98.9%
*-commutative98.9%
Simplified98.9%
Final simplification99.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -12500000.0) (not (<= z 0.0033))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -12500000.0) || !(z <= 0.0033)) {
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 <= (-12500000.0d0)) .or. (.not. (z <= 0.0033d0))) 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 <= -12500000.0) || !(z <= 0.0033)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -12500000.0) or not (z <= 0.0033): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -12500000.0) || !(z <= 0.0033)) 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 <= -12500000.0) || ~((z <= 0.0033))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -12500000.0], N[Not[LessEqual[z, 0.0033]], $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 -12500000 \lor \neg \left(z \leq 0.0033\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -1.25e7 or 0.0033 < z Initial program 41.9%
+-commutative41.9%
*-commutative41.9%
associate-/l*51.0%
fma-define51.0%
*-commutative51.0%
fma-define51.0%
fma-define51.0%
*-commutative51.0%
fma-define51.0%
Simplified51.0%
Taylor expanded in z around inf 98.6%
+-commutative98.6%
*-commutative98.6%
Simplified98.6%
if -1.25e7 < z < 0.0033Initial 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.9%
+-commutative98.9%
*-commutative98.9%
Simplified98.9%
Final simplification98.7%
(FPCore (x y z) :precision binary64 (if (<= x -9.6e-9) x (if (<= x 4e-73) (* y 0.0692910599291889) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -9.6e-9) {
tmp = x;
} else if (x <= 4e-73) {
tmp = y * 0.0692910599291889;
} 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 (x <= (-9.6d-9)) then
tmp = x
else if (x <= 4d-73) then
tmp = y * 0.0692910599291889d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -9.6e-9) {
tmp = x;
} else if (x <= 4e-73) {
tmp = y * 0.0692910599291889;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -9.6e-9: tmp = x elif x <= 4e-73: tmp = y * 0.0692910599291889 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -9.6e-9) tmp = x; elseif (x <= 4e-73) tmp = Float64(y * 0.0692910599291889); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -9.6e-9) tmp = x; elseif (x <= 4e-73) tmp = y * 0.0692910599291889; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -9.6e-9], x, If[LessEqual[x, 4e-73], N[(y * 0.0692910599291889), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.6 \cdot 10^{-9}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4 \cdot 10^{-73}:\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -9.5999999999999999e-9 or 3.99999999999999999e-73 < x Initial program 71.8%
+-commutative71.8%
*-commutative71.8%
associate-/l*76.2%
fma-define76.2%
*-commutative76.2%
fma-define76.2%
fma-define76.2%
*-commutative76.2%
fma-define76.2%
Simplified76.2%
Taylor expanded in y around 0 79.1%
if -9.5999999999999999e-9 < x < 3.99999999999999999e-73Initial program 66.4%
+-commutative66.4%
*-commutative66.4%
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 z around inf 67.3%
+-commutative67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in x around inf 52.9%
Taylor expanded in x around 0 53.3%
*-commutative53.3%
Simplified53.3%
(FPCore (x y z) :precision binary64 (+ x (* y 0.0692910599291889)))
double code(double x, double y, double z) {
return x + (y * 0.0692910599291889);
}
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 * 0.0692910599291889d0)
end function
public static double code(double x, double y, double z) {
return x + (y * 0.0692910599291889);
}
def code(x, y, z): return x + (y * 0.0692910599291889)
function code(x, y, z) return Float64(x + Float64(y * 0.0692910599291889)) end
function tmp = code(x, y, z) tmp = x + (y * 0.0692910599291889); end
code[x_, y_, z_] := N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot 0.0692910599291889
\end{array}
Initial program 69.6%
+-commutative69.6%
*-commutative69.6%
associate-/l*74.4%
fma-define74.4%
*-commutative74.4%
fma-define74.4%
fma-define74.4%
*-commutative74.4%
fma-define74.4%
Simplified74.4%
Taylor expanded in z around inf 80.7%
+-commutative80.7%
*-commutative80.7%
Simplified80.7%
Final simplification80.7%
(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.6%
+-commutative69.6%
*-commutative69.6%
associate-/l*74.4%
fma-define74.4%
*-commutative74.4%
fma-define74.4%
fma-define74.4%
*-commutative74.4%
fma-define74.4%
Simplified74.4%
Taylor expanded in y around 0 53.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 2024137
(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))))