
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
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, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
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, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x 200000000.0)
(fma
c
b
(fma
(fma -4.0 a (* z (* y (* 18.0 x))))
t
(fma (* -27.0 (fmin j k)) (fmax j k) (* (* -4.0 x) i))))
(fma
c
b
(*
-1.0
(*
x
(fma
-18.0
(* t (* y z))
(fma
-1.0
(/ (fma -27.0 (* (fmin j k) (fmax j k)) (* -4.0 (* a t))) x)
(* 4.0 i))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= 200000000.0) {
tmp = fma(c, b, fma(fma(-4.0, a, (z * (y * (18.0 * x)))), t, fma((-27.0 * fmin(j, k)), fmax(j, k), ((-4.0 * x) * i))));
} else {
tmp = fma(c, b, (-1.0 * (x * fma(-18.0, (t * (y * z)), fma(-1.0, (fma(-27.0, (fmin(j, k) * fmax(j, k)), (-4.0 * (a * t))) / x), (4.0 * i))))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= 200000000.0) tmp = fma(c, b, fma(fma(-4.0, a, Float64(z * Float64(y * Float64(18.0 * x)))), t, fma(Float64(-27.0 * fmin(j, k)), fmax(j, k), Float64(Float64(-4.0 * x) * i)))); else tmp = fma(c, b, Float64(-1.0 * Float64(x * fma(-18.0, Float64(t * Float64(y * z)), fma(-1.0, Float64(fma(-27.0, Float64(fmin(j, k) * fmax(j, k)), Float64(-4.0 * Float64(a * t))) / x), Float64(4.0 * i)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, 200000000.0], N[(c * b + N[(N[(-4.0 * a + N[(z * N[(y * N[(18.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t + N[(N[(-27.0 * N[Min[j, k], $MachinePrecision]), $MachinePrecision] * N[Max[j, k], $MachinePrecision] + N[(N[(-4.0 * x), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * b + N[(-1.0 * N[(x * N[(-18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(-1.0 * N[(N[(-27.0 * N[(N[Min[j, k], $MachinePrecision] * N[Max[j, k], $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision] + N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;x \leq 200000000:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, z \cdot \left(y \cdot \left(18 \cdot x\right)\right)\right), t, \mathsf{fma}\left(-27 \cdot \mathsf{min}\left(j, k\right), \mathsf{max}\left(j, k\right), \left(-4 \cdot x\right) \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c, b, -1 \cdot \left(x \cdot \mathsf{fma}\left(-18, t \cdot \left(y \cdot z\right), \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-27, \mathsf{min}\left(j, k\right) \cdot \mathsf{max}\left(j, k\right), -4 \cdot \left(a \cdot t\right)\right)}{x}, 4 \cdot i\right)\right)\right)\right)\\
\end{array}
if x < 2e8Initial program 84.6%
Applied rewrites89.3%
if 2e8 < x Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
Applied rewrites79.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
(* (* x 4.0) i))
(* (* (fmin j k) 27.0) (fmax j k)))
INFINITY)
(fma
c
b
(fma
(fma -4.0 a (* z (* y (* 18.0 x))))
t
(fma (* -27.0 (fmin j k)) (fmax j k) (* (* -4.0 x) i))))
(* x (fma -4.0 i (* 18.0 (* t (* y z)))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((fmin(j, k) * 27.0) * fmax(j, k))) <= ((double) INFINITY)) {
tmp = fma(c, b, fma(fma(-4.0, a, (z * (y * (18.0 * x)))), t, fma((-27.0 * fmin(j, k)), fmax(j, k), ((-4.0 * x) * i))));
} else {
tmp = x * fma(-4.0, i, (18.0 * (t * (y * z))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(fmin(j, k) * 27.0) * fmax(j, k))) <= Inf) tmp = fma(c, b, fma(fma(-4.0, a, Float64(z * Float64(y * Float64(18.0 * x)))), t, fma(Float64(-27.0 * fmin(j, k)), fmax(j, k), Float64(Float64(-4.0 * x) * i)))); else tmp = Float64(x * fma(-4.0, i, Float64(18.0 * Float64(t * Float64(y * z))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(N[Min[j, k], $MachinePrecision] * 27.0), $MachinePrecision] * N[Max[j, k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(c * b + N[(N[(-4.0 * a + N[(z * N[(y * N[(18.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t + N[(N[(-27.0 * N[Min[j, k], $MachinePrecision]), $MachinePrecision] * N[Max[j, k], $MachinePrecision] + N[(N[(-4.0 * x), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-4.0 * i + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(\mathsf{min}\left(j, k\right) \cdot 27\right) \cdot \mathsf{max}\left(j, k\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(c, b, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, z \cdot \left(y \cdot \left(18 \cdot x\right)\right)\right), t, \mathsf{fma}\left(-27 \cdot \mathsf{min}\left(j, k\right), \mathsf{max}\left(j, k\right), \left(-4 \cdot x\right) \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 84.6%
Applied rewrites89.3%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6443.3%
Applied rewrites43.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c))
(* (* x 4.0) i))
INFINITY)
(fma
(* -27.0 k)
j
(fma (* i x) -4.0 (fma (fma -4.0 a (* z (* y (* 18.0 x)))) t (* c b))))
(* x (fma -4.0 i (* 18.0 (* t (* y z)))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) <= ((double) INFINITY)) {
tmp = fma((-27.0 * k), j, fma((i * x), -4.0, fma(fma(-4.0, a, (z * (y * (18.0 * x)))), t, (c * b))));
} else {
tmp = x * fma(-4.0, i, (18.0 * (t * (y * z))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) <= Inf) tmp = fma(Float64(-27.0 * k), j, fma(Float64(i * x), -4.0, fma(fma(-4.0, a, Float64(z * Float64(y * Float64(18.0 * x)))), t, Float64(c * b)))); else tmp = Float64(x * fma(-4.0, i, Float64(18.0 * Float64(t * Float64(y * z))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(-27.0 * k), $MachinePrecision] * j + N[(N[(i * x), $MachinePrecision] * -4.0 + N[(N[(-4.0 * a + N[(z * N[(y * N[(18.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-4.0 * i + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(-27 \cdot k, j, \mathsf{fma}\left(i \cdot x, -4, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, z \cdot \left(y \cdot \left(18 \cdot x\right)\right)\right), t, c \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
if (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) < +inf.0Initial program 84.6%
Applied rewrites88.5%
if +inf.0 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6443.3%
Applied rewrites43.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(fma
c
b
(fma
(fma -4.0 a (* z (* y (* 18.0 x))))
t
(* -27.0 (* (fmin j k) (fmax j k)))))))
(if (<= z -9.2e+69)
t_1
(if (<= z 8.4e-72)
(fma
(* -27.0 (fmax j k))
(fmin j k)
(fma (* i x) -4.0 (fma (* -4.0 a) t (* c b))))
t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma(c, b, fma(fma(-4.0, a, (z * (y * (18.0 * x)))), t, (-27.0 * (fmin(j, k) * fmax(j, k)))));
double tmp;
if (z <= -9.2e+69) {
tmp = t_1;
} else if (z <= 8.4e-72) {
tmp = fma((-27.0 * fmax(j, k)), fmin(j, k), fma((i * x), -4.0, fma((-4.0 * a), t, (c * b))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(c, b, fma(fma(-4.0, a, Float64(z * Float64(y * Float64(18.0 * x)))), t, Float64(-27.0 * Float64(fmin(j, k) * fmax(j, k))))) tmp = 0.0 if (z <= -9.2e+69) tmp = t_1; elseif (z <= 8.4e-72) tmp = fma(Float64(-27.0 * fmax(j, k)), fmin(j, k), fma(Float64(i * x), -4.0, fma(Float64(-4.0 * a), t, Float64(c * b)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(c * b + N[(N[(-4.0 * a + N[(z * N[(y * N[(18.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t + N[(-27.0 * N[(N[Min[j, k], $MachinePrecision] * N[Max[j, k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e+69], t$95$1, If[LessEqual[z, 8.4e-72], N[(N[(-27.0 * N[Max[j, k], $MachinePrecision]), $MachinePrecision] * N[Min[j, k], $MachinePrecision] + N[(N[(i * x), $MachinePrecision] * -4.0 + N[(N[(-4.0 * a), $MachinePrecision] * t + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(c, b, \mathsf{fma}\left(\mathsf{fma}\left(-4, a, z \cdot \left(y \cdot \left(18 \cdot x\right)\right)\right), t, -27 \cdot \left(\mathsf{min}\left(j, k\right) \cdot \mathsf{max}\left(j, k\right)\right)\right)\right)\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-72}:\\
\;\;\;\;\mathsf{fma}\left(-27 \cdot \mathsf{max}\left(j, k\right), \mathsf{min}\left(j, k\right), \mathsf{fma}\left(i \cdot x, -4, \mathsf{fma}\left(-4 \cdot a, t, c \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -9.20000000000000067e69 or 8.4e-72 < z Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6478.7%
Applied rewrites78.7%
if -9.20000000000000067e69 < z < 8.4e-72Initial program 84.6%
Applied rewrites88.5%
Taylor expanded in x around 0
lower-*.f6477.8%
Applied rewrites77.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (fmax j k))))
(if (<= t -3.8e+77)
(fma c b (* t (* x (fma -4.0 (/ a x) (* 18.0 (* y z))))))
(if (<= t 3.3e+187)
(fma t_1 (fmin j k) (fma (* i x) -4.0 (fma (* -4.0 a) t (* c b))))
(fma t_1 (fmin j k) (fma (* i x) -4.0 (* 18.0 (* t (* x (* y z))))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * fmax(j, k);
double tmp;
if (t <= -3.8e+77) {
tmp = fma(c, b, (t * (x * fma(-4.0, (a / x), (18.0 * (y * z))))));
} else if (t <= 3.3e+187) {
tmp = fma(t_1, fmin(j, k), fma((i * x), -4.0, fma((-4.0 * a), t, (c * b))));
} else {
tmp = fma(t_1, fmin(j, k), fma((i * x), -4.0, (18.0 * (t * (x * (y * z))))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * fmax(j, k)) tmp = 0.0 if (t <= -3.8e+77) tmp = fma(c, b, Float64(t * Float64(x * fma(-4.0, Float64(a / x), Float64(18.0 * Float64(y * z)))))); elseif (t <= 3.3e+187) tmp = fma(t_1, fmin(j, k), fma(Float64(i * x), -4.0, fma(Float64(-4.0 * a), t, Float64(c * b)))); else tmp = fma(t_1, fmin(j, k), fma(Float64(i * x), -4.0, Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[Max[j, k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.8e+77], N[(c * b + N[(t * N[(x * N[(-4.0 * N[(a / x), $MachinePrecision] + N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+187], N[(t$95$1 * N[Min[j, k], $MachinePrecision] + N[(N[(i * x), $MachinePrecision] * -4.0 + N[(N[(-4.0 * a), $MachinePrecision] * t + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Min[j, k], $MachinePrecision] + N[(N[(i * x), $MachinePrecision] * -4.0 + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := -27 \cdot \mathsf{max}\left(j, k\right)\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(c, b, t \cdot \left(x \cdot \mathsf{fma}\left(-4, \frac{a}{x}, 18 \cdot \left(y \cdot z\right)\right)\right)\right)\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+187}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, \mathsf{min}\left(j, k\right), \mathsf{fma}\left(i \cdot x, -4, \mathsf{fma}\left(-4 \cdot a, t, c \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, \mathsf{min}\left(j, k\right), \mathsf{fma}\left(i \cdot x, -4, 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right)\right)\\
\end{array}
if t < -3.8000000000000001e77Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
Applied rewrites79.9%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6456.3%
Applied rewrites56.3%
if -3.8000000000000001e77 < t < 3.3000000000000001e187Initial program 84.6%
Applied rewrites88.5%
Taylor expanded in x around 0
lower-*.f6477.8%
Applied rewrites77.8%
if 3.3000000000000001e187 < t Initial program 84.6%
Applied rewrites88.5%
Taylor expanded in x around 0
lower-*.f6477.8%
Applied rewrites77.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6458.2%
Applied rewrites58.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -3.8e+77)
(fma c b (* t (* x (fma -4.0 (/ a x) (* 18.0 (* y z))))))
(if (<= t 3.5e+187)
(fma
(* -27.0 (fmax j k))
(fmin j k)
(fma (* i x) -4.0 (fma (* -4.0 a) t (* c b))))
(* x (fma -4.0 i (* 18.0 (* t (* y z))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -3.8e+77) {
tmp = fma(c, b, (t * (x * fma(-4.0, (a / x), (18.0 * (y * z))))));
} else if (t <= 3.5e+187) {
tmp = fma((-27.0 * fmax(j, k)), fmin(j, k), fma((i * x), -4.0, fma((-4.0 * a), t, (c * b))));
} else {
tmp = x * fma(-4.0, i, (18.0 * (t * (y * z))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -3.8e+77) tmp = fma(c, b, Float64(t * Float64(x * fma(-4.0, Float64(a / x), Float64(18.0 * Float64(y * z)))))); elseif (t <= 3.5e+187) tmp = fma(Float64(-27.0 * fmax(j, k)), fmin(j, k), fma(Float64(i * x), -4.0, fma(Float64(-4.0 * a), t, Float64(c * b)))); else tmp = Float64(x * fma(-4.0, i, Float64(18.0 * Float64(t * Float64(y * z))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -3.8e+77], N[(c * b + N[(t * N[(x * N[(-4.0 * N[(a / x), $MachinePrecision] + N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e+187], N[(N[(-27.0 * N[Max[j, k], $MachinePrecision]), $MachinePrecision] * N[Min[j, k], $MachinePrecision] + N[(N[(i * x), $MachinePrecision] * -4.0 + N[(N[(-4.0 * a), $MachinePrecision] * t + N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-4.0 * i + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(c, b, t \cdot \left(x \cdot \mathsf{fma}\left(-4, \frac{a}{x}, 18 \cdot \left(y \cdot z\right)\right)\right)\right)\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+187}:\\
\;\;\;\;\mathsf{fma}\left(-27 \cdot \mathsf{max}\left(j, k\right), \mathsf{min}\left(j, k\right), \mathsf{fma}\left(i \cdot x, -4, \mathsf{fma}\left(-4 \cdot a, t, c \cdot b\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
if t < -3.8000000000000001e77Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
Applied rewrites79.9%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6456.3%
Applied rewrites56.3%
if -3.8000000000000001e77 < t < 3.4999999999999998e187Initial program 84.6%
Applied rewrites88.5%
Taylor expanded in x around 0
lower-*.f6477.8%
Applied rewrites77.8%
if 3.4999999999999998e187 < t Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6443.3%
Applied rewrites43.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -3.8e+77)
(fma c b (* t (* x (fma -4.0 (/ a x) (* 18.0 (* y z))))))
(if (<= t 3.6e+21)
(- (- (* b c) (* (* x 4.0) i)) (* (* j 27.0) k))
(* (fma a -4.0 (* (* (* x 18.0) y) z)) t))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -3.8e+77) {
tmp = fma(c, b, (t * (x * fma(-4.0, (a / x), (18.0 * (y * z))))));
} else if (t <= 3.6e+21) {
tmp = ((b * c) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = fma(a, -4.0, (((x * 18.0) * y) * z)) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -3.8e+77) tmp = fma(c, b, Float64(t * Float64(x * fma(-4.0, Float64(a / x), Float64(18.0 * Float64(y * z)))))); elseif (t <= 3.6e+21) tmp = Float64(Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(fma(a, -4.0, Float64(Float64(Float64(x * 18.0) * y) * z)) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -3.8e+77], N[(c * b + N[(t * N[(x * N[(-4.0 * N[(a / x), $MachinePrecision] + N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+21], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(a * -4.0 + N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(c, b, t \cdot \left(x \cdot \mathsf{fma}\left(-4, \frac{a}{x}, 18 \cdot \left(y \cdot z\right)\right)\right)\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+21}:\\
\;\;\;\;\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, -4, \left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\\
\end{array}
if t < -3.8000000000000001e77Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
Applied rewrites79.9%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6456.3%
Applied rewrites56.3%
if -3.8000000000000001e77 < t < 3.6e21Initial program 84.6%
Taylor expanded in t around 0
lower-*.f6461.0%
Applied rewrites61.0%
if 3.6e21 < t Initial program 84.6%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.9%
Applied rewrites42.9%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
Applied rewrites43.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (fma a -4.0 (* (* (* x 18.0) y) z)) t)))
(if (<= t -3.8e+77)
t_1
(if (<= t 3.6e+21)
(- (- (* b c) (* (* x 4.0) i)) (* (* j 27.0) k))
t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma(a, -4.0, (((x * 18.0) * y) * z)) * t;
double tmp;
if (t <= -3.8e+77) {
tmp = t_1;
} else if (t <= 3.6e+21) {
tmp = ((b * c) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(fma(a, -4.0, Float64(Float64(Float64(x * 18.0) * y) * z)) * t) tmp = 0.0 if (t <= -3.8e+77) tmp = t_1; elseif (t <= 3.6e+21) tmp = Float64(Float64(Float64(b * c) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(a * -4.0 + N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -3.8e+77], t$95$1, If[LessEqual[t, 3.6e+21], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, -4, \left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+21}:\\
\;\;\;\;\left(b \cdot c - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -3.8000000000000001e77 or 3.6e21 < t Initial program 84.6%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.9%
Applied rewrites42.9%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
Applied rewrites43.6%
if -3.8000000000000001e77 < t < 3.6e21Initial program 84.6%
Taylor expanded in t around 0
lower-*.f6461.0%
Applied rewrites61.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (fma a -4.0 (* (* (* x 18.0) y) z)) t)))
(if (<= t -3.8e+77)
t_1
(if (<= t 3.6e+21)
(fma (* -27.0 (fmax j k)) (fmin j k) (fma (* i x) -4.0 (* b c)))
t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = fma(a, -4.0, (((x * 18.0) * y) * z)) * t;
double tmp;
if (t <= -3.8e+77) {
tmp = t_1;
} else if (t <= 3.6e+21) {
tmp = fma((-27.0 * fmax(j, k)), fmin(j, k), fma((i * x), -4.0, (b * c)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(fma(a, -4.0, Float64(Float64(Float64(x * 18.0) * y) * z)) * t) tmp = 0.0 if (t <= -3.8e+77) tmp = t_1; elseif (t <= 3.6e+21) tmp = fma(Float64(-27.0 * fmax(j, k)), fmin(j, k), fma(Float64(i * x), -4.0, Float64(b * c))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(a * -4.0 + N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -3.8e+77], t$95$1, If[LessEqual[t, 3.6e+21], N[(N[(-27.0 * N[Max[j, k], $MachinePrecision]), $MachinePrecision] * N[Min[j, k], $MachinePrecision] + N[(N[(i * x), $MachinePrecision] * -4.0 + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, -4, \left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(-27 \cdot \mathsf{max}\left(j, k\right), \mathsf{min}\left(j, k\right), \mathsf{fma}\left(i \cdot x, -4, b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -3.8000000000000001e77 or 3.6e21 < t Initial program 84.6%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.9%
Applied rewrites42.9%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
Applied rewrites43.6%
if -3.8000000000000001e77 < t < 3.6e21Initial program 84.6%
Applied rewrites88.5%
Taylor expanded in t around 0
lower-*.f6461.8%
Applied rewrites61.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (fma -4.0 i (* 18.0 (* t (* y z)))))))
(if (<= x -5.2e+77)
t_1
(if (<= x 3.6e+156) (fma (* -27.0 k) j (fma -4.0 (* a t) (* b c))) t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * fma(-4.0, i, (18.0 * (t * (y * z))));
double tmp;
if (x <= -5.2e+77) {
tmp = t_1;
} else if (x <= 3.6e+156) {
tmp = fma((-27.0 * k), j, fma(-4.0, (a * t), (b * c)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * fma(-4.0, i, Float64(18.0 * Float64(t * Float64(y * z))))) tmp = 0.0 if (x <= -5.2e+77) tmp = t_1; elseif (x <= 3.6e+156) tmp = fma(Float64(-27.0 * k), j, fma(-4.0, Float64(a * t), Float64(b * c))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(-4.0 * i + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.2e+77], t$95$1, If[LessEqual[x, 3.6e+156], N[(N[(-27.0 * k), $MachinePrecision] * j + N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x \cdot \mathsf{fma}\left(-4, i, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -5.2 \cdot 10^{+77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+156}:\\
\;\;\;\;\mathsf{fma}\left(-27 \cdot k, j, \mathsf{fma}\left(-4, a \cdot t, b \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if x < -5.2000000000000004e77 or 3.59999999999999979e156 < x Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6443.3%
Applied rewrites43.3%
if -5.2000000000000004e77 < x < 3.59999999999999979e156Initial program 84.6%
Applied rewrites88.5%
Taylor expanded in x around 0
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6461.3%
Applied rewrites61.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 27.0 (* j k)))))
(if (<= t -3.7e+102)
(* t (fma -4.0 a (* 18.0 (* x (* y z)))))
(if (<= t -1.35e+29)
(* x (fma -4.0 i (* 18.0 (* t (* y z)))))
(if (<= t -1e-238)
t_1
(if (<= t 6.4e-199)
(fma c b (* -1.0 (* 4.0 (* i x))))
(if (<= t 3.6e+21)
t_1
(* (fma a -4.0 (* (* (* x 18.0) y) z)) t))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double tmp;
if (t <= -3.7e+102) {
tmp = t * fma(-4.0, a, (18.0 * (x * (y * z))));
} else if (t <= -1.35e+29) {
tmp = x * fma(-4.0, i, (18.0 * (t * (y * z))));
} else if (t <= -1e-238) {
tmp = t_1;
} else if (t <= 6.4e-199) {
tmp = fma(c, b, (-1.0 * (4.0 * (i * x))));
} else if (t <= 3.6e+21) {
tmp = t_1;
} else {
tmp = fma(a, -4.0, (((x * 18.0) * y) * z)) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) tmp = 0.0 if (t <= -3.7e+102) tmp = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z))))); elseif (t <= -1.35e+29) tmp = Float64(x * fma(-4.0, i, Float64(18.0 * Float64(t * Float64(y * z))))); elseif (t <= -1e-238) tmp = t_1; elseif (t <= 6.4e-199) tmp = fma(c, b, Float64(-1.0 * Float64(4.0 * Float64(i * x)))); elseif (t <= 3.6e+21) tmp = t_1; else tmp = Float64(fma(a, -4.0, Float64(Float64(Float64(x * 18.0) * y) * z)) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+102], N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e+29], N[(x * N[(-4.0 * i + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1e-238], t$95$1, If[LessEqual[t, 6.4e-199], N[(c * b + N[(-1.0 * N[(4.0 * N[(i * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+21], t$95$1, N[(N[(a * -4.0 + N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]]]
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+102}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{+29}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{-199}:\\
\;\;\;\;\mathsf{fma}\left(c, b, -1 \cdot \left(4 \cdot \left(i \cdot x\right)\right)\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, -4, \left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\\
\end{array}
if t < -3.70000000000000023e102Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.9%
Applied rewrites42.9%
if -3.70000000000000023e102 < t < -1.35e29Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6443.3%
Applied rewrites43.3%
if -1.35e29 < t < -9.9999999999999999e-239 or 6.3999999999999999e-199 < t < 3.6e21Initial program 84.6%
Taylor expanded in x around 0
lower--.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6460.8%
Applied rewrites60.8%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6444.3%
Applied rewrites44.3%
if -9.9999999999999999e-239 < t < 6.3999999999999999e-199Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
Applied rewrites79.9%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6441.9%
Applied rewrites41.9%
if 3.6e21 < t Initial program 84.6%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.9%
Applied rewrites42.9%
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
Applied rewrites43.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 27.0 (* j k))))
(t_2 (* t (fma -4.0 a (* 18.0 (* x (* y z)))))))
(if (<= t -3.7e+102)
t_2
(if (<= t -1.35e+29)
(* x (fma -4.0 i (* 18.0 (* t (* y z)))))
(if (<= t -1e-238)
t_1
(if (<= t 6.4e-199)
(fma c b (* -1.0 (* 4.0 (* i x))))
(if (<= t 3.6e+21) t_1 t_2)))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = t * fma(-4.0, a, (18.0 * (x * (y * z))));
double tmp;
if (t <= -3.7e+102) {
tmp = t_2;
} else if (t <= -1.35e+29) {
tmp = x * fma(-4.0, i, (18.0 * (t * (y * z))));
} else if (t <= -1e-238) {
tmp = t_1;
} else if (t <= 6.4e-199) {
tmp = fma(c, b, (-1.0 * (4.0 * (i * x))));
} else if (t <= 3.6e+21) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z))))) tmp = 0.0 if (t <= -3.7e+102) tmp = t_2; elseif (t <= -1.35e+29) tmp = Float64(x * fma(-4.0, i, Float64(18.0 * Float64(t * Float64(y * z))))); elseif (t <= -1e-238) tmp = t_1; elseif (t <= 6.4e-199) tmp = fma(c, b, Float64(-1.0 * Float64(4.0 * Float64(i * x)))); elseif (t <= 3.6e+21) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+102], t$95$2, If[LessEqual[t, -1.35e+29], N[(x * N[(-4.0 * i + N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1e-238], t$95$1, If[LessEqual[t, 6.4e-199], N[(c * b + N[(-1.0 * N[(4.0 * N[(i * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+21], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+102}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{+29}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{-199}:\\
\;\;\;\;\mathsf{fma}\left(c, b, -1 \cdot \left(4 \cdot \left(i \cdot x\right)\right)\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if t < -3.70000000000000023e102 or 3.6e21 < t Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.9%
Applied rewrites42.9%
if -3.70000000000000023e102 < t < -1.35e29Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6443.3%
Applied rewrites43.3%
if -1.35e29 < t < -9.9999999999999999e-239 or 6.3999999999999999e-199 < t < 3.6e21Initial program 84.6%
Taylor expanded in x around 0
lower--.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6460.8%
Applied rewrites60.8%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6444.3%
Applied rewrites44.3%
if -9.9999999999999999e-239 < t < 6.3999999999999999e-199Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
Applied rewrites79.9%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6441.9%
Applied rewrites41.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 27.0 (* j k))))
(t_2 (* t (fma -4.0 a (* 18.0 (* x (* y z)))))))
(if (<= t -2.1e+69)
t_2
(if (<= t -1e-238)
t_1
(if (<= t 6.4e-199)
(fma c b (* -1.0 (* 4.0 (* i x))))
(if (<= t 3.6e+21) t_1 t_2))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = t * fma(-4.0, a, (18.0 * (x * (y * z))));
double tmp;
if (t <= -2.1e+69) {
tmp = t_2;
} else if (t <= -1e-238) {
tmp = t_1;
} else if (t <= 6.4e-199) {
tmp = fma(c, b, (-1.0 * (4.0 * (i * x))));
} else if (t <= 3.6e+21) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z))))) tmp = 0.0 if (t <= -2.1e+69) tmp = t_2; elseif (t <= -1e-238) tmp = t_1; elseif (t <= 6.4e-199) tmp = fma(c, b, Float64(-1.0 * Float64(4.0 * Float64(i * x)))); elseif (t <= 3.6e+21) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+69], t$95$2, If[LessEqual[t, -1e-238], t$95$1, If[LessEqual[t, 6.4e-199], N[(c * b + N[(-1.0 * N[(4.0 * N[(i * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+21], t$95$1, t$95$2]]]]]]
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{-199}:\\
\;\;\;\;\mathsf{fma}\left(c, b, -1 \cdot \left(4 \cdot \left(i \cdot x\right)\right)\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if t < -2.10000000000000015e69 or 3.6e21 < t Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.9%
Applied rewrites42.9%
if -2.10000000000000015e69 < t < -9.9999999999999999e-239 or 6.3999999999999999e-199 < t < 3.6e21Initial program 84.6%
Taylor expanded in x around 0
lower--.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6460.8%
Applied rewrites60.8%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6444.3%
Applied rewrites44.3%
if -9.9999999999999999e-239 < t < 6.3999999999999999e-199Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
Applied rewrites79.9%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6441.9%
Applied rewrites41.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 27.0 (* j k)))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -5e+45)
t_1
(if (<= t_2 1e-78)
(fma c b (* -1.0 (* 4.0 (* i x))))
(if (<= t_2 5e+66) (* c (+ b (* -4.0 (/ (* a t) c)))) t_1)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+45) {
tmp = t_1;
} else if (t_2 <= 1e-78) {
tmp = fma(c, b, (-1.0 * (4.0 * (i * x))));
} else if (t_2 <= 5e+66) {
tmp = c * (b + (-4.0 * ((a * t) / c)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -5e+45) tmp = t_1; elseif (t_2 <= 1e-78) tmp = fma(c, b, Float64(-1.0 * Float64(4.0 * Float64(i * x)))); elseif (t_2 <= 5e+66) tmp = Float64(c * Float64(b + Float64(-4.0 * Float64(Float64(a * t) / c)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+45], t$95$1, If[LessEqual[t$95$2, 1e-78], N[(c * b + N[(-1.0 * N[(4.0 * N[(i * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+66], N[(c * N[(b + N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{-78}:\\
\;\;\;\;\mathsf{fma}\left(c, b, -1 \cdot \left(4 \cdot \left(i \cdot x\right)\right)\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+66}:\\
\;\;\;\;c \cdot \left(b + -4 \cdot \frac{a \cdot t}{c}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5e45 or 4.99999999999999991e66 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.6%
Taylor expanded in x around 0
lower--.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6460.8%
Applied rewrites60.8%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6444.3%
Applied rewrites44.3%
if -5e45 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999999e-79Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
Applied rewrites79.9%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6441.9%
Applied rewrites41.9%
if 9.99999999999999999e-79 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.99999999999999991e66Initial program 84.6%
Taylor expanded in x around 0
lower--.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6460.8%
Applied rewrites60.8%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6440.8%
Applied rewrites40.8%
Taylor expanded in c around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6439.7%
Applied rewrites39.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 27.0 (* j k)))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -5e+45)
t_1
(if (<= t_2 1e-78)
(fma c b (* -1.0 (* 4.0 (* i x))))
(if (<= t_2 5e+66) (fma (* t a) -4.0 (* b c)) t_1)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+45) {
tmp = t_1;
} else if (t_2 <= 1e-78) {
tmp = fma(c, b, (-1.0 * (4.0 * (i * x))));
} else if (t_2 <= 5e+66) {
tmp = fma((t * a), -4.0, (b * c));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -5e+45) tmp = t_1; elseif (t_2 <= 1e-78) tmp = fma(c, b, Float64(-1.0 * Float64(4.0 * Float64(i * x)))); elseif (t_2 <= 5e+66) tmp = fma(Float64(t * a), -4.0, Float64(b * c)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+45], t$95$1, If[LessEqual[t$95$2, 1e-78], N[(c * b + N[(-1.0 * N[(4.0 * N[(i * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+66], N[(N[(t * a), $MachinePrecision] * -4.0 + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{-78}:\\
\;\;\;\;\mathsf{fma}\left(c, b, -1 \cdot \left(4 \cdot \left(i \cdot x\right)\right)\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+66}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot a, -4, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5e45 or 4.99999999999999991e66 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.6%
Taylor expanded in x around 0
lower--.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6460.8%
Applied rewrites60.8%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6444.3%
Applied rewrites44.3%
if -5e45 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999999e-79Initial program 84.6%
Applied rewrites89.3%
Taylor expanded in x around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
Applied rewrites79.9%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6441.9%
Applied rewrites41.9%
if 9.99999999999999999e-79 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.99999999999999991e66Initial program 84.6%
Taylor expanded in x around 0
lower--.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6460.8%
Applied rewrites60.8%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6440.8%
Applied rewrites40.8%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-fma.f6440.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.8%
Applied rewrites40.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 27.0 (* j k)))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -4e+65)
t_1
(if (<= t_2 5e+66) (fma (* t a) -4.0 (* b c)) t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -4e+65) {
tmp = t_1;
} else if (t_2 <= 5e+66) {
tmp = fma((t * a), -4.0, (b * c));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -4e+65) tmp = t_1; elseif (t_2 <= 5e+66) tmp = fma(Float64(t * a), -4.0, Float64(b * c)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -4e+65], t$95$1, If[LessEqual[t$95$2, 5e+66], N[(N[(t * a), $MachinePrecision] * -4.0 + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+66}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot a, -4, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4e65 or 4.99999999999999991e66 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.6%
Taylor expanded in x around 0
lower--.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6460.8%
Applied rewrites60.8%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6444.3%
Applied rewrites44.3%
if -4e65 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.99999999999999991e66Initial program 84.6%
Taylor expanded in x around 0
lower--.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6460.8%
Applied rewrites60.8%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6440.8%
Applied rewrites40.8%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-fma.f6440.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.8%
Applied rewrites40.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -2e+208)
t_1
(if (<= t_2 5e+210) (fma (* t a) -4.0 (* b c)) t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -2e+208) {
tmp = t_1;
} else if (t_2 <= 5e+210) {
tmp = fma((t * a), -4.0, (b * c));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -2e+208) tmp = t_1; elseif (t_2 <= 5e+210) tmp = fma(Float64(t * a), -4.0, Float64(b * c)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+208], t$95$1, If[LessEqual[t$95$2, 5e+210], N[(N[(t * a), $MachinePrecision] * -4.0 + N[(b * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+210}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot a, -4, b \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2e208 or 4.9999999999999998e210 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f6424.6%
Applied rewrites24.6%
if -2e208 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 4.9999999999999998e210Initial program 84.6%
Taylor expanded in x around 0
lower--.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6460.8%
Applied rewrites60.8%
Taylor expanded in j around 0
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6440.8%
Applied rewrites40.8%
lift--.f64N/A
sub-flipN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
lower-fma.f6440.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6440.8%
Applied rewrites40.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -5e+45)
(* (* j -27.0) k)
(if (<= t_1 1e-78)
(* -4.0 (* i x))
(if (<= t_1 2e+117) (* -4.0 (* a t)) (* (* k -27.0) j))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+45) {
tmp = (j * -27.0) * k;
} else if (t_1 <= 1e-78) {
tmp = -4.0 * (i * x);
} else if (t_1 <= 2e+117) {
tmp = -4.0 * (a * t);
} else {
tmp = (k * -27.0) * j;
}
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, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-5d+45)) then
tmp = (j * (-27.0d0)) * k
else if (t_1 <= 1d-78) then
tmp = (-4.0d0) * (i * x)
else if (t_1 <= 2d+117) then
tmp = (-4.0d0) * (a * t)
else
tmp = (k * (-27.0d0)) * j
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 j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+45) {
tmp = (j * -27.0) * k;
} else if (t_1 <= 1e-78) {
tmp = -4.0 * (i * x);
} else if (t_1 <= 2e+117) {
tmp = -4.0 * (a * t);
} else {
tmp = (k * -27.0) * j;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -5e+45: tmp = (j * -27.0) * k elif t_1 <= 1e-78: tmp = -4.0 * (i * x) elif t_1 <= 2e+117: tmp = -4.0 * (a * t) else: tmp = (k * -27.0) * j return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -5e+45) tmp = Float64(Float64(j * -27.0) * k); elseif (t_1 <= 1e-78) tmp = Float64(-4.0 * Float64(i * x)); elseif (t_1 <= 2e+117) tmp = Float64(-4.0 * Float64(a * t)); else tmp = Float64(Float64(k * -27.0) * j); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (j * 27.0) * k; tmp = 0.0; if (t_1 <= -5e+45) tmp = (j * -27.0) * k; elseif (t_1 <= 1e-78) tmp = -4.0 * (i * x); elseif (t_1 <= 2e+117) tmp = -4.0 * (a * t); else tmp = (k * -27.0) * j; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+45], N[(N[(j * -27.0), $MachinePrecision] * k), $MachinePrecision], If[LessEqual[t$95$1, 1e-78], N[(-4.0 * N[(i * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+117], N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision], N[(N[(k * -27.0), $MachinePrecision] * j), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+45}:\\
\;\;\;\;\left(j \cdot -27\right) \cdot k\\
\mathbf{elif}\;t\_1 \leq 10^{-78}:\\
\;\;\;\;-4 \cdot \left(i \cdot x\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+117}:\\
\;\;\;\;-4 \cdot \left(a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(k \cdot -27\right) \cdot j\\
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5e45Initial program 84.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f6424.6%
Applied rewrites24.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-*.f6424.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6424.6%
Applied rewrites24.6%
if -5e45 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999999e-79Initial program 84.6%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6421.6%
Applied rewrites21.6%
if 9.99999999999999999e-79 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000000000000001e117Initial program 84.6%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.9%
Applied rewrites42.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6421.1%
Applied rewrites21.1%
if 2.0000000000000001e117 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f6424.6%
Applied rewrites24.6%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lift-*.f64N/A
lower-*.f6424.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6424.6%
Applied rewrites24.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -5e+45)
(* (* j -27.0) k)
(if (<= t_1 1e-78)
(* -4.0 (* i x))
(if (<= t_1 2e+117) (* -4.0 (* a t)) (* -27.0 (* j k)))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+45) {
tmp = (j * -27.0) * k;
} else if (t_1 <= 1e-78) {
tmp = -4.0 * (i * x);
} else if (t_1 <= 2e+117) {
tmp = -4.0 * (a * t);
} else {
tmp = -27.0 * (j * k);
}
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, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-5d+45)) then
tmp = (j * (-27.0d0)) * k
else if (t_1 <= 1d-78) then
tmp = (-4.0d0) * (i * x)
else if (t_1 <= 2d+117) then
tmp = (-4.0d0) * (a * t)
else
tmp = (-27.0d0) * (j * k)
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 j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+45) {
tmp = (j * -27.0) * k;
} else if (t_1 <= 1e-78) {
tmp = -4.0 * (i * x);
} else if (t_1 <= 2e+117) {
tmp = -4.0 * (a * t);
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -5e+45: tmp = (j * -27.0) * k elif t_1 <= 1e-78: tmp = -4.0 * (i * x) elif t_1 <= 2e+117: tmp = -4.0 * (a * t) else: tmp = -27.0 * (j * k) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -5e+45) tmp = Float64(Float64(j * -27.0) * k); elseif (t_1 <= 1e-78) tmp = Float64(-4.0 * Float64(i * x)); elseif (t_1 <= 2e+117) tmp = Float64(-4.0 * Float64(a * t)); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (j * 27.0) * k; tmp = 0.0; if (t_1 <= -5e+45) tmp = (j * -27.0) * k; elseif (t_1 <= 1e-78) tmp = -4.0 * (i * x); elseif (t_1 <= 2e+117) tmp = -4.0 * (a * t); else tmp = -27.0 * (j * k); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+45], N[(N[(j * -27.0), $MachinePrecision] * k), $MachinePrecision], If[LessEqual[t$95$1, 1e-78], N[(-4.0 * N[(i * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+117], N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+45}:\\
\;\;\;\;\left(j \cdot -27\right) \cdot k\\
\mathbf{elif}\;t\_1 \leq 10^{-78}:\\
\;\;\;\;-4 \cdot \left(i \cdot x\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+117}:\\
\;\;\;\;-4 \cdot \left(a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5e45Initial program 84.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f6424.6%
Applied rewrites24.6%
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lift-*.f64N/A
lower-*.f6424.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6424.6%
Applied rewrites24.6%
if -5e45 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999999e-79Initial program 84.6%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6421.6%
Applied rewrites21.6%
if 9.99999999999999999e-79 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000000000000001e117Initial program 84.6%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.9%
Applied rewrites42.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6421.1%
Applied rewrites21.1%
if 2.0000000000000001e117 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f6424.6%
Applied rewrites24.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -5e+45)
t_1
(if (<= t_2 1e-78)
(* -4.0 (* i x))
(if (<= t_2 2e+117) (* -4.0 (* a t)) t_1)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+45) {
tmp = t_1;
} else if (t_2 <= 1e-78) {
tmp = -4.0 * (i * x);
} else if (t_2 <= 2e+117) {
tmp = -4.0 * (a * 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, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
t_2 = (j * 27.0d0) * k
if (t_2 <= (-5d+45)) then
tmp = t_1
else if (t_2 <= 1d-78) then
tmp = (-4.0d0) * (i * x)
else if (t_2 <= 2d+117) then
tmp = (-4.0d0) * (a * 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 j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -5e+45) {
tmp = t_1;
} else if (t_2 <= 1e-78) {
tmp = -4.0 * (i * x);
} else if (t_2 <= 2e+117) {
tmp = -4.0 * (a * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -5e+45: tmp = t_1 elif t_2 <= 1e-78: tmp = -4.0 * (i * x) elif t_2 <= 2e+117: tmp = -4.0 * (a * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -5e+45) tmp = t_1; elseif (t_2 <= 1e-78) tmp = Float64(-4.0 * Float64(i * x)); elseif (t_2 <= 2e+117) tmp = Float64(-4.0 * Float64(a * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = -27.0 * (j * k); t_2 = (j * 27.0) * k; tmp = 0.0; if (t_2 <= -5e+45) tmp = t_1; elseif (t_2 <= 1e-78) tmp = -4.0 * (i * x); elseif (t_2 <= 2e+117) tmp = -4.0 * (a * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+45], t$95$1, If[LessEqual[t$95$2, 1e-78], N[(-4.0 * N[(i * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+117], N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{-78}:\\
\;\;\;\;-4 \cdot \left(i \cdot x\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+117}:\\
\;\;\;\;-4 \cdot \left(a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -5e45 or 2.0000000000000001e117 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f6424.6%
Applied rewrites24.6%
if -5e45 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 9.99999999999999999e-79Initial program 84.6%
Taylor expanded in i around inf
lower-*.f64N/A
lower-*.f6421.6%
Applied rewrites21.6%
if 9.99999999999999999e-79 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000000000000001e117Initial program 84.6%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.9%
Applied rewrites42.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6421.1%
Applied rewrites21.1%
(FPCore (x y z t a b c i j k) :precision binary64 (let* ((t_1 (* -27.0 (* j k))) (t_2 (* (* j 27.0) k))) (if (<= t_2 -1e+76) t_1 (if (<= t_2 2e+117) (* -4.0 (* a t)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -1e+76) {
tmp = t_1;
} else if (t_2 <= 2e+117) {
tmp = -4.0 * (a * 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, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
t_2 = (j * 27.0d0) * k
if (t_2 <= (-1d+76)) then
tmp = t_1
else if (t_2 <= 2d+117) then
tmp = (-4.0d0) * (a * 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 j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -1e+76) {
tmp = t_1;
} else if (t_2 <= 2e+117) {
tmp = -4.0 * (a * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -1e+76: tmp = t_1 elif t_2 <= 2e+117: tmp = -4.0 * (a * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -1e+76) tmp = t_1; elseif (t_2 <= 2e+117) tmp = Float64(-4.0 * Float64(a * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = -27.0 * (j * k); t_2 = (j * 27.0) * k; tmp = 0.0; if (t_2 <= -1e+76) tmp = t_1; elseif (t_2 <= 2e+117) tmp = -4.0 * (a * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+76], t$95$1, If[LessEqual[t$95$2, 2e+117], N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+117}:\\
\;\;\;\;-4 \cdot \left(a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1e76 or 2.0000000000000001e117 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 84.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f6424.6%
Applied rewrites24.6%
if -1e76 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000000000000001e117Initial program 84.6%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.9%
Applied rewrites42.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6421.1%
Applied rewrites21.1%
(FPCore (x y z t a b c i j k) :precision binary64 (* -4.0 (* a t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return -4.0 * (a * t);
}
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, j, k)
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), intent (in) :: j
real(8), intent (in) :: k
code = (-4.0d0) * (a * t)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return -4.0 * (a * t);
}
def code(x, y, z, t, a, b, c, i, j, k): return -4.0 * (a * t)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(-4.0 * Float64(a * t)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = -4.0 * (a * t); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(-4.0 * N[(a * t), $MachinePrecision]), $MachinePrecision]
-4 \cdot \left(a \cdot t\right)
Initial program 84.6%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6442.9%
Applied rewrites42.9%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6421.1%
Applied rewrites21.1%
herbie shell --seed 2025183
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))