
(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 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
x
(/
(*
y
(+
(* (+ (* z 0.0692910599291889) 0.4917317610505968) z)
0.279195317918525))
(+ (* (+ z 6.012459259764103) z) 3.350343815022304))))
double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + ((y * ((((z * 0.0692910599291889d0) + 0.4917317610505968d0) * z) + 0.279195317918525d0)) / (((z + 6.012459259764103d0) * z) + 3.350343815022304d0))
end function
public static double code(double x, double y, double z) {
return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304));
}
def code(x, y, z): return x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304))
function code(x, y, z) return Float64(x + Float64(Float64(y * Float64(Float64(Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / Float64(Float64(Float64(z + 6.012459259764103) * z) + 3.350343815022304))) end
function tmp = code(x, y, z) tmp = x + ((y * ((((z * 0.0692910599291889) + 0.4917317610505968) * z) + 0.279195317918525)) / (((z + 6.012459259764103) * z) + 3.350343815022304)); end
code[x_, y_, z_] := N[(x + N[(N[(y * N[(N[(N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision] * z), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(z + 6.012459259764103), $MachinePrecision] * z), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(\left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) \cdot z + 0.279195317918525\right)}{\left(z + 6.012459259764103\right) \cdot z + 3.350343815022304}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
1e+273)
(fma
y
(/
(fma z (fma z 0.0692910599291889 0.4917317610505968) 0.279195317918525)
(fma z (+ z 6.012459259764103) 3.350343815022304))
x)
(+ x (/ y 14.431876219268936))))
double code(double x, double y, double z) {
double tmp;
if (((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) <= 1e+273) {
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 / 14.431876219268936);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) <= 1e+273) 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 / 14.431876219268936)); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision], 1e+273], 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 / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} \leq 10^{+273}:\\
\;\;\;\;\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 + \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))) < 9.99999999999999945e272Initial program 93.9%
+-commutative93.9%
associate-/l*99.7%
fma-define99.7%
remove-double-neg99.7%
remove-double-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
if 9.99999999999999945e272 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.7%
Taylor expanded in z around inf 0.7%
unpow20.7%
associate-*r*0.7%
*-commutative0.7%
Simplified0.7%
clear-num0.7%
*-un-lft-identity0.7%
associate-*l*0.7%
times-frac11.3%
*-commutative11.3%
Applied egg-rr11.3%
Taylor expanded in z around inf 99.7%
associate-*l/99.7%
metadata-eval99.7%
clear-num99.9%
Applied egg-rr99.9%
Final simplification99.8%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
(t_1
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(t_2 (pow t_0 0.5)))
(if (<= (/ (* y t_1) t_0) 1e+273)
(+ x (* (/ t_1 t_2) (/ y t_2)))
(+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525;
double t_2 = pow(t_0, 0.5);
double tmp;
if (((y * t_1) / t_0) <= 1e+273) {
tmp = x + ((t_1 / t_2) * (y / t_2));
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_0 = (z * (z + 6.012459259764103d0)) + 3.350343815022304d0
t_1 = (z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0
t_2 = t_0 ** 0.5d0
if (((y * t_1) / t_0) <= 1d+273) then
tmp = x + ((t_1 / t_2) * (y / t_2))
else
tmp = x + (y / 14.431876219268936d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525;
double t_2 = Math.pow(t_0, 0.5);
double tmp;
if (((y * t_1) / t_0) <= 1e+273) {
tmp = x + ((t_1 / t_2) * (y / t_2));
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
def code(x, y, z): t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304 t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525 t_2 = math.pow(t_0, 0.5) tmp = 0 if ((y * t_1) / t_0) <= 1e+273: tmp = x + ((t_1 / t_2) * (y / t_2)) else: tmp = x + (y / 14.431876219268936) return tmp
function code(x, y, z) t_0 = Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304) t_1 = Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525) t_2 = t_0 ^ 0.5 tmp = 0.0 if (Float64(Float64(y * t_1) / t_0) <= 1e+273) tmp = Float64(x + Float64(Float64(t_1 / t_2) * Float64(y / t_2))); else tmp = Float64(x + Float64(y / 14.431876219268936)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304; t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525; t_2 = t_0 ^ 0.5; tmp = 0.0; if (((y * t_1) / t_0) <= 1e+273) tmp = x + ((t_1 / t_2) * (y / t_2)); else tmp = x + (y / 14.431876219268936); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]}, Block[{t$95$1 = N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$0, 0.5], $MachinePrecision]}, If[LessEqual[N[(N[(y * t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision], 1e+273], N[(x + N[(N[(t$95$1 / t$95$2), $MachinePrecision] * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\\
t_1 := z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\\
t_2 := {t\_0}^{0.5}\\
\mathbf{if}\;\frac{y \cdot t\_1}{t\_0} \leq 10^{+273}:\\
\;\;\;\;x + \frac{t\_1}{t\_2} \cdot \frac{y}{t\_2}\\
\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))) < 9.99999999999999945e272Initial program 93.9%
*-commutative93.9%
add-sqr-sqrt93.5%
times-frac99.6%
*-commutative99.6%
pow1/299.6%
*-commutative99.6%
pow1/299.6%
*-commutative99.6%
Applied egg-rr99.6%
if 9.99999999999999945e272 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.7%
Taylor expanded in z around inf 0.7%
unpow20.7%
associate-*r*0.7%
*-commutative0.7%
Simplified0.7%
clear-num0.7%
*-un-lft-identity0.7%
associate-*l*0.7%
times-frac11.3%
*-commutative11.3%
Applied egg-rr11.3%
Taylor expanded in z around inf 99.7%
associate-*l/99.7%
metadata-eval99.7%
clear-num99.9%
Applied egg-rr99.9%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ (* z (+ z 6.012459259764103)) 3.350343815022304))
(t_1
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525)))
(if (<= (/ (* y t_1) t_0) 1e+273)
(+ x (* t_1 (/ y t_0)))
(+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525;
double tmp;
if (((y * t_1) / t_0) <= 1e+273) {
tmp = x + (t_1 * (y / t_0));
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = (z * (z + 6.012459259764103d0)) + 3.350343815022304d0
t_1 = (z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0
if (((y * t_1) / t_0) <= 1d+273) then
tmp = x + (t_1 * (y / t_0))
else
tmp = x + (y / 14.431876219268936d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304;
double t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525;
double tmp;
if (((y * t_1) / t_0) <= 1e+273) {
tmp = x + (t_1 * (y / t_0));
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
def code(x, y, z): t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304 t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525 tmp = 0 if ((y * t_1) / t_0) <= 1e+273: tmp = x + (t_1 * (y / t_0)) else: tmp = x + (y / 14.431876219268936) return tmp
function code(x, y, z) t_0 = Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304) t_1 = Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525) tmp = 0.0 if (Float64(Float64(y * t_1) / t_0) <= 1e+273) tmp = Float64(x + Float64(t_1 * Float64(y / t_0))); else tmp = Float64(x + Float64(y / 14.431876219268936)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (z * (z + 6.012459259764103)) + 3.350343815022304; t_1 = (z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525; tmp = 0.0; if (((y * t_1) / t_0) <= 1e+273) tmp = x + (t_1 * (y / t_0)); else tmp = x + (y / 14.431876219268936); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]}, Block[{t$95$1 = N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]}, If[LessEqual[N[(N[(y * t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision], 1e+273], N[(x + N[(t$95$1 * N[(y / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304\\
t_1 := z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\\
\mathbf{if}\;\frac{y \cdot t\_1}{t\_0} \leq 10^{+273}:\\
\;\;\;\;x + t\_1 \cdot \frac{y}{t\_0}\\
\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))) < 9.99999999999999945e272Initial program 93.9%
+-commutative93.9%
associate-/l*99.7%
fma-define99.7%
remove-double-neg99.7%
remove-double-neg99.7%
*-commutative99.7%
fma-define99.7%
fma-define99.7%
*-commutative99.7%
fma-define99.7%
Simplified99.7%
fma-undefine99.7%
fma-define99.7%
fma-undefine99.7%
*-commutative99.7%
fma-undefine99.7%
*-commutative99.7%
associate-/l*93.9%
*-commutative93.9%
associate-/l*98.3%
*-commutative98.3%
*-commutative98.3%
Applied egg-rr98.3%
if 9.99999999999999945e272 < (/.f64 (*.f64 y (+.f64 (*.f64 (+.f64 (*.f64 z #s(literal 692910599291889/10000000000000000 binary64)) #s(literal 307332350656623/625000000000000 binary64)) z) #s(literal 11167812716741/40000000000000 binary64))) (+.f64 (*.f64 (+.f64 z #s(literal 6012459259764103/1000000000000000 binary64)) z) #s(literal 104698244219447/31250000000000 binary64))) Initial program 0.7%
Taylor expanded in z around inf 0.7%
unpow20.7%
associate-*r*0.7%
*-commutative0.7%
Simplified0.7%
clear-num0.7%
*-un-lft-identity0.7%
associate-*l*0.7%
times-frac11.3%
*-commutative11.3%
Applied egg-rr11.3%
Taylor expanded in z around inf 99.7%
associate-*l/99.7%
metadata-eval99.7%
clear-num99.9%
Applied egg-rr99.9%
Final simplification98.8%
(FPCore (x y z)
:precision binary64
(if (or (<= z -2e+21) (not (<= z 18000000000.0)))
(+ x (/ y 14.431876219268936))
(+
(/
(*
y
(+
(* z (+ (* z 0.0692910599291889) 0.4917317610505968))
0.279195317918525))
(+ (* z (+ z 6.012459259764103)) 3.350343815022304))
x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -2e+21) || !(z <= 18000000000.0)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-2d+21)) .or. (.not. (z <= 18000000000.0d0))) then
tmp = x + (y / 14.431876219268936d0)
else
tmp = ((y * ((z * ((z * 0.0692910599291889d0) + 0.4917317610505968d0)) + 0.279195317918525d0)) / ((z * (z + 6.012459259764103d0)) + 3.350343815022304d0)) + x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -2e+21) || !(z <= 18000000000.0)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -2e+21) or not (z <= 18000000000.0): tmp = x + (y / 14.431876219268936) else: tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -2e+21) || !(z <= 18000000000.0)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = Float64(Float64(Float64(y * Float64(Float64(z * Float64(Float64(z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / Float64(Float64(z * Float64(z + 6.012459259764103)) + 3.350343815022304)) + x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -2e+21) || ~((z <= 18000000000.0))) tmp = x + (y / 14.431876219268936); else tmp = ((y * ((z * ((z * 0.0692910599291889) + 0.4917317610505968)) + 0.279195317918525)) / ((z * (z + 6.012459259764103)) + 3.350343815022304)) + x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -2e+21], N[Not[LessEqual[z, 18000000000.0]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y * N[(N[(z * N[(N[(z * 0.0692910599291889), $MachinePrecision] + 0.4917317610505968), $MachinePrecision]), $MachinePrecision] + 0.279195317918525), $MachinePrecision]), $MachinePrecision] / N[(N[(z * N[(z + 6.012459259764103), $MachinePrecision]), $MachinePrecision] + 3.350343815022304), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+21} \lor \neg \left(z \leq 18000000000\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \left(z \cdot \left(z \cdot 0.0692910599291889 + 0.4917317610505968\right) + 0.279195317918525\right)}{z \cdot \left(z + 6.012459259764103\right) + 3.350343815022304} + x\\
\end{array}
\end{array}
if z < -2e21 or 1.8e10 < z Initial program 29.0%
Taylor expanded in z around inf 29.0%
unpow229.0%
associate-*r*29.0%
*-commutative29.0%
Simplified29.0%
clear-num29.0%
*-un-lft-identity29.0%
associate-*l*28.9%
times-frac43.7%
*-commutative43.7%
Applied egg-rr43.7%
Taylor expanded in z around inf 99.7%
associate-*l/99.7%
metadata-eval99.7%
clear-num99.9%
Applied egg-rr99.9%
if -2e21 < z < 1.8e10Initial program 99.6%
Final simplification99.8%
(FPCore (x y z) :precision binary64 (if (or (<= z -5200000.0) (not (<= z 5.0))) (+ x (/ y 14.431876219268936)) (+ x (+ (* -0.00277777777751721 (* y z)) (* y 0.08333333333333323)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5200000.0) || !(z <= 5.0)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + ((-0.00277777777751721 * (y * z)) + (y * 0.08333333333333323));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-5200000.0d0)) .or. (.not. (z <= 5.0d0))) then
tmp = x + (y / 14.431876219268936d0)
else
tmp = x + (((-0.00277777777751721d0) * (y * z)) + (y * 0.08333333333333323d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -5200000.0) || !(z <= 5.0)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + ((-0.00277777777751721 * (y * z)) + (y * 0.08333333333333323));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5200000.0) or not (z <= 5.0): tmp = x + (y / 14.431876219268936) else: tmp = x + ((-0.00277777777751721 * (y * z)) + (y * 0.08333333333333323)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5200000.0) || !(z <= 5.0)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = Float64(x + Float64(Float64(-0.00277777777751721 * Float64(y * z)) + Float64(y * 0.08333333333333323))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5200000.0) || ~((z <= 5.0))) tmp = x + (y / 14.431876219268936); else tmp = x + ((-0.00277777777751721 * (y * z)) + (y * 0.08333333333333323)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5200000.0], N[Not[LessEqual[z, 5.0]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-0.00277777777751721 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5200000 \lor \neg \left(z \leq 5\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + \left(-0.00277777777751721 \cdot \left(y \cdot z\right) + y \cdot 0.08333333333333323\right)\\
\end{array}
\end{array}
if z < -5.2e6 or 5 < z Initial program 31.2%
Taylor expanded in z around inf 30.9%
unpow230.9%
associate-*r*30.9%
*-commutative30.9%
Simplified30.9%
clear-num30.9%
*-un-lft-identity30.9%
associate-*l*30.9%
times-frac45.2%
*-commutative45.2%
Applied egg-rr45.2%
Taylor expanded in z around inf 99.5%
associate-*l/99.5%
metadata-eval99.5%
clear-num99.7%
Applied egg-rr99.7%
if -5.2e6 < z < 5Initial program 99.6%
*-commutative99.6%
flip-+99.6%
associate-*l/99.3%
sub-neg99.3%
swap-sqr99.3%
metadata-eval99.7%
metadata-eval99.7%
sub-neg99.7%
*-commutative99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 98.9%
Final simplification99.3%
(FPCore (x y z)
:precision binary64
(if (<= z -5200000.0)
(+ (* y 0.0692910599291889) (- x (/ (* y -0.07512208616047561) z)))
(if (<= z 5.0)
(+ x (+ (* -0.00277777777751721 (* y z)) (* y 0.08333333333333323)))
(+ x (/ y 14.431876219268936)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -5200000.0) {
tmp = (y * 0.0692910599291889) + (x - ((y * -0.07512208616047561) / z));
} else if (z <= 5.0) {
tmp = x + ((-0.00277777777751721 * (y * z)) + (y * 0.08333333333333323));
} else {
tmp = x + (y / 14.431876219268936);
}
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 <= (-5200000.0d0)) then
tmp = (y * 0.0692910599291889d0) + (x - ((y * (-0.07512208616047561d0)) / z))
else if (z <= 5.0d0) then
tmp = x + (((-0.00277777777751721d0) * (y * z)) + (y * 0.08333333333333323d0))
else
tmp = x + (y / 14.431876219268936d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -5200000.0) {
tmp = (y * 0.0692910599291889) + (x - ((y * -0.07512208616047561) / z));
} else if (z <= 5.0) {
tmp = x + ((-0.00277777777751721 * (y * z)) + (y * 0.08333333333333323));
} else {
tmp = x + (y / 14.431876219268936);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -5200000.0: tmp = (y * 0.0692910599291889) + (x - ((y * -0.07512208616047561) / z)) elif z <= 5.0: tmp = x + ((-0.00277777777751721 * (y * z)) + (y * 0.08333333333333323)) else: tmp = x + (y / 14.431876219268936) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -5200000.0) tmp = Float64(Float64(y * 0.0692910599291889) + Float64(x - Float64(Float64(y * -0.07512208616047561) / z))); elseif (z <= 5.0) tmp = Float64(x + Float64(Float64(-0.00277777777751721 * Float64(y * z)) + Float64(y * 0.08333333333333323))); else tmp = Float64(x + Float64(y / 14.431876219268936)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -5200000.0) tmp = (y * 0.0692910599291889) + (x - ((y * -0.07512208616047561) / z)); elseif (z <= 5.0) tmp = x + ((-0.00277777777751721 * (y * z)) + (y * 0.08333333333333323)); else tmp = x + (y / 14.431876219268936); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -5200000.0], N[(N[(y * 0.0692910599291889), $MachinePrecision] + N[(x - N[(N[(y * -0.07512208616047561), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.0], N[(x + N[(N[(-0.00277777777751721 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5200000:\\
\;\;\;\;y \cdot 0.0692910599291889 + \left(x - \frac{y \cdot -0.07512208616047561}{z}\right)\\
\mathbf{elif}\;z \leq 5:\\
\;\;\;\;x + \left(-0.00277777777751721 \cdot \left(y \cdot z\right) + y \cdot 0.08333333333333323\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\end{array}
\end{array}
if z < -5.2e6Initial program 30.4%
+-commutative30.4%
associate-/l*47.8%
fma-define47.8%
remove-double-neg47.8%
remove-double-neg47.8%
*-commutative47.8%
fma-define47.8%
fma-define47.8%
*-commutative47.8%
fma-define47.8%
Simplified47.8%
Taylor expanded in z around -inf 99.6%
associate-+r+99.6%
+-commutative99.6%
*-commutative99.6%
mul-1-neg99.6%
unsub-neg99.6%
distribute-rgt-out--99.6%
metadata-eval99.6%
Simplified99.6%
if -5.2e6 < z < 5Initial program 99.6%
*-commutative99.6%
flip-+99.6%
associate-*l/99.3%
sub-neg99.3%
swap-sqr99.3%
metadata-eval99.7%
metadata-eval99.7%
sub-neg99.7%
*-commutative99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 98.9%
if 5 < z Initial program 32.2%
Taylor expanded in z around inf 32.2%
unpow232.2%
associate-*r*32.2%
*-commutative32.2%
Simplified32.2%
clear-num32.1%
*-un-lft-identity32.1%
associate-*l*32.2%
times-frac42.3%
*-commutative42.3%
Applied egg-rr42.3%
Taylor expanded in z around inf 99.8%
associate-*l/99.7%
metadata-eval99.7%
clear-num100.0%
Applied egg-rr100.0%
Final simplification99.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -5200000.0) (not (<= z 6.5))) (+ x (/ y 14.431876219268936)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5200000.0) || !(z <= 6.5)) {
tmp = x + (y / 14.431876219268936);
} 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 <= (-5200000.0d0)) .or. (.not. (z <= 6.5d0))) then
tmp = x + (y / 14.431876219268936d0)
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 <= -5200000.0) || !(z <= 6.5)) {
tmp = x + (y / 14.431876219268936);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5200000.0) or not (z <= 6.5): tmp = x + (y / 14.431876219268936) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5200000.0) || !(z <= 6.5)) tmp = Float64(x + Float64(y / 14.431876219268936)); else tmp = Float64(x + Float64(y * 0.08333333333333323)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -5200000.0) || ~((z <= 6.5))) tmp = x + (y / 14.431876219268936); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5200000.0], N[Not[LessEqual[z, 6.5]], $MachinePrecision]], N[(x + N[(y / 14.431876219268936), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * 0.08333333333333323), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5200000 \lor \neg \left(z \leq 6.5\right):\\
\;\;\;\;x + \frac{y}{14.431876219268936}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.2e6 or 6.5 < z Initial program 31.2%
Taylor expanded in z around inf 30.9%
unpow230.9%
associate-*r*30.9%
*-commutative30.9%
Simplified30.9%
clear-num30.9%
*-un-lft-identity30.9%
associate-*l*30.9%
times-frac45.2%
*-commutative45.2%
Applied egg-rr45.2%
Taylor expanded in z around inf 99.5%
associate-*l/99.5%
metadata-eval99.5%
clear-num99.7%
Applied egg-rr99.7%
if -5.2e6 < z < 6.5Initial program 99.6%
Taylor expanded in z around 0 98.2%
*-commutative98.2%
Simplified98.2%
Final simplification99.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -5200000.0) (not (<= z 5.6))) (+ x (* y 0.0692910599291889)) (+ x (* y 0.08333333333333323))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -5200000.0) || !(z <= 5.6)) {
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 <= (-5200000.0d0)) .or. (.not. (z <= 5.6d0))) 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 <= -5200000.0) || !(z <= 5.6)) {
tmp = x + (y * 0.0692910599291889);
} else {
tmp = x + (y * 0.08333333333333323);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -5200000.0) or not (z <= 5.6): tmp = x + (y * 0.0692910599291889) else: tmp = x + (y * 0.08333333333333323) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -5200000.0) || !(z <= 5.6)) 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 <= -5200000.0) || ~((z <= 5.6))) tmp = x + (y * 0.0692910599291889); else tmp = x + (y * 0.08333333333333323); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -5200000.0], N[Not[LessEqual[z, 5.6]], $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 -5200000 \lor \neg \left(z \leq 5.6\right):\\
\;\;\;\;x + y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot 0.08333333333333323\\
\end{array}
\end{array}
if z < -5.2e6 or 5.5999999999999996 < z Initial program 31.2%
Taylor expanded in z around inf 99.4%
*-commutative99.4%
Simplified99.4%
if -5.2e6 < z < 5.5999999999999996Initial program 99.6%
Taylor expanded in z around 0 98.2%
*-commutative98.2%
Simplified98.2%
Final simplification98.8%
(FPCore (x y z) :precision binary64 (if (or (<= y -1.3e+18) (not (<= y 1.08e+52))) (* y 0.0692910599291889) x))
double code(double x, double y, double z) {
double tmp;
if ((y <= -1.3e+18) || !(y <= 1.08e+52)) {
tmp = y * 0.0692910599291889;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y <= (-1.3d+18)) .or. (.not. (y <= 1.08d+52))) then
tmp = y * 0.0692910599291889d0
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -1.3e+18) || !(y <= 1.08e+52)) {
tmp = y * 0.0692910599291889;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -1.3e+18) or not (y <= 1.08e+52): tmp = y * 0.0692910599291889 else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -1.3e+18) || !(y <= 1.08e+52)) tmp = Float64(y * 0.0692910599291889); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -1.3e+18) || ~((y <= 1.08e+52))) tmp = y * 0.0692910599291889; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -1.3e+18], N[Not[LessEqual[y, 1.08e+52]], $MachinePrecision]], N[(y * 0.0692910599291889), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+18} \lor \neg \left(y \leq 1.08 \cdot 10^{+52}\right):\\
\;\;\;\;y \cdot 0.0692910599291889\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.3e18 or 1.07999999999999997e52 < y Initial program 56.5%
Taylor expanded in z around inf 68.5%
*-commutative68.5%
Simplified68.5%
Taylor expanded in x around 0 55.5%
if -1.3e18 < y < 1.07999999999999997e52Initial program 71.9%
+-commutative71.9%
associate-/l*72.6%
fma-define72.6%
remove-double-neg72.6%
remove-double-neg72.6%
*-commutative72.6%
fma-define72.6%
fma-define72.6%
*-commutative72.6%
fma-define72.6%
Simplified72.6%
Taylor expanded in y around 0 75.4%
Final simplification66.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 65.1%
Taylor expanded in z around inf 78.9%
*-commutative78.9%
Simplified78.9%
(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 65.1%
+-commutative65.1%
associate-/l*72.4%
fma-define72.4%
remove-double-neg72.4%
remove-double-neg72.4%
*-commutative72.4%
fma-define72.4%
fma-define72.4%
*-commutative72.4%
fma-define72.4%
Simplified72.4%
Taylor expanded in y around 0 48.7%
(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 2024097
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, B"
:precision binary64
:alt
(if (< z -8120153.652456675) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x)) (if (< z 6.576118972787377e+20) (+ x (* (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (/ 1.0 (+ (* (+ z 6.012459259764103) z) 3.350343815022304)))) (- (* (+ (/ 0.07512208616047561 z) 0.0692910599291889) y) (- (/ (* 0.40462203869992125 y) (* z z)) x))))
(+ x (/ (* y (+ (* (+ (* z 0.0692910599291889) 0.4917317610505968) z) 0.279195317918525)) (+ (* (+ z 6.012459259764103) z) 3.350343815022304))))