
(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 16 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
(+
0.279195317918525
(* z (+ 0.4917317610505968 (* z 0.0692910599291889)))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
4e+300)
(fma
y
(/
(fma z (fma z 0.0692910599291889 0.4917317610505968) 0.279195317918525)
(fma z (+ z 6.012459259764103) 3.350343815022304))
x)
(+ x (* y 0.0692910599291889))))
double code(double x, double y, double z) {
double tmp;
if (((y * (0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 4e+300) {
tmp = fma(y, (fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, (z + 6.012459259764103), 3.350343815022304)), x);
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(y * Float64(0.279195317918525 + Float64(z * Float64(0.4917317610505968 + Float64(z * 0.0692910599291889))))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 4e+300) tmp = fma(y, Float64(fma(z, fma(z, 0.0692910599291889, 0.4917317610505968), 0.279195317918525) / fma(z, Float64(z + 6.012459259764103), 3.350343815022304)), x); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(y * N[(0.279195317918525 + N[(z * N[(0.4917317610505968 + N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 4e+300], N[(y * N[(N[(z * N[(z * 0.0692910599291889 + 0.4917317610505968), $MachinePrecision] + 0.279195317918525), $MachinePrecision] / N[(z * N[(z + 6.012459259764103), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(0.279195317918525 + z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 4 \cdot 10^{+300}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(z, 0.0692910599291889, 0.4917317610505968\right), 0.279195317918525\right)}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, x\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))) < 4.0000000000000002e300Initial program 96.6%
+-commutative96.6%
associate-/l*99.8%
fma-define99.8%
*-commutative99.8%
fma-define99.8%
fma-define99.8%
*-commutative99.8%
fma-define99.8%
Simplified99.8%
if 4.0000000000000002e300 < (/.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.4%
+-commutative0.4%
associate-/l*5.9%
fma-define5.9%
*-commutative5.9%
fma-define5.9%
fma-define5.9%
*-commutative5.9%
fma-define5.9%
Simplified5.9%
Taylor expanded in z around inf 99.5%
+-commutative99.5%
*-commutative99.5%
Simplified99.5%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
0.279195317918525
(* z (+ 0.4917317610505968 (* z 0.0692910599291889)))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
4e+300)
(+
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 * (0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 4e+300) {
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(0.279195317918525 + Float64(z * Float64(0.4917317610505968 + Float64(z * 0.0692910599291889))))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 4e+300) 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[(0.279195317918525 + N[(z * N[(0.4917317610505968 + N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 4e+300], 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(0.279195317918525 + z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 4 \cdot 10^{+300}:\\
\;\;\;\;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))) < 4.0000000000000002e300Initial program 96.6%
remove-double-neg96.6%
distribute-lft-neg-out96.6%
distribute-neg-frac96.6%
associate-/l*99.8%
distribute-lft-neg-in99.8%
remove-double-neg99.8%
fma-define99.8%
fma-define99.8%
fma-define99.8%
Simplified99.8%
if 4.0000000000000002e300 < (/.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.4%
+-commutative0.4%
associate-/l*5.9%
fma-define5.9%
*-commutative5.9%
fma-define5.9%
fma-define5.9%
*-commutative5.9%
fma-define5.9%
Simplified5.9%
Taylor expanded in z around inf 99.5%
+-commutative99.5%
*-commutative99.5%
Simplified99.5%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
0.279195317918525
(* z (+ 0.4917317610505968 (* z 0.0692910599291889))))))
(if (<=
(/ (* y t_0) (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
4e+300)
(fma
t_0
(* y (/ 1.0 (fma z (+ z 6.012459259764103) 3.350343815022304)))
x)
(+ x (* y 0.0692910599291889)))))
double code(double x, double y, double z) {
double t_0 = 0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889)));
double tmp;
if (((y * t_0) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 4e+300) {
tmp = fma(t_0, (y * (1.0 / fma(z, (z + 6.012459259764103), 3.350343815022304))), x);
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
function code(x, y, z) t_0 = Float64(0.279195317918525 + Float64(z * Float64(0.4917317610505968 + Float64(z * 0.0692910599291889)))) tmp = 0.0 if (Float64(Float64(y * t_0) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 4e+300) tmp = fma(t_0, Float64(y * Float64(1.0 / fma(z, Float64(z + 6.012459259764103), 3.350343815022304))), x); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.279195317918525 + N[(z * N[(0.4917317610505968 + N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(y * t$95$0), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 4e+300], N[(t$95$0 * N[(y * N[(1.0 / N[(z * N[(z + 6.012459259764103), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.279195317918525 + z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right)\\
\mathbf{if}\;\frac{y \cdot t\_0}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 4 \cdot 10^{+300}:\\
\;\;\;\;\mathsf{fma}\left(t\_0, y \cdot \frac{1}{\mathsf{fma}\left(z, z + 6.012459259764103, 3.350343815022304\right)}, x\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))) < 4.0000000000000002e300Initial program 96.6%
+-commutative96.6%
*-commutative96.6%
associate-/l*98.1%
fma-define98.1%
*-commutative98.1%
fma-define98.1%
fma-define98.1%
*-commutative98.1%
fma-define98.1%
Simplified98.1%
clear-num98.1%
fma-undefine98.1%
*-commutative98.1%
associate-/r/97.9%
*-commutative97.9%
fma-undefine97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 97.9%
if 4.0000000000000002e300 < (/.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.4%
+-commutative0.4%
associate-/l*5.9%
fma-define5.9%
*-commutative5.9%
fma-define5.9%
fma-define5.9%
*-commutative5.9%
fma-define5.9%
Simplified5.9%
Taylor expanded in z around inf 99.5%
+-commutative99.5%
*-commutative99.5%
Simplified99.5%
Final simplification98.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z)))
(if (<= z -1.75e+30)
(+
x
(*
0.004801250986110448
(/
y
(+
0.0692910599291889
(- (/ 0.4046220386999212 (pow z 2.0)) (/ 0.07512208616047561 z))))))
(if (<= z 470000.0)
(+
x
(/
(+
(* y 0.279195317918525)
(* z (+ (* 0.0692910599291889 (* y z)) (* y 0.4917317610505968))))
(+ (* z (+ z 6.012459259764103)) 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 (z <= -1.75e+30) {
tmp = x + (0.004801250986110448 * (y / (0.0692910599291889 + ((0.4046220386999212 / pow(z, 2.0)) - (0.07512208616047561 / z)))));
} else if (z <= 470000.0) {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + ((y * (0.004801250986110448 - pow(t_0, 2.0))) / (0.0692910599291889 + 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.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z
if (z <= (-1.75d+30)) then
tmp = x + (0.004801250986110448d0 * (y / (0.0692910599291889d0 + ((0.4046220386999212d0 / (z ** 2.0d0)) - (0.07512208616047561d0 / z)))))
else if (z <= 470000.0d0) then
tmp = x + (((y * 0.279195317918525d0) + (z * ((0.0692910599291889d0 * (y * z)) + (y * 0.4917317610505968d0)))) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0))
else
tmp = x + ((y * (0.004801250986110448d0 - (t_0 ** 2.0d0))) / (0.0692910599291889d0 + t_0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((0.4046220386999212 / z) + -0.07512208616047561) / z;
double tmp;
if (z <= -1.75e+30) {
tmp = x + (0.004801250986110448 * (y / (0.0692910599291889 + ((0.4046220386999212 / Math.pow(z, 2.0)) - (0.07512208616047561 / z)))));
} else if (z <= 470000.0) {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + ((y * (0.004801250986110448 - Math.pow(t_0, 2.0))) / (0.0692910599291889 + t_0));
}
return tmp;
}
def code(x, y, z): t_0 = ((0.4046220386999212 / z) + -0.07512208616047561) / z tmp = 0 if z <= -1.75e+30: tmp = x + (0.004801250986110448 * (y / (0.0692910599291889 + ((0.4046220386999212 / math.pow(z, 2.0)) - (0.07512208616047561 / z))))) elif z <= 470000.0: tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) else: tmp = x + ((y * (0.004801250986110448 - math.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 (z <= -1.75e+30) tmp = Float64(x + Float64(0.004801250986110448 * Float64(y / Float64(0.0692910599291889 + Float64(Float64(0.4046220386999212 / (z ^ 2.0)) - Float64(0.07512208616047561 / z)))))); elseif (z <= 470000.0) tmp = Float64(x + Float64(Float64(Float64(y * 0.279195317918525) + Float64(z * Float64(Float64(0.0692910599291889 * Float64(y * z)) + Float64(y * 0.4917317610505968)))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 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
function tmp_2 = code(x, y, z) t_0 = ((0.4046220386999212 / z) + -0.07512208616047561) / z; tmp = 0.0; if (z <= -1.75e+30) tmp = x + (0.004801250986110448 * (y / (0.0692910599291889 + ((0.4046220386999212 / (z ^ 2.0)) - (0.07512208616047561 / z))))); elseif (z <= 470000.0) tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)); else tmp = x + ((y * (0.004801250986110448 - (t_0 ^ 2.0))) / (0.0692910599291889 + t_0)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -1.75e+30], N[(x + N[(0.004801250986110448 * N[(y / N[(0.0692910599291889 + N[(N[(0.4046220386999212 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] - N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 470000.0], N[(x + N[(N[(N[(y * 0.279195317918525), $MachinePrecision] + N[(z * N[(N[(0.0692910599291889 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * 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 * 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}\;z \leq -1.75 \cdot 10^{+30}:\\
\;\;\;\;x + 0.004801250986110448 \cdot \frac{y}{0.0692910599291889 + \left(\frac{0.4046220386999212}{{z}^{2}} - \frac{0.07512208616047561}{z}\right)}\\
\mathbf{elif}\;z \leq 470000:\\
\;\;\;\;x + \frac{y \cdot 0.279195317918525 + z \cdot \left(0.0692910599291889 \cdot \left(y \cdot z\right) + y \cdot 0.4917317610505968\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(0.004801250986110448 - {t\_0}^{2}\right)}{0.0692910599291889 + t\_0}\\
\end{array}
\end{array}
if z < -1.75000000000000011e30Initial program 30.1%
remove-double-neg30.1%
distribute-lft-neg-out30.1%
distribute-neg-frac30.1%
associate-/l*35.9%
distribute-lft-neg-in35.9%
remove-double-neg35.9%
fma-define35.9%
fma-define35.9%
fma-define35.9%
Simplified35.9%
Taylor expanded in z around -inf 99.4%
mul-1-neg99.4%
unsub-neg99.4%
sub-neg99.4%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
flip--99.4%
metadata-eval99.3%
pow299.3%
Applied egg-rr99.3%
Taylor expanded in z around inf 99.3%
Taylor expanded in y around 0 99.6%
associate--l+99.6%
associate-*r/99.6%
metadata-eval99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
if -1.75000000000000011e30 < z < 4.7e5Initial program 99.6%
Taylor expanded in z around 0 99.6%
if 4.7e5 < z Initial program 37.0%
remove-double-neg37.0%
distribute-lft-neg-out37.0%
distribute-neg-frac37.0%
associate-/l*47.4%
distribute-lft-neg-in47.4%
remove-double-neg47.4%
fma-define47.4%
fma-define47.4%
fma-define47.4%
Simplified47.4%
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%
flip--99.7%
metadata-eval99.5%
pow299.5%
Applied egg-rr99.5%
associate-*r/99.7%
Applied egg-rr99.7%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (<= z -1.75e+30)
(+
x
(*
0.004801250986110448
(/
y
(+
0.0692910599291889
(- (/ 0.4046220386999212 (pow z 2.0)) (/ 0.07512208616047561 z))))))
(if (<= z 4000000000.0)
(+
x
(/
(+
(* y 0.279195317918525)
(* z (+ (* 0.0692910599291889 (* y z)) (* y 0.4917317610505968))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304)))
(+
x
(/
(* y 0.004801250986110448)
(+
0.0692910599291889
(/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z)))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.75e+30) {
tmp = x + (0.004801250986110448 * (y / (0.0692910599291889 + ((0.4046220386999212 / pow(z, 2.0)) - (0.07512208616047561 / z)))));
} else if (z <= 4000000000.0) {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + (((0.4046220386999212 / z) + -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 <= (-1.75d+30)) then
tmp = x + (0.004801250986110448d0 * (y / (0.0692910599291889d0 + ((0.4046220386999212d0 / (z ** 2.0d0)) - (0.07512208616047561d0 / z)))))
else if (z <= 4000000000.0d0) then
tmp = x + (((y * 0.279195317918525d0) + (z * ((0.0692910599291889d0 * (y * z)) + (y * 0.4917317610505968d0)))) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0))
else
tmp = x + ((y * 0.004801250986110448d0) / (0.0692910599291889d0 + (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.75e+30) {
tmp = x + (0.004801250986110448 * (y / (0.0692910599291889 + ((0.4046220386999212 / Math.pow(z, 2.0)) - (0.07512208616047561 / z)))));
} else if (z <= 4000000000.0) {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
} else {
tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.75e+30: tmp = x + (0.004801250986110448 * (y / (0.0692910599291889 + ((0.4046220386999212 / math.pow(z, 2.0)) - (0.07512208616047561 / z))))) elif z <= 4000000000.0: tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) else: tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + (((0.4046220386999212 / z) + -0.07512208616047561) / z))) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.75e+30) tmp = Float64(x + Float64(0.004801250986110448 * Float64(y / Float64(0.0692910599291889 + Float64(Float64(0.4046220386999212 / (z ^ 2.0)) - Float64(0.07512208616047561 / z)))))); elseif (z <= 4000000000.0) tmp = Float64(x + Float64(Float64(Float64(y * 0.279195317918525) + Float64(z * Float64(Float64(0.0692910599291889 * Float64(y * z)) + Float64(y * 0.4917317610505968)))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304))); else tmp = Float64(x + Float64(Float64(y * 0.004801250986110448) / Float64(0.0692910599291889 + Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.75e+30) tmp = x + (0.004801250986110448 * (y / (0.0692910599291889 + ((0.4046220386999212 / (z ^ 2.0)) - (0.07512208616047561 / z))))); elseif (z <= 4000000000.0) tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)); else tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + (((0.4046220386999212 / z) + -0.07512208616047561) / z))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.75e+30], N[(x + N[(0.004801250986110448 * N[(y / N[(0.0692910599291889 + N[(N[(0.4046220386999212 / N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] - N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4000000000.0], N[(x + N[(N[(N[(y * 0.279195317918525), $MachinePrecision] + N[(z * N[(N[(0.0692910599291889 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * 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.004801250986110448), $MachinePrecision] / N[(0.0692910599291889 + N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+30}:\\
\;\;\;\;x + 0.004801250986110448 \cdot \frac{y}{0.0692910599291889 + \left(\frac{0.4046220386999212}{{z}^{2}} - \frac{0.07512208616047561}{z}\right)}\\
\mathbf{elif}\;z \leq 4000000000:\\
\;\;\;\;x + \frac{y \cdot 0.279195317918525 + z \cdot \left(0.0692910599291889 \cdot \left(y \cdot z\right) + y \cdot 0.4917317610505968\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot 0.004801250986110448}{0.0692910599291889 + \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}}\\
\end{array}
\end{array}
if z < -1.75000000000000011e30Initial program 30.1%
remove-double-neg30.1%
distribute-lft-neg-out30.1%
distribute-neg-frac30.1%
associate-/l*35.9%
distribute-lft-neg-in35.9%
remove-double-neg35.9%
fma-define35.9%
fma-define35.9%
fma-define35.9%
Simplified35.9%
Taylor expanded in z around -inf 99.4%
mul-1-neg99.4%
unsub-neg99.4%
sub-neg99.4%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
flip--99.4%
metadata-eval99.3%
pow299.3%
Applied egg-rr99.3%
Taylor expanded in z around inf 99.3%
Taylor expanded in y around 0 99.6%
associate--l+99.6%
associate-*r/99.6%
metadata-eval99.6%
associate-*r/99.6%
metadata-eval99.6%
Simplified99.6%
if -1.75000000000000011e30 < z < 4e9Initial program 99.6%
Taylor expanded in z around 0 99.6%
if 4e9 < z Initial program 37.0%
remove-double-neg37.0%
distribute-lft-neg-out37.0%
distribute-neg-frac37.0%
associate-/l*47.4%
distribute-lft-neg-in47.4%
remove-double-neg47.4%
fma-define47.4%
fma-define47.4%
fma-define47.4%
Simplified47.4%
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%
flip--99.7%
metadata-eval99.5%
pow299.5%
Applied egg-rr99.5%
Taylor expanded in z around inf 99.5%
associate-*r/99.7%
Applied egg-rr99.7%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
y
(+
0.279195317918525
(* z (+ 0.4917317610505968 (* z 0.0692910599291889)))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))))
(if (<= t_0 (- INFINITY))
(+
x
(/
(* y 0.004801250986110448)
(+
0.0692910599291889
(/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z))))
(if (<= t_0 4e+300) (+ t_0 x) (+ x (* y 0.0692910599291889))))))
double code(double x, double y, double z) {
double t_0 = (y * (0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (t_0 <= 4e+300) {
tmp = t_0 + x;
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = (y * (0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (t_0 <= 4e+300) {
tmp = t_0 + x;
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): t_0 = (y * (0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304) tmp = 0 if t_0 <= -math.inf: tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + (((0.4046220386999212 / z) + -0.07512208616047561) / z))) elif t_0 <= 4e+300: tmp = t_0 + x else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) t_0 = Float64(Float64(y * Float64(0.279195317918525 + Float64(z * Float64(0.4917317610505968 + Float64(z * 0.0692910599291889))))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(x + Float64(Float64(y * 0.004801250986110448) / Float64(0.0692910599291889 + Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z)))); elseif (t_0 <= 4e+300) tmp = Float64(t_0 + x); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (y * (0.279195317918525 + (z * (0.4917317610505968 + (z * 0.0692910599291889))))) / ((z * (z + 6.012459259764103)) + 3.350343815022304); tmp = 0.0; if (t_0 <= -Inf) tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + (((0.4046220386999212 / z) + -0.07512208616047561) / z))); elseif (t_0 <= 4e+300) tmp = t_0 + x; else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y * N[(0.279195317918525 + N[(z * N[(0.4917317610505968 + N[(z * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(x + N[(N[(y * 0.004801250986110448), $MachinePrecision] / N[(0.0692910599291889 + N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 4e+300], N[(t$95$0 + x), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y \cdot \left(0.279195317918525 + z \cdot \left(0.4917317610505968 + z \cdot 0.0692910599291889\right)\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\mathbf{if}\;t\_0 \leq -\infty:\\
\;\;\;\;x + \frac{y \cdot 0.004801250986110448}{0.0692910599291889 + \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}}\\
\mathbf{elif}\;t\_0 \leq 4 \cdot 10^{+300}:\\
\;\;\;\;t\_0 + 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))) < -inf.0Initial program 3.6%
remove-double-neg3.6%
distribute-lft-neg-out3.6%
distribute-neg-frac3.6%
associate-/l*99.0%
distribute-lft-neg-in99.0%
remove-double-neg99.0%
fma-define99.0%
fma-define99.0%
fma-define99.0%
Simplified99.0%
Taylor expanded in z around -inf 99.0%
mul-1-neg99.0%
unsub-neg99.0%
sub-neg99.0%
associate-*r/99.0%
metadata-eval99.0%
metadata-eval99.0%
Simplified99.0%
flip--99.0%
metadata-eval99.5%
pow299.5%
Applied egg-rr99.5%
Taylor expanded in z around inf 99.5%
associate-*r/100.0%
Applied egg-rr100.0%
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))) < 4.0000000000000002e300Initial program 99.6%
if 4.0000000000000002e300 < (/.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.4%
+-commutative0.4%
associate-/l*5.9%
fma-define5.9%
*-commutative5.9%
fma-define5.9%
fma-define5.9%
*-commutative5.9%
fma-define5.9%
Simplified5.9%
Taylor expanded in z around inf 99.5%
+-commutative99.5%
*-commutative99.5%
Simplified99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -3.2e+30) (not (<= z 150000000.0)))
(+
x
(/
(* y 0.004801250986110448)
(+
0.0692910599291889
(/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z))))
(+
x
(/
(+
(* y 0.279195317918525)
(* z (+ (* 0.0692910599291889 (* y z)) (* y 0.4917317610505968))))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3.2e+30) || !(z <= 150000000.0)) {
tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
}
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 <= (-3.2d+30)) .or. (.not. (z <= 150000000.0d0))) then
tmp = x + ((y * 0.004801250986110448d0) / (0.0692910599291889d0 + (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
else
tmp = x + (((y * 0.279195317918525d0) + (z * ((0.0692910599291889d0 * (y * z)) + (y * 0.4917317610505968d0)))) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -3.2e+30) || !(z <= 150000000.0)) {
tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else {
tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3.2e+30) or not (z <= 150000000.0): tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + (((0.4046220386999212 / z) + -0.07512208616047561) / z))) else: tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3.2e+30) || !(z <= 150000000.0)) tmp = Float64(x + Float64(Float64(y * 0.004801250986110448) / Float64(0.0692910599291889 + Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z)))); else tmp = Float64(x + Float64(Float64(Float64(y * 0.279195317918525) + Float64(z * Float64(Float64(0.0692910599291889 * Float64(y * z)) + Float64(y * 0.4917317610505968)))) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -3.2e+30) || ~((z <= 150000000.0))) tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + (((0.4046220386999212 / z) + -0.07512208616047561) / z))); else tmp = x + (((y * 0.279195317918525) + (z * ((0.0692910599291889 * (y * z)) + (y * 0.4917317610505968)))) / ((z * (z + 6.012459259764103)) + 3.350343815022304)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3.2e+30], N[Not[LessEqual[z, 150000000.0]], $MachinePrecision]], N[(x + N[(N[(y * 0.004801250986110448), $MachinePrecision] / N[(0.0692910599291889 + N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y * 0.279195317918525), $MachinePrecision] + N[(z * N[(N[(0.0692910599291889 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * 0.4917317610505968), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+30} \lor \neg \left(z \leq 150000000\right):\\
\;\;\;\;x + \frac{y \cdot 0.004801250986110448}{0.0692910599291889 + \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot 0.279195317918525 + z \cdot \left(0.0692910599291889 \cdot \left(y \cdot z\right) + y \cdot 0.4917317610505968\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304}\\
\end{array}
\end{array}
if z < -3.19999999999999973e30 or 1.5e8 < z Initial program 34.0%
remove-double-neg34.0%
distribute-lft-neg-out34.0%
distribute-neg-frac34.0%
associate-/l*42.5%
distribute-lft-neg-in42.5%
remove-double-neg42.5%
fma-define42.5%
fma-define42.5%
fma-define42.5%
Simplified42.5%
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.4%
pow299.4%
Applied egg-rr99.4%
Taylor expanded in z around inf 99.4%
associate-*r/99.6%
Applied egg-rr99.6%
if -3.19999999999999973e30 < z < 1.5e8Initial program 99.6%
Taylor expanded in z around 0 99.6%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z)))
(if (<= z -5.4)
(+ x (* y (- 0.0692910599291889 t_0)))
(if (<= z 4.8)
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))
(+ x (/ (* y 0.004801250986110448) (+ 0.0692910599291889 t_0)))))))
double code(double x, double y, double z) {
double t_0 = ((0.4046220386999212 / z) + -0.07512208616047561) / z;
double tmp;
if (z <= -5.4) {
tmp = x + (y * (0.0692910599291889 - t_0));
} else if (z <= 4.8) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + 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.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z
if (z <= (-5.4d0)) then
tmp = x + (y * (0.0692910599291889d0 - t_0))
else if (z <= 4.8d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
else
tmp = x + ((y * 0.004801250986110448d0) / (0.0692910599291889d0 + t_0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((0.4046220386999212 / z) + -0.07512208616047561) / z;
double tmp;
if (z <= -5.4) {
tmp = x + (y * (0.0692910599291889 - t_0));
} else if (z <= 4.8) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + t_0));
}
return tmp;
}
def code(x, y, z): t_0 = ((0.4046220386999212 / z) + -0.07512208616047561) / z tmp = 0 if z <= -5.4: tmp = x + (y * (0.0692910599291889 - t_0)) elif z <= 4.8: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) else: tmp = x + ((y * 0.004801250986110448) / (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 (z <= -5.4) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - t_0))); elseif (z <= 4.8) 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.004801250986110448) / Float64(0.0692910599291889 + t_0))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((0.4046220386999212 / z) + -0.07512208616047561) / z; tmp = 0.0; if (z <= -5.4) tmp = x + (y * (0.0692910599291889 - t_0)); elseif (z <= 4.8) tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); else tmp = x + ((y * 0.004801250986110448) / (0.0692910599291889 + t_0)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] + -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[z, -5.4], N[(x + N[(y * N[(0.0692910599291889 - t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8], 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.004801250986110448), $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}\;z \leq -5.4:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - t\_0\right)\\
\mathbf{elif}\;z \leq 4.8:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot 0.004801250986110448}{0.0692910599291889 + t\_0}\\
\end{array}
\end{array}
if z < -5.4000000000000004Initial program 36.8%
remove-double-neg36.8%
distribute-lft-neg-out36.8%
distribute-neg-frac36.8%
associate-/l*42.1%
distribute-lft-neg-in42.1%
remove-double-neg42.1%
fma-define42.1%
fma-define42.1%
fma-define42.1%
Simplified42.1%
Taylor expanded in z around -inf 99.4%
mul-1-neg99.4%
unsub-neg99.4%
sub-neg99.4%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
if -5.4000000000000004 < z < 4.79999999999999982Initial program 99.6%
remove-double-neg99.6%
distribute-lft-neg-out99.6%
distribute-neg-frac99.6%
associate-/l*99.9%
distribute-lft-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%
if 4.79999999999999982 < z Initial program 37.0%
remove-double-neg37.0%
distribute-lft-neg-out37.0%
distribute-neg-frac37.0%
associate-/l*47.4%
distribute-lft-neg-in47.4%
remove-double-neg47.4%
fma-define47.4%
fma-define47.4%
fma-define47.4%
Simplified47.4%
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%
flip--99.7%
metadata-eval99.5%
pow299.5%
Applied egg-rr99.5%
Taylor expanded in z around inf 99.5%
associate-*r/99.7%
Applied egg-rr99.7%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(if (<= z -5.4)
(+
x
(*
y
(-
0.0692910599291889
(/ (+ (/ 0.4046220386999212 z) -0.07512208616047561) z))))
(if (<= z 4.2)
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))
(+ x (* y 0.0692910599291889)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (z <= 4.2) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} 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) :: tmp
if (z <= (-5.4d0)) then
tmp = x + (y * (0.0692910599291889d0 - (((0.4046220386999212d0 / z) + (-0.07512208616047561d0)) / z)))
else if (z <= 4.2d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
else
tmp = x + (y * 0.0692910599291889d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z)));
} else if (z <= 4.2) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.4: tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))) elif z <= 4.2: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.4) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 - Float64(Float64(Float64(0.4046220386999212 / z) + -0.07512208616047561) / z)))); elseif (z <= 4.2) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721))))); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.4) tmp = x + (y * (0.0692910599291889 - (((0.4046220386999212 / z) + -0.07512208616047561) / z))); elseif (z <= 4.2) tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.4], 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.2], 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 * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} + -0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 4.2:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if z < -5.4000000000000004Initial program 36.8%
remove-double-neg36.8%
distribute-lft-neg-out36.8%
distribute-neg-frac36.8%
associate-/l*42.1%
distribute-lft-neg-in42.1%
remove-double-neg42.1%
fma-define42.1%
fma-define42.1%
fma-define42.1%
Simplified42.1%
Taylor expanded in z around -inf 99.4%
mul-1-neg99.4%
unsub-neg99.4%
sub-neg99.4%
associate-*r/99.4%
metadata-eval99.4%
metadata-eval99.4%
Simplified99.4%
if -5.4000000000000004 < z < 4.20000000000000018Initial program 99.6%
remove-double-neg99.6%
distribute-lft-neg-out99.6%
distribute-neg-frac99.6%
associate-/l*99.9%
distribute-lft-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%
if 4.20000000000000018 < z Initial program 37.0%
+-commutative37.0%
associate-/l*47.4%
fma-define47.4%
*-commutative47.4%
fma-define47.4%
fma-define47.4%
*-commutative47.4%
fma-define47.4%
Simplified47.4%
Taylor expanded in z around inf 99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(if (<= z -5.4)
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z))))
(if (<= z 4.1)
(+
x
(*
y
(+
0.08333333333333323
(* z (- (* z 0.0007936505811533442) 0.00277777777751721)))))
(+ x (* y 0.0692910599291889)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else if (z <= 4.1) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} 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) :: tmp
if (z <= (-5.4d0)) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else if (z <= 4.1d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * ((z * 0.0007936505811533442d0) - 0.00277777777751721d0))))
else
tmp = x + (y * 0.0692910599291889d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else if (z <= 4.1) {
tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721))));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.4: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) elif z <= 4.1: tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))) else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.4) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); elseif (z <= 4.1) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * Float64(Float64(z * 0.0007936505811533442) - 0.00277777777751721))))); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.4) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); elseif (z <= 4.1) tmp = x + (y * (0.08333333333333323 + (z * ((z * 0.0007936505811533442) - 0.00277777777751721)))); else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.4], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1], 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 * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 4.1:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot \left(z \cdot 0.0007936505811533442 - 0.00277777777751721\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if z < -5.4000000000000004Initial program 36.8%
remove-double-neg36.8%
distribute-lft-neg-out36.8%
distribute-neg-frac36.8%
associate-/l*42.1%
distribute-lft-neg-in42.1%
remove-double-neg42.1%
fma-define42.1%
fma-define42.1%
fma-define42.1%
Simplified42.1%
Taylor expanded in z around inf 99.1%
associate-*r/99.1%
metadata-eval99.1%
Simplified99.1%
if -5.4000000000000004 < z < 4.0999999999999996Initial program 99.6%
remove-double-neg99.6%
distribute-lft-neg-out99.6%
distribute-neg-frac99.6%
associate-/l*99.9%
distribute-lft-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%
if 4.0999999999999996 < z Initial program 37.0%
+-commutative37.0%
associate-/l*47.4%
fma-define47.4%
*-commutative47.4%
fma-define47.4%
fma-define47.4%
*-commutative47.4%
fma-define47.4%
Simplified47.4%
Taylor expanded in z around inf 99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(if (<= z -5.4)
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z))))
(if (<= z 5.0)
(+ x (* y (+ 0.08333333333333323 (* z -0.00277777777751721))))
(+ x (* y 0.0692910599291889)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else if (z <= 5.0) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} 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) :: tmp
if (z <= (-5.4d0)) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else if (z <= 5.0d0) then
tmp = x + (y * (0.08333333333333323d0 + (z * (-0.00277777777751721d0))))
else
tmp = x + (y * 0.0692910599291889d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else if (z <= 5.0) {
tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721)));
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.4: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) elif z <= 5.0: tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))) else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.4) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); elseif (z <= 5.0) tmp = Float64(x + Float64(y * Float64(0.08333333333333323 + Float64(z * -0.00277777777751721)))); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.4) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); elseif (z <= 5.0) tmp = x + (y * (0.08333333333333323 + (z * -0.00277777777751721))); else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.4], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.0], N[(x + N[(y * N[(0.08333333333333323 + N[(z * -0.00277777777751721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 5:\\
\;\;\;\;x + y \cdot \left(0.08333333333333323 + z \cdot -0.00277777777751721\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if z < -5.4000000000000004Initial program 36.8%
remove-double-neg36.8%
distribute-lft-neg-out36.8%
distribute-neg-frac36.8%
associate-/l*42.1%
distribute-lft-neg-in42.1%
remove-double-neg42.1%
fma-define42.1%
fma-define42.1%
fma-define42.1%
Simplified42.1%
Taylor expanded in z around inf 99.1%
associate-*r/99.1%
metadata-eval99.1%
Simplified99.1%
if -5.4000000000000004 < z < 5Initial program 99.6%
remove-double-neg99.6%
distribute-lft-neg-out99.6%
distribute-neg-frac99.6%
associate-/l*99.9%
distribute-lft-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.3%
*-commutative99.3%
Simplified99.3%
if 5 < z Initial program 37.0%
+-commutative37.0%
associate-/l*47.4%
fma-define47.4%
*-commutative47.4%
fma-define47.4%
fma-define47.4%
*-commutative47.4%
fma-define47.4%
Simplified47.4%
Taylor expanded in z around inf 99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.4) (not (<= z 5.8))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.4) || !(z <= 5.8)) {
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 <= (-5.4d0)) .or. (.not. (z <= 5.8d0))) 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 <= -5.4) || !(z <= 5.8)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5.4) or not (z <= 5.8): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5.4) || !(z <= 5.8)) 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 <= -5.4) || ~((z <= 5.8))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.4], N[Not[LessEqual[z, 5.8]], $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 -5.4 \lor \neg \left(z \leq 5.8\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.4000000000000004 or 5.79999999999999982 < z Initial program 36.9%
+-commutative36.9%
associate-/l*45.0%
fma-define45.0%
*-commutative45.0%
fma-define45.0%
fma-define45.0%
*-commutative45.0%
fma-define45.0%
Simplified45.0%
Taylor expanded in z around inf 99.3%
+-commutative99.3%
*-commutative99.3%
Simplified99.3%
if -5.4000000000000004 < z < 5.79999999999999982Initial program 99.6%
+-commutative99.6%
associate-/l*99.9%
fma-define99.9%
*-commutative99.9%
fma-define99.9%
fma-define99.9%
*-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 99.1%
+-commutative99.1%
*-commutative99.1%
Simplified99.1%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (<= z -5.4)
(+ x (* y (+ 0.0692910599291889 (/ 0.07512208616047561 z))))
(if (<= z 6.2)
(+ x (* y 0.08333333333333323))
(+ x (* y 0.0692910599291889)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else if (z <= 6.2) {
tmp = x + (y * 0.08333333333333323);
} 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) :: tmp
if (z <= (-5.4d0)) then
tmp = x + (y * (0.0692910599291889d0 + (0.07512208616047561d0 / z)))
else if (z <= 6.2d0) then
tmp = x + (y * 0.08333333333333323d0)
else
tmp = x + (y * 0.0692910599291889d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5.4) {
tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z)));
} else if (z <= 6.2) {
tmp = x + (y * 0.08333333333333323);
} else {
tmp = x + (y * 0.0692910599291889);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5.4: tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))) elif z <= 6.2: tmp = x + (y * 0.08333333333333323) else: tmp = x + (y * 0.0692910599291889) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5.4) tmp = Float64(x + Float64(y * Float64(0.0692910599291889 + Float64(0.07512208616047561 / z)))); elseif (z <= 6.2) tmp = Float64(x + Float64(y * 0.08333333333333323)); else tmp = Float64(x + Float64(y * 0.0692910599291889)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5.4) tmp = x + (y * (0.0692910599291889 + (0.07512208616047561 / z))); elseif (z <= 6.2) tmp = x + (y * 0.08333333333333323); else tmp = x + (y * 0.0692910599291889); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5.4], N[(x + N[(y * N[(0.0692910599291889 + N[(0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.0692910599291889), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4:\\
\;\;\;\;x + y \cdot \left(0.0692910599291889 + \frac{0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 6.2:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\end{array}
\end{array}
if z < -5.4000000000000004Initial program 36.8%
remove-double-neg36.8%
distribute-lft-neg-out36.8%
distribute-neg-frac36.8%
associate-/l*42.1%
distribute-lft-neg-in42.1%
remove-double-neg42.1%
fma-define42.1%
fma-define42.1%
fma-define42.1%
Simplified42.1%
Taylor expanded in z around inf 99.1%
associate-*r/99.1%
metadata-eval99.1%
Simplified99.1%
if -5.4000000000000004 < z < 6.20000000000000018Initial program 99.6%
+-commutative99.6%
associate-/l*99.9%
fma-define99.9%
*-commutative99.9%
fma-define99.9%
fma-define99.9%
*-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around 0 99.1%
+-commutative99.1%
*-commutative99.1%
Simplified99.1%
if 6.20000000000000018 < z Initial program 37.0%
+-commutative37.0%
associate-/l*47.4%
fma-define47.4%
*-commutative47.4%
fma-define47.4%
fma-define47.4%
*-commutative47.4%
fma-define47.4%
Simplified47.4%
Taylor expanded in z around inf 99.7%
+-commutative99.7%
*-commutative99.7%
Simplified99.7%
Final simplification99.3%
(FPCore (x y z) :precision binary64 (if (<= x -8.5e-64) x (if (<= x 2.5e-141) (* y 0.08333333333333323) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= -8.5e-64) {
tmp = x;
} else if (x <= 2.5e-141) {
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 (x <= (-8.5d-64)) then
tmp = x
else if (x <= 2.5d-141) 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 (x <= -8.5e-64) {
tmp = x;
} else if (x <= 2.5e-141) {
tmp = y * 0.08333333333333323;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -8.5e-64: tmp = x elif x <= 2.5e-141: tmp = y * 0.08333333333333323 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -8.5e-64) tmp = x; elseif (x <= 2.5e-141) tmp = Float64(y * 0.08333333333333323); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -8.5e-64) tmp = x; elseif (x <= 2.5e-141) tmp = y * 0.08333333333333323; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -8.5e-64], x, If[LessEqual[x, 2.5e-141], N[(y * 0.08333333333333323), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{-64}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-141}:\\
\;\;\;\;y \cdot 0.08333333333333323\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -8.49999999999999996e-64 or 2.5e-141 < x Initial program 71.9%
+-commutative71.9%
associate-/l*76.0%
fma-define76.0%
*-commutative76.0%
fma-define76.0%
fma-define76.0%
*-commutative76.0%
fma-define76.0%
Simplified76.0%
Taylor expanded in y around 0 72.9%
if -8.49999999999999996e-64 < x < 2.5e-141Initial program 70.5%
+-commutative70.5%
associate-/l*73.8%
fma-define73.8%
*-commutative73.8%
fma-define73.8%
fma-define73.8%
*-commutative73.8%
fma-define73.8%
Simplified73.8%
Taylor expanded in z around 0 68.0%
+-commutative68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in y around inf 68.0%
Taylor expanded in x around 0 57.6%
(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 71.4%
+-commutative71.4%
associate-/l*75.2%
fma-define75.2%
*-commutative75.2%
fma-define75.2%
fma-define75.2%
*-commutative75.2%
fma-define75.2%
Simplified75.2%
Taylor expanded in z around inf 77.5%
+-commutative77.5%
*-commutative77.5%
Simplified77.5%
Final simplification77.5%
(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 71.4%
+-commutative71.4%
associate-/l*75.2%
fma-define75.2%
*-commutative75.2%
fma-define75.2%
fma-define75.2%
*-commutative75.2%
fma-define75.2%
Simplified75.2%
Taylor expanded in y around 0 52.3%
(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 2024170
(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))))