
(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 13 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 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))
5e+295)
(fma
(/
(fma (fma 0.0692910599291889 z 0.4917317610505968) z 0.279195317918525)
(fma (+ 6.012459259764103 z) z 3.350343815022304))
y
x)
(+ x (/ y 14.431876219268936))))
double code(double x, double y, double z) {
double tmp;
if (((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)) <= 5e+295) {
tmp = fma((fma(fma(0.0692910599291889, z, 0.4917317610505968), z, 0.279195317918525) / fma((6.012459259764103 + z), z, 3.350343815022304)), y, x);
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304)) <= 5e+295) tmp = fma(Float64(fma(fma(0.0692910599291889, z, 0.4917317610505968), z, 0.279195317918525) / fma(Float64(6.012459259764103 + z), z, 3.350343815022304)), y, x); else tmp = Float64(x + Float64(y / 14.431876219268936)); end return tmp end
code[x_, y_, z_] := If[LessEqual[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], 5e+295], N[(N[(N[(N[(0.0692910599291889 * z + 0.4917317610505968), $MachinePrecision] * z + 0.279195317918525), $MachinePrecision] / N[(N[(6.012459259764103 + z), $MachinePrecision] * z + 3.350343815022304), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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} \leq 5 \cdot 10^{+295}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0692910599291889, z, 0.4917317610505968\right), z, 0.279195317918525\right)}{\mathsf{fma}\left(6.012459259764103 + z, z, 3.350343815022304\right)}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\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.99999999999999991e295Initial program 93.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.7%
if 4.99999999999999991e295 < (/.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 1.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6418.3
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6418.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6418.3
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6418.3
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6418.3
Applied rewrites18.3%
Taylor expanded in z around inf
Applied rewrites100.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
(if (or (<= t_0 5e+55) (not (<= t_0 5e+295)))
(fma 0.0692910599291889 y x)
(* 0.08333333333333323 y))))
double code(double x, double y, double z) {
double t_0 = (y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304);
double tmp;
if ((t_0 <= 5e+55) || !(t_0 <= 5e+295)) {
tmp = fma(0.0692910599291889, y, x);
} else {
tmp = 0.08333333333333323 * y;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304)) tmp = 0.0 if ((t_0 <= 5e+55) || !(t_0 <= 5e+295)) tmp = fma(0.0692910599291889, y, x); else tmp = Float64(0.08333333333333323 * y); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, If[Or[LessEqual[t$95$0, 5e+55], N[Not[LessEqual[t$95$0, 5e+295]], $MachinePrecision]], N[(0.0692910599291889 * y + x), $MachinePrecision], N[(0.08333333333333323 * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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}\\
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{+55} \lor \neg \left(t\_0 \leq 5 \cdot 10^{+295}\right):\\
\;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;0.08333333333333323 \cdot y\\
\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))) < 5.00000000000000046e55 or 4.99999999999999991e295 < (/.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 66.5%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6484.7
Applied rewrites84.7%
if 5.00000000000000046e55 < (/.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.99999999999999991e295Initial program 99.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.5%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6494.1
Applied rewrites94.1%
Taylor expanded in z around 0
Applied rewrites83.8%
Final simplification84.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -6.5) (not (<= z 3.3)))
(fma y (- 0.0692910599291889 (/ -0.07512208616047561 z)) x)
(+
x
(/
y
(fma
(fma
(fma 0.07852944389170011 z -0.10095235035524991)
z
0.39999999996247915)
z
12.000000000000014)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -6.5) || !(z <= 3.3)) {
tmp = fma(y, (0.0692910599291889 - (-0.07512208616047561 / z)), x);
} else {
tmp = x + (y / fma(fma(fma(0.07852944389170011, z, -0.10095235035524991), z, 0.39999999996247915), z, 12.000000000000014));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if ((z <= -6.5) || !(z <= 3.3)) tmp = fma(y, Float64(0.0692910599291889 - Float64(-0.07512208616047561 / z)), x); else tmp = Float64(x + Float64(y / fma(fma(fma(0.07852944389170011, z, -0.10095235035524991), z, 0.39999999996247915), z, 12.000000000000014))); end return tmp end
code[x_, y_, z_] := If[Or[LessEqual[z, -6.5], N[Not[LessEqual[z, 3.3]], $MachinePrecision]], N[(y * N[(0.0692910599291889 - N[(-0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + N[(y / N[(N[(N[(0.07852944389170011 * z + -0.10095235035524991), $MachinePrecision] * z + 0.39999999996247915), $MachinePrecision] * z + 12.000000000000014), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \lor \neg \left(z \leq 3.3\right):\\
\;\;\;\;\mathsf{fma}\left(y, 0.0692910599291889 - \frac{-0.07512208616047561}{z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.07852944389170011, z, -0.10095235035524991\right), z, 0.39999999996247915\right), z, 12.000000000000014\right)}\\
\end{array}
\end{array}
if z < -6.5 or 3.2999999999999998 < z Initial program 38.5%
Taylor expanded in z around inf
associate-+r+N/A
associate--l+N/A
distribute-rgt-out--N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
times-fracN/A
distribute-rgt-out--N/A
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
associate-+r+N/A
+-commutativeN/A
+-commutativeN/A
Applied rewrites99.1%
if -6.5 < z < 3.2999999999999998Initial program 99.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.3
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6499.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.3
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6499.3
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.3
Applied rewrites99.3%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f6499.5
Applied rewrites99.5%
Final simplification99.4%
(FPCore (x y z)
:precision binary64
(if (<= z -6.5)
(fma
(-
0.0692910599291889
(/ (- (/ 0.4046220386999212 z) 0.07512208616047561) z))
y
x)
(if (<= z 3.3)
(+
x
(/
y
(fma
(fma
(fma 0.07852944389170011 z -0.10095235035524991)
z
0.39999999996247915)
z
12.000000000000014)))
(fma y (- 0.0692910599291889 (/ -0.07512208616047561 z)) x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -6.5) {
tmp = fma((0.0692910599291889 - (((0.4046220386999212 / z) - 0.07512208616047561) / z)), y, x);
} else if (z <= 3.3) {
tmp = x + (y / fma(fma(fma(0.07852944389170011, z, -0.10095235035524991), z, 0.39999999996247915), z, 12.000000000000014));
} else {
tmp = fma(y, (0.0692910599291889 - (-0.07512208616047561 / z)), x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (z <= -6.5) tmp = fma(Float64(0.0692910599291889 - Float64(Float64(Float64(0.4046220386999212 / z) - 0.07512208616047561) / z)), y, x); elseif (z <= 3.3) tmp = Float64(x + Float64(y / fma(fma(fma(0.07852944389170011, z, -0.10095235035524991), z, 0.39999999996247915), z, 12.000000000000014))); else tmp = fma(y, Float64(0.0692910599291889 - Float64(-0.07512208616047561 / z)), x); end return tmp end
code[x_, y_, z_] := If[LessEqual[z, -6.5], N[(N[(0.0692910599291889 - N[(N[(N[(0.4046220386999212 / z), $MachinePrecision] - 0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[z, 3.3], N[(x + N[(y / N[(N[(N[(0.07852944389170011 * z + -0.10095235035524991), $MachinePrecision] * z + 0.39999999996247915), $MachinePrecision] * z + 12.000000000000014), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(0.0692910599291889 - N[(-0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5:\\
\;\;\;\;\mathsf{fma}\left(0.0692910599291889 - \frac{\frac{0.4046220386999212}{z} - 0.07512208616047561}{z}, y, x\right)\\
\mathbf{elif}\;z \leq 3.3:\\
\;\;\;\;x + \frac{y}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.07852944389170011, z, -0.10095235035524991\right), z, 0.39999999996247915\right), z, 12.000000000000014\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, 0.0692910599291889 - \frac{-0.07512208616047561}{z}, x\right)\\
\end{array}
\end{array}
if z < -6.5Initial program 45.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites58.2%
Taylor expanded in z around inf
sub-negN/A
+-commutativeN/A
+-commutativeN/A
associate-+r+N/A
neg-sub0N/A
associate--r-N/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
associate-*r/N/A
associate-*r/N/A
metadata-evalN/A
div-subN/A
neg-sub0N/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
Applied rewrites99.0%
if -6.5 < z < 3.2999999999999998Initial program 99.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.3
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6499.3
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.3
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6499.3
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.3
Applied rewrites99.3%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f6499.5
Applied rewrites99.5%
if 3.2999999999999998 < z Initial program 30.9%
Taylor expanded in z around inf
associate-+r+N/A
associate--l+N/A
distribute-rgt-out--N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
times-fracN/A
distribute-rgt-out--N/A
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
associate-+r+N/A
+-commutativeN/A
+-commutativeN/A
Applied rewrites99.6%
(FPCore (x y z)
:precision binary64
(if (or (<= z -5.5) (not (<= z 3.0)))
(fma y (- 0.0692910599291889 (/ -0.07512208616047561 z)) x)
(fma
(fma
(fma
(fma -0.0005951669793454025 z 0.0007936505811533442)
z
-0.00277777777751721)
z
0.08333333333333323)
y
x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 3.0)) {
tmp = fma(y, (0.0692910599291889 - (-0.07512208616047561 / z)), x);
} else {
tmp = fma(fma(fma(fma(-0.0005951669793454025, z, 0.0007936505811533442), z, -0.00277777777751721), z, 0.08333333333333323), y, x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 3.0)) tmp = fma(y, Float64(0.0692910599291889 - Float64(-0.07512208616047561 / z)), x); else tmp = fma(fma(fma(fma(-0.0005951669793454025, z, 0.0007936505811533442), z, -0.00277777777751721), z, 0.08333333333333323), y, x); end return tmp end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 3.0]], $MachinePrecision]], N[(y * N[(0.0692910599291889 - N[(-0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(N[(-0.0005951669793454025 * z + 0.0007936505811533442), $MachinePrecision] * z + -0.00277777777751721), $MachinePrecision] * z + 0.08333333333333323), $MachinePrecision] * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 3\right):\\
\;\;\;\;\mathsf{fma}\left(y, 0.0692910599291889 - \frac{-0.07512208616047561}{z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.0005951669793454025, z, 0.0007936505811533442\right), z, -0.00277777777751721\right), z, 0.08333333333333323\right), y, x\right)\\
\end{array}
\end{array}
if z < -5.5 or 3 < z Initial program 38.5%
Taylor expanded in z around inf
associate-+r+N/A
associate--l+N/A
distribute-rgt-out--N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
times-fracN/A
distribute-rgt-out--N/A
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
associate-+r+N/A
+-commutativeN/A
+-commutativeN/A
Applied rewrites99.1%
if -5.5 < z < 3Initial program 99.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.8%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f6499.4
Applied rewrites99.4%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (or (<= z -5.5) (not (<= z 4.4)))
(fma y (- 0.0692910599291889 (/ -0.07512208616047561 z)) x)
(fma
(fma
(fma 0.0007936505811533442 z -0.00277777777751721)
z
0.08333333333333323)
y
x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 4.4)) {
tmp = fma(y, (0.0692910599291889 - (-0.07512208616047561 / z)), x);
} else {
tmp = fma(fma(fma(0.0007936505811533442, z, -0.00277777777751721), z, 0.08333333333333323), y, x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 4.4)) tmp = fma(y, Float64(0.0692910599291889 - Float64(-0.07512208616047561 / z)), x); else tmp = fma(fma(fma(0.0007936505811533442, z, -0.00277777777751721), z, 0.08333333333333323), y, x); end return tmp end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 4.4]], $MachinePrecision]], N[(y * N[(0.0692910599291889 - N[(-0.07512208616047561 / z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(0.0007936505811533442 * z + -0.00277777777751721), $MachinePrecision] * z + 0.08333333333333323), $MachinePrecision] * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 4.4\right):\\
\;\;\;\;\mathsf{fma}\left(y, 0.0692910599291889 - \frac{-0.07512208616047561}{z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0007936505811533442, z, -0.00277777777751721\right), z, 0.08333333333333323\right), y, x\right)\\
\end{array}
\end{array}
if z < -5.5 or 4.4000000000000004 < z Initial program 38.5%
Taylor expanded in z around inf
associate-+r+N/A
associate--l+N/A
distribute-rgt-out--N/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
times-fracN/A
distribute-rgt-out--N/A
*-commutativeN/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
associate-+r+N/A
+-commutativeN/A
+-commutativeN/A
Applied rewrites99.1%
if -5.5 < z < 4.4000000000000004Initial program 99.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.8%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f6499.4
Applied rewrites99.4%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (or (<= z -5.5) (not (<= z 4.2)))
(+ x (/ y 14.431876219268936))
(fma
(fma
(fma 0.0007936505811533442 z -0.00277777777751721)
z
0.08333333333333323)
y
x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 4.2)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = fma(fma(fma(0.0007936505811533442, z, -0.00277777777751721), z, 0.08333333333333323), y, x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 4.2)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = fma(fma(fma(0.0007936505811533442, z, -0.00277777777751721), z, 0.08333333333333323), y, x); end return tmp end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 4.2]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(N[(N[(0.0007936505811533442 * z + -0.00277777777751721), $MachinePrecision] * z + 0.08333333333333323), $MachinePrecision] * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 4.2\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(0.0007936505811533442, z, -0.00277777777751721\right), z, 0.08333333333333323\right), y, x\right)\\
\end{array}
\end{array}
if z < -5.5 or 4.20000000000000018 < z Initial program 38.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6456.7
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6456.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6456.7
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6456.7
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6456.7
Applied rewrites56.7%
Taylor expanded in z around inf
Applied rewrites98.7%
if -5.5 < z < 4.20000000000000018Initial program 99.6%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.8%
Taylor expanded in z around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
lower-fma.f6499.4
Applied rewrites99.4%
Final simplification99.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 5.2))) (+ x (/ y 14.431876219268936)) (fma y (fma -0.00277777777751721 z 0.08333333333333323) x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.2)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = fma(y, fma(-0.00277777777751721, z, 0.08333333333333323), x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 5.2)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = fma(y, fma(-0.00277777777751721, z, 0.08333333333333323), x); end return tmp end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 5.2]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(y * N[(-0.00277777777751721 * z + 0.08333333333333323), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 5.2\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(-0.00277777777751721, z, 0.08333333333333323\right), x\right)\\
\end{array}
\end{array}
if z < -5.5 or 5.20000000000000018 < z Initial program 38.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6456.7
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6456.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6456.7
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f6456.7
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6456.7
Applied rewrites56.7%
Taylor expanded in z around inf
Applied rewrites98.7%
if -5.5 < z < 5.20000000000000018Initial program 99.6%
Taylor expanded in z around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-out--N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
metadata-eval99.1
Applied rewrites99.1%
Final simplification98.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 5.2))) (fma 0.0692910599291889 y x) (fma y (fma -0.00277777777751721 z 0.08333333333333323) x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.2)) {
tmp = fma(0.0692910599291889, y, x);
} else {
tmp = fma(y, fma(-0.00277777777751721, z, 0.08333333333333323), x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 5.2)) tmp = fma(0.0692910599291889, y, x); else tmp = fma(y, fma(-0.00277777777751721, z, 0.08333333333333323), x); end return tmp end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 5.2]], $MachinePrecision]], N[(0.0692910599291889 * y + x), $MachinePrecision], N[(y * N[(-0.00277777777751721 * z + 0.08333333333333323), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 5.2\right):\\
\;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(-0.00277777777751721, z, 0.08333333333333323\right), x\right)\\
\end{array}
\end{array}
if z < -5.5 or 5.20000000000000018 < z Initial program 38.5%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6498.4
Applied rewrites98.4%
if -5.5 < z < 5.20000000000000018Initial program 99.6%
Taylor expanded in z around 0
+-commutativeN/A
+-commutativeN/A
*-commutativeN/A
distribute-rgt-out--N/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-outN/A
lower-fma.f64N/A
lower-fma.f64N/A
metadata-eval99.1
Applied rewrites99.1%
Final simplification98.8%
(FPCore (x y z)
:precision binary64
(if (<= y -2.9e+81)
(* 0.0692910599291889 y)
(if (<= y 2.05e+55)
(* 1.0 x)
(if (<= y 1.25e+194)
(* 0.08333333333333323 y)
(* 0.0692910599291889 y)))))
double code(double x, double y, double z) {
double tmp;
if (y <= -2.9e+81) {
tmp = 0.0692910599291889 * y;
} else if (y <= 2.05e+55) {
tmp = 1.0 * x;
} else if (y <= 1.25e+194) {
tmp = 0.08333333333333323 * y;
} else {
tmp = 0.0692910599291889 * y;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-2.9d+81)) then
tmp = 0.0692910599291889d0 * y
else if (y <= 2.05d+55) then
tmp = 1.0d0 * x
else if (y <= 1.25d+194) then
tmp = 0.08333333333333323d0 * y
else
tmp = 0.0692910599291889d0 * y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -2.9e+81) {
tmp = 0.0692910599291889 * y;
} else if (y <= 2.05e+55) {
tmp = 1.0 * x;
} else if (y <= 1.25e+194) {
tmp = 0.08333333333333323 * y;
} else {
tmp = 0.0692910599291889 * y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -2.9e+81: tmp = 0.0692910599291889 * y elif y <= 2.05e+55: tmp = 1.0 * x elif y <= 1.25e+194: tmp = 0.08333333333333323 * y else: tmp = 0.0692910599291889 * y return tmp
function code(x, y, z) tmp = 0.0 if (y <= -2.9e+81) tmp = Float64(0.0692910599291889 * y); elseif (y <= 2.05e+55) tmp = Float64(1.0 * x); elseif (y <= 1.25e+194) tmp = Float64(0.08333333333333323 * y); else tmp = Float64(0.0692910599291889 * y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -2.9e+81) tmp = 0.0692910599291889 * y; elseif (y <= 2.05e+55) tmp = 1.0 * x; elseif (y <= 1.25e+194) tmp = 0.08333333333333323 * y; else tmp = 0.0692910599291889 * y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -2.9e+81], N[(0.0692910599291889 * y), $MachinePrecision], If[LessEqual[y, 2.05e+55], N[(1.0 * x), $MachinePrecision], If[LessEqual[y, 1.25e+194], N[(0.08333333333333323 * y), $MachinePrecision], N[(0.0692910599291889 * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+81}:\\
\;\;\;\;0.0692910599291889 \cdot y\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{+55}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+194}:\\
\;\;\;\;0.08333333333333323 \cdot y\\
\mathbf{else}:\\
\;\;\;\;0.0692910599291889 \cdot y\\
\end{array}
\end{array}
if y < -2.9e81 or 1.24999999999999997e194 < y Initial program 55.7%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6471.6
Applied rewrites71.6%
Taylor expanded in x around 0
Applied rewrites59.9%
if -2.9e81 < y < 2.04999999999999991e55Initial program 76.4%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6487.1
Applied rewrites87.1%
Taylor expanded in x around inf
Applied rewrites86.4%
Taylor expanded in x around inf
Applied rewrites69.4%
if 2.04999999999999991e55 < y < 1.24999999999999997e194Initial program 73.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites86.3%
Taylor expanded in x around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6477.8
Applied rewrites77.8%
Taylor expanded in z around 0
Applied rewrites61.2%
Final simplification65.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -5.5) (not (<= z 5.5))) (fma 0.0692910599291889 y x) (fma 0.08333333333333323 y x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5.5) || !(z <= 5.5)) {
tmp = fma(0.0692910599291889, y, x);
} else {
tmp = fma(0.08333333333333323, y, x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if ((z <= -5.5) || !(z <= 5.5)) tmp = fma(0.0692910599291889, y, x); else tmp = fma(0.08333333333333323, y, x); end return tmp end
code[x_, y_, z_] := If[Or[LessEqual[z, -5.5], N[Not[LessEqual[z, 5.5]], $MachinePrecision]], N[(0.0692910599291889 * y + x), $MachinePrecision], N[(0.08333333333333323 * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \lor \neg \left(z \leq 5.5\right):\\
\;\;\;\;\mathsf{fma}\left(0.0692910599291889, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.08333333333333323, y, x\right)\\
\end{array}
\end{array}
if z < -5.5 or 5.5 < z Initial program 38.5%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6498.4
Applied rewrites98.4%
if -5.5 < z < 5.5Initial program 99.6%
Taylor expanded in z around 0
+-commutativeN/A
lower-fma.f6498.6
Applied rewrites98.6%
Final simplification98.5%
(FPCore (x y z) :precision binary64 (if (or (<= y -2.9e+81) (not (<= y 6.2e+55))) (* 0.0692910599291889 y) (* 1.0 x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2.9e+81) || !(y <= 6.2e+55)) {
tmp = 0.0692910599291889 * y;
} else {
tmp = 1.0 * x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-2.9d+81)) .or. (.not. (y <= 6.2d+55))) then
tmp = 0.0692910599291889d0 * y
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -2.9e+81) || !(y <= 6.2e+55)) {
tmp = 0.0692910599291889 * y;
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -2.9e+81) or not (y <= 6.2e+55): tmp = 0.0692910599291889 * y else: tmp = 1.0 * x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -2.9e+81) || !(y <= 6.2e+55)) tmp = Float64(0.0692910599291889 * y); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -2.9e+81) || ~((y <= 6.2e+55))) tmp = 0.0692910599291889 * y; else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -2.9e+81], N[Not[LessEqual[y, 6.2e+55]], $MachinePrecision]], N[(0.0692910599291889 * y), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+81} \lor \neg \left(y \leq 6.2 \cdot 10^{+55}\right):\\
\;\;\;\;0.0692910599291889 \cdot y\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if y < -2.9e81 or 6.19999999999999987e55 < y Initial program 60.9%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6466.7
Applied rewrites66.7%
Taylor expanded in x around 0
Applied rewrites53.8%
if -2.9e81 < y < 6.19999999999999987e55Initial program 76.4%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6487.1
Applied rewrites87.1%
Taylor expanded in x around inf
Applied rewrites86.4%
Taylor expanded in x around inf
Applied rewrites69.4%
Final simplification63.2%
(FPCore (x y z) :precision binary64 (* 0.0692910599291889 y))
double code(double x, double y, double z) {
return 0.0692910599291889 * y;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.0692910599291889d0 * y
end function
public static double code(double x, double y, double z) {
return 0.0692910599291889 * y;
}
def code(x, y, z): return 0.0692910599291889 * y
function code(x, y, z) return Float64(0.0692910599291889 * y) end
function tmp = code(x, y, z) tmp = 0.0692910599291889 * y; end
code[x_, y_, z_] := N[(0.0692910599291889 * y), $MachinePrecision]
\begin{array}{l}
\\
0.0692910599291889 \cdot y
\end{array}
Initial program 70.2%
Taylor expanded in z around inf
+-commutativeN/A
lower-fma.f6479.0
Applied rewrites79.0%
Taylor expanded in x around 0
Applied rewrites33.4%
(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 2024324
(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))))