
(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 15 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 (fma (fma (fma (+ a y) y b) y c) y i)))
(if (<=
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
INFINITY)
(fma
y
(/ (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) t_1)
(/ t t_1))
(- (+ x (* 2.0 (/ z y))) (/ z y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(fma(fma((a + y), y, b), y, c), y, 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 = fma(y, (fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616) / t_1), (t / t_1));
} else {
tmp = (x + (2.0 * (z / y))) - (z / y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(fma(fma(Float64(a + y), y, b), y, c), y, 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 = fma(y, Float64(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616) / t_1), Float64(t / t_1)); else tmp = Float64(Float64(x + Float64(2.0 * Float64(z / y))) - Float64(z / y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]}, 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[(y * N[(N[(N[(N[(y * x + z), $MachinePrecision] * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(2.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)\\
\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:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(y, x, z\right), y, 27464.7644705\right), y, 230661.510616\right)}{t\_1}, \frac{t}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + 2 \cdot \frac{z}{y}\right) - \frac{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 55.9%
Applied rewrites56.6%
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 55.9%
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
flip-+N/A
lower-/.f64N/A
Applied rewrites51.2%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
div-add-revN/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f6430.2
Applied rewrites30.2%
Taylor expanded in x around 0
lift-/.f6431.9
Applied rewrites31.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 INFINITY) t_1 (- (+ x (* 2.0 (/ z y))) (/ z y)))))
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 = (x + (2.0 * (z / y))) - (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 = ((((((((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 = (x + (2.0 * (z / y))) - (z / y);
}
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 = (x + (2.0 * (z / y))) - (z / y) 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(x + Float64(2.0 * Float64(z / y))) - Float64(z / y)); 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 = (x + (2.0 * (z / y))) - (z / y); 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[(x + N[(2.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z / y), $MachinePrecision]), $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(x + 2 \cdot \frac{z}{y}\right) - \frac{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 55.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 55.9%
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
flip-+N/A
lower-/.f64N/A
Applied rewrites51.2%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
div-add-revN/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f6430.2
Applied rewrites30.2%
Taylor expanded in x around 0
lift-/.f6431.9
Applied rewrites31.9%
(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))
5e+307)
(/
(fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ a y) y b) y c) y i))
(- (+ x (* 2.0 (/ z y))) (/ z y))))
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)) <= 5e+307) {
tmp = fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma((a + y), y, b), y, c), y, i);
} else {
tmp = (x + (2.0 * (z / y))) - (z / y);
}
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)) <= 5e+307) tmp = Float64(fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(fma(Float64(a + y), y, b), y, c), y, i)); else tmp = Float64(Float64(x + Float64(2.0 * Float64(z / y))) - Float64(z / y)); 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], 5e+307], N[(N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(N[(N[(a + y), $MachinePrecision] * y + b), $MachinePrecision] * y + c), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(2.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z / y), $MachinePrecision]), $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 5 \cdot 10^{+307}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(z, y, 27464.7644705\right), y, 230661.510616\right), y, t\right)}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a + y, y, b\right), y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(x + 2 \cdot \frac{z}{y}\right) - \frac{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)) < 5e307Initial program 55.9%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
Applied rewrites52.2%
if 5e307 < (/.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 55.9%
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
flip-+N/A
lower-/.f64N/A
Applied rewrites51.2%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
div-add-revN/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f6430.2
Applied rewrites30.2%
Taylor expanded in x around 0
lift-/.f6431.9
Applied rewrites31.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (* 2.0 (/ z y))) (/ z y))))
(if (<= y -1.15e+16)
t_1
(if (<= y 3.1e-92)
(/ (fma 230661.510616 y t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
(if (<= y 1.1e+30)
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y)
t)
(fma c y i))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + (2.0 * (z / y))) - (z / y);
double tmp;
if (y <= -1.15e+16) {
tmp = t_1;
} else if (y <= 3.1e-92) {
tmp = fma(230661.510616, y, t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
} else if (y <= 1.1e+30) {
tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / fma(c, y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x + Float64(2.0 * Float64(z / y))) - Float64(z / y)) tmp = 0.0 if (y <= -1.15e+16) tmp = t_1; elseif (y <= 3.1e-92) 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.1e+30) tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / fma(c, y, i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x + N[(2.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.15e+16], t$95$1, If[LessEqual[y, 3.1e-92], 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.1e+30], 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[(c * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + 2 \cdot \frac{z}{y}\right) - \frac{z}{y}\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-92}:\\
\;\;\;\;\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.1 \cdot 10^{+30}:\\
\;\;\;\;\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.15e16 or 1.1e30 < y Initial program 55.9%
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
flip-+N/A
lower-/.f64N/A
Applied rewrites51.2%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
div-add-revN/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f6430.2
Applied rewrites30.2%
Taylor expanded in x around 0
lift-/.f6431.9
Applied rewrites31.9%
if -1.15e16 < y < 3.1000000000000001e-92Initial program 55.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6448.0
Applied rewrites48.0%
if 3.1000000000000001e-92 < y < 1.1e30Initial program 55.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.0
Applied rewrites46.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (* 2.0 (/ z y))) (/ z y))))
(if (<= y -1.15e+16)
t_1
(if (<= y 3e+28)
(/ (fma 230661.510616 y t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + (2.0 * (z / y))) - (z / y);
double tmp;
if (y <= -1.15e+16) {
tmp = t_1;
} else if (y <= 3e+28) {
tmp = fma(230661.510616, y, t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x + Float64(2.0 * Float64(z / y))) - Float64(z / y)) tmp = 0.0 if (y <= -1.15e+16) tmp = t_1; elseif (y <= 3e+28) tmp = Float64(fma(230661.510616, y, t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x + N[(2.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.15e+16], t$95$1, If[LessEqual[y, 3e+28], 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], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + 2 \cdot \frac{z}{y}\right) - \frac{z}{y}\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+28}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.15e16 or 3.0000000000000001e28 < y Initial program 55.9%
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
flip-+N/A
lower-/.f64N/A
Applied rewrites51.2%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
div-add-revN/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f6430.2
Applied rewrites30.2%
Taylor expanded in x around 0
lift-/.f6431.9
Applied rewrites31.9%
if -1.15e16 < y < 3.0000000000000001e28Initial program 55.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6448.0
Applied rewrites48.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (* 2.0 (/ z y))) (/ z y))))
(if (<= y -2.1e+29)
t_1
(if (<= y 4.2e+19)
(/
(+ (* (+ (* (+ (* y z) 27464.7644705) y) 230661.510616) y) t)
(fma c y i))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + (2.0 * (z / y))) - (z / y);
double tmp;
if (y <= -2.1e+29) {
tmp = t_1;
} else if (y <= 4.2e+19) {
tmp = ((((((y * z) + 27464.7644705) * y) + 230661.510616) * y) + t) / fma(c, y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x + Float64(2.0 * Float64(z / y))) - Float64(z / y)) tmp = 0.0 if (y <= -2.1e+29) tmp = t_1; elseif (y <= 4.2e+19) tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(y * z) + 27464.7644705) * y) + 230661.510616) * y) + t) / fma(c, y, i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x + N[(2.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+29], t$95$1, If[LessEqual[y, 4.2e+19], 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], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + 2 \cdot \frac{z}{y}\right) - \frac{z}{y}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+19}:\\
\;\;\;\;\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}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.1000000000000002e29 or 4.2e19 < y Initial program 55.9%
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
flip-+N/A
lower-/.f64N/A
Applied rewrites51.2%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
div-add-revN/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f6430.2
Applied rewrites30.2%
Taylor expanded in x around 0
lift-/.f6431.9
Applied rewrites31.9%
if -2.1000000000000002e29 < y < 4.2e19Initial program 55.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.0
Applied rewrites46.0%
Taylor expanded in x around 0
lower-*.f6444.3
Applied rewrites44.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (* 2.0 (/ z y))) (/ z y))))
(if (<= y -2.45e+29)
t_1
(if (<= y 1.7e+27)
(/ (+ (* (+ (* 27464.7644705 y) 230661.510616) y) t) (fma c y i))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + (2.0 * (z / y))) - (z / y);
double tmp;
if (y <= -2.45e+29) {
tmp = t_1;
} else if (y <= 1.7e+27) {
tmp = ((((27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x + Float64(2.0 * Float64(z / y))) - Float64(z / y)) tmp = 0.0 if (y <= -2.45e+29) tmp = t_1; elseif (y <= 1.7e+27) tmp = Float64(Float64(Float64(Float64(Float64(27464.7644705 * y) + 230661.510616) * y) + t) / fma(c, y, i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x + N[(2.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.45e+29], t$95$1, If[LessEqual[y, 1.7e+27], N[(N[(N[(N[(N[(27464.7644705 * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + 2 \cdot \frac{z}{y}\right) - \frac{z}{y}\\
\mathbf{if}\;y \leq -2.45 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+27}:\\
\;\;\;\;\frac{\left(27464.7644705 \cdot y + 230661.510616\right) \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.4500000000000001e29 or 1.7e27 < y Initial program 55.9%
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
flip-+N/A
lower-/.f64N/A
Applied rewrites51.2%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
div-add-revN/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f6430.2
Applied rewrites30.2%
Taylor expanded in x around 0
lift-/.f6431.9
Applied rewrites31.9%
if -2.4500000000000001e29 < y < 1.7e27Initial program 55.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.0
Applied rewrites46.0%
Taylor expanded in y around 0
lower-*.f6442.3
Applied rewrites42.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ x (* 2.0 (/ z y))) (/ z y))))
(if (<= y -47000000000000.0)
t_1
(if (<= y 2.4e+28) (/ (+ (* 230661.510616 y) t) (fma c y i)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + (2.0 * (z / y))) - (z / y);
double tmp;
if (y <= -47000000000000.0) {
tmp = t_1;
} else if (y <= 2.4e+28) {
tmp = ((230661.510616 * y) + t) / fma(c, y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x + Float64(2.0 * Float64(z / y))) - Float64(z / y)) tmp = 0.0 if (y <= -47000000000000.0) tmp = t_1; elseif (y <= 2.4e+28) tmp = Float64(Float64(Float64(230661.510616 * y) + t) / fma(c, y, i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x + N[(2.0 * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -47000000000000.0], t$95$1, If[LessEqual[y, 2.4e+28], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + 2 \cdot \frac{z}{y}\right) - \frac{z}{y}\\
\mathbf{if}\;y \leq -47000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+28}:\\
\;\;\;\;\frac{230661.510616 \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.7e13 or 2.39999999999999981e28 < y Initial program 55.9%
lift-+.f64N/A
lift-*.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-+.f64N/A
flip-+N/A
lower-/.f64N/A
Applied rewrites51.2%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
div-add-revN/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f6430.2
Applied rewrites30.2%
Taylor expanded in x around 0
lift-/.f6431.9
Applied rewrites31.9%
if -4.7e13 < y < 2.39999999999999981e28Initial program 55.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.0
Applied rewrites46.0%
Taylor expanded in y around 0
lower-*.f6442.4
Applied rewrites42.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* a x)) y))))
(if (<= y -47000000000000.0)
t_1
(if (<= y 2.4e+28) (/ (+ (* 230661.510616 y) t) (fma c y i)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (a * x)) / y);
double tmp;
if (y <= -47000000000000.0) {
tmp = t_1;
} else if (y <= 2.4e+28) {
tmp = ((230661.510616 * y) + t) / fma(c, y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(a * x)) / y)) tmp = 0.0 if (y <= -47000000000000.0) tmp = t_1; elseif (y <= 2.4e+28) tmp = Float64(Float64(Float64(230661.510616 * y) + t) / fma(c, y, i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -47000000000000.0], t$95$1, If[LessEqual[y, 2.4e+28], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(c * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - a \cdot x}{y}\\
\mathbf{if}\;y \leq -47000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+28}:\\
\;\;\;\;\frac{230661.510616 \cdot y + t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.7e13 or 2.39999999999999981e28 < y Initial program 55.9%
Taylor expanded in y around inf
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites24.8%
Taylor expanded in y around inf
lower-/.f64N/A
lift--.f64N/A
lift-*.f6431.0
Applied rewrites31.0%
if -4.7e13 < y < 2.39999999999999981e28Initial program 55.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.0
Applied rewrites46.0%
Taylor expanded in y around 0
lower-*.f6442.4
Applied rewrites42.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ x (/ (- z (* a x)) y))))
(if (<= y -47000000000000.0)
t_1
(if (<= y 2.4e+28) (/ t (fma c y i)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x + ((z - (a * x)) / y);
double tmp;
if (y <= -47000000000000.0) {
tmp = t_1;
} else if (y <= 2.4e+28) {
tmp = t / fma(c, y, i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x + Float64(Float64(z - Float64(a * x)) / y)) tmp = 0.0 if (y <= -47000000000000.0) tmp = t_1; elseif (y <= 2.4e+28) tmp = Float64(t / fma(c, y, i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x + N[(N[(z - N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -47000000000000.0], t$95$1, If[LessEqual[y, 2.4e+28], N[(t / N[(c * y + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - a \cdot x}{y}\\
\mathbf{if}\;y \leq -47000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+28}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.7e13 or 2.39999999999999981e28 < y Initial program 55.9%
Taylor expanded in y around inf
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites24.8%
Taylor expanded in y around inf
lower-/.f64N/A
lift--.f64N/A
lift-*.f6431.0
Applied rewrites31.0%
if -4.7e13 < y < 2.39999999999999981e28Initial program 55.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.0
Applied rewrites46.0%
Taylor expanded in y around 0
Applied rewrites36.8%
(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))
2e+287)
(/ t (fma c y i))
(* (- x) -1.0)))
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)) <= 2e+287) {
tmp = t / fma(c, y, i);
} else {
tmp = -x * -1.0;
}
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)) <= 2e+287) tmp = Float64(t / fma(c, y, i)); else tmp = Float64(Float64(-x) * -1.0); 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], 2e+287], N[(t / N[(c * y + i), $MachinePrecision]), $MachinePrecision], N[((-x) * -1.0), $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 2 \cdot 10^{+287}:\\
\;\;\;\;\frac{t}{\mathsf{fma}\left(c, y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(-x\right) \cdot -1\\
\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)) < 2.0000000000000002e287Initial program 55.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6446.0
Applied rewrites46.0%
Taylor expanded in y around 0
Applied rewrites36.8%
if 2.0000000000000002e287 < (/.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 55.9%
Taylor expanded in x around -inf
Applied rewrites48.8%
Taylor expanded in y around inf
Applied rewrites25.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))
2e+287)
(/ t i)
(* (- x) -1.0)))
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)) <= 2e+287) {
tmp = t / i;
} else {
tmp = -x * -1.0;
}
return tmp;
}
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
real(8) :: tmp
if ((((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 2d+287) then
tmp = t / i
else
tmp = -x * (-1.0d0)
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 ((((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)) <= 2e+287) {
tmp = t / i;
} else {
tmp = -x * -1.0;
}
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)) <= 2e+287: tmp = t / i else: tmp = -x * -1.0 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)) <= 2e+287) tmp = Float64(t / i); else tmp = Float64(Float64(-x) * -1.0); 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)) <= 2e+287) tmp = t / i; else tmp = -x * -1.0; 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], 2e+287], N[(t / i), $MachinePrecision], N[((-x) * -1.0), $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 2 \cdot 10^{+287}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;\left(-x\right) \cdot -1\\
\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)) < 2.0000000000000002e287Initial program 55.9%
Taylor expanded in y around 0
lower-/.f6428.9
Applied rewrites28.9%
if 2.0000000000000002e287 < (/.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 55.9%
Taylor expanded in x around -inf
Applied rewrites48.8%
Taylor expanded in y around inf
Applied rewrites25.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y -1.66e+61) (/ z y) (if (<= y 6.2e+37) (/ t i) (/ 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.66e+61) {
tmp = z / y;
} else if (y <= 6.2e+37) {
tmp = t / i;
} else {
tmp = z / y;
}
return tmp;
}
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
real(8) :: tmp
if (y <= (-1.66d+61)) then
tmp = z / y
else if (y <= 6.2d+37) then
tmp = t / i
else
tmp = 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.66e+61) {
tmp = z / y;
} else if (y <= 6.2e+37) {
tmp = t / i;
} else {
tmp = z / y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= -1.66e+61: tmp = z / y elif y <= 6.2e+37: tmp = t / i else: tmp = z / y return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= -1.66e+61) tmp = Float64(z / y); elseif (y <= 6.2e+37) tmp = Float64(t / i); else tmp = Float64(z / y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= -1.66e+61) tmp = z / y; elseif (y <= 6.2e+37) tmp = t / i; else tmp = z / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, -1.66e+61], N[(z / y), $MachinePrecision], If[LessEqual[y, 6.2e+37], N[(t / i), $MachinePrecision], N[(z / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.66 \cdot 10^{+61}:\\
\;\;\;\;\frac{z}{y}\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+37}:\\
\;\;\;\;\frac{t}{i}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{y}\\
\end{array}
\end{array}
if y < -1.66000000000000004e61 or 6.2000000000000004e37 < y Initial program 55.9%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites11.3%
Taylor expanded in a around inf
lower-/.f647.4
Applied rewrites7.4%
Taylor expanded in y around inf
lower-/.f6410.7
Applied rewrites10.7%
if -1.66000000000000004e61 < y < 6.2000000000000004e37Initial program 55.9%
Taylor expanded in y around 0
lower-/.f6428.9
Applied rewrites28.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.35e+72) (/ z y) (/ z a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.35e+72) {
tmp = z / y;
} else {
tmp = z / a;
}
return tmp;
}
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
real(8) :: tmp
if (a <= 2.35d+72) then
tmp = z / y
else
tmp = z / a
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 (a <= 2.35e+72) {
tmp = z / y;
} else {
tmp = z / a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.35e+72: tmp = z / y else: tmp = z / a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.35e+72) tmp = Float64(z / y); 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 (a <= 2.35e+72) tmp = z / y; else tmp = z / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.35e+72], N[(z / y), $MachinePrecision], N[(z / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.35 \cdot 10^{+72}:\\
\;\;\;\;\frac{z}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{a}\\
\end{array}
\end{array}
if a < 2.35000000000000017e72Initial program 55.9%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites11.3%
Taylor expanded in a around inf
lower-/.f647.4
Applied rewrites7.4%
Taylor expanded in y around inf
lower-/.f6410.7
Applied rewrites10.7%
if 2.35000000000000017e72 < a Initial program 55.9%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites11.3%
Taylor expanded in a around inf
lower-/.f647.4
Applied rewrites7.4%
(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 55.9%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites11.3%
Taylor expanded in a around inf
lower-/.f647.4
Applied rewrites7.4%
herbie shell --seed 2025139
(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)))