
(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 18 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))
(t_2 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -1e+174)
t_2
(if (<= y -3.3e+56)
(*
x
(+
(/ 27464.7644705 (* a (* x y)))
(+
(/ 230661.510616 (* a (* x (* y y))))
(+ (/ t (* a (* x (* (* y y) y)))) (+ (/ y a) (/ z (* a x)))))))
(if (<= y 7e+63)
(fma
y
(/ (fma (fma (fma y x z) y 27464.7644705) y 230661.510616) t_1)
(/ t t_1))
t_2)))))
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 t_2 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1e+174) {
tmp = t_2;
} else if (y <= -3.3e+56) {
tmp = x * ((27464.7644705 / (a * (x * y))) + ((230661.510616 / (a * (x * (y * y)))) + ((t / (a * (x * ((y * y) * y)))) + ((y / a) + (z / (a * x))))));
} else if (y <= 7e+63) {
tmp = fma(y, (fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616) / t_1), (t / t_1));
} else {
tmp = t_2;
}
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) t_2 = Float64(Float64(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x) tmp = 0.0 if (y <= -1e+174) tmp = t_2; elseif (y <= -3.3e+56) tmp = Float64(x * Float64(Float64(27464.7644705 / Float64(a * Float64(x * y))) + Float64(Float64(230661.510616 / Float64(a * Float64(x * Float64(y * y)))) + Float64(Float64(t / Float64(a * Float64(x * Float64(Float64(y * y) * y)))) + Float64(Float64(y / a) + Float64(z / Float64(a * x))))))); elseif (y <= 7e+63) tmp = fma(y, Float64(fma(fma(fma(y, x, z), y, 27464.7644705), y, 230661.510616) / t_1), Float64(t / t_1)); else tmp = t_2; 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]}, Block[{t$95$2 = N[((-N[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -1e+174], t$95$2, If[LessEqual[y, -3.3e+56], N[(x * N[(N[(27464.7644705 / N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(230661.510616 / N[(a * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(a * N[(x * N[(N[(y * y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / a), $MachinePrecision] + N[(z / N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+63], 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], t$95$2]]]]]
\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)\\
t_2 := \left(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\
\mathbf{if}\;y \leq -1 \cdot 10^{+174}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{+56}:\\
\;\;\;\;x \cdot \left(\frac{27464.7644705}{a \cdot \left(x \cdot y\right)} + \left(\frac{230661.510616}{a \cdot \left(x \cdot \left(y \cdot y\right)\right)} + \left(\frac{t}{a \cdot \left(x \cdot \left(\left(y \cdot y\right) \cdot y\right)\right)} + \left(\frac{y}{a} + \frac{z}{a \cdot x}\right)\right)\right)\right)\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+63}:\\
\;\;\;\;\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}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.00000000000000007e174 or 7.00000000000000059e63 < y Initial program 1.1%
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.f6473.5
Applied rewrites73.5%
if -1.00000000000000007e174 < y < -3.30000000000000002e56Initial program 4.5%
Applied rewrites7.0%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites26.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
Applied rewrites30.3%
if -3.30000000000000002e56 < y < 7.00000000000000059e63Initial program 91.9%
Applied rewrites92.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -1e+174)
t_1
(if (<= y -1.1e+56)
(*
x
(+
(/ 27464.7644705 (* a (* x y)))
(+
(/ 230661.510616 (* a (* x (* y y))))
(+ (/ t (* a (* x (* (* y y) y)))) (+ (/ y a) (/ z (* a x)))))))
(if (<= y 1.5e+55)
(/
(+
(* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 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 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1e+174) {
tmp = t_1;
} else if (y <= -1.1e+56) {
tmp = x * ((27464.7644705 / (a * (x * y))) + ((230661.510616 / (a * (x * (y * y)))) + ((t / (a * (x * ((y * y) * y)))) + ((y / a) + (z / (a * x))))));
} else if (y <= 1.5e+55) {
tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = -((-z - (-a * x)) / y) + x
if (y <= (-1d+174)) then
tmp = t_1
else if (y <= (-1.1d+56)) then
tmp = x * ((27464.7644705d0 / (a * (x * y))) + ((230661.510616d0 / (a * (x * (y * y)))) + ((t / (a * (x * ((y * y) * y)))) + ((y / a) + (z / (a * x))))))
else if (y <= 1.5d+55) then
tmp = ((((((((x * y) + z) * y) + 27464.7644705d0) * y) + 230661.510616d0) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i)
else
tmp = t_1
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 t_1 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1e+174) {
tmp = t_1;
} else if (y <= -1.1e+56) {
tmp = x * ((27464.7644705 / (a * (x * y))) + ((230661.510616 / (a * (x * (y * y)))) + ((t / (a * (x * ((y * y) * y)))) + ((y / a) + (z / (a * x))))));
} else if (y <= 1.5e+55) {
tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = -((-z - (-a * x)) / y) + x tmp = 0 if y <= -1e+174: tmp = t_1 elif y <= -1.1e+56: tmp = x * ((27464.7644705 / (a * (x * y))) + ((230661.510616 / (a * (x * (y * y)))) + ((t / (a * (x * ((y * y) * y)))) + ((y / a) + (z / (a * x)))))) elif y <= 1.5e+55: tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 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(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x) tmp = 0.0 if (y <= -1e+174) tmp = t_1; elseif (y <= -1.1e+56) tmp = Float64(x * Float64(Float64(27464.7644705 / Float64(a * Float64(x * y))) + Float64(Float64(230661.510616 / Float64(a * Float64(x * Float64(y * y)))) + Float64(Float64(t / Float64(a * Float64(x * Float64(Float64(y * y) * y)))) + Float64(Float64(y / a) + Float64(z / Float64(a * x))))))); elseif (y <= 1.5e+55) tmp = 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)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = -((-z - (-a * x)) / y) + x; tmp = 0.0; if (y <= -1e+174) tmp = t_1; elseif (y <= -1.1e+56) tmp = x * ((27464.7644705 / (a * (x * y))) + ((230661.510616 / (a * (x * (y * y)))) + ((t / (a * (x * ((y * y) * y)))) + ((y / a) + (z / (a * x)))))); elseif (y <= 1.5e+55) tmp = ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i); else tmp = t_1; end tmp_2 = 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, -1e+174], t$95$1, If[LessEqual[y, -1.1e+56], N[(x * N[(N[(27464.7644705 / N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(230661.510616 / N[(a * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t / N[(a * N[(x * N[(N[(y * y), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y / a), $MachinePrecision] + N[(z / N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+55], 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], 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 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{+56}:\\
\;\;\;\;x \cdot \left(\frac{27464.7644705}{a \cdot \left(x \cdot y\right)} + \left(\frac{230661.510616}{a \cdot \left(x \cdot \left(y \cdot y\right)\right)} + \left(\frac{t}{a \cdot \left(x \cdot \left(\left(y \cdot y\right) \cdot y\right)\right)} + \left(\frac{y}{a} + \frac{z}{a \cdot x}\right)\right)\right)\right)\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+55}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.00000000000000007e174 or 1.50000000000000008e55 < y Initial program 2.1%
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.f6472.2
Applied rewrites72.2%
if -1.00000000000000007e174 < y < -1.10000000000000008e56Initial program 4.5%
Applied rewrites7.1%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites26.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
Applied rewrites30.3%
if -1.10000000000000008e56 < y < 1.50000000000000008e55Initial program 92.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -1e+174)
t_1
(if (<= y -9.5e+55)
(/ (+ z (fma 27464.7644705 (/ 1.0 y) (* x y))) a)
(if (<= y 1.45e+55)
(/
(fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
(fma (fma (fma (+ a y) 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 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1e+174) {
tmp = t_1;
} else if (y <= -9.5e+55) {
tmp = (z + fma(27464.7644705, (1.0 / y), (x * y))) / a;
} else if (y <= 1.45e+55) {
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 = 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 <= -1e+174) tmp = t_1; elseif (y <= -9.5e+55) tmp = Float64(Float64(z + fma(27464.7644705, Float64(1.0 / y), Float64(x * y))) / a); elseif (y <= 1.45e+55) 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 = 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, -1e+174], t$95$1, If[LessEqual[y, -9.5e+55], N[(N[(z + N[(27464.7644705 * N[(1.0 / y), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 1.45e+55], 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], 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 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{+55}:\\
\;\;\;\;\frac{z + \mathsf{fma}\left(27464.7644705, \frac{1}{y}, x \cdot y\right)}{a}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+55}:\\
\;\;\;\;\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}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.00000000000000007e174 or 1.4499999999999999e55 < y Initial program 2.1%
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.f6472.2
Applied rewrites72.2%
if -1.00000000000000007e174 < y < -9.49999999999999989e55Initial program 4.6%
Applied rewrites7.2%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites26.3%
Taylor expanded in x around inf
lower-*.f6426.0
Applied rewrites26.0%
if -9.49999999999999989e55 < y < 1.4499999999999999e55Initial program 92.8%
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 rewrites87.3%
(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 89.5%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around -inf
+-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.f6470.1
Applied rewrites70.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -1e+174)
t_1
(if (<= y -5.5e+55)
(/ (+ z (fma 27464.7644705 (/ 1.0 y) (* x y))) a)
(if (<= y 3.5e+53)
(/
(fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
(fma (fma 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 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1e+174) {
tmp = t_1;
} else if (y <= -5.5e+55) {
tmp = (z + fma(27464.7644705, (1.0 / y), (x * y))) / a;
} else if (y <= 3.5e+53) {
tmp = fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(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(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x) tmp = 0.0 if (y <= -1e+174) tmp = t_1; elseif (y <= -5.5e+55) tmp = Float64(Float64(z + fma(27464.7644705, Float64(1.0 / y), Float64(x * y))) / a); elseif (y <= 3.5e+53) tmp = Float64(fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(fma(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[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -1e+174], t$95$1, If[LessEqual[y, -5.5e+55], N[(N[(z + N[(27464.7644705 * N[(1.0 / y), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 3.5e+53], N[(N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(b * y + c), $MachinePrecision] * y + i), $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 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{+55}:\\
\;\;\;\;\frac{z + \mathsf{fma}\left(27464.7644705, \frac{1}{y}, x \cdot y\right)}{a}\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+53}:\\
\;\;\;\;\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(b, y, c\right), y, i\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.00000000000000007e174 or 3.50000000000000019e53 < y Initial program 2.1%
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.f6472.1
Applied rewrites72.1%
if -1.00000000000000007e174 < y < -5.5000000000000004e55Initial program 4.6%
Applied rewrites7.2%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites26.3%
Taylor expanded in x around inf
lower-*.f6426.1
Applied rewrites26.1%
if -5.5000000000000004e55 < y < 3.50000000000000019e53Initial program 93.0%
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 rewrites87.5%
Taylor expanded in y around 0
Applied rewrites82.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -1e+174)
t_1
(if (<= y -7.6e-7)
(/ (+ z (fma 27464.7644705 (/ 1.0 y) (* x y))) a)
(if (<= y 9.5e+54)
(/
(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 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1e+174) {
tmp = t_1;
} else if (y <= -7.6e-7) {
tmp = (z + fma(27464.7644705, (1.0 / y), (x * y))) / a;
} else if (y <= 9.5e+54) {
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(-Float64(Float64(Float64(-z) - Float64(Float64(-a) * x)) / y)) + x) tmp = 0.0 if (y <= -1e+174) tmp = t_1; elseif (y <= -7.6e-7) tmp = Float64(Float64(z + fma(27464.7644705, Float64(1.0 / y), Float64(x * y))) / a); elseif (y <= 9.5e+54) 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[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -1e+174], t$95$1, If[LessEqual[y, -7.6e-7], N[(N[(z + N[(27464.7644705 * N[(1.0 / y), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 9.5e+54], 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(-\frac{\left(-z\right) - \left(-a\right) \cdot x}{y}\right) + x\\
\mathbf{if}\;y \leq -1 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.6 \cdot 10^{-7}:\\
\;\;\;\;\frac{z + \mathsf{fma}\left(27464.7644705, \frac{1}{y}, x \cdot y\right)}{a}\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+54}:\\
\;\;\;\;\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.00000000000000007e174 or 9.4999999999999999e54 < y Initial program 2.1%
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.f6472.2
Applied rewrites72.2%
if -1.00000000000000007e174 < y < -7.60000000000000029e-7Initial program 21.9%
Applied rewrites25.3%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites26.5%
Taylor expanded in x around inf
lower-*.f6424.6
Applied rewrites24.6%
if -7.60000000000000029e-7 < y < 9.4999999999999999e54Initial program 95.9%
Taylor expanded in y around 0
+-commutativeN/A
lower-fma.f6483.3
Applied rewrites83.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -1e+174)
t_1
(if (<= y -5.5e+55)
(/ (+ z (fma 27464.7644705 (/ 1.0 y) (* x y))) a)
(if (<= y -2.1e-97)
(/ (+ (* (* (* y y) z) y) t) (+ (* (+ (* b y) c) y) i))
(if (<= y 1.05e+54)
(/ (+ (* (+ (* 27464.7644705 y) 230661.510616) y) t) (+ (* 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 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1e+174) {
tmp = t_1;
} else if (y <= -5.5e+55) {
tmp = (z + fma(27464.7644705, (1.0 / y), (x * y))) / a;
} else if (y <= -2.1e-97) {
tmp = ((((y * y) * z) * y) + t) / ((((b * y) + c) * y) + i);
} else if (y <= 1.05e+54) {
tmp = ((((27464.7644705 * y) + 230661.510616) * y) + t) / ((c * y) + i);
} 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 <= -1e+174) tmp = t_1; elseif (y <= -5.5e+55) tmp = Float64(Float64(z + fma(27464.7644705, Float64(1.0 / y), Float64(x * y))) / a); elseif (y <= -2.1e-97) tmp = Float64(Float64(Float64(Float64(Float64(y * y) * z) * y) + t) / Float64(Float64(Float64(Float64(b * y) + c) * y) + i)); elseif (y <= 1.05e+54) tmp = Float64(Float64(Float64(Float64(Float64(27464.7644705 * y) + 230661.510616) * y) + t) / Float64(Float64(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[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -1e+174], t$95$1, If[LessEqual[y, -5.5e+55], N[(N[(z + N[(27464.7644705 * N[(1.0 / y), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -2.1e-97], N[(N[(N[(N[(N[(y * y), $MachinePrecision] * z), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(b * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+54], N[(N[(N[(N[(N[(27464.7644705 * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(c * y), $MachinePrecision] + i), $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 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{+55}:\\
\;\;\;\;\frac{z + \mathsf{fma}\left(27464.7644705, \frac{1}{y}, x \cdot y\right)}{a}\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-97}:\\
\;\;\;\;\frac{\left(\left(y \cdot y\right) \cdot z\right) \cdot y + t}{\left(b \cdot y + c\right) \cdot y + i}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+54}:\\
\;\;\;\;\frac{\left(27464.7644705 \cdot y + 230661.510616\right) \cdot y + t}{c \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.00000000000000007e174 or 1.04999999999999993e54 < y Initial program 2.1%
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.f6472.1
Applied rewrites72.1%
if -1.00000000000000007e174 < y < -5.5000000000000004e55Initial program 4.6%
Applied rewrites7.2%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites26.3%
Taylor expanded in x around inf
lower-*.f6426.1
Applied rewrites26.1%
if -5.5000000000000004e55 < y < -2.1000000000000001e-97Initial program 83.7%
Taylor expanded in z around inf
lower-*.f64N/A
unpow2N/A
lower-*.f6454.8
Applied rewrites54.8%
Taylor expanded in y around 0
Applied rewrites46.5%
if -2.1000000000000001e-97 < y < 1.04999999999999993e54Initial program 95.5%
Taylor expanded in y around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6464.8
Applied rewrites64.8%
Taylor expanded in y around 0
Applied rewrites61.8%
Taylor expanded in y around 0
Applied rewrites79.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -1e+174)
t_1
(if (<= y -4.2e-7)
(/ (+ z (fma 27464.7644705 (/ 1.0 y) (* x y))) a)
(if (<= y -5.5e-47)
(/
(fma (fma (fma z y 27464.7644705) y 230661.510616) y t)
(fma (* b y) y i))
(if (<= y 1.05e+54)
(/ (+ (* (+ (* 27464.7644705 y) 230661.510616) y) t) (+ (* 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 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1e+174) {
tmp = t_1;
} else if (y <= -4.2e-7) {
tmp = (z + fma(27464.7644705, (1.0 / y), (x * y))) / a;
} else if (y <= -5.5e-47) {
tmp = fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma((b * y), y, i);
} else if (y <= 1.05e+54) {
tmp = ((((27464.7644705 * y) + 230661.510616) * y) + t) / ((c * y) + i);
} 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 <= -1e+174) tmp = t_1; elseif (y <= -4.2e-7) tmp = Float64(Float64(z + fma(27464.7644705, Float64(1.0 / y), Float64(x * y))) / a); elseif (y <= -5.5e-47) tmp = Float64(fma(fma(fma(z, y, 27464.7644705), y, 230661.510616), y, t) / fma(Float64(b * y), y, i)); elseif (y <= 1.05e+54) tmp = Float64(Float64(Float64(Float64(Float64(27464.7644705 * y) + 230661.510616) * y) + t) / Float64(Float64(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[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -1e+174], t$95$1, If[LessEqual[y, -4.2e-7], N[(N[(z + N[(27464.7644705 * N[(1.0 / y), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -5.5e-47], N[(N[(N[(N[(z * y + 27464.7644705), $MachinePrecision] * y + 230661.510616), $MachinePrecision] * y + t), $MachinePrecision] / N[(N[(b * y), $MachinePrecision] * y + i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+54], N[(N[(N[(N[(N[(27464.7644705 * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(c * y), $MachinePrecision] + i), $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 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-7}:\\
\;\;\;\;\frac{z + \mathsf{fma}\left(27464.7644705, \frac{1}{y}, x \cdot y\right)}{a}\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-47}:\\
\;\;\;\;\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(b \cdot y, y, i\right)}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+54}:\\
\;\;\;\;\frac{\left(27464.7644705 \cdot y + 230661.510616\right) \cdot y + t}{c \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.00000000000000007e174 or 1.04999999999999993e54 < y Initial program 2.1%
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.f6472.1
Applied rewrites72.1%
if -1.00000000000000007e174 < y < -4.2e-7Initial program 22.1%
Applied rewrites25.5%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites26.4%
Taylor expanded in x around inf
lower-*.f6424.6
Applied rewrites24.6%
if -4.2e-7 < y < -5.5000000000000002e-47Initial program 99.3%
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 rewrites79.4%
Taylor expanded in b around inf
lower-*.f6443.2
Applied rewrites43.2%
if -5.5000000000000002e-47 < y < 1.04999999999999993e54Initial program 95.8%
Taylor expanded in y around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6463.3
Applied rewrites63.3%
Taylor expanded in y around 0
Applied rewrites59.8%
Taylor expanded in y around 0
Applied rewrites77.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -1e+174)
t_1
(if (<= y -6.5e-34)
(/ (+ z (fma 27464.7644705 (/ 1.0 y) (* x y))) a)
(if (<= y 1.05e+54)
(/ (+ (* (+ (* 27464.7644705 y) 230661.510616) y) t) (+ (* 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 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1e+174) {
tmp = t_1;
} else if (y <= -6.5e-34) {
tmp = (z + fma(27464.7644705, (1.0 / y), (x * y))) / a;
} else if (y <= 1.05e+54) {
tmp = ((((27464.7644705 * y) + 230661.510616) * y) + t) / ((c * y) + i);
} 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 <= -1e+174) tmp = t_1; elseif (y <= -6.5e-34) tmp = Float64(Float64(z + fma(27464.7644705, Float64(1.0 / y), Float64(x * y))) / a); elseif (y <= 1.05e+54) tmp = Float64(Float64(Float64(Float64(Float64(27464.7644705 * y) + 230661.510616) * y) + t) / Float64(Float64(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[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -1e+174], t$95$1, If[LessEqual[y, -6.5e-34], N[(N[(z + N[(27464.7644705 * N[(1.0 / y), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 1.05e+54], N[(N[(N[(N[(N[(27464.7644705 * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(c * y), $MachinePrecision] + i), $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 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-34}:\\
\;\;\;\;\frac{z + \mathsf{fma}\left(27464.7644705, \frac{1}{y}, x \cdot y\right)}{a}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+54}:\\
\;\;\;\;\frac{\left(27464.7644705 \cdot y + 230661.510616\right) \cdot y + t}{c \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.00000000000000007e174 or 1.04999999999999993e54 < y Initial program 2.1%
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.f6472.1
Applied rewrites72.1%
if -1.00000000000000007e174 < y < -6.49999999999999985e-34Initial program 33.0%
Applied rewrites35.9%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites25.4%
Taylor expanded in x around inf
lower-*.f6422.5
Applied rewrites22.5%
if -6.49999999999999985e-34 < y < 1.04999999999999993e54Initial program 95.9%
Taylor expanded in y around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6462.6
Applied rewrites62.6%
Taylor expanded in y around 0
Applied rewrites58.9%
Taylor expanded in y around 0
Applied rewrites76.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -1e+174)
t_1
(if (<= y -6.5e-34)
(/ (+ z (fma 27464.7644705 (/ 1.0 y) (* x y))) a)
(if (<= y 1.05e+54) (/ (+ (* 230661.510616 y) t) (+ (* 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 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1e+174) {
tmp = t_1;
} else if (y <= -6.5e-34) {
tmp = (z + fma(27464.7644705, (1.0 / y), (x * y))) / a;
} else if (y <= 1.05e+54) {
tmp = ((230661.510616 * y) + t) / ((c * y) + i);
} 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 <= -1e+174) tmp = t_1; elseif (y <= -6.5e-34) tmp = Float64(Float64(z + fma(27464.7644705, Float64(1.0 / y), Float64(x * y))) / a); elseif (y <= 1.05e+54) tmp = Float64(Float64(Float64(230661.510616 * y) + t) / Float64(Float64(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[(N[((-z) - N[((-a) * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[y, -1e+174], t$95$1, If[LessEqual[y, -6.5e-34], N[(N[(z + N[(27464.7644705 * N[(1.0 / y), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 1.05e+54], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(c * y), $MachinePrecision] + i), $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 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-34}:\\
\;\;\;\;\frac{z + \mathsf{fma}\left(27464.7644705, \frac{1}{y}, x \cdot y\right)}{a}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+54}:\\
\;\;\;\;\frac{230661.510616 \cdot y + t}{c \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.00000000000000007e174 or 1.04999999999999993e54 < y Initial program 2.1%
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.f6472.1
Applied rewrites72.1%
if -1.00000000000000007e174 < y < -6.49999999999999985e-34Initial program 33.0%
Applied rewrites35.9%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites25.4%
Taylor expanded in x around inf
lower-*.f6422.5
Applied rewrites22.5%
if -6.49999999999999985e-34 < y < 1.04999999999999993e54Initial program 95.9%
Taylor expanded in y around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6462.6
Applied rewrites62.6%
Taylor expanded in y around 0
Applied rewrites58.9%
Taylor expanded in y around 0
Applied rewrites76.8%
Taylor expanded in y around 0
Applied rewrites76.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (- (/ (- (- z) (* (- a) x)) y)) x)))
(if (<= y -1e+174)
t_1
(if (<= y -6.5e-34)
(* y (+ (/ x a) (/ z (* a y))))
(if (<= y 1.05e+54) (/ (+ (* 230661.510616 y) t) (+ (* 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 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1e+174) {
tmp = t_1;
} else if (y <= -6.5e-34) {
tmp = y * ((x / a) + (z / (a * y)));
} else if (y <= 1.05e+54) {
tmp = ((230661.510616 * y) + t) / ((c * y) + i);
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = -((-z - (-a * x)) / y) + x
if (y <= (-1d+174)) then
tmp = t_1
else if (y <= (-6.5d-34)) then
tmp = y * ((x / a) + (z / (a * y)))
else if (y <= 1.05d+54) then
tmp = ((230661.510616d0 * y) + t) / ((c * y) + i)
else
tmp = t_1
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 t_1 = -((-z - (-a * x)) / y) + x;
double tmp;
if (y <= -1e+174) {
tmp = t_1;
} else if (y <= -6.5e-34) {
tmp = y * ((x / a) + (z / (a * y)));
} else if (y <= 1.05e+54) {
tmp = ((230661.510616 * y) + t) / ((c * y) + i);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = -((-z - (-a * x)) / y) + x tmp = 0 if y <= -1e+174: tmp = t_1 elif y <= -6.5e-34: tmp = y * ((x / a) + (z / (a * y))) elif y <= 1.05e+54: tmp = ((230661.510616 * y) + t) / ((c * y) + i) 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 <= -1e+174) tmp = t_1; elseif (y <= -6.5e-34) tmp = Float64(y * Float64(Float64(x / a) + Float64(z / Float64(a * y)))); elseif (y <= 1.05e+54) tmp = Float64(Float64(Float64(230661.510616 * y) + t) / Float64(Float64(c * y) + i)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = -((-z - (-a * x)) / y) + x; tmp = 0.0; if (y <= -1e+174) tmp = t_1; elseif (y <= -6.5e-34) tmp = y * ((x / a) + (z / (a * y))); elseif (y <= 1.05e+54) tmp = ((230661.510616 * y) + t) / ((c * y) + i); else tmp = t_1; end tmp_2 = 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, -1e+174], t$95$1, If[LessEqual[y, -6.5e-34], N[(y * N[(N[(x / a), $MachinePrecision] + N[(z / N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+54], N[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(c * y), $MachinePrecision] + i), $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 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-34}:\\
\;\;\;\;y \cdot \left(\frac{x}{a} + \frac{z}{a \cdot y}\right)\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+54}:\\
\;\;\;\;\frac{230661.510616 \cdot y + t}{c \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.00000000000000007e174 or 1.04999999999999993e54 < y Initial program 2.1%
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.f6472.1
Applied rewrites72.1%
if -1.00000000000000007e174 < y < -6.49999999999999985e-34Initial program 33.0%
Applied rewrites35.9%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites25.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f6420.5
Applied rewrites20.5%
if -6.49999999999999985e-34 < y < 1.04999999999999993e54Initial program 95.9%
Taylor expanded in y around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6462.6
Applied rewrites62.6%
Taylor expanded in y around 0
Applied rewrites58.9%
Taylor expanded in y around 0
Applied rewrites76.8%
Taylor expanded in y around 0
Applied rewrites76.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) (+ (* 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) / ((c * y) + i);
} 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 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 = ((230661.510616 * y) + t) / ((c * y) + i);
} else {
tmp = -((-z - (-a * x)) / y) + x;
}
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 = ((230661.510616 * y) + t) / ((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) / Float64(Float64(c * y) + i)); 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) 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 = ((230661.510616 * y) + t) / ((c * y) + i); else tmp = -((-z - (-a * x)) / y) + x; 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[(N[(N[(230661.510616 * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(c * y), $MachinePrecision] + 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}{c \cdot y + i}\\
\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 89.5%
Taylor expanded in y around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
Taylor expanded in y around 0
Applied rewrites51.4%
Taylor expanded in y around 0
Applied rewrites66.5%
Taylor expanded in y around 0
Applied rewrites66.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 0.0%
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.f6470.1
Applied rewrites70.1%
(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 (+ (* 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 = t / ((c * y) + i);
} 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 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 / ((c * y) + i);
} else {
tmp = -((-z - (-a * x)) / y) + x;
}
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 / ((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(t / Float64(Float64(c * y) + i)); 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) 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 / ((c * y) + i); else tmp = -((-z - (-a * x)) / y) + x; 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 / N[(N[(c * y), $MachinePrecision] + 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{t}{c \cdot y + i}\\
\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 89.5%
Taylor expanded in y around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
Taylor expanded in y around 0
Applied rewrites51.4%
Taylor expanded in y around 0
Applied rewrites66.5%
Taylor expanded in y around 0
Applied rewrites57.2%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around -inf
+-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.f6470.1
Applied rewrites70.1%
(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 (+ (* c y) i))
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 = t / ((c * y) + i);
} else {
tmp = x;
}
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 / ((c * y) + i);
} else {
tmp = x;
}
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 / ((c * y) + i) else: tmp = 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(t / Float64(Float64(c * y) + i)); else tmp = x; 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 / ((c * y) + i); else tmp = x; 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 / N[(N[(c * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], x]
\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}{c \cdot y + i}\\
\mathbf{else}:\\
\;\;\;\;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 89.5%
Taylor expanded in y around inf
unpow3N/A
unpow2N/A
lower-*.f64N/A
unpow2N/A
lower-*.f6456.4
Applied rewrites56.4%
Taylor expanded in y around 0
Applied rewrites51.4%
Taylor expanded in y around 0
Applied rewrites66.5%
Taylor expanded in y around 0
Applied rewrites57.2%
if +inf.0 < (/.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x y) z) y) #s(literal 54929528941/2000000 binary64)) y) #s(literal 28832688827/125000 binary64)) y) t) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 y a) y) b) y) c) y) i)) Initial program 0.0%
Taylor expanded in y around inf
Applied rewrites60.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 (* 230661.510616 y)) i)
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 = (t + (230661.510616 * y)) / i;
} else {
tmp = x;
}
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 + (230661.510616 * y)) / i;
} else {
tmp = x;
}
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 + (230661.510616 * y)) / i else: tmp = 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(t + Float64(230661.510616 * y)) / i); else tmp = x; 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 + (230661.510616 * y)) / i; else tmp = x; 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[(N[(t + N[(230661.510616 * y), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision], x]
\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 + 230661.510616 \cdot y}{i}\\
\mathbf{else}:\\
\;\;\;\;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 89.5%
Taylor expanded in y around inf
Applied rewrites5.7%
Taylor expanded in y around 0
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-/.f6440.7
Applied rewrites40.7%
Taylor expanded in i around inf
lower-/.f64N/A
lower-+.f64N/A
lower-*.f6449.9
Applied rewrites49.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 0.0%
Taylor expanded in y around inf
Applied rewrites60.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))
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;
}
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;
}
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 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 = x; 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; 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], x]
\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}:\\
\;\;\;\;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 89.5%
Taylor expanded in y around 0
lower-/.f6444.6
Applied rewrites44.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 0.0%
Taylor expanded in y around inf
Applied rewrites60.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a -2.1e+132) (/ z a) x))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= -2.1e+132) {
tmp = z / a;
} else {
tmp = x;
}
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.1d+132)) then
tmp = z / a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= -2.1e+132) {
tmp = z / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= -2.1e+132: tmp = z / a else: tmp = x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= -2.1e+132) tmp = Float64(z / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= -2.1e+132) tmp = z / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, -2.1e+132], N[(z / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{+132}:\\
\;\;\;\;\frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.09999999999999993e132Initial program 54.2%
Applied rewrites54.9%
Taylor expanded in a around inf
lower-/.f64N/A
Applied rewrites31.9%
Taylor expanded in z around inf
Applied rewrites14.9%
if -2.09999999999999993e132 < a Initial program 55.7%
Taylor expanded in y around inf
Applied rewrites28.6%
(FPCore (x y z t a b c i) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return x;
}
def code(x, y, z, t, a, b, c, i): return x
function code(x, y, z, t, a, b, c, i) return x end
function tmp = code(x, y, z, t, a, b, c, i) tmp = x; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 55.5%
Taylor expanded in y around inf
Applied rewrites26.6%
herbie shell --seed 2025119
(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)))