
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * 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 = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * 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 = 2.0d0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i));
}
def code(x, y, z, t, a, b, c, i): return 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))
function code(x, y, z, t, a, b, c, i) return Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = 2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* (+ a (* b c)) c) 1e+267) (* 2.0 (fma i (- (* (* (- b) c) c) (* c a)) (fma t z (* y x)))) (* (* -2.0 (* (* c (+ (/ a b) c)) i)) b)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((a + (b * c)) * c) <= 1e+267) {
tmp = 2.0 * fma(i, (((-b * c) * c) - (c * a)), fma(t, z, (y * x)));
} else {
tmp = (-2.0 * ((c * ((a / b) + c)) * i)) * b;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(a + Float64(b * c)) * c) <= 1e+267) tmp = Float64(2.0 * fma(i, Float64(Float64(Float64(Float64(-b) * c) * c) - Float64(c * a)), fma(t, z, Float64(y * x)))); else tmp = Float64(Float64(-2.0 * Float64(Float64(c * Float64(Float64(a / b) + c)) * i)) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], 1e+267], N[(2.0 * N[(i * N[(N[(N[((-b) * c), $MachinePrecision] * c), $MachinePrecision] - N[(c * a), $MachinePrecision]), $MachinePrecision] + N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 * N[(N[(c * N[(N[(a / b), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(a + b \cdot c\right) \cdot c \leq 10^{+267}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(i, \left(\left(-b\right) \cdot c\right) \cdot c - c \cdot a, \mathsf{fma}\left(t, z, y \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-2 \cdot \left(\left(c \cdot \left(\frac{a}{b} + c\right)\right) \cdot i\right)\right) \cdot b\\
\end{array}
\end{array}
if (*.f64 (+.f64 a (*.f64 b c)) c) < 9.9999999999999997e266Initial program 93.1%
Applied rewrites91.8%
if 9.9999999999999997e266 < (*.f64 (+.f64 a (*.f64 b c)) c) Initial program 75.2%
Applied rewrites66.1%
Taylor expanded in b around 0
Applied rewrites40.5%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
associate-*r*N/A
distribute-lft-outN/A
lower-*.f64N/A
Applied rewrites87.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites81.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ a (* b c)) c)))
(if (<= t_1 1e+267)
(* 2.0 (- (+ (* x y) (* z t)) (* t_1 i)))
(* (* -2.0 (* (* c (+ (/ a b) c)) i)) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (a + (b * c)) * c;
double tmp;
if (t_1 <= 1e+267) {
tmp = 2.0 * (((x * y) + (z * t)) - (t_1 * i));
} else {
tmp = (-2.0 * ((c * ((a / b) + c)) * i)) * b;
}
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 = (a + (b * c)) * c
if (t_1 <= 1d+267) then
tmp = 2.0d0 * (((x * y) + (z * t)) - (t_1 * i))
else
tmp = ((-2.0d0) * ((c * ((a / b) + c)) * i)) * b
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 = (a + (b * c)) * c;
double tmp;
if (t_1 <= 1e+267) {
tmp = 2.0 * (((x * y) + (z * t)) - (t_1 * i));
} else {
tmp = (-2.0 * ((c * ((a / b) + c)) * i)) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (a + (b * c)) * c tmp = 0 if t_1 <= 1e+267: tmp = 2.0 * (((x * y) + (z * t)) - (t_1 * i)) else: tmp = (-2.0 * ((c * ((a / b) + c)) * i)) * b return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(a + Float64(b * c)) * c) tmp = 0.0 if (t_1 <= 1e+267) tmp = Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(t_1 * i))); else tmp = Float64(Float64(-2.0 * Float64(Float64(c * Float64(Float64(a / b) + c)) * i)) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (a + (b * c)) * c; tmp = 0.0; if (t_1 <= 1e+267) tmp = 2.0 * (((x * y) + (z * t)) - (t_1 * i)); else tmp = (-2.0 * ((c * ((a / b) + c)) * i)) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+267], N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 * N[(N[(c * N[(N[(a / b), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + b \cdot c\right) \cdot c\\
\mathbf{if}\;t\_1 \leq 10^{+267}:\\
\;\;\;\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - t\_1 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-2 \cdot \left(\left(c \cdot \left(\frac{a}{b} + c\right)\right) \cdot i\right)\right) \cdot b\\
\end{array}
\end{array}
if (*.f64 (+.f64 a (*.f64 b c)) c) < 9.9999999999999997e266Initial program 93.1%
if 9.9999999999999997e266 < (*.f64 (+.f64 a (*.f64 b c)) c) Initial program 75.2%
Applied rewrites66.1%
Taylor expanded in b around 0
Applied rewrites40.5%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
associate-*r*N/A
distribute-lft-outN/A
lower-*.f64N/A
Applied rewrites87.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites81.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (fma c b a) i)) (t_2 (* (* (+ a (* b c)) c) i)))
(if (<= t_2 -5e+229)
(* (* -2.0 t_1) c)
(if (<= t_2 2e+243)
(* 2.0 (- (fma x y (* z t)) (* (* a c) i)))
(* 2.0 (- (* y x) (* t_1 c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(c, b, a) * i;
double t_2 = ((a + (b * c)) * c) * i;
double tmp;
if (t_2 <= -5e+229) {
tmp = (-2.0 * t_1) * c;
} else if (t_2 <= 2e+243) {
tmp = 2.0 * (fma(x, y, (z * t)) - ((a * c) * i));
} else {
tmp = 2.0 * ((y * x) - (t_1 * c));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(fma(c, b, a) * i) t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_2 <= -5e+229) tmp = Float64(Float64(-2.0 * t_1) * c); elseif (t_2 <= 2e+243) tmp = Float64(2.0 * Float64(fma(x, y, Float64(z * t)) - Float64(Float64(a * c) * i))); else tmp = Float64(2.0 * Float64(Float64(y * x) - Float64(t_1 * c))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+229], N[(N[(-2.0 * t$95$1), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[t$95$2, 2e+243], N[(2.0 * N[(N[(x * y + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(a * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(y * x), $MachinePrecision] - N[(t$95$1 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(c, b, a\right) \cdot i\\
t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+229}:\\
\;\;\;\;\left(-2 \cdot t\_1\right) \cdot c\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+243}:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(x, y, z \cdot t\right) - \left(a \cdot c\right) \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(y \cdot x - t\_1 \cdot c\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000005e229Initial program 76.8%
Taylor expanded in i around inf
*-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
associate-*r*N/A
distribute-lft-outN/A
lower-*.f64N/A
distribute-lft-outN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6485.6
Applied rewrites85.6%
if -5.0000000000000005e229 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.0000000000000001e243Initial program 99.0%
Applied rewrites99.3%
Taylor expanded in b around 0
Applied rewrites91.4%
if 2.0000000000000001e243 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 79.0%
Taylor expanded in z around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6485.0
Applied rewrites85.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* (+ a (* b c)) c) i)))
(if (<= t_1 -5e+229)
(* (* -2.0 (* (fma c b a) i)) c)
(if (<= t_1 4e+303)
(* 2.0 (- (fma t z (* y x)) (* (* i c) a)))
(* (* -2.0 (* (* c (+ (/ a b) c)) i)) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a + (b * c)) * c) * i;
double tmp;
if (t_1 <= -5e+229) {
tmp = (-2.0 * (fma(c, b, a) * i)) * c;
} else if (t_1 <= 4e+303) {
tmp = 2.0 * (fma(t, z, (y * x)) - ((i * c) * a));
} else {
tmp = (-2.0 * ((c * ((a / b) + c)) * i)) * b;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_1 <= -5e+229) tmp = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c); elseif (t_1 <= 4e+303) tmp = Float64(2.0 * Float64(fma(t, z, Float64(y * x)) - Float64(Float64(i * c) * a))); else tmp = Float64(Float64(-2.0 * Float64(Float64(c * Float64(Float64(a / b) + c)) * i)) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+229], N[(N[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[t$95$1, 4e+303], N[(2.0 * N[(N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision] - N[(N[(i * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 * N[(N[(c * N[(N[(a / b), $MachinePrecision] + c), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+229}:\\
\;\;\;\;\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+303}:\\
\;\;\;\;2 \cdot \left(\mathsf{fma}\left(t, z, y \cdot x\right) - \left(i \cdot c\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-2 \cdot \left(\left(c \cdot \left(\frac{a}{b} + c\right)\right) \cdot i\right)\right) \cdot b\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000005e229Initial program 76.8%
Taylor expanded in i around inf
*-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
associate-*r*N/A
distribute-lft-outN/A
lower-*.f64N/A
distribute-lft-outN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6485.6
Applied rewrites85.6%
if -5.0000000000000005e229 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4e303Initial program 99.1%
Taylor expanded in b around 0
associate--l+N/A
cancel-sign-sub-invN/A
distribute-lft-neg-outN/A
mul-1-negN/A
associate-+l+N/A
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
mul-1-negN/A
distribute-lft-neg-outN/A
cancel-sign-sub-invN/A
associate--l+N/A
lower--.f64N/A
Applied rewrites89.8%
if 4e303 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 76.7%
Applied rewrites70.5%
Taylor expanded in b around 0
Applied rewrites45.4%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
associate-*r*N/A
distribute-lft-outN/A
lower-*.f64N/A
Applied rewrites89.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites85.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* 2.0 (- (* y x) (* (* (fma c b a) i) c))))
(t_2 (* (* (+ a (* b c)) c) i)))
(if (<= t_2 -1e+74) t_1 (if (<= t_2 5e-17) (* 2.0 (fma t z (* y x))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = 2.0 * ((y * x) - ((fma(c, b, a) * i) * c));
double t_2 = ((a + (b * c)) * c) * i;
double tmp;
if (t_2 <= -1e+74) {
tmp = t_1;
} else if (t_2 <= 5e-17) {
tmp = 2.0 * fma(t, z, (y * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(2.0 * Float64(Float64(y * x) - Float64(Float64(fma(c, b, a) * i) * c))) t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_2 <= -1e+74) tmp = t_1; elseif (t_2 <= 5e-17) tmp = Float64(2.0 * fma(t, z, Float64(y * x))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[(N[(y * x), $MachinePrecision] - N[(N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+74], t$95$1, If[LessEqual[t$95$2, 5e-17], N[(2.0 * N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(y \cdot x - \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right) \cdot c\right)\\
t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-17}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -9.99999999999999952e73 or 4.9999999999999999e-17 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 84.3%
Taylor expanded in z around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6478.0
Applied rewrites78.0%
if -9.99999999999999952e73 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.9999999999999999e-17Initial program 99.0%
Taylor expanded in c around 0
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6490.4
Applied rewrites90.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* -2.0 (* (fma c b a) i)) c))
(t_2 (* (* (+ a (* b c)) c) i))
(t_3 (* 2.0 (- (* y x) (* (* a c) i)))))
(if (<= t_2 -5e+229)
t_1
(if (<= t_2 -1e+74)
t_3
(if (<= t_2 5e-17)
(* 2.0 (fma t z (* y x)))
(if (<= t_2 2e+289) t_3 t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (-2.0 * (fma(c, b, a) * i)) * c;
double t_2 = ((a + (b * c)) * c) * i;
double t_3 = 2.0 * ((y * x) - ((a * c) * i));
double tmp;
if (t_2 <= -5e+229) {
tmp = t_1;
} else if (t_2 <= -1e+74) {
tmp = t_3;
} else if (t_2 <= 5e-17) {
tmp = 2.0 * fma(t, z, (y * x));
} else if (t_2 <= 2e+289) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c) t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) t_3 = Float64(2.0 * Float64(Float64(y * x) - Float64(Float64(a * c) * i))) tmp = 0.0 if (t_2 <= -5e+229) tmp = t_1; elseif (t_2 <= -1e+74) tmp = t_3; elseif (t_2 <= 5e-17) tmp = Float64(2.0 * fma(t, z, Float64(y * x))); elseif (t_2 <= 2e+289) tmp = t_3; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(N[(y * x), $MachinePrecision] - N[(N[(a * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+229], t$95$1, If[LessEqual[t$95$2, -1e+74], t$95$3, If[LessEqual[t$95$2, 5e-17], N[(2.0 * N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+289], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
t_3 := 2 \cdot \left(y \cdot x - \left(a \cdot c\right) \cdot i\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+229}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{+74}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-17}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+289}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000005e229 or 2.0000000000000001e289 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 77.0%
Taylor expanded in i around inf
*-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
associate-*r*N/A
distribute-lft-outN/A
lower-*.f64N/A
distribute-lft-outN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6486.6
Applied rewrites86.6%
if -5.0000000000000005e229 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -9.99999999999999952e73 or 4.9999999999999999e-17 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2.0000000000000001e289Initial program 99.2%
Taylor expanded in z around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6461.0
Applied rewrites61.0%
Taylor expanded in a around inf
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-inN/A
mul-1-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-rgt-identityN/A
lower-*.f6454.1
Applied rewrites54.1%
if -9.99999999999999952e73 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.9999999999999999e-17Initial program 99.0%
Taylor expanded in c around 0
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6490.4
Applied rewrites90.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* (+ a (* b c)) c) i)))
(if (<= t_1 -5e+229)
(* (* -2.0 (* (fma c b a) i)) c)
(if (<= t_1 -1e+74)
(* 2.0 (- (* y x) (* (* a c) i)))
(if (<= t_1 5e+110)
(* 2.0 (fma t z (* y x)))
(* 2.0 (* (- i) (* (fma c b a) c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a + (b * c)) * c) * i;
double tmp;
if (t_1 <= -5e+229) {
tmp = (-2.0 * (fma(c, b, a) * i)) * c;
} else if (t_1 <= -1e+74) {
tmp = 2.0 * ((y * x) - ((a * c) * i));
} else if (t_1 <= 5e+110) {
tmp = 2.0 * fma(t, z, (y * x));
} else {
tmp = 2.0 * (-i * (fma(c, b, a) * c));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_1 <= -5e+229) tmp = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c); elseif (t_1 <= -1e+74) tmp = Float64(2.0 * Float64(Float64(y * x) - Float64(Float64(a * c) * i))); elseif (t_1 <= 5e+110) tmp = Float64(2.0 * fma(t, z, Float64(y * x))); else tmp = Float64(2.0 * Float64(Float64(-i) * Float64(fma(c, b, a) * c))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+229], N[(N[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[t$95$1, -1e+74], N[(2.0 * N[(N[(y * x), $MachinePrecision] - N[(N[(a * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+110], N[(2.0 * N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[((-i) * N[(N[(c * b + a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+229}:\\
\;\;\;\;\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{+74}:\\
\;\;\;\;2 \cdot \left(y \cdot x - \left(a \cdot c\right) \cdot i\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+110}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(-i\right) \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot c\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000005e229Initial program 76.8%
Taylor expanded in i around inf
*-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
associate-*r*N/A
distribute-lft-outN/A
lower-*.f64N/A
distribute-lft-outN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6485.6
Applied rewrites85.6%
if -5.0000000000000005e229 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -9.99999999999999952e73Initial program 99.2%
Taylor expanded in z around 0
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6461.7
Applied rewrites61.7%
Taylor expanded in a around inf
*-lft-identityN/A
metadata-evalN/A
distribute-lft-neg-inN/A
mul-1-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
*-rgt-identityN/A
lower-*.f6452.0
Applied rewrites52.0%
if -9.99999999999999952e73 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.99999999999999978e110Initial program 99.1%
Taylor expanded in c around 0
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6487.6
Applied rewrites87.6%
if 4.99999999999999978e110 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 83.0%
Taylor expanded in i around inf
mul-1-negN/A
distribute-lft-neg-outN/A
mul-1-negN/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lift-*.f6476.6
lift-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6476.6
Applied rewrites76.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* -2.0 (* (fma c b a) i)) c)) (t_2 (* (* (+ a (* b c)) c) i)))
(if (<= t_2 -1e+205)
t_1
(if (<= t_2 -1e+74)
(* 2.0 (- (* t z) (* (* a c) i)))
(if (<= t_2 5e-9) (* 2.0 (fma t z (* y x))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (-2.0 * (fma(c, b, a) * i)) * c;
double t_2 = ((a + (b * c)) * c) * i;
double tmp;
if (t_2 <= -1e+205) {
tmp = t_1;
} else if (t_2 <= -1e+74) {
tmp = 2.0 * ((t * z) - ((a * c) * i));
} else if (t_2 <= 5e-9) {
tmp = 2.0 * fma(t, z, (y * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c) t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_2 <= -1e+205) tmp = t_1; elseif (t_2 <= -1e+74) tmp = Float64(2.0 * Float64(Float64(t * z) - Float64(Float64(a * c) * i))); elseif (t_2 <= 5e-9) tmp = Float64(2.0 * fma(t, z, Float64(y * x))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+205], t$95$1, If[LessEqual[t$95$2, -1e+74], N[(2.0 * N[(N[(t * z), $MachinePrecision] - N[(N[(a * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e-9], N[(2.0 * N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+205}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{+74}:\\
\;\;\;\;2 \cdot \left(t \cdot z - \left(a \cdot c\right) \cdot i\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-9}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -1.00000000000000002e205 or 5.0000000000000001e-9 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 82.6%
Taylor expanded in i around inf
*-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
associate-*r*N/A
distribute-lft-outN/A
lower-*.f64N/A
distribute-lft-outN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6474.6
Applied rewrites74.6%
if -1.00000000000000002e205 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -9.99999999999999952e73Initial program 99.1%
Applied rewrites99.1%
Taylor expanded in b around 0
Applied rewrites76.8%
Taylor expanded in x around 0
lower-*.f6455.0
Applied rewrites55.0%
if -9.99999999999999952e73 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.0000000000000001e-9Initial program 99.0%
Taylor expanded in c around 0
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6490.3
Applied rewrites90.3%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (* (* -2.0 (* (fma c b a) i)) c)) (t_2 (* (* (+ a (* b c)) c) i))) (if (<= t_2 -5e+179) t_1 (if (<= t_2 5e-9) (* 2.0 (fma t z (* y x))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (-2.0 * (fma(c, b, a) * i)) * c;
double t_2 = ((a + (b * c)) * c) * i;
double tmp;
if (t_2 <= -5e+179) {
tmp = t_1;
} else if (t_2 <= 5e-9) {
tmp = 2.0 * fma(t, z, (y * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c) t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_2 <= -5e+179) tmp = t_1; elseif (t_2 <= 5e-9) tmp = Float64(2.0 * fma(t, z, Float64(y * x))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+179], t$95$1, If[LessEqual[t$95$2, 5e-9], N[(2.0 * N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+179}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-9}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5e179 or 5.0000000000000001e-9 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 82.9%
Taylor expanded in i around inf
*-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
associate-*r*N/A
distribute-lft-outN/A
lower-*.f64N/A
distribute-lft-outN/A
associate-*r*N/A
distribute-rgt-inN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f6474.2
Applied rewrites74.2%
if -5e179 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.0000000000000001e-9Initial program 99.0%
Taylor expanded in c around 0
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6486.3
Applied rewrites86.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* (+ a (* b c)) c) i)))
(if (<= t_1 -5e+229)
(* (* (* (* (- i) b) c) c) 2.0)
(if (<= t_1 4e+303)
(* 2.0 (fma t z (* y x)))
(* (* (* (* i c) b) -2.0) c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a + (b * c)) * c) * i;
double tmp;
if (t_1 <= -5e+229) {
tmp = (((-i * b) * c) * c) * 2.0;
} else if (t_1 <= 4e+303) {
tmp = 2.0 * fma(t, z, (y * x));
} else {
tmp = (((i * c) * b) * -2.0) * c;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_1 <= -5e+229) tmp = Float64(Float64(Float64(Float64(Float64(-i) * b) * c) * c) * 2.0); elseif (t_1 <= 4e+303) tmp = Float64(2.0 * fma(t, z, Float64(y * x))); else tmp = Float64(Float64(Float64(Float64(i * c) * b) * -2.0) * c); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+229], N[(N[(N[(N[((-i) * b), $MachinePrecision] * c), $MachinePrecision] * c), $MachinePrecision] * 2.0), $MachinePrecision], If[LessEqual[t$95$1, 4e+303], N[(2.0 * N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(i * c), $MachinePrecision] * b), $MachinePrecision] * -2.0), $MachinePrecision] * c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+229}:\\
\;\;\;\;\left(\left(\left(\left(-i\right) \cdot b\right) \cdot c\right) \cdot c\right) \cdot 2\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+303}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(i \cdot c\right) \cdot b\right) \cdot -2\right) \cdot c\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000005e229Initial program 76.8%
Taylor expanded in b around inf
associate-*r*N/A
mul-1-negN/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
distribute-lft-neg-outN/A
*-commutativeN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f64N/A
unpow2N/A
lower-*.f6464.9
Applied rewrites64.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6464.9
Applied rewrites66.4%
if -5.0000000000000005e229 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4e303Initial program 99.1%
Taylor expanded in c around 0
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6477.6
Applied rewrites77.6%
if 4e303 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 76.7%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6471.5
Applied rewrites71.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* (+ a (* b c)) c) i)))
(if (<= t_1 -5e+229)
(* (* (* i (* c b)) -2.0) c)
(if (<= t_1 4e+303)
(* 2.0 (fma t z (* y x)))
(* (* (* (* i c) b) -2.0) c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a + (b * c)) * c) * i;
double tmp;
if (t_1 <= -5e+229) {
tmp = ((i * (c * b)) * -2.0) * c;
} else if (t_1 <= 4e+303) {
tmp = 2.0 * fma(t, z, (y * x));
} else {
tmp = (((i * c) * b) * -2.0) * c;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_1 <= -5e+229) tmp = Float64(Float64(Float64(i * Float64(c * b)) * -2.0) * c); elseif (t_1 <= 4e+303) tmp = Float64(2.0 * fma(t, z, Float64(y * x))); else tmp = Float64(Float64(Float64(Float64(i * c) * b) * -2.0) * c); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+229], N[(N[(N[(i * N[(c * b), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[t$95$1, 4e+303], N[(2.0 * N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(i * c), $MachinePrecision] * b), $MachinePrecision] * -2.0), $MachinePrecision] * c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+229}:\\
\;\;\;\;\left(\left(i \cdot \left(c \cdot b\right)\right) \cdot -2\right) \cdot c\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+303}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(i \cdot c\right) \cdot b\right) \cdot -2\right) \cdot c\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000005e229Initial program 76.8%
Applied rewrites69.7%
Taylor expanded in b around 0
Applied rewrites42.6%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
associate-*r*N/A
distribute-lft-outN/A
lower-*.f64N/A
Applied rewrites85.6%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f6466.0
Applied rewrites66.0%
if -5.0000000000000005e229 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4e303Initial program 99.1%
Taylor expanded in c around 0
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6477.6
Applied rewrites77.6%
if 4e303 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 76.7%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6471.5
Applied rewrites71.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* (+ a (* b c)) c) i)))
(if (<= t_1 -5e+229)
(* (* (* i (* c b)) -2.0) c)
(if (<= t_1 4e+303)
(* 2.0 (fma t z (* y x)))
(* (* (* (* c c) i) b) -2.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a + (b * c)) * c) * i;
double tmp;
if (t_1 <= -5e+229) {
tmp = ((i * (c * b)) * -2.0) * c;
} else if (t_1 <= 4e+303) {
tmp = 2.0 * fma(t, z, (y * x));
} else {
tmp = (((c * c) * i) * b) * -2.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_1 <= -5e+229) tmp = Float64(Float64(Float64(i * Float64(c * b)) * -2.0) * c); elseif (t_1 <= 4e+303) tmp = Float64(2.0 * fma(t, z, Float64(y * x))); else tmp = Float64(Float64(Float64(Float64(c * c) * i) * b) * -2.0); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+229], N[(N[(N[(i * N[(c * b), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[t$95$1, 4e+303], N[(2.0 * N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(c * c), $MachinePrecision] * i), $MachinePrecision] * b), $MachinePrecision] * -2.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+229}:\\
\;\;\;\;\left(\left(i \cdot \left(c \cdot b\right)\right) \cdot -2\right) \cdot c\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+303}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right) \cdot -2\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000005e229Initial program 76.8%
Applied rewrites69.7%
Taylor expanded in b around 0
Applied rewrites42.6%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
associate-*r*N/A
distribute-lft-outN/A
lower-*.f64N/A
Applied rewrites85.6%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f6466.0
Applied rewrites66.0%
if -5.0000000000000005e229 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4e303Initial program 99.1%
Taylor expanded in c around 0
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6477.6
Applied rewrites77.6%
if 4e303 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 76.7%
Applied rewrites70.5%
Taylor expanded in b around inf
Applied rewrites71.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* (+ a (* b c)) c) i)))
(if (<= t_1 -5e+229)
(* (* (* i (* c b)) -2.0) c)
(if (<= t_1 4e+303)
(* 2.0 (fma t z (* y x)))
(* (* (* i b) (* c c)) -2.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a + (b * c)) * c) * i;
double tmp;
if (t_1 <= -5e+229) {
tmp = ((i * (c * b)) * -2.0) * c;
} else if (t_1 <= 4e+303) {
tmp = 2.0 * fma(t, z, (y * x));
} else {
tmp = ((i * b) * (c * c)) * -2.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_1 <= -5e+229) tmp = Float64(Float64(Float64(i * Float64(c * b)) * -2.0) * c); elseif (t_1 <= 4e+303) tmp = Float64(2.0 * fma(t, z, Float64(y * x))); else tmp = Float64(Float64(Float64(i * b) * Float64(c * c)) * -2.0); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+229], N[(N[(N[(i * N[(c * b), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[t$95$1, 4e+303], N[(2.0 * N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(i * b), $MachinePrecision] * N[(c * c), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+229}:\\
\;\;\;\;\left(\left(i \cdot \left(c \cdot b\right)\right) \cdot -2\right) \cdot c\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+303}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(i \cdot b\right) \cdot \left(c \cdot c\right)\right) \cdot -2\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000005e229Initial program 76.8%
Applied rewrites69.7%
Taylor expanded in b around 0
Applied rewrites42.6%
Taylor expanded in i around inf
*-commutativeN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
distribute-rgt-inN/A
associate-*r*N/A
distribute-lft-outN/A
lower-*.f64N/A
Applied rewrites85.6%
Taylor expanded in a around 0
*-commutativeN/A
lower-*.f6466.0
Applied rewrites66.0%
if -5.0000000000000005e229 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4e303Initial program 99.1%
Taylor expanded in c around 0
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6477.6
Applied rewrites77.6%
if 4e303 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 76.7%
Applied rewrites70.5%
Taylor expanded in b around inf
Applied rewrites71.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
pow2N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lift-*.f6469.7
Applied rewrites69.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* (+ a (* b c)) c) i)))
(if (<= t_1 -5e+229)
(* (* (* c b) (* i c)) -2.0)
(if (<= t_1 4e+303)
(* 2.0 (fma t z (* y x)))
(* (* (* i b) (* c c)) -2.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((a + (b * c)) * c) * i;
double tmp;
if (t_1 <= -5e+229) {
tmp = ((c * b) * (i * c)) * -2.0;
} else if (t_1 <= 4e+303) {
tmp = 2.0 * fma(t, z, (y * x));
} else {
tmp = ((i * b) * (c * c)) * -2.0;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_1 <= -5e+229) tmp = Float64(Float64(Float64(c * b) * Float64(i * c)) * -2.0); elseif (t_1 <= 4e+303) tmp = Float64(2.0 * fma(t, z, Float64(y * x))); else tmp = Float64(Float64(Float64(i * b) * Float64(c * c)) * -2.0); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+229], N[(N[(N[(c * b), $MachinePrecision] * N[(i * c), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[t$95$1, 4e+303], N[(2.0 * N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(i * b), $MachinePrecision] * N[(c * c), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+229}:\\
\;\;\;\;\left(\left(c \cdot b\right) \cdot \left(i \cdot c\right)\right) \cdot -2\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+303}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(i \cdot b\right) \cdot \left(c \cdot c\right)\right) \cdot -2\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000005e229Initial program 76.8%
Applied rewrites69.7%
Taylor expanded in b around inf
Applied rewrites67.2%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6467.0
Applied rewrites67.0%
if -5.0000000000000005e229 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4e303Initial program 99.1%
Taylor expanded in c around 0
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6477.6
Applied rewrites77.6%
if 4e303 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 76.7%
Applied rewrites70.5%
Taylor expanded in b around inf
Applied rewrites71.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
pow2N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lift-*.f6469.7
Applied rewrites69.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* (* c b) (* i c)) -2.0)) (t_2 (* (* (+ a (* b c)) c) i)))
(if (<= t_2 -5e+229)
t_1
(if (<= t_2 4e+303) (* 2.0 (fma t z (* y x))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((c * b) * (i * c)) * -2.0;
double t_2 = ((a + (b * c)) * c) * i;
double tmp;
if (t_2 <= -5e+229) {
tmp = t_1;
} else if (t_2 <= 4e+303) {
tmp = 2.0 * fma(t, z, (y * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(c * b) * Float64(i * c)) * -2.0) t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_2 <= -5e+229) tmp = t_1; elseif (t_2 <= 4e+303) tmp = Float64(2.0 * fma(t, z, Float64(y * x))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(c * b), $MachinePrecision] * N[(i * c), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+229], t$95$1, If[LessEqual[t$95$2, 4e+303], N[(2.0 * N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(c \cdot b\right) \cdot \left(i \cdot c\right)\right) \cdot -2\\
t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+229}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+303}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.0000000000000005e229 or 4e303 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 76.7%
Applied rewrites70.1%
Taylor expanded in b around inf
Applied rewrites69.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6468.6
Applied rewrites68.6%
if -5.0000000000000005e229 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4e303Initial program 99.1%
Taylor expanded in c around 0
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6477.6
Applied rewrites77.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (* (* i c) a) -2.0)) (t_2 (* (* (+ a (* b c)) c) i)))
(if (<= t_2 -2e+217)
t_1
(if (<= t_2 1e+158) (* 2.0 (fma t z (* y x))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((i * c) * a) * -2.0;
double t_2 = ((a + (b * c)) * c) * i;
double tmp;
if (t_2 <= -2e+217) {
tmp = t_1;
} else if (t_2 <= 1e+158) {
tmp = 2.0 * fma(t, z, (y * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(i * c) * a) * -2.0) t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i) tmp = 0.0 if (t_2 <= -2e+217) tmp = t_1; elseif (t_2 <= 1e+158) tmp = Float64(2.0 * fma(t, z, Float64(y * x))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(i * c), $MachinePrecision] * a), $MachinePrecision] * -2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+217], t$95$1, If[LessEqual[t$95$2, 1e+158], N[(2.0 * N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\
t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+217}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+158}:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(t, z, y \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -1.99999999999999992e217 or 9.99999999999999953e157 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) Initial program 79.7%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6440.3
Applied rewrites40.3%
if -1.99999999999999992e217 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.99999999999999953e157Initial program 99.0%
Taylor expanded in c around 0
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6482.3
Applied rewrites82.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ z z) t)))
(if (<= (* z t) -1e+87)
t_1
(if (<= (* z t) -2e-74)
(* (* (* i c) a) -2.0)
(if (<= (* z t) 2e-51)
(* (+ x x) y)
(if (<= (* z t) 2e+27) (* (* (* a c) i) -2.0) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z + z) * t;
double tmp;
if ((z * t) <= -1e+87) {
tmp = t_1;
} else if ((z * t) <= -2e-74) {
tmp = ((i * c) * a) * -2.0;
} else if ((z * t) <= 2e-51) {
tmp = (x + x) * y;
} else if ((z * t) <= 2e+27) {
tmp = ((a * c) * i) * -2.0;
} 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 + z) * t
if ((z * t) <= (-1d+87)) then
tmp = t_1
else if ((z * t) <= (-2d-74)) then
tmp = ((i * c) * a) * (-2.0d0)
else if ((z * t) <= 2d-51) then
tmp = (x + x) * y
else if ((z * t) <= 2d+27) then
tmp = ((a * c) * i) * (-2.0d0)
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 + z) * t;
double tmp;
if ((z * t) <= -1e+87) {
tmp = t_1;
} else if ((z * t) <= -2e-74) {
tmp = ((i * c) * a) * -2.0;
} else if ((z * t) <= 2e-51) {
tmp = (x + x) * y;
} else if ((z * t) <= 2e+27) {
tmp = ((a * c) * i) * -2.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (z + z) * t tmp = 0 if (z * t) <= -1e+87: tmp = t_1 elif (z * t) <= -2e-74: tmp = ((i * c) * a) * -2.0 elif (z * t) <= 2e-51: tmp = (x + x) * y elif (z * t) <= 2e+27: tmp = ((a * c) * i) * -2.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z + z) * t) tmp = 0.0 if (Float64(z * t) <= -1e+87) tmp = t_1; elseif (Float64(z * t) <= -2e-74) tmp = Float64(Float64(Float64(i * c) * a) * -2.0); elseif (Float64(z * t) <= 2e-51) tmp = Float64(Float64(x + x) * y); elseif (Float64(z * t) <= 2e+27) tmp = Float64(Float64(Float64(a * c) * i) * -2.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (z + z) * t; tmp = 0.0; if ((z * t) <= -1e+87) tmp = t_1; elseif ((z * t) <= -2e-74) tmp = ((i * c) * a) * -2.0; elseif ((z * t) <= 2e-51) tmp = (x + x) * y; elseif ((z * t) <= 2e+27) tmp = ((a * c) * i) * -2.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z + z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -1e+87], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], -2e-74], N[(N[(N[(i * c), $MachinePrecision] * a), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 2e-51], N[(N[(x + x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 2e+27], N[(N[(N[(a * c), $MachinePrecision] * i), $MachinePrecision] * -2.0), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + z\right) \cdot t\\
\mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot t \leq -2 \cdot 10^{-74}:\\
\;\;\;\;\left(\left(i \cdot c\right) \cdot a\right) \cdot -2\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{-51}:\\
\;\;\;\;\left(x + x\right) \cdot y\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+27}:\\
\;\;\;\;\left(\left(a \cdot c\right) \cdot i\right) \cdot -2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 z t) < -9.9999999999999996e86 or 2e27 < (*.f64 z t) Initial program 87.2%
Taylor expanded in z around inf
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6455.6
Applied rewrites55.6%
if -9.9999999999999996e86 < (*.f64 z t) < -1.99999999999999992e-74Initial program 91.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6427.0
Applied rewrites27.0%
if -1.99999999999999992e-74 < (*.f64 z t) < 2e-51Initial program 92.4%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6440.1
Applied rewrites40.1%
if 2e-51 < (*.f64 z t) < 2e27Initial program 91.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6432.2
Applied rewrites32.2%
Applied rewrites29.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ x x) y)))
(if (<= (* x y) -5000000.0)
t_1
(if (<= (* x y) -5e-57)
(* (* (* i a) c) -2.0)
(if (<= (* x y) 0.02) (* (+ z z) t) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + x) * y;
double tmp;
if ((x * y) <= -5000000.0) {
tmp = t_1;
} else if ((x * y) <= -5e-57) {
tmp = ((i * a) * c) * -2.0;
} else if ((x * y) <= 0.02) {
tmp = (z + z) * t;
} 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 = (x + x) * y
if ((x * y) <= (-5000000.0d0)) then
tmp = t_1
else if ((x * y) <= (-5d-57)) then
tmp = ((i * a) * c) * (-2.0d0)
else if ((x * y) <= 0.02d0) then
tmp = (z + z) * t
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 = (x + x) * y;
double tmp;
if ((x * y) <= -5000000.0) {
tmp = t_1;
} else if ((x * y) <= -5e-57) {
tmp = ((i * a) * c) * -2.0;
} else if ((x * y) <= 0.02) {
tmp = (z + z) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x + x) * y tmp = 0 if (x * y) <= -5000000.0: tmp = t_1 elif (x * y) <= -5e-57: tmp = ((i * a) * c) * -2.0 elif (x * y) <= 0.02: tmp = (z + z) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x + x) * y) tmp = 0.0 if (Float64(x * y) <= -5000000.0) tmp = t_1; elseif (Float64(x * y) <= -5e-57) tmp = Float64(Float64(Float64(i * a) * c) * -2.0); elseif (Float64(x * y) <= 0.02) tmp = Float64(Float64(z + z) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x + x) * y; tmp = 0.0; if ((x * y) <= -5000000.0) tmp = t_1; elseif ((x * y) <= -5e-57) tmp = ((i * a) * c) * -2.0; elseif ((x * y) <= 0.02) tmp = (z + z) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x + x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -5000000.0], t$95$1, If[LessEqual[N[(x * y), $MachinePrecision], -5e-57], N[(N[(N[(i * a), $MachinePrecision] * c), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 0.02], N[(N[(z + z), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + x\right) \cdot y\\
\mathbf{if}\;x \cdot y \leq -5000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-57}:\\
\;\;\;\;\left(\left(i \cdot a\right) \cdot c\right) \cdot -2\\
\mathbf{elif}\;x \cdot y \leq 0.02:\\
\;\;\;\;\left(z + z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 x y) < -5e6 or 0.0200000000000000004 < (*.f64 x y) Initial program 88.0%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6450.7
Applied rewrites50.7%
if -5e6 < (*.f64 x y) < -5.0000000000000002e-57Initial program 93.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6426.1
Applied rewrites26.1%
Applied rewrites24.5%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6423.2
Applied rewrites23.2%
if -5.0000000000000002e-57 < (*.f64 x y) < 0.0200000000000000004Initial program 91.8%
Taylor expanded in z around inf
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6438.0
Applied rewrites38.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (+ z z) t)))
(if (<= (* z t) -2e+128)
t_1
(if (<= (* z t) 2e-51)
(* (+ x x) y)
(if (<= (* z t) 2e+27) (* (* (* a c) i) -2.0) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (z + z) * t;
double tmp;
if ((z * t) <= -2e+128) {
tmp = t_1;
} else if ((z * t) <= 2e-51) {
tmp = (x + x) * y;
} else if ((z * t) <= 2e+27) {
tmp = ((a * c) * i) * -2.0;
} 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 + z) * t
if ((z * t) <= (-2d+128)) then
tmp = t_1
else if ((z * t) <= 2d-51) then
tmp = (x + x) * y
else if ((z * t) <= 2d+27) then
tmp = ((a * c) * i) * (-2.0d0)
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 + z) * t;
double tmp;
if ((z * t) <= -2e+128) {
tmp = t_1;
} else if ((z * t) <= 2e-51) {
tmp = (x + x) * y;
} else if ((z * t) <= 2e+27) {
tmp = ((a * c) * i) * -2.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (z + z) * t tmp = 0 if (z * t) <= -2e+128: tmp = t_1 elif (z * t) <= 2e-51: tmp = (x + x) * y elif (z * t) <= 2e+27: tmp = ((a * c) * i) * -2.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(z + z) * t) tmp = 0.0 if (Float64(z * t) <= -2e+128) tmp = t_1; elseif (Float64(z * t) <= 2e-51) tmp = Float64(Float64(x + x) * y); elseif (Float64(z * t) <= 2e+27) tmp = Float64(Float64(Float64(a * c) * i) * -2.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (z + z) * t; tmp = 0.0; if ((z * t) <= -2e+128) tmp = t_1; elseif ((z * t) <= 2e-51) tmp = (x + x) * y; elseif ((z * t) <= 2e+27) tmp = ((a * c) * i) * -2.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(z + z), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -2e+128], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 2e-51], N[(N[(x + x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 2e+27], N[(N[(N[(a * c), $MachinePrecision] * i), $MachinePrecision] * -2.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + z\right) \cdot t\\
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{-51}:\\
\;\;\;\;\left(x + x\right) \cdot y\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+27}:\\
\;\;\;\;\left(\left(a \cdot c\right) \cdot i\right) \cdot -2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 z t) < -2.0000000000000002e128 or 2e27 < (*.f64 z t) Initial program 86.9%
Taylor expanded in z around inf
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6457.0
Applied rewrites57.0%
if -2.0000000000000002e128 < (*.f64 z t) < 2e-51Initial program 92.1%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6437.4
Applied rewrites37.4%
if 2e-51 < (*.f64 z t) < 2e27Initial program 91.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6432.2
Applied rewrites32.2%
Applied rewrites29.1%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (* (+ x x) y))) (if (<= x -2.1e+34) t_1 (if (<= x 2.7) (* (+ z z) t) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x + x) * y;
double tmp;
if (x <= -2.1e+34) {
tmp = t_1;
} else if (x <= 2.7) {
tmp = (z + z) * t;
} 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 = (x + x) * y
if (x <= (-2.1d+34)) then
tmp = t_1
else if (x <= 2.7d0) then
tmp = (z + z) * t
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 = (x + x) * y;
double tmp;
if (x <= -2.1e+34) {
tmp = t_1;
} else if (x <= 2.7) {
tmp = (z + z) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (x + x) * y tmp = 0 if x <= -2.1e+34: tmp = t_1 elif x <= 2.7: tmp = (z + z) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x + x) * y) tmp = 0.0 if (x <= -2.1e+34) tmp = t_1; elseif (x <= 2.7) tmp = Float64(Float64(z + z) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (x + x) * y; tmp = 0.0; if (x <= -2.1e+34) tmp = t_1; elseif (x <= 2.7) tmp = (z + z) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x + x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[x, -2.1e+34], t$95$1, If[LessEqual[x, 2.7], N[(N[(z + z), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + x\right) \cdot y\\
\mathbf{if}\;x \leq -2.1 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.7:\\
\;\;\;\;\left(z + z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.10000000000000017e34 or 2.7000000000000002 < x Initial program 87.9%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6445.8
Applied rewrites45.8%
if -2.10000000000000017e34 < x < 2.7000000000000002Initial program 92.0%
Taylor expanded in z around inf
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6435.7
Applied rewrites35.7%
(FPCore (x y z t a b c i) :precision binary64 (* (+ x x) y))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (x + x) * y;
}
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 + x) * y
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (x + x) * y;
}
def code(x, y, z, t, a, b, c, i): return (x + x) * y
function code(x, y, z, t, a, b, c, i) return Float64(Float64(x + x) * y) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (x + x) * y; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(x + x), $MachinePrecision] * y), $MachinePrecision]
\begin{array}{l}
\\
\left(x + x\right) \cdot y
\end{array}
Initial program 90.1%
Taylor expanded in x around inf
associate-*r*N/A
lower-*.f64N/A
count-2-revN/A
lower-+.f6429.0
Applied rewrites29.0%
herbie shell --seed 2025130
(FPCore (x y z t a b c i)
:name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
:precision binary64
(* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))