
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
def code(x, y, z, t, a, b, c, i): return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\end{array}
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
INFINITY)
(/
(fma (fma (fma (fma x y z) y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ y a) y b) y c) y i))
(- x (/ (- (* x a) z) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)) <= ((double) INFINITY)) {
tmp = fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((y + a), y, b), y, c), y, i);
} else {
tmp = x - (((x * a) - z) / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) <= Inf) tmp = Float64(fma(fma(fma(fma(x, y, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(y + a), y, b), y, c), y, i)); else tmp = Float64(x - Float64(Float64(Float64(x * a) - z) / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(x * y + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(y + a), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(x, y, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y + a, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 95.2%
fma-define95.2%
fma-define95.2%
fma-define95.2%
fma-define95.2%
fma-define95.2%
fma-define95.2%
fma-define95.2%
Simplified95.2%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around -inf 73.9%
mul-1-neg73.9%
distribute-lft-out--73.9%
Simplified73.9%
Final simplification86.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* y (+ (* y (+ (* y (+ (* x y) z)) 27464.7644705)) 230661.510616))
t)
(+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))))
(if (<= t_1 INFINITY) t_1 (- x (/ (- (* x a) z) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x - (((x * a) - z) / y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x - (((x * a) - z) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x - (((x * a) - z) / y) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(Float64(x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x - Float64(Float64(Float64(x * a) - z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((y * ((y * ((y * ((x * y) + z)) + 27464.7644705)) + 230661.510616)) + t) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x - (((x * a) - z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(y * N[(N[(y * N[(N[(y * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + 27464.7644705), $MachinePrecision]), $MachinePrecision] + 230661.510616), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x - N[(N[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(y \cdot \left(y \cdot \left(x \cdot y + z\right) + 27464.7644705\right) + 230661.510616\right) + t}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) < +inf.0Initial program 95.2%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around -inf 73.9%
mul-1-neg73.9%
distribute-lft-out--73.9%
Simplified73.9%
Final simplification86.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -1.1e+39)
(- (+ x (/ z y)) (/ (* x a) y))
(if (<= y 1.45e+38)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y (+ b (* y a)))))))
(- x (/ (- (* x a) z) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.1e+39) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 1.45e+38) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a))))));
} else {
tmp = x - (((x * a) - z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-1.1d+39)) then
tmp = (x + (z / y)) - ((x * a) / y)
else if (y <= 1.45d+38) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a))))))
else
tmp = x - (((x * a) - z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.1e+39) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 1.45e+38) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a))))));
} else {
tmp = x - (((x * a) - z) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.1e+39: tmp = (x + (z / y)) - ((x * a) / y) elif y <= 1.45e+38: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a)))))) else: tmp = x - (((x * a) - z) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.1e+39) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); elseif (y <= 1.45e+38) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * Float64(c + Float64(y * Float64(b + Float64(y * a))))))); else tmp = Float64(x - Float64(Float64(Float64(x * a) - z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -1.1e+39) tmp = (x + (z / y)) - ((x * a) / y); elseif (y <= 1.45e+38) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * (b + (y * a)))))); else tmp = x - (((x * a) - z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.1e+39], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+38], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * N[(b + N[(y * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.1 \cdot 10^{+39}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+38}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot \left(b + y \cdot a\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{y}\\
\end{array}
\end{array}
if y < -1.1000000000000001e39Initial program 1.9%
Taylor expanded in y around inf 77.7%
if -1.1000000000000001e39 < y < 1.45000000000000003e38Initial program 97.6%
Taylor expanded in x around 0 91.9%
Taylor expanded in y around 0 91.9%
if 1.45000000000000003e38 < y Initial program 2.0%
Taylor expanded in y around -inf 68.6%
mul-1-neg68.6%
distribute-lft-out--68.6%
Simplified68.6%
Final simplification83.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -1.7e+24)
(- (+ x (/ z y)) (/ (* x a) y))
(if (<= y 1.3e+36)
(/
(+ t (* y (+ 230661.510616 (* y (+ 27464.7644705 (* y z))))))
(+ i (* y (+ c (* y b)))))
(- x (/ (- (* x a) z) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.7e+24) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 1.3e+36) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
} else {
tmp = x - (((x * a) - z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-1.7d+24)) then
tmp = (x + (z / y)) - ((x * a) / y)
else if (y <= 1.3d+36) then
tmp = (t + (y * (230661.510616d0 + (y * (27464.7644705d0 + (y * z)))))) / (i + (y * (c + (y * b))))
else
tmp = x - (((x * a) - z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.7e+24) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 1.3e+36) {
tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b))));
} else {
tmp = x - (((x * a) - z) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.7e+24: tmp = (x + (z / y)) - ((x * a) / y) elif y <= 1.3e+36: tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))) else: tmp = x - (((x * a) - z) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.7e+24) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); elseif (y <= 1.3e+36) tmp = Float64(Float64(t + Float64(y * Float64(230661.510616 + Float64(y * Float64(27464.7644705 + Float64(y * z)))))) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); else tmp = Float64(x - Float64(Float64(Float64(x * a) - z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -1.7e+24) tmp = (x + (z / y)) - ((x * a) / y); elseif (y <= 1.3e+36) tmp = (t + (y * (230661.510616 + (y * (27464.7644705 + (y * z)))))) / (i + (y * (c + (y * b)))); else tmp = x - (((x * a) - z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.7e+24], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+36], N[(N[(t + N[(y * N[(230661.510616 + N[(y * N[(27464.7644705 + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+24}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+36}:\\
\;\;\;\;\frac{t + y \cdot \left(230661.510616 + y \cdot \left(27464.7644705 + y \cdot z\right)\right)}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{y}\\
\end{array}
\end{array}
if y < -1.7e24Initial program 3.6%
Taylor expanded in y around inf 75.2%
if -1.7e24 < y < 1.3000000000000001e36Initial program 98.3%
Taylor expanded in x around 0 92.4%
Taylor expanded in y around 0 88.1%
if 1.3000000000000001e36 < y Initial program 2.0%
Taylor expanded in y around -inf 68.6%
mul-1-neg68.6%
distribute-lft-out--68.6%
Simplified68.6%
Final simplification81.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -8e+36)
(- (+ x (/ z y)) (/ (* x a) y))
(if (<= y 2.45e+27)
(/ (+ t (* y 230661.510616)) (+ (* y (+ (* y (+ (* y (+ y a)) b)) c)) i))
(- x (/ (- (* x a) z) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -8e+36) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 2.45e+27) {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else {
tmp = x - (((x * a) - z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-8d+36)) then
tmp = (x + (z / y)) - ((x * a) / y)
else if (y <= 2.45d+27) then
tmp = (t + (y * 230661.510616d0)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i)
else
tmp = x - (((x * a) - z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -8e+36) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 2.45e+27) {
tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i);
} else {
tmp = x - (((x * a) - z) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -8e+36: tmp = (x + (z / y)) - ((x * a) / y) elif y <= 2.45e+27: tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i) else: tmp = x - (((x * a) - z) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -8e+36) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); elseif (y <= 2.45e+27) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(Float64(y * Float64(Float64(y * Float64(Float64(y * Float64(y + a)) + b)) + c)) + i)); else tmp = Float64(x - Float64(Float64(Float64(x * a) - z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -8e+36) tmp = (x + (z / y)) - ((x * a) / y); elseif (y <= 2.45e+27) tmp = (t + (y * 230661.510616)) / ((y * ((y * ((y * (y + a)) + b)) + c)) + i); else tmp = x - (((x * a) - z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -8e+36], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.45e+27], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(N[(y * N[(N[(y * N[(N[(y * N[(y + a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+36}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{+27}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{y \cdot \left(y \cdot \left(y \cdot \left(y + a\right) + b\right) + c\right) + i}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{y}\\
\end{array}
\end{array}
if y < -8.00000000000000034e36Initial program 1.9%
Taylor expanded in y around inf 77.7%
if -8.00000000000000034e36 < y < 2.45000000000000007e27Initial program 97.6%
Taylor expanded in y around 0 86.2%
*-commutative86.2%
Simplified86.2%
if 2.45000000000000007e27 < y Initial program 5.4%
Taylor expanded in y around -inf 66.4%
mul-1-neg66.4%
distribute-lft-out--66.4%
Simplified66.4%
Final simplification80.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -9e+37)
(- (+ x (/ z y)) (/ (* x a) y))
(if (<= y 420000.0)
(/ (+ t (* y 230661.510616)) (+ i (* y (+ c (* y b)))))
(- x (/ (- (* x a) z) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -9e+37) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 420000.0) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
} else {
tmp = x - (((x * a) - z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-9d+37)) then
tmp = (x + (z / y)) - ((x * a) / y)
else if (y <= 420000.0d0) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * (c + (y * b))))
else
tmp = x - (((x * a) - z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -9e+37) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 420000.0) {
tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b))));
} else {
tmp = x - (((x * a) - z) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -9e+37: tmp = (x + (z / y)) - ((x * a) / y) elif y <= 420000.0: tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))) else: tmp = x - (((x * a) - z) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -9e+37) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); elseif (y <= 420000.0) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * Float64(c + Float64(y * b))))); else tmp = Float64(x - Float64(Float64(Float64(x * a) - z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -9e+37) tmp = (x + (z / y)) - ((x * a) / y); elseif (y <= 420000.0) tmp = (t + (y * 230661.510616)) / (i + (y * (c + (y * b)))); else tmp = x - (((x * a) - z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -9e+37], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 420000.0], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * N[(c + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+37}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{elif}\;y \leq 420000:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot \left(c + y \cdot b\right)}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{y}\\
\end{array}
\end{array}
if y < -8.99999999999999923e37Initial program 1.9%
Taylor expanded in y around inf 77.7%
if -8.99999999999999923e37 < y < 4.2e5Initial program 98.9%
Taylor expanded in y around 0 88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in y around 0 85.0%
if 4.2e5 < y Initial program 10.0%
Taylor expanded in y around -inf 62.6%
mul-1-neg62.6%
distribute-lft-out--62.6%
Simplified62.6%
Final simplification78.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.2e+35) (not (<= y 0.39))) (- (+ x (/ z y)) (/ (* x a) y)) (/ (+ t (* y 230661.510616)) (+ i (* y c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+35) || !(y <= 0.39)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.2d+35)) .or. (.not. (y <= 0.39d0))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * 230661.510616d0)) / (i + (y * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+35) || !(y <= 0.39)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.2e+35) or not (y <= 0.39): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * 230661.510616)) / (i + (y * c)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.2e+35) || !(y <= 0.39)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.2e+35) || ~((y <= 0.39))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * 230661.510616)) / (i + (y * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.2e+35], N[Not[LessEqual[y, 0.39]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+35} \lor \neg \left(y \leq 0.39\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\
\end{array}
\end{array}
if y < -1.20000000000000007e35 or 0.39000000000000001 < y Initial program 6.1%
Taylor expanded in y around inf 69.9%
if -1.20000000000000007e35 < y < 0.39000000000000001Initial program 98.9%
Taylor expanded in y around 0 88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in y around 0 82.6%
Final simplification76.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y -1.2e+35) (not (<= y 5.2e-7))) (- (+ x (/ z y)) (/ (* x a) y)) (/ (+ t (* y 230661.510616)) i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+35) || !(y <= 5.2e-7)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((y <= (-1.2d+35)) .or. (.not. (y <= 5.2d-7))) then
tmp = (x + (z / y)) - ((x * a) / y)
else
tmp = (t + (y * 230661.510616d0)) / i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= -1.2e+35) || !(y <= 5.2e-7)) {
tmp = (x + (z / y)) - ((x * a) / y);
} else {
tmp = (t + (y * 230661.510616)) / i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= -1.2e+35) or not (y <= 5.2e-7): tmp = (x + (z / y)) - ((x * a) / y) else: tmp = (t + (y * 230661.510616)) / i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= -1.2e+35) || !(y <= 5.2e-7)) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); else tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= -1.2e+35) || ~((y <= 5.2e-7))) tmp = (x + (z / y)) - ((x * a) / y); else tmp = (t + (y * 230661.510616)) / i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, -1.2e+35], N[Not[LessEqual[y, 5.2e-7]], $MachinePrecision]], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+35} \lor \neg \left(y \leq 5.2 \cdot 10^{-7}\right):\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\end{array}
\end{array}
if y < -1.20000000000000007e35 or 5.19999999999999998e-7 < y Initial program 7.6%
Taylor expanded in y around inf 68.8%
if -1.20000000000000007e35 < y < 5.19999999999999998e-7Initial program 99.0%
Taylor expanded in y around 0 89.3%
*-commutative89.3%
Simplified89.3%
Taylor expanded in i around inf 61.4%
Final simplification64.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= y -1.75e+35)
(- (+ x (/ z y)) (/ (* x a) y))
(if (<= y 400000.0)
(/ (+ t (* y 230661.510616)) (+ i (* y c)))
(- x (/ (- (* x a) z) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.75e+35) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 400000.0) {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
} else {
tmp = x - (((x * a) - z) / y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-1.75d+35)) then
tmp = (x + (z / y)) - ((x * a) / y)
else if (y <= 400000.0d0) then
tmp = (t + (y * 230661.510616d0)) / (i + (y * c))
else
tmp = x - (((x * a) - z) / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -1.75e+35) {
tmp = (x + (z / y)) - ((x * a) / y);
} else if (y <= 400000.0) {
tmp = (t + (y * 230661.510616)) / (i + (y * c));
} else {
tmp = x - (((x * a) - z) / y);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.75e+35: tmp = (x + (z / y)) - ((x * a) / y) elif y <= 400000.0: tmp = (t + (y * 230661.510616)) / (i + (y * c)) else: tmp = x - (((x * a) - z) / y) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.75e+35) tmp = Float64(Float64(x + Float64(z / y)) - Float64(Float64(x * a) / y)); elseif (y <= 400000.0) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / Float64(i + Float64(y * c))); else tmp = Float64(x - Float64(Float64(Float64(x * a) - z) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -1.75e+35) tmp = (x + (z / y)) - ((x * a) / y); elseif (y <= 400000.0) tmp = (t + (y * 230661.510616)) / (i + (y * c)); else tmp = x - (((x * a) - z) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.75e+35], N[(N[(x + N[(z / y), $MachinePrecision]), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 400000.0], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / N[(i + N[(y * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(N[(x * a), $MachinePrecision] - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+35}:\\
\;\;\;\;\left(x + \frac{z}{y}\right) - \frac{x \cdot a}{y}\\
\mathbf{elif}\;y \leq 400000:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i + y \cdot c}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x \cdot a - z}{y}\\
\end{array}
\end{array}
if y < -1.75e35Initial program 1.9%
Taylor expanded in y around inf 77.7%
if -1.75e35 < y < 4e5Initial program 98.9%
Taylor expanded in y around 0 88.4%
*-commutative88.4%
Simplified88.4%
Taylor expanded in y around 0 82.6%
if 4e5 < y Initial program 10.0%
Taylor expanded in y around -inf 62.6%
mul-1-neg62.6%
distribute-lft-out--62.6%
Simplified62.6%
Final simplification76.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -5.6e-14) x (if (<= y 4.8e-7) (/ (+ t (* y 230661.510616)) i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -5.6e-14) {
tmp = x;
} else if (y <= 4.8e-7) {
tmp = (t + (y * 230661.510616)) / i;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-5.6d-14)) then
tmp = x
else if (y <= 4.8d-7) then
tmp = (t + (y * 230661.510616d0)) / i
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -5.6e-14) {
tmp = x;
} else if (y <= 4.8e-7) {
tmp = (t + (y * 230661.510616)) / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -5.6e-14: tmp = x elif y <= 4.8e-7: tmp = (t + (y * 230661.510616)) / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -5.6e-14) tmp = x; elseif (y <= 4.8e-7) tmp = Float64(Float64(t + Float64(y * 230661.510616)) / i); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -5.6e-14) tmp = x; elseif (y <= 4.8e-7) tmp = (t + (y * 230661.510616)) / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -5.6e-14], x, If[LessEqual[y, 4.8e-7], N[(N[(t + N[(y * 230661.510616), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{t + y \cdot 230661.510616}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.6000000000000001e-14 or 4.79999999999999957e-7 < y Initial program 11.9%
Taylor expanded in y around inf 51.9%
if -5.6000000000000001e-14 < y < 4.79999999999999957e-7Initial program 99.7%
Taylor expanded in y around 0 92.5%
*-commutative92.5%
Simplified92.5%
Taylor expanded in i around inf 64.5%
Final simplification58.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -5.5e-14) x (if (<= y 6.8e-9) (/ t i) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -5.5e-14) {
tmp = x;
} else if (y <= 6.8e-9) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-5.5d-14)) then
tmp = x
else if (y <= 6.8d-9) then
tmp = t / i
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -5.5e-14) {
tmp = x;
} else if (y <= 6.8e-9) {
tmp = t / i;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -5.5e-14: tmp = x elif y <= 6.8e-9: tmp = t / i else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -5.5e-14) tmp = x; elseif (y <= 6.8e-9) tmp = Float64(t / i); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -5.5e-14) tmp = x; elseif (y <= 6.8e-9) tmp = t / i; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -5.5e-14], x, If[LessEqual[y, 6.8e-9], N[(t / i), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-9}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.49999999999999991e-14 or 6.7999999999999997e-9 < y Initial program 11.9%
Taylor expanded in y around inf 51.9%
if -5.49999999999999991e-14 < y < 6.7999999999999997e-9Initial program 99.7%
Taylor expanded in y around 0 56.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -6800000000000.0) x (if (<= y 250000.0) (/ 230661.510616 c) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -6800000000000.0) {
tmp = x;
} else if (y <= 250000.0) {
tmp = 230661.510616 / c;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= (-6800000000000.0d0)) then
tmp = x
else if (y <= 250000.0d0) then
tmp = 230661.510616d0 / c
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= -6800000000000.0) {
tmp = x;
} else if (y <= 250000.0) {
tmp = 230661.510616 / c;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -6800000000000.0: tmp = x elif y <= 250000.0: tmp = 230661.510616 / c else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -6800000000000.0) tmp = x; elseif (y <= 250000.0) tmp = Float64(230661.510616 / c); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -6800000000000.0) tmp = x; elseif (y <= 250000.0) tmp = 230661.510616 / c; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -6800000000000.0], x, If[LessEqual[y, 250000.0], N[(230661.510616 / c), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6800000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 250000:\\
\;\;\;\;\frac{230661.510616}{c}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.8e12 or 2.5e5 < y Initial program 7.6%
Taylor expanded in y around inf 54.2%
if -6.8e12 < y < 2.5e5Initial program 99.6%
Taylor expanded in y around 0 90.3%
*-commutative90.3%
Simplified90.3%
Taylor expanded in t around 0 22.4%
Taylor expanded in c around inf 11.1%
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
def code(x, y, z, t, a, b, c, i): return x
function code(x, y, z, t, a, b, c, i) return x end
function tmp = code(x, y, z, t, a, b, c, i) tmp = x; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 56.1%
Taylor expanded in y around inf 27.3%
herbie shell --seed 2024086
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2"
:precision binary64
(/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))