
(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);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
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}
Herbie found 16 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);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
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
(let* ((t_1
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))))
(if (<= t_1 INFINITY) t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = -((-z - (-a * x)) / y) + x;
}
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 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = -((-z - (-a * x)) / y) + x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = -((-z - (-a * x)) / y) + x return tmp
function code(x, y, z, t, a, b, c, i) t_1 = 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)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = -((-z - (-a * x)) / y) + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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}\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\
\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 56.9%
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 56.9%
Taylor expanded in y around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6430.5
Applied rewrites30.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x))
(t_2 (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
(if (<= y -4e+55)
t_1
(if (<= y -1e-58)
(/ (+ (* (* (* y y) z) y) t) t_2)
(if (<= y 3.1e-5)
(/ (fma 230661.510616 y t) t_2)
(if (<= y 9.5e+41)
(/ (* (* (* y y) (* y y)) x) t_2)
(if (<= y 1.72e+106)
(*
y
(+ (/ 27464.7644705 (* a (* y y))) (+ (/ x a) (/ z (* a y)))))
t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -((-z - (-a * x)) / y) + x;
double t_2 = ((((((y + a) * y) + b) * y) + c) * y) + i;
double tmp;
if (y <= -4e+55) {
tmp = t_1;
} else if (y <= -1e-58) {
tmp = ((((y * y) * z) * y) + t) / t_2;
} else if (y <= 3.1e-5) {
tmp = fma(230661.510616, y, t) / t_2;
} else if (y <= 9.5e+41) {
tmp = (((y * y) * (y * y)) * x) / t_2;
} else if (y <= 1.72e+106) {
tmp = y * ((27464.7644705 / (a * (y * y))) + ((x / a) + (z / (a * y))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x) t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i) tmp = 0.0 if (y <= -4e+55) tmp = t_1; elseif (y <= -1e-58) tmp = Float64(Float64(Float64(Float64(Float64(y * y) * z) * y) + t) / t_2); elseif (y <= 3.1e-5) tmp = Float64(fma(230661.510616, y, t) / t_2); elseif (y <= 9.5e+41) tmp = Float64(Float64(Float64(Float64(y * y) * Float64(y * y)) * x) / t_2); elseif (y <= 1.72e+106) tmp = Float64(y * Float64(Float64(27464.7644705 / Float64(a * Float64(y * y))) + Float64(Float64(x / a) + Float64(z / Float64(a * y))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]}, If[LessEqual[y, -4e+55], t$95$1, If[LessEqual[y, -1e-58], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 3.1e-5], N[(N[(230661.510616 * y + t), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 9.5e+41], N[(N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(27464.7644705 / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\
t_2 := \left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i\\
\mathbf{if}\;y \leq -4 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1 \cdot 10^{-58}:\\
\;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{t\_2}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{t\_2}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+41}:\\
\;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot x}{t\_2}\\
\mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.00000000000000004e55 or 1.7200000000000001e106 < y Initial program 56.9%
Taylor expanded in y around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6430.5
Applied rewrites30.5%
if -4.00000000000000004e55 < y < -1e-58Initial program 56.9%
Taylor expanded in z around inf
lower-*.f64N/A
unpow2N/A
lower-*.f6444.9
Applied rewrites44.9%
if -1e-58 < y < 3.10000000000000014e-5Initial program 56.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6448.6
Applied rewrites48.6%
if 3.10000000000000014e-5 < y < 9.4999999999999996e41Initial program 56.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sqr-powN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f649.1
Applied rewrites9.1%
if 9.4999999999999996e41 < y < 1.7200000000000001e106Initial program 56.9%
Applied rewrites57.7%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites13.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6410.8
Applied rewrites10.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x))
(t_2 (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
(if (<= y -4e+55)
t_1
(if (<= y -1e-58)
(/ (+ (* (* (* y y) z) y) t) t_2)
(if (<= y 3.1e-5)
(/ (fma 230661.510616 y t) t_2)
(if (<= y 9.5e+41)
(/ (* (* (* y y) (* y y)) x) (fma (fma (fma (+ a y) y b) y c) y i))
(if (<= y 1.72e+106)
(*
y
(+ (/ 27464.7644705 (* a (* y y))) (+ (/ x a) (/ z (* a y)))))
t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -((-z - (-a * x)) / y) + x;
double t_2 = ((((((y + a) * y) + b) * y) + c) * y) + i;
double tmp;
if (y <= -4e+55) {
tmp = t_1;
} else if (y <= -1e-58) {
tmp = ((((y * y) * z) * y) + t) / t_2;
} else if (y <= 3.1e-5) {
tmp = fma(230661.510616, y, t) / t_2;
} else if (y <= 9.5e+41) {
tmp = (((y * y) * (y * y)) * x) / fma(fma(fma((a + y), y, b), y, c), y, i);
} else if (y <= 1.72e+106) {
tmp = y * ((27464.7644705 / (a * (y * y))) + ((x / a) + (z / (a * y))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x) t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i) tmp = 0.0 if (y <= -4e+55) tmp = t_1; elseif (y <= -1e-58) tmp = Float64(Float64(Float64(Float64(Float64(y * y) * z) * y) + t) / t_2); elseif (y <= 3.1e-5) tmp = Float64(fma(230661.510616, y, t) / t_2); elseif (y <= 9.5e+41) tmp = Float64(Float64(Float64(Float64(y * y) * Float64(y * y)) * x) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); elseif (y <= 1.72e+106) tmp = Float64(y * Float64(Float64(27464.7644705 / Float64(a * Float64(y * y))) + Float64(Float64(x / a) + Float64(z / Float64(a * y))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]}, If[LessEqual[y, -4e+55], t$95$1, If[LessEqual[y, -1e-58], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 3.1e-5], N[(N[(230661.510616 * y + t), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, 9.5e+41], N[(N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(27464.7644705 / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\
t_2 := \left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i\\
\mathbf{if}\;y \leq -4 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1 \cdot 10^{-58}:\\
\;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{t\_2}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{t\_2}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+41}:\\
\;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.00000000000000004e55 or 1.7200000000000001e106 < y Initial program 56.9%
Taylor expanded in y around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6430.5
Applied rewrites30.5%
if -4.00000000000000004e55 < y < -1e-58Initial program 56.9%
Taylor expanded in z around inf
lower-*.f64N/A
unpow2N/A
lower-*.f6444.9
Applied rewrites44.9%
if -1e-58 < y < 3.10000000000000014e-5Initial program 56.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6448.6
Applied rewrites48.6%
if 3.10000000000000014e-5 < y < 9.4999999999999996e41Initial program 56.9%
Taylor expanded in x around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
sqr-powN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites9.1%
if 9.4999999999999996e41 < y < 1.7200000000000001e106Initial program 56.9%
Applied rewrites57.7%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites13.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6410.8
Applied rewrites10.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -1.2e+56)
t_1
(if (<= y 3.8e+44)
(/
(fma (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma y y b) y c) y i))
(if (<= y 1.72e+106)
(* y (+ (/ 27464.7644705 (* a (* y y))) (+ (/ x a) (/ z (* a y)))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1.2e+56) {
tmp = t_1;
} else if (y <= 3.8e+44) {
tmp = fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(y, y, b), y, c), y, i);
} else if (y <= 1.72e+106) {
tmp = y * ((27464.7644705 / (a * (y * y))) + ((x / a) + (z / (a * y))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x) tmp = 0.0 if (y <= -1.2e+56) tmp = t_1; elseif (y <= 3.8e+44) tmp = Float64(fma(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(y, y, b), y, c), y, i)); elseif (y <= 1.72e+106) tmp = Float64(y * Float64(Float64(27464.7644705 / Float64(a * Float64(y * y))) + Float64(Float64(x / a) + Float64(z / Float64(a * y))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -1.2e+56], t$95$1, If[LessEqual[y, 3.8e+44], N[(N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(y * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(27464.7644705 / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\
\mathbf{if}\;y \leq -1.2 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+44}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.20000000000000007e56 or 1.7200000000000001e106 < y Initial program 56.9%
Taylor expanded in y around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6430.5
Applied rewrites30.5%
if -1.20000000000000007e56 < y < 3.8000000000000002e44Initial program 56.9%
Taylor expanded in a around 0
lower-/.f64N/A
Applied rewrites53.4%
if 3.8000000000000002e44 < y < 1.7200000000000001e106Initial program 56.9%
Applied rewrites57.7%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites13.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6410.8
Applied rewrites10.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -7e+31)
t_1
(if (<= y 3.1e-5)
(/ (fma 230661.510616 y t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
(if (<= y 9.5e+41)
(/ (* (* (* y y) (* y y)) x) (fma (fma (fma (+ a y) y b) y c) y i))
(if (<= y 1.72e+106)
(* y (+ (/ 27464.7644705 (* a (* y y))) (+ (/ x a) (/ z (* a y)))))
t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -7e+31) {
tmp = t_1;
} else if (y <= 3.1e-5) {
tmp = fma(230661.510616, y, t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
} else if (y <= 9.5e+41) {
tmp = (((y * y) * (y * y)) * x) / fma(fma(fma((a + y), y, b), y, c), y, i);
} else if (y <= 1.72e+106) {
tmp = y * ((27464.7644705 / (a * (y * y))) + ((x / a) + (z / (a * y))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x) tmp = 0.0 if (y <= -7e+31) tmp = t_1; elseif (y <= 3.1e-5) tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)); elseif (y <= 9.5e+41) tmp = Float64(Float64(Float64(Float64(y * y) * Float64(y * y)) * x) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); elseif (y <= 1.72e+106) tmp = Float64(y * Float64(Float64(27464.7644705 / Float64(a * Float64(y * y))) + Float64(Float64(x / a) + Float64(z / Float64(a * y))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -7e+31], t$95$1, If[LessEqual[y, 3.1e-5], N[(N[(230661.510616 * y + 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], If[LessEqual[y, 9.5e+41], N[(N[(N[(N[(y * y), $MachinePrecision] * N[(y * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(27464.7644705 / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\
\mathbf{if}\;y \leq -7 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+41}:\\
\;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot \left(y \cdot y\right)\right) \cdot x}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7e31 or 1.7200000000000001e106 < y Initial program 56.9%
Taylor expanded in y around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6430.5
Applied rewrites30.5%
if -7e31 < y < 3.10000000000000014e-5Initial program 56.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6448.6
Applied rewrites48.6%
if 3.10000000000000014e-5 < y < 9.4999999999999996e41Initial program 56.9%
Taylor expanded in x around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
sqr-powN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites9.1%
if 9.4999999999999996e41 < y < 1.7200000000000001e106Initial program 56.9%
Applied rewrites57.7%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites13.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6410.8
Applied rewrites10.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -7e+31)
t_1
(if (<= y 0.00023)
(/ (fma 230661.510616 y t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
(if (<= y 1.72e+106)
(* y (+ (/ 27464.7644705 (* a (* y y))) (+ (/ x a) (/ z (* a y)))))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -7e+31) {
tmp = t_1;
} else if (y <= 0.00023) {
tmp = fma(230661.510616, y, t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
} else if (y <= 1.72e+106) {
tmp = y * ((27464.7644705 / (a * (y * y))) + ((x / a) + (z / (a * y))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x) tmp = 0.0 if (y <= -7e+31) tmp = t_1; elseif (y <= 0.00023) tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)); elseif (y <= 1.72e+106) tmp = Float64(y * Float64(Float64(27464.7644705 / Float64(a * Float64(y * y))) + Float64(Float64(x / a) + Float64(z / Float64(a * y))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -7e+31], t$95$1, If[LessEqual[y, 0.00023], N[(N[(230661.510616 * y + 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], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(27464.7644705 / N[(a * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\
\mathbf{if}\;y \leq -7 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.00023:\\
\;\;\;\;\frac{\mathsf{fma}\left(230661.510616, y, t\right)}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}\\
\mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{27464.7644705}{a \cdot \left(y \cdot y\right)} + \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7e31 or 1.7200000000000001e106 < y Initial program 56.9%
Taylor expanded in y around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6430.5
Applied rewrites30.5%
if -7e31 < y < 2.3000000000000001e-4Initial program 56.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6448.6
Applied rewrites48.6%
if 2.3000000000000001e-4 < y < 1.7200000000000001e106Initial program 56.9%
Applied rewrites57.7%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites13.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
pow2N/A
lift-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6410.8
Applied rewrites10.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))))
(if (<= t_1 -4e+60)
(/ t (fma (fma (fma (+ a y) y b) y c) y i))
(if (<= t_1 INFINITY)
(/
(+ (* (+ (* (+ (* y z) 27464.7644705) y) 230661.510616) y) t)
(fma c y i))
(+ (- (/ (- (- z) (* (- a) x)) y)) x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
double tmp;
if (t_1 <= -4e+60) {
tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
} else if (t_1 <= ((double) INFINITY)) {
tmp = ((((((y * z) + 27464.7644705) * y) + 230661.510616) * y) + t) / fma(c, y, i);
} else {
tmp = -((-z - (-a * x)) / y) + x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = 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)) tmp = 0.0 if (t_1 <= -4e+60) tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); elseif (t_1 <= Inf) tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(y * z) + 27464.7644705) * y) + 230661.510616) * y) + t) / fma(c, y, i)); else tmp = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -4e+60], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(N[(N[(N[(N[(N[(y * z), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], N[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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}\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+60}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{\left(\left(y \cdot z + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\
\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)) < -3.9999999999999998e60Initial program 56.9%
Taylor expanded in t around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
+-commutativeN/A
lower-+.f6441.4
Applied rewrites41.4%
if -3.9999999999999998e60 < (/.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 56.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.7
Applied rewrites46.7%
Taylor expanded in x around 0
lower-*.f6445.1
Applied rewrites45.1%
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 56.9%
Taylor expanded in y around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6430.5
Applied rewrites30.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -1.5e+30)
t_1
(if (<= y 0.00022)
(/ (+ (* (+ (* 27464.7644705 y) 230661.510616) y) t) (fma c y i))
(if (<= y 1.72e+106) (* y (+ (/ x a) (/ z (* a y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1.5e+30) {
tmp = t_1;
} else if (y <= 0.00022) {
tmp = ((((27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, y, i);
} else if (y <= 1.72e+106) {
tmp = y * ((x / a) + (z / (a * y)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x) tmp = 0.0 if (y <= -1.5e+30) tmp = t_1; elseif (y <= 0.00022) tmp = Float64(Float64(Float64(Float64(Float64(27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, y, i)); elseif (y <= 1.72e+106) tmp = Float64(y * Float64(Float64(x / a) + Float64(z / Float64(a * y)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -1.5e+30], t$95$1, If[LessEqual[y, 0.00022], N[(N[(N[(N[(N[(27464.7644705 * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.00022:\\
\;\;\;\;\frac{\left(27464.7644705 \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.49999999999999989e30 or 1.7200000000000001e106 < y Initial program 56.9%
Taylor expanded in y around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6430.5
Applied rewrites30.5%
if -1.49999999999999989e30 < y < 2.20000000000000008e-4Initial program 56.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.7
Applied rewrites46.7%
Taylor expanded in y around 0
lower-*.f6442.7
Applied rewrites42.7%
if 2.20000000000000008e-4 < y < 1.7200000000000001e106Initial program 56.9%
Applied rewrites57.7%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites13.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6410.9
Applied rewrites10.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -1.5e+30)
t_1
(if (<= y 0.00022)
(/ (+ (* 230661.510616 y) t) (fma c y i))
(if (<= y 1.72e+106) (* y (+ (/ x a) (/ z (* a y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1.5e+30) {
tmp = t_1;
} else if (y <= 0.00022) {
tmp = ((230661.510616 * y) + t) / fma(c, y, i);
} else if (y <= 1.72e+106) {
tmp = y * ((x / a) + (z / (a * y)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x) tmp = 0.0 if (y <= -1.5e+30) tmp = t_1; elseif (y <= 0.00022) tmp = Float64(Float64(Float64(230661.510616 * y) + t) / fma(c, y, i)); elseif (y <= 1.72e+106) tmp = Float64(y * Float64(Float64(x / a) + Float64(z / Float64(a * y)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -1.5e+30], t$95$1, If[LessEqual[y, 0.00022], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.72e+106], N[(y * N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\
\mathbf{if}\;y \leq -1.5 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 0.00022:\\
\;\;\;\;\frac{230661.510616 \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{elif}\;y \leq 1.72 \cdot 10^{+106}:\\
\;\;\;\;y \cdot \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.49999999999999989e30 or 1.7200000000000001e106 < y Initial program 56.9%
Taylor expanded in y around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6430.5
Applied rewrites30.5%
if -1.49999999999999989e30 < y < 2.20000000000000008e-4Initial program 56.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.7
Applied rewrites46.7%
Taylor expanded in y around 0
lower-*.f6442.9
Applied rewrites42.9%
if 2.20000000000000008e-4 < y < 1.7200000000000001e106Initial program 56.9%
Applied rewrites57.7%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites13.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6410.9
Applied rewrites10.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))))
(if (<= t_1 -1e+82)
(/ t (fma (fma (fma (+ a y) y b) y c) y i))
(if (<= t_1 INFINITY)
(/ (+ (* (+ (* 27464.7644705 y) 230661.510616) y) t) (fma c y i))
(+ (- (/ (- (- z) (* (- a) x)) y)) x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
double tmp;
if (t_1 <= -1e+82) {
tmp = t / fma(fma(fma((a + y), y, b), y, c), y, i);
} else if (t_1 <= ((double) INFINITY)) {
tmp = ((((27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, y, i);
} else {
tmp = -((-z - (-a * x)) / y) + x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = 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)) tmp = 0.0 if (t_1 <= -1e+82) tmp = Float64(t / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); elseif (t_1 <= Inf) tmp = Float64(Float64(Float64(Float64(Float64(27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, y, i)); else tmp = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -1e+82], N[(t / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(N[(N[(N[(N[(27464.7644705 * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], N[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+82}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{\left(27464.7644705 \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\
\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)) < -9.9999999999999996e81Initial program 56.9%
Taylor expanded in t around inf
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
*-commutativeN/A
+-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
+-commutativeN/A
lower-+.f6441.4
Applied rewrites41.4%
if -9.9999999999999996e81 < (/.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 56.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.7
Applied rewrites46.7%
Taylor expanded in y around 0
lower-*.f6442.7
Applied rewrites42.7%
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 56.9%
Taylor expanded in y around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6430.5
Applied rewrites30.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(/ (+ (* 230661.510616 y) t) (fma c y i))
(+ (- (/ (- (- z) (* (- a) x)) y)) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = ((230661.510616 * y) + t) / fma(c, y, i);
} else {
tmp = -((-z - (-a * x)) / y) + x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (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)) <= Inf) tmp = Float64(Float64(Float64(230661.510616 * y) + t) / fma(c, y, i)); else tmp = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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], Infinity], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], N[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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} \leq \infty:\\
\;\;\;\;\frac{230661.510616 \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\
\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 56.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.7
Applied rewrites46.7%
Taylor expanded in y around 0
lower-*.f6442.9
Applied rewrites42.9%
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 56.9%
Taylor expanded in y around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
mul-1-negN/A
lower-neg.f64N/A
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6430.5
Applied rewrites30.5%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(/ (+ (* 230661.510616 y) t) (fma c y i))
(/ (* x y) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = ((230661.510616 * y) + t) / fma(c, y, i);
} else {
tmp = (x * y) / a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (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)) <= Inf) tmp = Float64(Float64(Float64(230661.510616 * y) + t) / fma(c, y, i)); else tmp = Float64(Float64(x * y) / a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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], Infinity], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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} \leq \infty:\\
\;\;\;\;\frac{230661.510616 \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\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 56.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.7
Applied rewrites46.7%
Taylor expanded in y around 0
lower-*.f6442.9
Applied rewrites42.9%
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 56.9%
Applied rewrites57.7%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites13.4%
Taylor expanded in x around inf
lower-/.f64N/A
lower-*.f649.6
Applied rewrites9.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 2.6e-6) (/ t (fma c y i)) (/ (* x y) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 2.6e-6) {
tmp = t / fma(c, y, i);
} else {
tmp = (x * y) / a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 2.6e-6) tmp = Float64(t / fma(c, y, i)); else tmp = Float64(Float64(x * y) / a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 2.6e-6], N[(t / N[(c * y + i), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.6 \cdot 10^{-6}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\end{array}
\end{array}
if y < 2.60000000000000009e-6Initial program 56.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.7
Applied rewrites46.7%
Taylor expanded in y around 0
Applied rewrites37.3%
if 2.60000000000000009e-6 < y Initial program 56.9%
Applied rewrites57.7%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites13.4%
Taylor expanded in x around inf
lower-/.f64N/A
lower-*.f649.6
Applied rewrites9.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(/ t i)
(/ (* x y) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = t / i;
} else {
tmp = (x * y) / a;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= Double.POSITIVE_INFINITY) {
tmp = t / i;
} else {
tmp = (x * y) / a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= math.inf: tmp = t / i else: tmp = (x * y) / a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (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)) <= Inf) tmp = Float64(t / i); else tmp = Float64(Float64(x * y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = t / i; else tmp = (x * y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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], Infinity], N[(t / i), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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} \leq \infty:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y}{a}\\
\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 56.9%
Taylor expanded in y around 0
lower-/.f6429.0
Applied rewrites29.0%
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 56.9%
Applied rewrites57.7%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites13.4%
Taylor expanded in x around inf
lower-/.f64N/A
lower-*.f649.6
Applied rewrites9.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(/ t i)
(/ z a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= ((double) INFINITY)) {
tmp = t / i;
} else {
tmp = z / a;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= Double.POSITIVE_INFINITY) {
tmp = t / i;
} else {
tmp = z / a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= math.inf: tmp = t / i else: tmp = z / a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (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)) <= Inf) tmp = Float64(t / i); else tmp = Float64(z / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= Inf) tmp = t / i; else tmp = z / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[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], Infinity], N[(t / i), $MachinePrecision], N[(z / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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} \leq \infty:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{a}\\
\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 56.9%
Taylor expanded in y around 0
lower-/.f6429.0
Applied rewrites29.0%
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 56.9%
Applied rewrites57.7%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites13.4%
Taylor expanded in z around inf
lower-/.f647.5
Applied rewrites7.5%
(FPCore (x y z t a b c i) :precision binary64 (/ z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z / a;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i)
use fmin_fmax_functions
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 = z / a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z / a;
}
def code(x, y, z, t, a, b, c, i): return z / a
function code(x, y, z, t, a, b, c, i) return Float64(z / a) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = z / a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(z / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{z}{a}
\end{array}
Initial program 56.9%
Applied rewrites57.7%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites13.4%
Taylor expanded in z around inf
lower-/.f647.5
Applied rewrites7.5%
herbie shell --seed 2025142
(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)))