
(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 19 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))
4e+301)
(*
(fma
x
(fma x (fma x (fma x 4.16438922228 78.6994924154) 137.519416416) y)
z)
(/
(+ x -2.0)
(fma
x
(fma x (fma x (+ x 43.3400022514) 263.505074721) 313.399215894)
47.066876606)))
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811)))
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)) <= 4e+301) {
tmp = fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) * ((x + -2.0) / fma(x, fma(x, fma(x, (x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606));
} else {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
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)) <= 4e+301) tmp = Float64(fma(x, fma(x, fma(x, fma(x, 4.16438922228, 78.6994924154), 137.519416416), y), z) * Float64(Float64(x + -2.0) / fma(x, fma(x, fma(x, Float64(x + 43.3400022514), 263.505074721), 313.399215894), 47.066876606))); else tmp = Float64(Float64(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811); 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], 4e+301], N[(N[(x * N[(x * N[(x * N[(x * 4.16438922228 + 78.6994924154), $MachinePrecision] + 137.519416416), $MachinePrecision] + y), $MachinePrecision] + z), $MachinePrecision] * N[(N[(x + -2.0), $MachinePrecision] / N[(x * N[(x * N[(x * N[(x + 43.3400022514), $MachinePrecision] + 263.505074721), $MachinePrecision] + 313.399215894), $MachinePrecision] + 47.066876606), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $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 4 \cdot 10^{+301}:\\
\;\;\;\;\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) \cdot \frac{x + -2}{\mathsf{fma}\left(x, \mathsf{fma}\left(x, \mathsf{fma}\left(x, x + 43.3400022514, 263.505074721\right), 313.399215894\right), 47.066876606\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 4.00000000000000021e301Initial program 97.0%
Simplified98.2%
if 4.00000000000000021e301 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.4%
Simplified5.1%
Taylor expanded in x around -inf 98.2%
Final simplification98.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606)))
(if (<=
(/
(*
(- x 2.0)
(+
(*
x
(+
(*
x
(+ (* x (+ (* x 4.16438922228) 78.6994924154)) 137.519416416))
y))
z))
t_0)
4e+301)
(+
(/
(*
x
(*
(- x 2.0)
(+
y
(*
x
(+
137.519416416
(/
(* x (- (* (pow x 2.0) 17.342137594641823) 6193.6101064416025))
(- (* x 4.16438922228) 78.6994924154)))))))
t_0)
(/ (* (- x 2.0) z) t_0))
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811))))
double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) <= 4e+301) {
tmp = ((x * ((x - 2.0) * (y + (x * (137.519416416 + ((x * ((pow(x, 2.0) * 17.342137594641823) - 6193.6101064416025)) / ((x * 4.16438922228) - 78.6994924154))))))) / t_0) + (((x - 2.0) * z) / t_0);
} else {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
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 = (x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0
if ((((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / t_0) <= 4d+301) then
tmp = ((x * ((x - 2.0d0) * (y + (x * (137.519416416d0 + ((x * (((x ** 2.0d0) * 17.342137594641823d0) - 6193.6101064416025d0)) / ((x * 4.16438922228d0) - 78.6994924154d0))))))) / t_0) + (((x - 2.0d0) * z) / t_0)
else
tmp = (((y - 130977.50649958357d0) / (x ** 2.0d0)) + ((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x)))) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606;
double tmp;
if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) <= 4e+301) {
tmp = ((x * ((x - 2.0) * (y + (x * (137.519416416 + ((x * ((Math.pow(x, 2.0) * 17.342137594641823) - 6193.6101064416025)) / ((x * 4.16438922228) - 78.6994924154))))))) / t_0) + (((x - 2.0) * z) / t_0);
} else {
tmp = (((y - 130977.50649958357) / Math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606 tmp = 0 if (((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) <= 4e+301: tmp = ((x * ((x - 2.0) * (y + (x * (137.519416416 + ((x * ((math.pow(x, 2.0) * 17.342137594641823) - 6193.6101064416025)) / ((x * 4.16438922228) - 78.6994924154))))))) / t_0) + (((x - 2.0) * z) / t_0) else: tmp = (((y - 130977.50649958357) / math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811 return tmp
function code(x, y, z) t_0 = Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) 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)) / t_0) <= 4e+301) tmp = Float64(Float64(Float64(x * Float64(Float64(x - 2.0) * Float64(y + Float64(x * Float64(137.519416416 + Float64(Float64(x * Float64(Float64((x ^ 2.0) * 17.342137594641823) - 6193.6101064416025)) / Float64(Float64(x * 4.16438922228) - 78.6994924154))))))) / t_0) + Float64(Float64(Float64(x - 2.0) * z) / t_0)); else tmp = Float64(Float64(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606; tmp = 0.0; if ((((x - 2.0) * ((x * ((x * ((x * ((x * 4.16438922228) + 78.6994924154)) + 137.519416416)) + y)) + z)) / t_0) <= 4e+301) tmp = ((x * ((x - 2.0) * (y + (x * (137.519416416 + ((x * (((x ^ 2.0) * 17.342137594641823) - 6193.6101064416025)) / ((x * 4.16438922228) - 78.6994924154))))))) / t_0) + (((x - 2.0) * z) / t_0); else tmp = (((y - 130977.50649958357) / (x ^ 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, 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] / t$95$0), $MachinePrecision], 4e+301], N[(N[(N[(x * N[(N[(x - 2.0), $MachinePrecision] * N[(y + N[(x * N[(137.519416416 + N[(N[(x * N[(N[(N[Power[x, 2.0], $MachinePrecision] * 17.342137594641823), $MachinePrecision] - 6193.6101064416025), $MachinePrecision]), $MachinePrecision] / N[(N[(x * 4.16438922228), $MachinePrecision] - 78.6994924154), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision] + N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606\\
\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)}{t_0} \leq 4 \cdot 10^{+301}:\\
\;\;\;\;\frac{x \cdot \left(\left(x - 2\right) \cdot \left(y + x \cdot \left(137.519416416 + \frac{x \cdot \left({x}^{2} \cdot 17.342137594641823 - 6193.6101064416025\right)}{x \cdot 4.16438922228 - 78.6994924154}\right)\right)\right)}{t_0} + \frac{\left(x - 2\right) \cdot z}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 4.00000000000000021e301Initial program 97.0%
associate-/l*98.1%
sub-neg98.1%
metadata-eval98.1%
fma-def98.1%
fma-def98.1%
fma-def98.1%
fma-def98.1%
fma-def98.1%
fma-def98.1%
fma-def98.1%
Simplified98.1%
fma-def98.1%
flip-+98.1%
div-sub98.1%
pow298.1%
fma-neg98.1%
metadata-eval98.1%
metadata-eval98.1%
fma-neg98.1%
metadata-eval98.1%
Applied egg-rr98.1%
div-sub98.1%
sub-neg98.1%
unpow298.1%
swap-sqr98.1%
unpow298.1%
metadata-eval98.1%
metadata-eval98.1%
Simplified98.1%
Taylor expanded in z around inf 97.0%
if 4.00000000000000021e301 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.4%
Simplified5.1%
Taylor expanded in x around -inf 98.2%
Final simplification97.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- 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))))
(if (<= t_0 4e+301)
t_0
(-
(+
(/ (- y 130977.50649958357) (pow x 2.0))
(+ (* x 4.16438922228) (* 3655.1204654076414 (/ 1.0 x))))
110.1139242984811))))
double code(double x, double y, double z) {
double t_0 = ((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);
double tmp;
if (t_0 <= 4e+301) {
tmp = t_0;
} else {
tmp = (((y - 130977.50649958357) / pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
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 = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
if (t_0 <= 4d+301) then
tmp = t_0
else
tmp = (((y - 130977.50649958357d0) / (x ** 2.0d0)) + ((x * 4.16438922228d0) + (3655.1204654076414d0 * (1.0d0 / x)))) - 110.1139242984811d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((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);
double tmp;
if (t_0 <= 4e+301) {
tmp = t_0;
} else {
tmp = (((y - 130977.50649958357) / Math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811;
}
return tmp;
}
def code(x, y, z): t_0 = ((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) tmp = 0 if t_0 <= 4e+301: tmp = t_0 else: tmp = (((y - 130977.50649958357) / math.pow(x, 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811 return tmp
function code(x, y, z) t_0 = 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)) tmp = 0.0 if (t_0 <= 4e+301) tmp = t_0; else tmp = Float64(Float64(Float64(Float64(y - 130977.50649958357) / (x ^ 2.0)) + Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 * Float64(1.0 / x)))) - 110.1139242984811); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((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); tmp = 0.0; if (t_0 <= 4e+301) tmp = t_0; else tmp = (((y - 130977.50649958357) / (x ^ 2.0)) + ((x * 4.16438922228) + (3655.1204654076414 * (1.0 / x)))) - 110.1139242984811; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, 4e+301], t$95$0, N[(N[(N[(N[(y - 130977.50649958357), $MachinePrecision] / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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}\\
\mathbf{if}\;t_0 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{y - 130977.50649958357}{{x}^{2}} + \left(x \cdot 4.16438922228 + 3655.1204654076414 \cdot \frac{1}{x}\right)\right) - 110.1139242984811\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 4.00000000000000021e301Initial program 97.0%
if 4.00000000000000021e301 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.4%
Simplified5.1%
Taylor expanded in x around -inf 98.2%
Final simplification97.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- 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))))
(if (<= t_0 4e+301) t_0 (+ (* x 4.16438922228) (/ z (pow x 3.0))))))
double code(double x, double y, double z) {
double t_0 = ((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);
double tmp;
if (t_0 <= 4e+301) {
tmp = t_0;
} else {
tmp = (x * 4.16438922228) + (z / pow(x, 3.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 = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
if (t_0 <= 4d+301) then
tmp = t_0
else
tmp = (x * 4.16438922228d0) + (z / (x ** 3.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((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);
double tmp;
if (t_0 <= 4e+301) {
tmp = t_0;
} else {
tmp = (x * 4.16438922228) + (z / Math.pow(x, 3.0));
}
return tmp;
}
def code(x, y, z): t_0 = ((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) tmp = 0 if t_0 <= 4e+301: tmp = t_0 else: tmp = (x * 4.16438922228) + (z / math.pow(x, 3.0)) return tmp
function code(x, y, z) t_0 = 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)) tmp = 0.0 if (t_0 <= 4e+301) tmp = t_0; else tmp = Float64(Float64(x * 4.16438922228) + Float64(z / (x ^ 3.0))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((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); tmp = 0.0; if (t_0 <= 4e+301) tmp = t_0; else tmp = (x * 4.16438922228) + (z / (x ^ 3.0)); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, 4e+301], t$95$0, N[(N[(x * 4.16438922228), $MachinePrecision] + N[(z / N[Power[x, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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}\\
\mathbf{if}\;t_0 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228 + \frac{z}{{x}^{3}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 4.00000000000000021e301Initial program 97.0%
if 4.00000000000000021e301 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.4%
associate-/l*5.1%
sub-neg5.1%
metadata-eval5.1%
fma-def5.1%
fma-def5.1%
fma-def5.1%
fma-def5.1%
fma-def5.1%
fma-def5.1%
fma-def5.1%
Simplified5.1%
fma-def5.1%
flip-+5.1%
div-sub5.1%
pow25.1%
fma-neg5.1%
metadata-eval5.1%
metadata-eval5.1%
fma-neg5.1%
metadata-eval5.1%
Applied egg-rr5.1%
div-sub5.1%
sub-neg5.1%
unpow25.1%
swap-sqr5.1%
unpow25.1%
metadata-eval5.1%
metadata-eval5.1%
Simplified5.1%
Taylor expanded in z around inf 0.3%
Taylor expanded in x around inf 68.8%
*-commutative68.8%
Simplified68.8%
Taylor expanded in x around inf 95.3%
Final simplification96.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(*
(- 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))))
(if (<= t_0 4e+301) t_0 (/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double t_0 = ((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);
double tmp;
if (t_0 <= 4e+301) {
tmp = t_0;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
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 = ((x - 2.0d0) * ((x * ((x * ((x * ((x * 4.16438922228d0) + 78.6994924154d0)) + 137.519416416d0)) + y)) + z)) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
if (t_0 <= 4d+301) then
tmp = t_0
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((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);
double tmp;
if (t_0 <= 4e+301) {
tmp = t_0;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): t_0 = ((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) tmp = 0 if t_0 <= 4e+301: tmp = t_0 else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) t_0 = 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)) tmp = 0.0 if (t_0 <= 4e+301) tmp = t_0; else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((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); tmp = 0.0; if (t_0 <= 4e+301) tmp = t_0; else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = 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]}, If[LessEqual[t$95$0, 4e+301], t$95$0, N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \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}\\
\mathbf{if}\;t_0 \leq 4 \cdot 10^{+301}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) < 4.00000000000000021e301Initial program 97.0%
if 4.00000000000000021e301 < (/.f64 (*.f64 (-.f64 x 2) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)) Initial program 0.4%
associate-/l*5.1%
sub-neg5.1%
metadata-eval5.1%
fma-def5.1%
fma-def5.1%
fma-def5.1%
fma-def5.1%
fma-def5.1%
fma-def5.1%
fma-def5.1%
Simplified5.1%
Taylor expanded in x around inf 94.8%
Final simplification96.1%
(FPCore (x y z)
:precision binary64
(if (<= x -110000000.0)
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(if (<= x 1.4e+37)
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+
(*
x
(+ (* x (+ (* x (+ x 43.3400022514)) 263.505074721)) 313.399215894))
47.066876606))
(/ (+ x -2.0) 0.24013125253755718))))
double code(double x, double y, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 1.4e+37) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
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 <= (-110000000.0d0)) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else if (x <= 1.4d+37) then
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / ((x * ((x * ((x * (x + 43.3400022514d0)) + 263.505074721d0)) + 313.399215894d0)) + 47.066876606d0)
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -110000000.0) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else if (x <= 1.4e+37) {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -110000000.0: tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) elif x <= 1.4e+37: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -110000000.0) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); elseif (x <= 1.4e+37) tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(Float64(x * Float64(Float64(x * Float64(Float64(x * Float64(x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606)); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -110000000.0) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); elseif (x <= 1.4e+37) tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / ((x * ((x * ((x * (x + 43.3400022514)) + 263.505074721)) + 313.399215894)) + 47.066876606); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -110000000.0], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.4e+37], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -110000000:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{+37}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{x \cdot \left(x \cdot \left(x \cdot \left(x + 43.3400022514\right) + 263.505074721\right) + 313.399215894\right) + 47.066876606}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -1.1e8Initial program 17.2%
associate-/l*20.1%
sub-neg20.1%
metadata-eval20.1%
fma-def20.1%
fma-def20.1%
fma-def20.1%
fma-def20.1%
fma-def20.1%
fma-def20.1%
fma-def20.1%
Simplified20.1%
Taylor expanded in x around inf 88.9%
associate-*r/88.9%
metadata-eval88.9%
Simplified88.9%
if -1.1e8 < x < 1.3999999999999999e37Initial program 99.5%
Taylor expanded in x around 0 96.2%
*-commutative93.7%
Simplified96.2%
if 1.3999999999999999e37 < x Initial program 6.0%
associate-/l*14.8%
sub-neg14.8%
metadata-eval14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
fma-def14.8%
Simplified14.8%
Taylor expanded in x around inf 92.5%
Final simplification93.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(/
(* (- x 2.0) z)
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721))))))
(t_1 (/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))))
(if (<= x -58.0)
t_1
(if (<= x 1.8e-96)
t_0
(if (<= x 4.5e-88)
(* -0.0424927283095952 (* x y))
(if (<= x 2.85) t_0 t_1))))))
double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
double t_1 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
double tmp;
if (x <= -58.0) {
tmp = t_1;
} else if (x <= 1.8e-96) {
tmp = t_0;
} else if (x <= 4.5e-88) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 2.85) {
tmp = t_0;
} else {
tmp = t_1;
}
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 = ((x - 2.0d0) * z) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
t_1 = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
if (x <= (-58.0d0)) then
tmp = t_1
else if (x <= 1.8d-96) then
tmp = t_0
else if (x <= 4.5d-88) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 2.85d0) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
double t_1 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
double tmp;
if (x <= -58.0) {
tmp = t_1;
} else if (x <= 1.8e-96) {
tmp = t_0;
} else if (x <= 4.5e-88) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 2.85) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) t_1 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) tmp = 0 if x <= -58.0: tmp = t_1 elif x <= 1.8e-96: tmp = t_0 elif x <= 4.5e-88: tmp = -0.0424927283095952 * (x * y) elif x <= 2.85: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(Float64(Float64(x - 2.0) * z) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))) t_1 = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))) tmp = 0.0 if (x <= -58.0) tmp = t_1; elseif (x <= 1.8e-96) tmp = t_0; elseif (x <= 4.5e-88) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 2.85) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = ((x - 2.0) * z) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); t_1 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); tmp = 0.0; if (x <= -58.0) tmp = t_1; elseif (x <= 1.8e-96) tmp = t_0; elseif (x <= 4.5e-88) tmp = -0.0424927283095952 * (x * y); elseif (x <= 2.85) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2.0), $MachinePrecision] * z), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -58.0], t$95$1, If[LessEqual[x, 1.8e-96], t$95$0, If[LessEqual[x, 4.5e-88], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.85], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{\left(x - 2\right) \cdot z}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
t_1 := \frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{if}\;x \leq -58:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-96}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{-88}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 2.85:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -58 or 2.85000000000000009 < x Initial program 18.2%
associate-/l*23.4%
sub-neg23.4%
metadata-eval23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
Simplified23.4%
Taylor expanded in x around inf 86.9%
associate-*r/86.9%
metadata-eval86.9%
Simplified86.9%
if -58 < x < 1.80000000000000004e-96 or 4.49999999999999991e-88 < x < 2.85000000000000009Initial program 99.6%
Taylor expanded in x around 0 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in z around inf 72.1%
if 1.80000000000000004e-96 < x < 4.49999999999999991e-88Initial program 99.4%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification80.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(* z -0.0424927283095952)
(* x (- (* z 0.0212463641547976) (* z -0.28294182010212804)))))
(t_1 (/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))))
(if (<= x -40.0)
t_1
(if (<= x 1.45e-94)
t_0
(if (<= x 1.85e-87)
(* -0.0424927283095952 (* x y))
(if (<= x 0.051) t_0 t_1))))))
double code(double x, double y, double z) {
double t_0 = (z * -0.0424927283095952) + (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804)));
double t_1 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
double tmp;
if (x <= -40.0) {
tmp = t_1;
} else if (x <= 1.45e-94) {
tmp = t_0;
} else if (x <= 1.85e-87) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 0.051) {
tmp = t_0;
} else {
tmp = t_1;
}
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 * (-0.0424927283095952d0)) + (x * ((z * 0.0212463641547976d0) - (z * (-0.28294182010212804d0))))
t_1 = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
if (x <= (-40.0d0)) then
tmp = t_1
else if (x <= 1.45d-94) then
tmp = t_0
else if (x <= 1.85d-87) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 0.051d0) then
tmp = t_0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (z * -0.0424927283095952) + (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804)));
double t_1 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
double tmp;
if (x <= -40.0) {
tmp = t_1;
} else if (x <= 1.45e-94) {
tmp = t_0;
} else if (x <= 1.85e-87) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 0.051) {
tmp = t_0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z): t_0 = (z * -0.0424927283095952) + (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))) t_1 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) tmp = 0 if x <= -40.0: tmp = t_1 elif x <= 1.45e-94: tmp = t_0 elif x <= 1.85e-87: tmp = -0.0424927283095952 * (x * y) elif x <= 0.051: tmp = t_0 else: tmp = t_1 return tmp
function code(x, y, z) t_0 = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(z * 0.0212463641547976) - Float64(z * -0.28294182010212804)))) t_1 = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))) tmp = 0.0 if (x <= -40.0) tmp = t_1; elseif (x <= 1.45e-94) tmp = t_0; elseif (x <= 1.85e-87) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 0.051) tmp = t_0; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (z * -0.0424927283095952) + (x * ((z * 0.0212463641547976) - (z * -0.28294182010212804))); t_1 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); tmp = 0.0; if (x <= -40.0) tmp = t_1; elseif (x <= 1.45e-94) tmp = t_0; elseif (x <= 1.85e-87) tmp = -0.0424927283095952 * (x * y); elseif (x <= 0.051) tmp = t_0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(z * 0.0212463641547976), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -40.0], t$95$1, If[LessEqual[x, 1.45e-94], t$95$0, If[LessEqual[x, 1.85e-87], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.051], t$95$0, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot -0.0424927283095952 + x \cdot \left(z \cdot 0.0212463641547976 - z \cdot -0.28294182010212804\right)\\
t_1 := \frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{if}\;x \leq -40:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-94}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{-87}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 0.051:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -40 or 0.0509999999999999967 < x Initial program 18.2%
associate-/l*23.4%
sub-neg23.4%
metadata-eval23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
Simplified23.4%
Taylor expanded in x around inf 86.9%
associate-*r/86.9%
metadata-eval86.9%
Simplified86.9%
if -40 < x < 1.44999999999999998e-94 or 1.8500000000000001e-87 < x < 0.0509999999999999967Initial program 99.6%
Simplified99.5%
Taylor expanded in y around 0 75.6%
Taylor expanded in x around 0 72.0%
if 1.44999999999999998e-94 < x < 1.8500000000000001e-87Initial program 99.4%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification80.0%
(FPCore (x y z)
:precision binary64
(if (or (<= x -15.5) (not (<= x 1000.0)))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(/
(* (- x 2.0) (+ z (* x (+ y (* x 137.519416416)))))
(+ 47.066876606 (* x (+ 313.399215894 (* x 263.505074721)))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -15.5) || !(x <= 1000.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
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 <= (-15.5d0)) .or. (.not. (x <= 1000.0d0))) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else
tmp = ((x - 2.0d0) * (z + (x * (y + (x * 137.519416416d0))))) / (47.066876606d0 + (x * (313.399215894d0 + (x * 263.505074721d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -15.5) || !(x <= 1000.0)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -15.5) or not (x <= 1000.0): tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) else: tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -15.5) || !(x <= 1000.0)) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); else tmp = Float64(Float64(Float64(x - 2.0) * Float64(z + Float64(x * Float64(y + Float64(x * 137.519416416))))) / Float64(47.066876606 + Float64(x * Float64(313.399215894 + Float64(x * 263.505074721))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -15.5) || ~((x <= 1000.0))) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); else tmp = ((x - 2.0) * (z + (x * (y + (x * 137.519416416))))) / (47.066876606 + (x * (313.399215894 + (x * 263.505074721)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -15.5], N[Not[LessEqual[x, 1000.0]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x - 2.0), $MachinePrecision] * N[(z + N[(x * N[(y + N[(x * 137.519416416), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(47.066876606 + N[(x * N[(313.399215894 + N[(x * 263.505074721), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -15.5 \lor \neg \left(x \leq 1000\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(z + x \cdot \left(y + x \cdot 137.519416416\right)\right)}{47.066876606 + x \cdot \left(313.399215894 + x \cdot 263.505074721\right)}\\
\end{array}
\end{array}
if x < -15.5 or 1e3 < x Initial program 16.3%
associate-/l*21.6%
sub-neg21.6%
metadata-eval21.6%
fma-def21.6%
fma-def21.6%
fma-def21.6%
fma-def21.6%
fma-def21.6%
fma-def21.6%
fma-def21.6%
Simplified21.6%
Taylor expanded in x around inf 88.7%
associate-*r/88.7%
metadata-eval88.7%
Simplified88.7%
if -15.5 < x < 1e3Initial program 99.5%
Taylor expanded in x around 0 97.6%
*-commutative97.6%
Simplified97.6%
Taylor expanded in x around 0 97.5%
*-commutative97.5%
Simplified97.5%
Final simplification93.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))))
(if (<= x -0.18)
t_0
(if (<= x 3.5e-94)
(* z -0.0424927283095952)
(if (<= x 2.05e-86)
(* -0.0424927283095952 (* x y))
(if (<= x 0.48) (/ (+ x -2.0) (/ 47.066876606 z)) t_0))))))
double code(double x, double y, double z) {
double t_0 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
double tmp;
if (x <= -0.18) {
tmp = t_0;
} else if (x <= 3.5e-94) {
tmp = z * -0.0424927283095952;
} else if (x <= 2.05e-86) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 0.48) {
tmp = (x + -2.0) / (47.066876606 / z);
} 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 = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
if (x <= (-0.18d0)) then
tmp = t_0
else if (x <= 3.5d-94) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 2.05d-86) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 0.48d0) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
double tmp;
if (x <= -0.18) {
tmp = t_0;
} else if (x <= 3.5e-94) {
tmp = z * -0.0424927283095952;
} else if (x <= 2.05e-86) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 0.48) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) tmp = 0 if x <= -0.18: tmp = t_0 elif x <= 3.5e-94: tmp = z * -0.0424927283095952 elif x <= 2.05e-86: tmp = -0.0424927283095952 * (x * y) elif x <= 0.48: tmp = (x + -2.0) / (47.066876606 / z) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))) tmp = 0.0 if (x <= -0.18) tmp = t_0; elseif (x <= 3.5e-94) tmp = Float64(z * -0.0424927283095952); elseif (x <= 2.05e-86) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 0.48) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); tmp = 0.0; if (x <= -0.18) tmp = t_0; elseif (x <= 3.5e-94) tmp = z * -0.0424927283095952; elseif (x <= 2.05e-86) tmp = -0.0424927283095952 * (x * y); elseif (x <= 0.48) tmp = (x + -2.0) / (47.066876606 / z); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -0.18], t$95$0, If[LessEqual[x, 3.5e-94], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 2.05e-86], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.48], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{if}\;x \leq -0.18:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-94}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{-86}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 0.48:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -0.17999999999999999 or 0.47999999999999998 < x Initial program 18.2%
associate-/l*23.4%
sub-neg23.4%
metadata-eval23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
Simplified23.4%
Taylor expanded in x around inf 86.9%
associate-*r/86.9%
metadata-eval86.9%
Simplified86.9%
if -0.17999999999999999 < x < 3.49999999999999998e-94Initial program 99.6%
Simplified99.5%
Taylor expanded in x around 0 75.2%
if 3.49999999999999998e-94 < x < 2.0499999999999999e-86Initial program 99.4%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
if 2.0499999999999999e-86 < x < 0.47999999999999998Initial program 99.4%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 47.0%
Final simplification79.8%
(FPCore (x y z)
:precision binary64
(if (<= x -65.0)
(- (* x 4.16438922228) 110.1139242984811)
(if (<= x 1e-97)
(* z -0.0424927283095952)
(if (<= x 1.45e-81)
(* -0.0424927283095952 (* x y))
(if (<= x 0.275)
(/ (+ x -2.0) (/ 47.066876606 z))
(/ (+ x -2.0) 0.24013125253755718))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -65.0) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 1e-97) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.45e-81) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 0.275) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
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 <= (-65.0d0)) then
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
else if (x <= 1d-97) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 1.45d-81) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 0.275d0) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -65.0) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 1e-97) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.45e-81) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 0.275) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -65.0: tmp = (x * 4.16438922228) - 110.1139242984811 elif x <= 1e-97: tmp = z * -0.0424927283095952 elif x <= 1.45e-81: tmp = -0.0424927283095952 * (x * y) elif x <= 0.275: tmp = (x + -2.0) / (47.066876606 / z) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -65.0) tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); elseif (x <= 1e-97) tmp = Float64(z * -0.0424927283095952); elseif (x <= 1.45e-81) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 0.275) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -65.0) tmp = (x * 4.16438922228) - 110.1139242984811; elseif (x <= 1e-97) tmp = z * -0.0424927283095952; elseif (x <= 1.45e-81) tmp = -0.0424927283095952 * (x * y); elseif (x <= 0.275) tmp = (x + -2.0) / (47.066876606 / z); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -65.0], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 1e-97], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 1.45e-81], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.275], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -65:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{elif}\;x \leq 10^{-97}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-81}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 0.275:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -65Initial program 17.2%
Simplified20.1%
Taylor expanded in x around inf 88.3%
if -65 < x < 1.00000000000000004e-97Initial program 99.6%
Simplified99.5%
Taylor expanded in x around 0 75.2%
if 1.00000000000000004e-97 < x < 1.44999999999999994e-81Initial program 99.4%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
if 1.44999999999999994e-81 < x < 0.27500000000000002Initial program 99.4%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 47.0%
if 0.27500000000000002 < x Initial program 19.2%
associate-/l*26.8%
sub-neg26.8%
metadata-eval26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
Simplified26.8%
Taylor expanded in x around inf 84.7%
Final simplification79.6%
(FPCore (x y z)
:precision binary64
(if (<= x -0.05)
(- (+ (* x 4.16438922228) (/ 3655.1204654076414 x)) 110.1139242984811)
(if (<= x 4.5e-94)
(* z -0.0424927283095952)
(if (<= x 9e-85)
(* -0.0424927283095952 (* x y))
(if (<= x 0.058)
(/ (+ x -2.0) (/ 47.066876606 z))
(/ (+ x -2.0) 0.24013125253755718))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.05) {
tmp = ((x * 4.16438922228) + (3655.1204654076414 / x)) - 110.1139242984811;
} else if (x <= 4.5e-94) {
tmp = z * -0.0424927283095952;
} else if (x <= 9e-85) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 0.058) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
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.05d0)) then
tmp = ((x * 4.16438922228d0) + (3655.1204654076414d0 / x)) - 110.1139242984811d0
else if (x <= 4.5d-94) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 9d-85) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 0.058d0) then
tmp = (x + (-2.0d0)) / (47.066876606d0 / z)
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -0.05) {
tmp = ((x * 4.16438922228) + (3655.1204654076414 / x)) - 110.1139242984811;
} else if (x <= 4.5e-94) {
tmp = z * -0.0424927283095952;
} else if (x <= 9e-85) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 0.058) {
tmp = (x + -2.0) / (47.066876606 / z);
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.05: tmp = ((x * 4.16438922228) + (3655.1204654076414 / x)) - 110.1139242984811 elif x <= 4.5e-94: tmp = z * -0.0424927283095952 elif x <= 9e-85: tmp = -0.0424927283095952 * (x * y) elif x <= 0.058: tmp = (x + -2.0) / (47.066876606 / z) else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.05) tmp = Float64(Float64(Float64(x * 4.16438922228) + Float64(3655.1204654076414 / x)) - 110.1139242984811); elseif (x <= 4.5e-94) tmp = Float64(z * -0.0424927283095952); elseif (x <= 9e-85) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 0.058) tmp = Float64(Float64(x + -2.0) / Float64(47.066876606 / z)); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -0.05) tmp = ((x * 4.16438922228) + (3655.1204654076414 / x)) - 110.1139242984811; elseif (x <= 4.5e-94) tmp = z * -0.0424927283095952; elseif (x <= 9e-85) tmp = -0.0424927283095952 * (x * y); elseif (x <= 0.058) tmp = (x + -2.0) / (47.066876606 / z); else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.05], N[(N[(N[(x * 4.16438922228), $MachinePrecision] + N[(3655.1204654076414 / x), $MachinePrecision]), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 4.5e-94], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 9e-85], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.058], N[(N[(x + -2.0), $MachinePrecision] / N[(47.066876606 / z), $MachinePrecision]), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.05:\\
\;\;\;\;\left(x \cdot 4.16438922228 + \frac{3655.1204654076414}{x}\right) - 110.1139242984811\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{-94}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 9 \cdot 10^{-85}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 0.058:\\
\;\;\;\;\frac{x + -2}{\frac{47.066876606}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -0.050000000000000003Initial program 17.2%
Simplified20.1%
Taylor expanded in x around inf 88.4%
Taylor expanded in x around 0 88.4%
if -0.050000000000000003 < x < 4.5000000000000002e-94Initial program 99.6%
Simplified99.5%
Taylor expanded in x around 0 75.2%
if 4.5000000000000002e-94 < x < 9.00000000000000008e-85Initial program 99.4%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
if 9.00000000000000008e-85 < x < 0.0580000000000000029Initial program 99.4%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
fma-def99.4%
Simplified99.4%
Taylor expanded in x around 0 47.0%
if 0.0580000000000000029 < x Initial program 19.2%
associate-/l*26.8%
sub-neg26.8%
metadata-eval26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
Simplified26.8%
Taylor expanded in x around inf 84.7%
Final simplification79.6%
(FPCore (x y z)
:precision binary64
(if (or (<= x -0.18) (not (<= x 0.096)))
(/ (+ x -2.0) (+ 0.24013125253755718 (/ 5.86923874282773 x)))
(+
(* z -0.0424927283095952)
(*
x
(- (* 0.0212463641547976 (+ z (* y -2.0))) (* z -0.28294182010212804))))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -0.18) || !(x <= 0.096)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
}
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.18d0)) .or. (.not. (x <= 0.096d0))) then
tmp = (x + (-2.0d0)) / (0.24013125253755718d0 + (5.86923874282773d0 / x))
else
tmp = (z * (-0.0424927283095952d0)) + (x * ((0.0212463641547976d0 * (z + (y * (-2.0d0)))) - (z * (-0.28294182010212804d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -0.18) || !(x <= 0.096)) {
tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x));
} else {
tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -0.18) or not (x <= 0.096): tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)) else: tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -0.18) || !(x <= 0.096)) tmp = Float64(Float64(x + -2.0) / Float64(0.24013125253755718 + Float64(5.86923874282773 / x))); else tmp = Float64(Float64(z * -0.0424927283095952) + Float64(x * Float64(Float64(0.0212463641547976 * Float64(z + Float64(y * -2.0))) - Float64(z * -0.28294182010212804)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -0.18) || ~((x <= 0.096))) tmp = (x + -2.0) / (0.24013125253755718 + (5.86923874282773 / x)); else tmp = (z * -0.0424927283095952) + (x * ((0.0212463641547976 * (z + (y * -2.0))) - (z * -0.28294182010212804))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -0.18], N[Not[LessEqual[x, 0.096]], $MachinePrecision]], N[(N[(x + -2.0), $MachinePrecision] / N[(0.24013125253755718 + N[(5.86923874282773 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * -0.0424927283095952), $MachinePrecision] + N[(x * N[(N[(0.0212463641547976 * N[(z + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * -0.28294182010212804), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.18 \lor \neg \left(x \leq 0.096\right):\\
\;\;\;\;\frac{x + -2}{0.24013125253755718 + \frac{5.86923874282773}{x}}\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952 + x \cdot \left(0.0212463641547976 \cdot \left(z + y \cdot -2\right) - z \cdot -0.28294182010212804\right)\\
\end{array}
\end{array}
if x < -0.17999999999999999 or 0.096000000000000002 < x Initial program 18.2%
associate-/l*23.4%
sub-neg23.4%
metadata-eval23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
fma-def23.4%
Simplified23.4%
Taylor expanded in x around inf 86.9%
associate-*r/86.9%
metadata-eval86.9%
Simplified86.9%
if -0.17999999999999999 < x < 0.096000000000000002Initial program 99.6%
Simplified99.5%
Taylor expanded in x around 0 94.3%
Final simplification90.6%
(FPCore (x y z)
:precision binary64
(if (<= x -5.5)
(- (* x 4.16438922228) 110.1139242984811)
(if (<= x 4.7e-94)
(* z -0.0424927283095952)
(if (<= x 8.2e-85)
(* -0.0424927283095952 (* x y))
(if (<= x 0.74)
(* z -0.0424927283095952)
(/ (+ x -2.0) 0.24013125253755718))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.5) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 4.7e-94) {
tmp = z * -0.0424927283095952;
} else if (x <= 8.2e-85) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 0.74) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
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 <= (-5.5d0)) then
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
else if (x <= 4.7d-94) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 8.2d-85) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 0.74d0) then
tmp = z * (-0.0424927283095952d0)
else
tmp = (x + (-2.0d0)) / 0.24013125253755718d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -5.5) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 4.7e-94) {
tmp = z * -0.0424927283095952;
} else if (x <= 8.2e-85) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 0.74) {
tmp = z * -0.0424927283095952;
} else {
tmp = (x + -2.0) / 0.24013125253755718;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5.5: tmp = (x * 4.16438922228) - 110.1139242984811 elif x <= 4.7e-94: tmp = z * -0.0424927283095952 elif x <= 8.2e-85: tmp = -0.0424927283095952 * (x * y) elif x <= 0.74: tmp = z * -0.0424927283095952 else: tmp = (x + -2.0) / 0.24013125253755718 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -5.5) tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); elseif (x <= 4.7e-94) tmp = Float64(z * -0.0424927283095952); elseif (x <= 8.2e-85) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 0.74) tmp = Float64(z * -0.0424927283095952); else tmp = Float64(Float64(x + -2.0) / 0.24013125253755718); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -5.5) tmp = (x * 4.16438922228) - 110.1139242984811; elseif (x <= 4.7e-94) tmp = z * -0.0424927283095952; elseif (x <= 8.2e-85) tmp = -0.0424927283095952 * (x * y); elseif (x <= 0.74) tmp = z * -0.0424927283095952; else tmp = (x + -2.0) / 0.24013125253755718; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -5.5], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 4.7e-94], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 8.2e-85], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 0.74], N[(z * -0.0424927283095952), $MachinePrecision], N[(N[(x + -2.0), $MachinePrecision] / 0.24013125253755718), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{elif}\;x \leq 4.7 \cdot 10^{-94}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{-85}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 0.74:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;\frac{x + -2}{0.24013125253755718}\\
\end{array}
\end{array}
if x < -5.5Initial program 17.2%
Simplified20.1%
Taylor expanded in x around inf 88.3%
if -5.5 < x < 4.70000000000000003e-94 or 8.19999999999999987e-85 < x < 0.73999999999999999Initial program 99.6%
Simplified99.5%
Taylor expanded in x around 0 71.5%
if 4.70000000000000003e-94 < x < 8.19999999999999987e-85Initial program 99.4%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
if 0.73999999999999999 < x Initial program 19.2%
associate-/l*26.8%
sub-neg26.8%
metadata-eval26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
fma-def26.8%
Simplified26.8%
Taylor expanded in x around inf 84.7%
Final simplification79.6%
(FPCore (x y z)
:precision binary64
(if (<= x -0.26)
(* x 4.16438922228)
(if (<= x 6.5e-99)
(* z -0.0424927283095952)
(if (<= x 1.15e-87)
(* y (* x -0.0424927283095952))
(if (<= x 1.15e-10) (* z -0.0424927283095952) (* x 4.16438922228))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -0.26) {
tmp = x * 4.16438922228;
} else if (x <= 6.5e-99) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.15e-87) {
tmp = y * (x * -0.0424927283095952);
} else if (x <= 1.15e-10) {
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.26d0)) then
tmp = x * 4.16438922228d0
else if (x <= 6.5d-99) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 1.15d-87) then
tmp = y * (x * (-0.0424927283095952d0))
else if (x <= 1.15d-10) 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.26) {
tmp = x * 4.16438922228;
} else if (x <= 6.5e-99) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.15e-87) {
tmp = y * (x * -0.0424927283095952);
} else if (x <= 1.15e-10) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -0.26: tmp = x * 4.16438922228 elif x <= 6.5e-99: tmp = z * -0.0424927283095952 elif x <= 1.15e-87: tmp = y * (x * -0.0424927283095952) elif x <= 1.15e-10: tmp = z * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -0.26) tmp = Float64(x * 4.16438922228); elseif (x <= 6.5e-99) tmp = Float64(z * -0.0424927283095952); elseif (x <= 1.15e-87) tmp = Float64(y * Float64(x * -0.0424927283095952)); elseif (x <= 1.15e-10) 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.26) tmp = x * 4.16438922228; elseif (x <= 6.5e-99) tmp = z * -0.0424927283095952; elseif (x <= 1.15e-87) tmp = y * (x * -0.0424927283095952); elseif (x <= 1.15e-10) tmp = z * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -0.26], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 6.5e-99], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 1.15e-87], N[(y * N[(x * -0.0424927283095952), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e-10], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.26:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-99}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-87}:\\
\;\;\;\;y \cdot \left(x \cdot -0.0424927283095952\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-10}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -0.26000000000000001 or 1.15000000000000004e-10 < x Initial program 19.4%
Simplified24.5%
Taylor expanded in x around inf 84.7%
*-commutative84.7%
Simplified84.7%
if -0.26000000000000001 < x < 6.50000000000000033e-99 or 1.1500000000000001e-87 < x < 1.15000000000000004e-10Initial program 99.6%
Simplified99.5%
Taylor expanded in x around 0 72.6%
if 6.50000000000000033e-99 < x < 1.1500000000000001e-87Initial program 99.4%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in y around 0 99.4%
Taylor expanded in x around 0 99.7%
associate-*r*99.4%
Simplified99.4%
Final simplification79.3%
(FPCore (x y z)
:precision binary64
(if (<= x -2400.0)
(* x 4.16438922228)
(if (<= x 4.6e-100)
(* z -0.0424927283095952)
(if (<= x 4.7e-88)
(* -0.0424927283095952 (* x y))
(if (<= x 1.15e-10) (* z -0.0424927283095952) (* x 4.16438922228))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2400.0) {
tmp = x * 4.16438922228;
} else if (x <= 4.6e-100) {
tmp = z * -0.0424927283095952;
} else if (x <= 4.7e-88) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 1.15e-10) {
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 <= (-2400.0d0)) then
tmp = x * 4.16438922228d0
else if (x <= 4.6d-100) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 4.7d-88) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 1.15d-10) 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 <= -2400.0) {
tmp = x * 4.16438922228;
} else if (x <= 4.6e-100) {
tmp = z * -0.0424927283095952;
} else if (x <= 4.7e-88) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 1.15e-10) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2400.0: tmp = x * 4.16438922228 elif x <= 4.6e-100: tmp = z * -0.0424927283095952 elif x <= 4.7e-88: tmp = -0.0424927283095952 * (x * y) elif x <= 1.15e-10: tmp = z * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2400.0) tmp = Float64(x * 4.16438922228); elseif (x <= 4.6e-100) tmp = Float64(z * -0.0424927283095952); elseif (x <= 4.7e-88) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 1.15e-10) 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 <= -2400.0) tmp = x * 4.16438922228; elseif (x <= 4.6e-100) tmp = z * -0.0424927283095952; elseif (x <= 4.7e-88) tmp = -0.0424927283095952 * (x * y); elseif (x <= 1.15e-10) tmp = z * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2400.0], N[(x * 4.16438922228), $MachinePrecision], If[LessEqual[x, 4.6e-100], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 4.7e-88], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e-10], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2400:\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{-100}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 4.7 \cdot 10^{-88}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-10}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -2400 or 1.15000000000000004e-10 < x Initial program 19.4%
Simplified24.5%
Taylor expanded in x around inf 84.7%
*-commutative84.7%
Simplified84.7%
if -2400 < x < 4.59999999999999989e-100 or 4.7e-88 < x < 1.15000000000000004e-10Initial program 99.6%
Simplified99.5%
Taylor expanded in x around 0 72.6%
if 4.59999999999999989e-100 < x < 4.7e-88Initial program 99.4%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
Final simplification79.3%
(FPCore (x y z)
:precision binary64
(if (<= x -5.5)
(- (* x 4.16438922228) 110.1139242984811)
(if (<= x 4.1e-94)
(* z -0.0424927283095952)
(if (<= x 1.15e-87)
(* -0.0424927283095952 (* x y))
(if (<= x 1.15e-10) (* z -0.0424927283095952) (* x 4.16438922228))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -5.5) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 4.1e-94) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.15e-87) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 1.15e-10) {
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 <= (-5.5d0)) then
tmp = (x * 4.16438922228d0) - 110.1139242984811d0
else if (x <= 4.1d-94) then
tmp = z * (-0.0424927283095952d0)
else if (x <= 1.15d-87) then
tmp = (-0.0424927283095952d0) * (x * y)
else if (x <= 1.15d-10) 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 <= -5.5) {
tmp = (x * 4.16438922228) - 110.1139242984811;
} else if (x <= 4.1e-94) {
tmp = z * -0.0424927283095952;
} else if (x <= 1.15e-87) {
tmp = -0.0424927283095952 * (x * y);
} else if (x <= 1.15e-10) {
tmp = z * -0.0424927283095952;
} else {
tmp = x * 4.16438922228;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -5.5: tmp = (x * 4.16438922228) - 110.1139242984811 elif x <= 4.1e-94: tmp = z * -0.0424927283095952 elif x <= 1.15e-87: tmp = -0.0424927283095952 * (x * y) elif x <= 1.15e-10: tmp = z * -0.0424927283095952 else: tmp = x * 4.16438922228 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -5.5) tmp = Float64(Float64(x * 4.16438922228) - 110.1139242984811); elseif (x <= 4.1e-94) tmp = Float64(z * -0.0424927283095952); elseif (x <= 1.15e-87) tmp = Float64(-0.0424927283095952 * Float64(x * y)); elseif (x <= 1.15e-10) 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 <= -5.5) tmp = (x * 4.16438922228) - 110.1139242984811; elseif (x <= 4.1e-94) tmp = z * -0.0424927283095952; elseif (x <= 1.15e-87) tmp = -0.0424927283095952 * (x * y); elseif (x <= 1.15e-10) tmp = z * -0.0424927283095952; else tmp = x * 4.16438922228; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -5.5], N[(N[(x * 4.16438922228), $MachinePrecision] - 110.1139242984811), $MachinePrecision], If[LessEqual[x, 4.1e-94], N[(z * -0.0424927283095952), $MachinePrecision], If[LessEqual[x, 1.15e-87], N[(-0.0424927283095952 * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e-10], N[(z * -0.0424927283095952), $MachinePrecision], N[(x * 4.16438922228), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5:\\
\;\;\;\;x \cdot 4.16438922228 - 110.1139242984811\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{-94}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-87}:\\
\;\;\;\;-0.0424927283095952 \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-10}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\mathbf{else}:\\
\;\;\;\;x \cdot 4.16438922228\\
\end{array}
\end{array}
if x < -5.5Initial program 17.2%
Simplified20.1%
Taylor expanded in x around inf 88.3%
if -5.5 < x < 4.10000000000000001e-94 or 1.1500000000000001e-87 < x < 1.15000000000000004e-10Initial program 99.6%
Simplified99.5%
Taylor expanded in x around 0 72.6%
if 4.10000000000000001e-94 < x < 1.1500000000000001e-87Initial program 99.4%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
fma-def99.7%
Simplified99.7%
Taylor expanded in y around inf 99.7%
Taylor expanded in x around 0 99.7%
*-commutative99.7%
Simplified99.7%
if 1.15000000000000004e-10 < x Initial program 21.7%
Simplified29.0%
Taylor expanded in x around inf 81.8%
*-commutative81.8%
Simplified81.8%
Final simplification79.5%
(FPCore (x y z) :precision binary64 (if (or (<= x -5.5) (not (<= x 1.15e-10))) (* x 4.16438922228) (* z -0.0424927283095952)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -5.5) || !(x <= 1.15e-10)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
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 <= (-5.5d0)) .or. (.not. (x <= 1.15d-10))) then
tmp = x * 4.16438922228d0
else
tmp = z * (-0.0424927283095952d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -5.5) || !(x <= 1.15e-10)) {
tmp = x * 4.16438922228;
} else {
tmp = z * -0.0424927283095952;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -5.5) or not (x <= 1.15e-10): tmp = x * 4.16438922228 else: tmp = z * -0.0424927283095952 return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -5.5) || !(x <= 1.15e-10)) tmp = Float64(x * 4.16438922228); else tmp = Float64(z * -0.0424927283095952); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -5.5) || ~((x <= 1.15e-10))) tmp = x * 4.16438922228; else tmp = z * -0.0424927283095952; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -5.5], N[Not[LessEqual[x, 1.15e-10]], $MachinePrecision]], N[(x * 4.16438922228), $MachinePrecision], N[(z * -0.0424927283095952), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.5 \lor \neg \left(x \leq 1.15 \cdot 10^{-10}\right):\\
\;\;\;\;x \cdot 4.16438922228\\
\mathbf{else}:\\
\;\;\;\;z \cdot -0.0424927283095952\\
\end{array}
\end{array}
if x < -5.5 or 1.15000000000000004e-10 < x Initial program 19.4%
Simplified24.5%
Taylor expanded in x around inf 84.7%
*-commutative84.7%
Simplified84.7%
if -5.5 < x < 1.15000000000000004e-10Initial program 99.6%
Simplified99.5%
Taylor expanded in x around 0 69.9%
Final simplification77.4%
(FPCore (x y z) :precision binary64 (* z -0.0424927283095952))
double code(double x, double y, double z) {
return z * -0.0424927283095952;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = z * (-0.0424927283095952d0)
end function
public static double code(double x, double y, double z) {
return z * -0.0424927283095952;
}
def code(x, y, z): return z * -0.0424927283095952
function code(x, y, z) return Float64(z * -0.0424927283095952) end
function tmp = code(x, y, z) tmp = z * -0.0424927283095952; end
code[x_, y_, z_] := N[(z * -0.0424927283095952), $MachinePrecision]
\begin{array}{l}
\\
z \cdot -0.0424927283095952
\end{array}
Initial program 58.9%
Simplified61.4%
Taylor expanded in x around 0 36.0%
Final simplification36.0%
(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 2024024
(FPCore (x y z)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
:precision binary64
:herbie-target
(if (< x -3.326128725870005e+62) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811) (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))) (- (+ (/ y (* x x)) (* 4.16438922228 x)) 110.1139242984811)))
(/ (* (- 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)))