
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(/
(*
(- x 2.0)
(+
(*
(+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y)
x)
z))
(+
(* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x)
47.066876606)))
double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z): return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z) return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) end
function tmp = code(x, y, z) tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606); end
code[x_, y_, z_] := N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 43.3400022514), $MachinePrecision] * x), $MachinePrecision] + 263.505074721), $MachinePrecision] * x), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + 43.3400022514\right) \cdot x + 263.505074721\right) \cdot x + 313.399215894\right) \cdot x + 47.066876606}
\end{array}
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
1e+282)
(/
(*
(fma x (* x x) -8.0)
(/
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606)))
(fma x x (fma x 2.0 4.0)))
(*
x
(-
(/
(+
(/
(-
(/ (+ (+ y -33.31511377824) -130944.19138580533) x)
-3655.1204654076414)
x)
-110.1139242984811)
x)
-4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 1e+282) {
tmp = (fma(x, (x * x), -8.0) * (fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606))) / fma(x, x, fma(x, 2.0, 4.0));
} else {
tmp = x * ((((((((y + -33.31511377824) + -130944.19138580533) / x) - -3655.1204654076414) / x) + -110.1139242984811) / x) - -4.16438922228);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 1e+282) tmp = Float64(Float64(fma(x, Float64(x * x), -8.0) * Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606))) / fma(x, x, fma(x, 2.0, 4.0))); else tmp = Float64(x * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + -33.31511377824) + -130944.19138580533) / x) - -3655.1204654076414) / x) + -110.1139242984811) / x) - -4.16438922228)); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], 1e+282], N[(N[(N[(x * N[(x * x), $MachinePrecision] + -8.0), $MachinePrecision] * N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] / N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x * x + N[(x * 2.0 + 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(N[(N[(N[(N[(N[(y + -33.31511377824), $MachinePrecision] + -130944.19138580533), $MachinePrecision] / x), $MachinePrecision] - -3655.1204654076414), $MachinePrecision] / x), $MachinePrecision] + -110.1139242984811), $MachinePrecision] / x), $MachinePrecision] - -4.16438922228), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq 10^{+282}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, x \cdot x, -8\right) \cdot \frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}}{\mathsf{fma}\left(x, x, \mathsf{fma}\left(x, 2, 4\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{\frac{\frac{\left(y + -33.31511377824\right) + -130944.19138580533}{x} - -3655.1204654076414}{x} + -110.1139242984811}{x} - -4.16438922228\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < 1.00000000000000003e282Initial program 95.7%
Applied rewrites98.9%
if 1.00000000000000003e282 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) Initial program 0.1%
Applied rewrites1.1%
Taylor expanded in x around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f641.1
Applied rewrites1.1%
Taylor expanded in x around -inf
Applied rewrites99.1%
Final simplification99.0%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
1e+282)
(/
(/
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606))
(/ 1.0 (+ x -2.0)))
(*
x
(-
(/
(+
(/
(-
(/ (+ (+ y -33.31511377824) -130944.19138580533) x)
-3655.1204654076414)
x)
-110.1139242984811)
x)
-4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 1e+282) {
tmp = (fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606)) / (1.0 / (x + -2.0));
} else {
tmp = x * ((((((((y + -33.31511377824) + -130944.19138580533) / x) - -3655.1204654076414) / x) + -110.1139242984811) / x) - -4.16438922228);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 1e+282) tmp = Float64(Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606)) / Float64(1.0 / Float64(x + -2.0))); else tmp = Float64(x * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + -33.31511377824) + -130944.19138580533) / x) - -3655.1204654076414) / x) + -110.1139242984811) / x) - -4.16438922228)); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], 1e+282], N[(N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] / N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(x + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(N[(N[(N[(N[(N[(y + -33.31511377824), $MachinePrecision] + -130944.19138580533), $MachinePrecision] / x), $MachinePrecision] - -3655.1204654076414), $MachinePrecision] / x), $MachinePrecision] + -110.1139242984811), $MachinePrecision] / x), $MachinePrecision] - -4.16438922228), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq 10^{+282}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}}{\frac{1}{x + -2}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{\frac{\frac{\left(y + -33.31511377824\right) + -130944.19138580533}{x} - -3655.1204654076414}{x} + -110.1139242984811}{x} - -4.16438922228\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < 1.00000000000000003e282Initial program 95.7%
Applied rewrites98.8%
if 1.00000000000000003e282 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) Initial program 0.1%
Applied rewrites1.1%
Taylor expanded in x around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f641.1
Applied rewrites1.1%
Taylor expanded in x around -inf
Applied rewrites99.1%
Final simplification98.9%
(FPCore (x y z)
:precision binary64
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
(* x (+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
1e+282)
(*
(/
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606))
(+ x -2.0))
(*
x
(-
(/
(+
(/
(-
(/ (+ (+ y -33.31511377824) -130944.19138580533) x)
-3655.1204654076414)
x)
-110.1139242984811)
x)
-4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 1e+282) {
tmp = (fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606)) * (x + -2.0);
} else {
tmp = x * ((((((((y + -33.31511377824) + -130944.19138580533) / x) - -3655.1204654076414) / x) + -110.1139242984811) / x) - -4.16438922228);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)) <= 1e+282) tmp = Float64(Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606)) * Float64(x + -2.0)); else tmp = Float64(x * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + -33.31511377824) + -130944.19138580533) / x) - -3655.1204654076414) / x) + -110.1139242984811) / x) - -4.16438922228)); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2.0), $MachinePrecision] * N[(N[(x * N[(N[(x * N[(N[(x * N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision]), $MachinePrecision] + 137.519416416), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], 1e+282], N[(N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] / N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision] * N[(x + -2.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(N[(N[(N[(N[(N[(y + -33.31511377824), $MachinePrecision] + -130944.19138580533), $MachinePrecision] / x), $MachinePrecision] - -3655.1204654076414), $MachinePrecision] / x), $MachinePrecision] + -110.1139242984811), $MachinePrecision] / x), $MachinePrecision] - -4.16438922228), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(x \cdot \left(x \cdot \left(x \cdot 4.16438922228 + 78.6994924154\right) + 137.519416416\right) + y\right) + z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606} \leq 10^{+282}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), z\right)}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)} \cdot \left(x + -2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{\frac{\frac{\left(y + -33.31511377824\right) + -130944.19138580533}{x} - -3655.1204654076414}{x} + -110.1139242984811}{x} - -4.16438922228\right)\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < 1.00000000000000003e282Initial program 95.7%
Applied rewrites98.8%
if 1.00000000000000003e282 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) Initial program 0.1%
Applied rewrites1.1%
Taylor expanded in x around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f641.1
Applied rewrites1.1%
Taylor expanded in x around -inf
Applied rewrites99.1%
Final simplification98.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(*
x
(-
(/
(+
(/
(-
(/ (+ (+ y -33.31511377824) -130944.19138580533) x)
-3655.1204654076414)
x)
-110.1139242984811)
x)
-4.16438922228))))
(if (<= x -6500000000000.0)
t_0
(if (<= x 9500000.0)
(/
(* (- x 2.0) (fma x (fma x 137.519416416 y) z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
t_0))))
double code(double x, double y, double z) {
double t_0 = x * ((((((((y + -33.31511377824) + -130944.19138580533) / x) - -3655.1204654076414) / x) + -110.1139242984811) / x) - -4.16438922228);
double tmp;
if (x <= -6500000000000.0) {
tmp = t_0;
} else if (x <= 9500000.0) {
tmp = ((x - 2.0) * fma(x, fma(x, 137.519416416, y), z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = t_0;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(x * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + -33.31511377824) + -130944.19138580533) / x) - -3655.1204654076414) / x) + -110.1139242984811) / x) - -4.16438922228)) tmp = 0.0 if (x <= -6500000000000.0) tmp = t_0; elseif (x <= 9500000.0) tmp = Float64(Float64(Float64(x - 2.0) * fma(x, fma(x, 137.519416416, y), z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); else tmp = t_0; end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[(N[(N[(N[(N[(N[(N[(y + -33.31511377824), $MachinePrecision] + -130944.19138580533), $MachinePrecision] / x), $MachinePrecision] - -3655.1204654076414), $MachinePrecision] / x), $MachinePrecision] + -110.1139242984811), $MachinePrecision] / x), $MachinePrecision] - -4.16438922228), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6500000000000.0], t$95$0, If[LessEqual[x, 9500000.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(x * N[(x * 137.519416416 + y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(\frac{\frac{\frac{\left(y + -33.31511377824\right) + -130944.19138580533}{x} - -3655.1204654076414}{x} + -110.1139242984811}{x} - -4.16438922228\right)\\
\mathbf{if}\;x \leq -6500000000000:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x \leq 9500000:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, 137.519416416, y\right), z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if x < -6.5e12 or 9.5e6 < x Initial program 14.8%
Applied rewrites19.1%
Taylor expanded in x around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
lower-/.f64N/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6419.2
Applied rewrites19.2%
Taylor expanded in x around -inf
Applied rewrites95.5%
if -6.5e12 < x < 9.5e6Initial program 99.6%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6499.1
Applied rewrites99.1%
Final simplification97.3%
(FPCore (x y z)
:precision binary64
(if (<= x -32000000000000.0)
(/
(* x (- 17.342137594641823 (/ 12125.076324411626 (* x x))))
(+ 4.16438922228 (/ 110.1139242984811 x)))
(if (<= x 1.6e+35)
(/
(* (- x 2.0) (fma x (fma x 137.519416416 y) z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(* x 4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if (x <= -32000000000000.0) {
tmp = (x * (17.342137594641823 - (12125.076324411626 / (x * x)))) / (4.16438922228 + (110.1139242984811 / x));
} else if (x <= 1.6e+35) {
tmp = ((x - 2.0) * fma(x, fma(x, 137.519416416, y), z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -32000000000000.0) tmp = Float64(Float64(x * Float64(17.342137594641823 - Float64(12125.076324411626 / Float64(x * x)))) / Float64(4.16438922228 + Float64(110.1139242984811 / x))); elseif (x <= 1.6e+35) tmp = Float64(Float64(Float64(x - 2.0) * fma(x, fma(x, 137.519416416, y), z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); else tmp = Float64(x * 4.16438922228); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -32000000000000.0], N[(N[(x * N[(17.342137594641823 - N[(12125.076324411626 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(4.16438922228 + N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+35], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(x * N[(x * 137.519416416 + y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -32000000000000:\\
\;\;\;\;\frac{x \cdot \left(17.342137594641823 - \frac{12125.076324411626}{x \cdot x}\right)}{4.16438922228 + \frac{110.1139242984811}{x}}\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+35}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(x, 137.519416416, y\right), z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -3.2e13Initial program 13.4%
Applied rewrites19.6%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites22.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6490.0
Applied rewrites90.0%
lift-/.f64N/A
lift--.f64N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lift-*.f64N/A
lower-/.f64N/A
metadata-evalN/A
lower-+.f6490.3
Applied rewrites90.3%
if -3.2e13 < x < 1.59999999999999991e35Initial program 99.6%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6496.4
Applied rewrites96.4%
if 1.59999999999999991e35 < x Initial program 5.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f6494.3
Applied rewrites94.3%
Final simplification94.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (fma -0.0424927283095952 y (* z 0.3041881842569256))))
(if (<= x -43000000000.0)
(/
(* x (- 17.342137594641823 (/ 12125.076324411626 (* x x))))
(+ 4.16438922228 (/ 110.1139242984811 x)))
(if (<= x 0.4)
(fma
x
(fma
(fma
z
-0.38999068429136097
(fma t_0 7.158593866711955 5.843575199059173))
(- x)
t_0)
(* z -0.0424927283095952))
(*
x
(+
4.16438922228
(/ (+ -110.1139242984811 (/ 3655.1204654076414 x)) x)))))))
double code(double x, double y, double z) {
double t_0 = fma(-0.0424927283095952, y, (z * 0.3041881842569256));
double tmp;
if (x <= -43000000000.0) {
tmp = (x * (17.342137594641823 - (12125.076324411626 / (x * x)))) / (4.16438922228 + (110.1139242984811 / x));
} else if (x <= 0.4) {
tmp = fma(x, fma(fma(z, -0.38999068429136097, fma(t_0, 7.158593866711955, 5.843575199059173)), -x, t_0), (z * -0.0424927283095952));
} else {
tmp = x * (4.16438922228 + ((-110.1139242984811 + (3655.1204654076414 / x)) / x));
}
return tmp;
}
function code(x, y, z) t_0 = fma(-0.0424927283095952, y, Float64(z * 0.3041881842569256)) tmp = 0.0 if (x <= -43000000000.0) tmp = Float64(Float64(x * Float64(17.342137594641823 - Float64(12125.076324411626 / Float64(x * x)))) / Float64(4.16438922228 + Float64(110.1139242984811 / x))); elseif (x <= 0.4) tmp = fma(x, fma(fma(z, -0.38999068429136097, fma(t_0, 7.158593866711955, 5.843575199059173)), Float64(-x), t_0), Float64(z * -0.0424927283095952)); else tmp = Float64(x * Float64(4.16438922228 + Float64(Float64(-110.1139242984811 + Float64(3655.1204654076414 / x)) / x))); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(-0.0424927283095952 * y + N[(z * 0.3041881842569256), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -43000000000.0], N[(N[(x * N[(17.342137594641823 - N[(12125.076324411626 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(4.16438922228 + N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.4], N[(x * N[(N[(z * -0.38999068429136097 + N[(t$95$0 * 7.158593866711955 + 5.843575199059173), $MachinePrecision]), $MachinePrecision] * (-x) + t$95$0), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(N[(-110.1139242984811 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(-0.0424927283095952, y, z \cdot 0.3041881842569256\right)\\
\mathbf{if}\;x \leq -43000000000:\\
\;\;\;\;\frac{x \cdot \left(17.342137594641823 - \frac{12125.076324411626}{x \cdot x}\right)}{4.16438922228 + \frac{110.1139242984811}{x}}\\
\mathbf{elif}\;x \leq 0.4:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(\mathsf{fma}\left(z, -0.38999068429136097, \mathsf{fma}\left(t\_0, 7.158593866711955, 5.843575199059173\right)\right), -x, t\_0\right), z \cdot -0.0424927283095952\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811 + \frac{3655.1204654076414}{x}}{x}\right)\\
\end{array}
\end{array}
if x < -4.3e10Initial program 13.4%
Applied rewrites19.6%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites22.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6490.0
Applied rewrites90.0%
lift-/.f64N/A
lift--.f64N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lift-*.f64N/A
lower-/.f64N/A
metadata-evalN/A
lower-+.f6490.3
Applied rewrites90.3%
if -4.3e10 < x < 0.40000000000000002Initial program 99.6%
Applied rewrites99.6%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites96.1%
if 0.40000000000000002 < x Initial program 17.1%
Taylor expanded in x around inf
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
associate-*r/N/A
associate-*r/N/A
metadata-evalN/A
div-subN/A
lower-/.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
metadata-eval88.1
Applied rewrites88.1%
Final simplification92.5%
(FPCore (x y z)
:precision binary64
(if (<= x -32000000000000.0)
(/
(* x (- 17.342137594641823 (/ 12125.076324411626 (* x x))))
(+ 4.16438922228 (/ 110.1139242984811 x)))
(if (<= x 112000000.0)
(/
(* (- x 2.0) (fma x y z))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(*
x
(+
4.16438922228
(/ (+ -110.1139242984811 (/ 3655.1204654076414 x)) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -32000000000000.0) {
tmp = (x * (17.342137594641823 - (12125.076324411626 / (x * x)))) / (4.16438922228 + (110.1139242984811 / x));
} else if (x <= 112000000.0) {
tmp = ((x - 2.0) * fma(x, y, z)) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = x * (4.16438922228 + ((-110.1139242984811 + (3655.1204654076414 / x)) / x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -32000000000000.0) tmp = Float64(Float64(x * Float64(17.342137594641823 - Float64(12125.076324411626 / Float64(x * x)))) / Float64(4.16438922228 + Float64(110.1139242984811 / x))); elseif (x <= 112000000.0) tmp = Float64(Float64(Float64(x - 2.0) * fma(x, y, z)) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); else tmp = Float64(x * Float64(4.16438922228 + Float64(Float64(-110.1139242984811 + Float64(3655.1204654076414 / x)) / x))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -32000000000000.0], N[(N[(x * N[(17.342137594641823 - N[(12125.076324411626 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(4.16438922228 + N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 112000000.0], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(x * y + z), $MachinePrecision]), $MachinePrecision] / N[(N[(x * N[(N[(x * N[(N[(x * N[(x + 43.3400022514), $MachinePrecision]), $MachinePrecision] + 263.505074721), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision]), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(N[(-110.1139242984811 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -32000000000000:\\
\;\;\;\;\frac{x \cdot \left(17.342137594641823 - \frac{12125.076324411626}{x \cdot x}\right)}{4.16438922228 + \frac{110.1139242984811}{x}}\\
\mathbf{elif}\;x \leq 112000000:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \mathsf{fma}\left(x, y, z\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811 + \frac{3655.1204654076414}{x}}{x}\right)\\
\end{array}
\end{array}
if x < -3.2e13Initial program 13.4%
Applied rewrites19.6%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites22.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6490.0
Applied rewrites90.0%
lift-/.f64N/A
lift--.f64N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lift-*.f64N/A
lower-/.f64N/A
metadata-evalN/A
lower-+.f6490.3
Applied rewrites90.3%
if -3.2e13 < x < 1.12e8Initial program 99.6%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f6493.6
Applied rewrites93.6%
if 1.12e8 < x Initial program 15.9%
Taylor expanded in x around inf
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
associate-*r/N/A
associate-*r/N/A
metadata-evalN/A
div-subN/A
lower-/.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
metadata-eval89.3
Applied rewrites89.3%
Final simplification91.7%
(FPCore (x y z)
:precision binary64
(if (<= x -43000000000.0)
(/
(* x (- 17.342137594641823 (/ 12125.076324411626 (* x x))))
(+ 4.16438922228 (/ 110.1139242984811 x)))
(if (<= x 0.4)
(fma
x
(*
9.590778533639166e-6
(fma
x
(fma
z
-186384.13759495187
(fma y 31716.735319244533 -609291.0162155379))
(fma y -4430.58174688886 (* z 31716.735319244533))))
(* z -0.0424927283095952))
(*
x
(+
4.16438922228
(/ (+ -110.1139242984811 (/ 3655.1204654076414 x)) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -43000000000.0) {
tmp = (x * (17.342137594641823 - (12125.076324411626 / (x * x)))) / (4.16438922228 + (110.1139242984811 / x));
} else if (x <= 0.4) {
tmp = fma(x, (9.590778533639166e-6 * fma(x, fma(z, -186384.13759495187, fma(y, 31716.735319244533, -609291.0162155379)), fma(y, -4430.58174688886, (z * 31716.735319244533)))), (z * -0.0424927283095952));
} else {
tmp = x * (4.16438922228 + ((-110.1139242984811 + (3655.1204654076414 / x)) / x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -43000000000.0) tmp = Float64(Float64(x * Float64(17.342137594641823 - Float64(12125.076324411626 / Float64(x * x)))) / Float64(4.16438922228 + Float64(110.1139242984811 / x))); elseif (x <= 0.4) tmp = fma(x, Float64(9.590778533639166e-6 * fma(x, fma(z, -186384.13759495187, fma(y, 31716.735319244533, -609291.0162155379)), fma(y, -4430.58174688886, Float64(z * 31716.735319244533)))), Float64(z * -0.0424927283095952)); else tmp = Float64(x * Float64(4.16438922228 + Float64(Float64(-110.1139242984811 + Float64(3655.1204654076414 / x)) / x))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -43000000000.0], N[(N[(x * N[(17.342137594641823 - N[(12125.076324411626 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(4.16438922228 + N[(110.1139242984811 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.4], N[(x * N[(9.590778533639166e-6 * N[(x * N[(z * -186384.13759495187 + N[(y * 31716.735319244533 + -609291.0162155379), $MachinePrecision]), $MachinePrecision] + N[(y * -4430.58174688886 + N[(z * 31716.735319244533), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(N[(-110.1139242984811 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -43000000000:\\
\;\;\;\;\frac{x \cdot \left(17.342137594641823 - \frac{12125.076324411626}{x \cdot x}\right)}{4.16438922228 + \frac{110.1139242984811}{x}}\\
\mathbf{elif}\;x \leq 0.4:\\
\;\;\;\;\mathsf{fma}\left(x, 9.590778533639166 \cdot 10^{-6} \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(z, -186384.13759495187, \mathsf{fma}\left(y, 31716.735319244533, -609291.0162155379\right)\right), \mathsf{fma}\left(y, -4430.58174688886, z \cdot 31716.735319244533\right)\right), z \cdot -0.0424927283095952\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811 + \frac{3655.1204654076414}{x}}{x}\right)\\
\end{array}
\end{array}
if x < -4.3e10Initial program 13.4%
Applied rewrites19.6%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites22.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6490.0
Applied rewrites90.0%
lift-/.f64N/A
lift--.f64N/A
*-commutativeN/A
lift--.f64N/A
flip--N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
metadata-evalN/A
lift-/.f64N/A
lift-/.f64N/A
frac-timesN/A
lift-*.f64N/A
lower-/.f64N/A
metadata-evalN/A
lower-+.f6490.3
Applied rewrites90.3%
if -4.3e10 < x < 0.40000000000000002Initial program 99.6%
Applied rewrites99.3%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites93.0%
if 0.40000000000000002 < x Initial program 17.1%
Taylor expanded in x around inf
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
associate-*r/N/A
associate-*r/N/A
metadata-evalN/A
div-subN/A
lower-/.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
metadata-eval88.1
Applied rewrites88.1%
Final simplification91.0%
(FPCore (x y z)
:precision binary64
(if (<= x -43000000000.0)
(fma x 4.16438922228 -110.1139242984811)
(if (<= x 0.4)
(fma
x
(*
9.590778533639166e-6
(fma
x
(fma
z
-186384.13759495187
(fma y 31716.735319244533 -609291.0162155379))
(fma y -4430.58174688886 (* z 31716.735319244533))))
(* z -0.0424927283095952))
(*
x
(+
4.16438922228
(/ (+ -110.1139242984811 (/ 3655.1204654076414 x)) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -43000000000.0) {
tmp = fma(x, 4.16438922228, -110.1139242984811);
} else if (x <= 0.4) {
tmp = fma(x, (9.590778533639166e-6 * fma(x, fma(z, -186384.13759495187, fma(y, 31716.735319244533, -609291.0162155379)), fma(y, -4430.58174688886, (z * 31716.735319244533)))), (z * -0.0424927283095952));
} else {
tmp = x * (4.16438922228 + ((-110.1139242984811 + (3655.1204654076414 / x)) / x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -43000000000.0) tmp = fma(x, 4.16438922228, -110.1139242984811); elseif (x <= 0.4) tmp = fma(x, Float64(9.590778533639166e-6 * fma(x, fma(z, -186384.13759495187, fma(y, 31716.735319244533, -609291.0162155379)), fma(y, -4430.58174688886, Float64(z * 31716.735319244533)))), Float64(z * -0.0424927283095952)); else tmp = Float64(x * Float64(4.16438922228 + Float64(Float64(-110.1139242984811 + Float64(3655.1204654076414 / x)) / x))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -43000000000.0], N[(x * 4.16438922228 + -110.1139242984811), $MachinePrecision], If[LessEqual[x, 0.4], N[(x * N[(9.590778533639166e-6 * N[(x * N[(z * -186384.13759495187 + N[(y * 31716.735319244533 + -609291.0162155379), $MachinePrecision]), $MachinePrecision] + N[(y * -4430.58174688886 + N[(z * 31716.735319244533), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(N[(-110.1139242984811 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -43000000000:\\
\;\;\;\;\mathsf{fma}\left(x, 4.16438922228, -110.1139242984811\right)\\
\mathbf{elif}\;x \leq 0.4:\\
\;\;\;\;\mathsf{fma}\left(x, 9.590778533639166 \cdot 10^{-6} \cdot \mathsf{fma}\left(x, \mathsf{fma}\left(z, -186384.13759495187, \mathsf{fma}\left(y, 31716.735319244533, -609291.0162155379\right)\right), \mathsf{fma}\left(y, -4430.58174688886, z \cdot 31716.735319244533\right)\right), z \cdot -0.0424927283095952\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811 + \frac{3655.1204654076414}{x}}{x}\right)\\
\end{array}
\end{array}
if x < -4.3e10Initial program 13.4%
Applied rewrites19.6%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites22.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6490.0
Applied rewrites90.0%
Taylor expanded in x around 0
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f6490.0
Applied rewrites90.0%
if -4.3e10 < x < 0.40000000000000002Initial program 99.6%
Applied rewrites99.3%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
Applied rewrites93.0%
if 0.40000000000000002 < x Initial program 17.1%
Taylor expanded in x around inf
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
associate-*r/N/A
associate-*r/N/A
metadata-evalN/A
div-subN/A
lower-/.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
metadata-eval88.1
Applied rewrites88.1%
Final simplification90.9%
(FPCore (x y z)
:precision binary64
(if (<= x -43000000000.0)
(fma x 4.16438922228 -110.1139242984811)
(if (<= x 2.0)
(*
z
(*
-0.0424927283095952
(fma
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
(/ x z)
1.0)))
(*
x
(+
4.16438922228
(/ (+ -110.1139242984811 (/ 3655.1204654076414 x)) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -43000000000.0) {
tmp = fma(x, 4.16438922228, -110.1139242984811);
} else if (x <= 2.0) {
tmp = z * (-0.0424927283095952 * fma(fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), (x / z), 1.0));
} else {
tmp = x * (4.16438922228 + ((-110.1139242984811 + (3655.1204654076414 / x)) / x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -43000000000.0) tmp = fma(x, 4.16438922228, -110.1139242984811); elseif (x <= 2.0) tmp = Float64(z * Float64(-0.0424927283095952 * fma(fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), Float64(x / z), 1.0))); else tmp = Float64(x * Float64(4.16438922228 + Float64(Float64(-110.1139242984811 + Float64(3655.1204654076414 / x)) / x))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -43000000000.0], N[(x * 4.16438922228 + -110.1139242984811), $MachinePrecision], If[LessEqual[x, 2.0], N[(z * N[(-0.0424927283095952 * N[(N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] * N[(x / z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(N[(-110.1139242984811 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -43000000000:\\
\;\;\;\;\mathsf{fma}\left(x, 4.16438922228, -110.1139242984811\right)\\
\mathbf{elif}\;x \leq 2:\\
\;\;\;\;z \cdot \left(-0.0424927283095952 \cdot \mathsf{fma}\left(\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, 4.16438922228, 78.6994924154\right), 137.519416416\right), y\right), \frac{x}{z}, 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811 + \frac{3655.1204654076414}{x}}{x}\right)\\
\end{array}
\end{array}
if x < -4.3e10Initial program 13.4%
Applied rewrites19.6%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites22.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6490.0
Applied rewrites90.0%
Taylor expanded in x around 0
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f6490.0
Applied rewrites90.0%
if -4.3e10 < x < 2Initial program 99.6%
Taylor expanded in z around inf
Applied rewrites94.2%
Taylor expanded in x around 0
Applied rewrites91.8%
if 2 < x Initial program 15.9%
Taylor expanded in x around inf
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
associate-*r/N/A
associate-*r/N/A
metadata-evalN/A
div-subN/A
lower-/.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
metadata-eval89.3
Applied rewrites89.3%
Final simplification90.7%
(FPCore (x y z)
:precision binary64
(if (<= x -43000000000.0)
(fma x 4.16438922228 -110.1139242984811)
(if (<= x 4.4)
(fma
z
-0.0424927283095952
(* x (fma 0.0212463641547976 (fma y -2.0 z) (* z 0.28294182010212804))))
(*
x
(+
4.16438922228
(/ (+ -110.1139242984811 (/ 3655.1204654076414 x)) x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -43000000000.0) {
tmp = fma(x, 4.16438922228, -110.1139242984811);
} else if (x <= 4.4) {
tmp = fma(z, -0.0424927283095952, (x * fma(0.0212463641547976, fma(y, -2.0, z), (z * 0.28294182010212804))));
} else {
tmp = x * (4.16438922228 + ((-110.1139242984811 + (3655.1204654076414 / x)) / x));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -43000000000.0) tmp = fma(x, 4.16438922228, -110.1139242984811); elseif (x <= 4.4) tmp = fma(z, -0.0424927283095952, Float64(x * fma(0.0212463641547976, fma(y, -2.0, z), Float64(z * 0.28294182010212804)))); else tmp = Float64(x * Float64(4.16438922228 + Float64(Float64(-110.1139242984811 + Float64(3655.1204654076414 / x)) / x))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -43000000000.0], N[(x * 4.16438922228 + -110.1139242984811), $MachinePrecision], If[LessEqual[x, 4.4], N[(z * -0.0424927283095952 + N[(x * N[(0.0212463641547976 * N[(y * -2.0 + z), $MachinePrecision] + N[(z * 0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(4.16438922228 + N[(N[(-110.1139242984811 + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -43000000000:\\
\;\;\;\;\mathsf{fma}\left(x, 4.16438922228, -110.1139242984811\right)\\
\mathbf{elif}\;x \leq 4.4:\\
\;\;\;\;\mathsf{fma}\left(z, -0.0424927283095952, x \cdot \mathsf{fma}\left(0.0212463641547976, \mathsf{fma}\left(y, -2, z\right), z \cdot 0.28294182010212804\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(4.16438922228 + \frac{-110.1139242984811 + \frac{3655.1204654076414}{x}}{x}\right)\\
\end{array}
\end{array}
if x < -4.3e10Initial program 13.4%
Applied rewrites19.6%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites22.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6490.0
Applied rewrites90.0%
Taylor expanded in x around 0
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f6490.0
Applied rewrites90.0%
if -4.3e10 < x < 4.4000000000000004Initial program 99.6%
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
+-commutativeN/A
flip-+N/A
div-subN/A
Applied rewrites63.3%
Taylor expanded in x around 0
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
cancel-sign-sub-invN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-eval89.9
Applied rewrites89.9%
if 4.4000000000000004 < x Initial program 15.9%
Taylor expanded in x around inf
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
unpow2N/A
associate-/r*N/A
metadata-evalN/A
associate-*r/N/A
associate-*r/N/A
metadata-evalN/A
div-subN/A
lower-/.f64N/A
sub-negN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f64N/A
metadata-eval89.3
Applied rewrites89.3%
Final simplification89.7%
(FPCore (x y z)
:precision binary64
(if (<= x -43000000000.0)
(fma x 4.16438922228 -110.1139242984811)
(if (<= x 27.0)
(fma
z
-0.0424927283095952
(* x (fma 0.0212463641547976 (fma y -2.0 z) (* z 0.28294182010212804))))
(fma x 4.16438922228 -110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -43000000000.0) {
tmp = fma(x, 4.16438922228, -110.1139242984811);
} else if (x <= 27.0) {
tmp = fma(z, -0.0424927283095952, (x * fma(0.0212463641547976, fma(y, -2.0, z), (z * 0.28294182010212804))));
} else {
tmp = fma(x, 4.16438922228, -110.1139242984811);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -43000000000.0) tmp = fma(x, 4.16438922228, -110.1139242984811); elseif (x <= 27.0) tmp = fma(z, -0.0424927283095952, Float64(x * fma(0.0212463641547976, fma(y, -2.0, z), Float64(z * 0.28294182010212804)))); else tmp = fma(x, 4.16438922228, -110.1139242984811); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -43000000000.0], N[(x * 4.16438922228 + -110.1139242984811), $MachinePrecision], If[LessEqual[x, 27.0], N[(z * -0.0424927283095952 + N[(x * N[(0.0212463641547976 * N[(y * -2.0 + z), $MachinePrecision] + N[(z * 0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * 4.16438922228 + -110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -43000000000:\\
\;\;\;\;\mathsf{fma}\left(x, 4.16438922228, -110.1139242984811\right)\\
\mathbf{elif}\;x \leq 27:\\
\;\;\;\;\mathsf{fma}\left(z, -0.0424927283095952, x \cdot \mathsf{fma}\left(0.0212463641547976, \mathsf{fma}\left(y, -2, z\right), z \cdot 0.28294182010212804\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, 4.16438922228, -110.1139242984811\right)\\
\end{array}
\end{array}
if x < -4.3e10 or 27 < x Initial program 14.8%
Applied rewrites19.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites21.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6489.5
Applied rewrites89.5%
Taylor expanded in x around 0
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f6489.5
Applied rewrites89.5%
if -4.3e10 < x < 27Initial program 99.6%
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
+-commutativeN/A
flip-+N/A
div-subN/A
Applied rewrites63.3%
Taylor expanded in x around 0
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
cancel-sign-sub-invN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
metadata-eval89.9
Applied rewrites89.9%
Final simplification89.7%
(FPCore (x y z)
:precision binary64
(if (<= x -43000000000.0)
(fma x 4.16438922228 -110.1139242984811)
(if (<= x 27.0)
(fma
x
(fma -0.0424927283095952 y (* z 0.3041881842569256))
(* z -0.0424927283095952))
(fma x 4.16438922228 -110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -43000000000.0) {
tmp = fma(x, 4.16438922228, -110.1139242984811);
} else if (x <= 27.0) {
tmp = fma(x, fma(-0.0424927283095952, y, (z * 0.3041881842569256)), (z * -0.0424927283095952));
} else {
tmp = fma(x, 4.16438922228, -110.1139242984811);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -43000000000.0) tmp = fma(x, 4.16438922228, -110.1139242984811); elseif (x <= 27.0) tmp = fma(x, fma(-0.0424927283095952, y, Float64(z * 0.3041881842569256)), Float64(z * -0.0424927283095952)); else tmp = fma(x, 4.16438922228, -110.1139242984811); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -43000000000.0], N[(x * 4.16438922228 + -110.1139242984811), $MachinePrecision], If[LessEqual[x, 27.0], N[(x * N[(-0.0424927283095952 * y + N[(z * 0.3041881842569256), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], N[(x * 4.16438922228 + -110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -43000000000:\\
\;\;\;\;\mathsf{fma}\left(x, 4.16438922228, -110.1139242984811\right)\\
\mathbf{elif}\;x \leq 27:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(-0.0424927283095952, y, z \cdot 0.3041881842569256\right), z \cdot -0.0424927283095952\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, 4.16438922228, -110.1139242984811\right)\\
\end{array}
\end{array}
if x < -4.3e10 or 27 < x Initial program 14.8%
Applied rewrites19.1%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites21.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6489.5
Applied rewrites89.5%
Taylor expanded in x around 0
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f6489.5
Applied rewrites89.5%
if -4.3e10 < x < 27Initial program 99.6%
Applied rewrites99.6%
Taylor expanded in x around 0
+-commutativeN/A
lower-fma.f64N/A
sub-negN/A
lower-fma.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-*.f64N/A
lower-*.f6489.9
Applied rewrites89.9%
Final simplification89.7%
(FPCore (x y z)
:precision binary64
(if (<= x -0.029)
(fma x 4.16438922228 -110.1139242984811)
(if (<= x 5.8e-23)
(* z -0.0424927283095952)
(fma x 4.16438922228 -110.1139242984811))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.029) {
tmp = fma(x, 4.16438922228, -110.1139242984811);
} else if (x <= 5.8e-23) {
tmp = z * -0.0424927283095952;
} else {
tmp = fma(x, 4.16438922228, -110.1139242984811);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= -0.029) tmp = fma(x, 4.16438922228, -110.1139242984811); elseif (x <= 5.8e-23) tmp = Float64(z * -0.0424927283095952); else tmp = fma(x, 4.16438922228, -110.1139242984811); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, -0.029], N[(x * 4.16438922228 + -110.1139242984811), $MachinePrecision], If[LessEqual[x, 5.8e-23], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228 + -110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.029:\\
\;\;\;\;\mathsf{fma}\left(x, 4.16438922228, -110.1139242984811\right)\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{-23}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, 4.16438922228, -110.1139242984811\right)\\
\end{array}
\end{array}
if x < -0.0290000000000000015 or 5.8000000000000003e-23 < x Initial program 19.1%
Applied rewrites23.2%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites25.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6485.2
Applied rewrites85.2%
Taylor expanded in x around 0
sub-negN/A
*-commutativeN/A
metadata-evalN/A
lower-fma.f6485.3
Applied rewrites85.3%
if -0.0290000000000000015 < x < 5.8000000000000003e-23Initial program 99.6%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f6471.7
Applied rewrites71.7%
(FPCore (x y z) :precision binary64 (if (<= x -0.029) (* x 4.16438922228) (if (<= x 0.4) (* z -0.0424927283095952) (* x 4.16438922228))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.029) {
tmp = x * 4.16438922228;
} else if (x <= 0.4) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
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 <= (-0.029d0)) then
tmp = x * 4.16438922228d0
else if (x <= 0.4d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = x * 4.16438922228d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.029) {
tmp = x * 4.16438922228;
} else if (x <= 0.4) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.029: tmp = x * 4.16438922228 elif x <= 0.4: tmp = z * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.029) tmp = Float64(x * 4.16438922228); elseif (x <= 0.4) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(x * 4.16438922228); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.029) tmp = x * 4.16438922228; elseif (x <= 0.4) tmp = z * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.029], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 0.4], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.029:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 0.4:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -0.0290000000000000015 or 0.40000000000000002 < x Initial program 17.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f6485.6
Applied rewrites85.6%
if -0.0290000000000000015 < x < 0.40000000000000002Initial program 99.6%
Taylor expanded in x around 0
*-commutativeN/A
lower-*.f6470.6
Applied rewrites70.6%
(FPCore (x y z) :precision binary64 (* x 4.16438922228))
double code(double x, double y, double z) {
return x * 4.16438922228;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * 4.16438922228d0
end function
public static double code(double x, double y, double z) {
return x * 4.16438922228;
}
def code(x, y, z): return x * 4.16438922228
function code(x, y, z) return Float64(x * 4.16438922228) end
function tmp = code(x, y, z) tmp = x * 4.16438922228; end
code[x_, y_, z_] := N[(x * 4.16438922228), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 4.16438922228
\end{array}
Initial program 56.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f6446.6
Applied rewrites46.6%
(FPCore (x y z) :precision binary64 -110.1139242984811)
double code(double x, double y, double z) {
return -110.1139242984811;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = -110.1139242984811d0
end function
public static double code(double x, double y, double z) {
return -110.1139242984811;
}
def code(x, y, z): return -110.1139242984811
function code(x, y, z) return -110.1139242984811 end
function tmp = code(x, y, z) tmp = -110.1139242984811; end
code[x_, y_, z_] := -110.1139242984811
\begin{array}{l}
\\
-110.1139242984811
\end{array}
Initial program 56.5%
Applied rewrites58.7%
Taylor expanded in z around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
Applied rewrites59.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6447.3
Applied rewrites47.3%
Taylor expanded in x around 0
Applied rewrites3.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(if (< x -3.326128725870005e+62)
t_0
(if (< x 9.429991714554673e+55)
(*
(/ (- x 2.0) 1.0)
(/
(+
(*
(+
(* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x)
y)
x)
z)
(+
(*
(+
(+ (* 263.505074721 x) (+ (* 43.3400022514 (* x x)) (* x (* x x))))
313.399215894)
x)
47.066876606)))
t_0))))
double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} 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 = ((y / (x * x)) + (4.16438922228d0 * x)) - 110.1139242984811d0
if (x < (-3.326128725870005d+62)) then
tmp = t_0
else if (x < 9.429991714554673d+55) then
tmp = ((x - 2.0d0) / 1.0d0) * (((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z) / (((((263.505074721d0 * x) + ((43.3400022514d0 * (x * x)) + (x * (x * x)))) + 313.399215894d0) * x) + 47.066876606d0))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811;
double tmp;
if (x < -3.326128725870005e+62) {
tmp = t_0;
} else if (x < 9.429991714554673e+55) {
tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811 tmp = 0 if x < -3.326128725870005e+62: tmp = t_0 elif x < 9.429991714554673e+55: tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(y / Float64(x * x)) + Float64(4.16438922228 * x)) - 110.1139242984811) tmp = 0.0 if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = Float64(Float64(Float64(x - 2.0) / 1.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / Float64(Float64(Float64(Float64(Float64(263.505074721 * x) + Float64(Float64(43.3400022514 * Float64(x * x)) + Float64(x * Float64(x * x)))) + 313.399215894) * x) + 47.066876606))); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((y / (x * x)) + (4.16438922228 * x)) - 110.1139242984811; tmp = 0.0; if (x < -3.326128725870005e+62) tmp = t_0; elseif (x < 9.429991714554673e+55) tmp = ((x - 2.0) / 1.0) * (((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z) / (((((263.505074721 * x) + ((43.3400022514 * (x * x)) + (x * (x * x)))) + 313.399215894) * x) + 47.066876606)); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(4.16438922228 * x), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]}, If[Less[x, -3.326128725870005e+62], t$95$0, If[Less[x, 9.429991714554673e+55], N[(N[(N[(x - 2.0), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(N[(x * 4.16438922228), $MachinePrecision] + 78.6994924154), $MachinePrecision] * x), $MachinePrecision] + 137.519416416), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision] / N[(N[(N[(N[(N[(263.505074721 * x), $MachinePrecision] + N[(N[(43.3400022514 * N[(x * x), $MachinePrecision]), $MachinePrecision] + N[(x * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 313.399215894), $MachinePrecision] * x), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\frac{y}{x \cdot x} + 4.16438922228 \cdot x\right) - 110.1139242984811\\
\mathbf{if}\;x < -3.326128725870005 \cdot 10^{+62}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;x < 9.429991714554673 \cdot 10^{+55}:\\
\;\;\;\;\frac{x - 2}{1} \cdot \frac{\left(\left(\left(x \cdot 4.16438922228 + 78.6994924154\right) \cdot x + 137.519416416\right) \cdot x + y\right) \cdot x + z}{\left(\left(263.505074721 \cdot x + \left(43.3400022514 \cdot \left(x \cdot x\right) + x \cdot \left(x \cdot x\right)\right)\right) + 313.399215894\right) \cdot x + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
herbie shell --seed 2024220
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
:precision binary64
:alt
(! :herbie-platform default (if (< x -332612872587000500000000000000000000000000000000000000000000000) (- (+ (/ y (* x x)) (* 104109730557/25000000000 x)) 1101139242984811/10000000000000) (if (< x 94299917145546730000000000000000000000000000000000000000) (* (/ (- x 2) 1) (/ (+ (* (+ (* (+ (* (+ (* x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z) (+ (* (+ (+ (* 263505074721/1000000000 x) (+ (* 216700011257/5000000000 (* x x)) (* x (* x x)))) 156699607947/500000000) x) 23533438303/500000000))) (- (+ (/ y (* x x)) (* 104109730557/25000000000 x)) 1101139242984811/10000000000000))))
(/ (* (- x 2.0) (+ (* (+ (* (+ (* (+ (* x 4.16438922228) 78.6994924154) x) 137.519416416) x) y) x) z)) (+ (* (+ (* (+ (* (+ x 43.3400022514) x) 263.505074721) x) 313.399215894) x) 47.066876606)))