
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
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 y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)
\end{array}
Herbie found 32 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
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 y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)
\end{array}
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* y0 c) (* y1 a)))
(t_2 (- (* j t) (* k y)))
(t_3 (- (* y2 t) (* y3 y)))
(t_4 (- (* b a) (* i c)))
(t_5 (- (* y0 b) (* y1 i)))
(t_6 (* (- (fma t_4 y (* t_1 y2)) (* t_5 j)) x))
(t_7 (* (- z) (- (fma t_4 t (* t_1 y3)) (* t_5 k))))
(t_8 (- (* y x) (* t z))))
(if (<= x -7.6e+176)
t_6
(if (<= x -3.5e+37)
t_7
(if (<= x -7.4e-261)
(* (- (fma t_8 a (* t_2 y4)) (* (- (* j x) (* k z)) y0)) b)
(if (<= x 7.8e-214)
(* (fma (- (- (* y2 x) (* y3 z))) y1 (fma t_8 b (* t_3 y5))) a)
(if (<= x 4.5e-176)
t_7
(if (<= x 52000000000000.0)
(* (- (fma t_2 b (* (- (* y2 k) (* y3 j)) y1)) (* t_3 c)) y4)
t_6))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y0 * c) - (y1 * a);
double t_2 = (j * t) - (k * y);
double t_3 = (y2 * t) - (y3 * y);
double t_4 = (b * a) - (i * c);
double t_5 = (y0 * b) - (y1 * i);
double t_6 = (fma(t_4, y, (t_1 * y2)) - (t_5 * j)) * x;
double t_7 = -z * (fma(t_4, t, (t_1 * y3)) - (t_5 * k));
double t_8 = (y * x) - (t * z);
double tmp;
if (x <= -7.6e+176) {
tmp = t_6;
} else if (x <= -3.5e+37) {
tmp = t_7;
} else if (x <= -7.4e-261) {
tmp = (fma(t_8, a, (t_2 * y4)) - (((j * x) - (k * z)) * y0)) * b;
} else if (x <= 7.8e-214) {
tmp = fma(-((y2 * x) - (y3 * z)), y1, fma(t_8, b, (t_3 * y5))) * a;
} else if (x <= 4.5e-176) {
tmp = t_7;
} else if (x <= 52000000000000.0) {
tmp = (fma(t_2, b, (((y2 * k) - (y3 * j)) * y1)) - (t_3 * c)) * y4;
} else {
tmp = t_6;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(y0 * c) - Float64(y1 * a)) t_2 = Float64(Float64(j * t) - Float64(k * y)) t_3 = Float64(Float64(y2 * t) - Float64(y3 * y)) t_4 = Float64(Float64(b * a) - Float64(i * c)) t_5 = Float64(Float64(y0 * b) - Float64(y1 * i)) t_6 = Float64(Float64(fma(t_4, y, Float64(t_1 * y2)) - Float64(t_5 * j)) * x) t_7 = Float64(Float64(-z) * Float64(fma(t_4, t, Float64(t_1 * y3)) - Float64(t_5 * k))) t_8 = Float64(Float64(y * x) - Float64(t * z)) tmp = 0.0 if (x <= -7.6e+176) tmp = t_6; elseif (x <= -3.5e+37) tmp = t_7; elseif (x <= -7.4e-261) tmp = Float64(Float64(fma(t_8, a, Float64(t_2 * y4)) - Float64(Float64(Float64(j * x) - Float64(k * z)) * y0)) * b); elseif (x <= 7.8e-214) tmp = Float64(fma(Float64(-Float64(Float64(y2 * x) - Float64(y3 * z))), y1, fma(t_8, b, Float64(t_3 * y5))) * a); elseif (x <= 4.5e-176) tmp = t_7; elseif (x <= 52000000000000.0) tmp = Float64(Float64(fma(t_2, b, Float64(Float64(Float64(y2 * k) - Float64(y3 * j)) * y1)) - Float64(t_3 * c)) * y4); else tmp = t_6; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y2 * t), $MachinePrecision] - N[(y3 * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(b * a), $MachinePrecision] - N[(i * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$4 * y + N[(t$95$1 * y2), $MachinePrecision]), $MachinePrecision] - N[(t$95$5 * j), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$7 = N[((-z) * N[(N[(t$95$4 * t + N[(t$95$1 * y3), $MachinePrecision]), $MachinePrecision] - N[(t$95$5 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.6e+176], t$95$6, If[LessEqual[x, -3.5e+37], t$95$7, If[LessEqual[x, -7.4e-261], N[(N[(N[(t$95$8 * a + N[(t$95$2 * y4), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision] * y0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 7.8e-214], N[(N[((-N[(N[(y2 * x), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]) * y1 + N[(t$95$8 * b + N[(t$95$3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, 4.5e-176], t$95$7, If[LessEqual[x, 52000000000000.0], N[(N[(N[(t$95$2 * b + N[(N[(N[(y2 * k), $MachinePrecision] - N[(y3 * j), $MachinePrecision]), $MachinePrecision] * y1), $MachinePrecision]), $MachinePrecision] - N[(t$95$3 * c), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision], t$95$6]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y0 \cdot c - y1 \cdot a\\
t_2 := j \cdot t - k \cdot y\\
t_3 := y2 \cdot t - y3 \cdot y\\
t_4 := b \cdot a - i \cdot c\\
t_5 := y0 \cdot b - y1 \cdot i\\
t_6 := \left(\mathsf{fma}\left(t\_4, y, t\_1 \cdot y2\right) - t\_5 \cdot j\right) \cdot x\\
t_7 := \left(-z\right) \cdot \left(\mathsf{fma}\left(t\_4, t, t\_1 \cdot y3\right) - t\_5 \cdot k\right)\\
t_8 := y \cdot x - t \cdot z\\
\mathbf{if}\;x \leq -7.6 \cdot 10^{+176}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{+37}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x \leq -7.4 \cdot 10^{-261}:\\
\;\;\;\;\left(\mathsf{fma}\left(t\_8, a, t\_2 \cdot y4\right) - \left(j \cdot x - k \cdot z\right) \cdot y0\right) \cdot b\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-214}:\\
\;\;\;\;\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(t\_8, b, t\_3 \cdot y5\right)\right) \cdot a\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{-176}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;x \leq 52000000000000:\\
\;\;\;\;\left(\mathsf{fma}\left(t\_2, b, \left(y2 \cdot k - y3 \cdot j\right) \cdot y1\right) - t\_3 \cdot c\right) \cdot y4\\
\mathbf{else}:\\
\;\;\;\;t\_6\\
\end{array}
\end{array}
if x < -7.6000000000000005e176 or 5.2e13 < x Initial program 23.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites53.8%
if -7.6000000000000005e176 < x < -3.5e37 or 7.80000000000000076e-214 < x < 4.5e-176Initial program 29.5%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites36.6%
if -3.5e37 < x < -7.4000000000000004e-261Initial program 33.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.8%
if -7.4000000000000004e-261 < x < 7.80000000000000076e-214Initial program 36.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.2%
if 4.5e-176 < x < 5.2e13Initial program 29.5%
Taylor expanded in y4 around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* y0 c) (* y1 a)))
(t_2 (- (* y x) (* t z)))
(t_3 (- (* y2 x) (* y3 z)))
(t_4 (- (* y2 t) (* y3 y)))
(t_5 (- (* b a) (* i c)))
(t_6 (- (* y0 b) (* y1 i)))
(t_7 (* (- z) (- (fma t_5 t (* t_1 y3)) (* t_6 k)))))
(if (<= z -5.5e+77)
t_7
(if (<= z -9.5e-200)
(* (- (fma (- i) t_2 (* t_3 y0)) (* t_4 y4)) c)
(if (<= z 3.4e-106)
(* (- (fma t_5 y (* t_1 y2)) (* t_6 j)) x)
(if (<= z 420000000000.0)
(* (fma (- t_3) y1 (fma t_2 b (* t_4 y5))) a)
(if (<= z 1.35e+110)
(*
(- y3)
(-
(fma (- (* y4 y1) (* y5 y0)) j (* t_1 z))
(* (- (* y4 c) (* y5 a)) y)))
t_7)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y0 * c) - (y1 * a);
double t_2 = (y * x) - (t * z);
double t_3 = (y2 * x) - (y3 * z);
double t_4 = (y2 * t) - (y3 * y);
double t_5 = (b * a) - (i * c);
double t_6 = (y0 * b) - (y1 * i);
double t_7 = -z * (fma(t_5, t, (t_1 * y3)) - (t_6 * k));
double tmp;
if (z <= -5.5e+77) {
tmp = t_7;
} else if (z <= -9.5e-200) {
tmp = (fma(-i, t_2, (t_3 * y0)) - (t_4 * y4)) * c;
} else if (z <= 3.4e-106) {
tmp = (fma(t_5, y, (t_1 * y2)) - (t_6 * j)) * x;
} else if (z <= 420000000000.0) {
tmp = fma(-t_3, y1, fma(t_2, b, (t_4 * y5))) * a;
} else if (z <= 1.35e+110) {
tmp = -y3 * (fma(((y4 * y1) - (y5 * y0)), j, (t_1 * z)) - (((y4 * c) - (y5 * a)) * y));
} else {
tmp = t_7;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(y0 * c) - Float64(y1 * a)) t_2 = Float64(Float64(y * x) - Float64(t * z)) t_3 = Float64(Float64(y2 * x) - Float64(y3 * z)) t_4 = Float64(Float64(y2 * t) - Float64(y3 * y)) t_5 = Float64(Float64(b * a) - Float64(i * c)) t_6 = Float64(Float64(y0 * b) - Float64(y1 * i)) t_7 = Float64(Float64(-z) * Float64(fma(t_5, t, Float64(t_1 * y3)) - Float64(t_6 * k))) tmp = 0.0 if (z <= -5.5e+77) tmp = t_7; elseif (z <= -9.5e-200) tmp = Float64(Float64(fma(Float64(-i), t_2, Float64(t_3 * y0)) - Float64(t_4 * y4)) * c); elseif (z <= 3.4e-106) tmp = Float64(Float64(fma(t_5, y, Float64(t_1 * y2)) - Float64(t_6 * j)) * x); elseif (z <= 420000000000.0) tmp = Float64(fma(Float64(-t_3), y1, fma(t_2, b, Float64(t_4 * y5))) * a); elseif (z <= 1.35e+110) tmp = Float64(Float64(-y3) * Float64(fma(Float64(Float64(y4 * y1) - Float64(y5 * y0)), j, Float64(t_1 * z)) - Float64(Float64(Float64(y4 * c) - Float64(y5 * a)) * y))); else tmp = t_7; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y2 * x), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(y2 * t), $MachinePrecision] - N[(y3 * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(b * a), $MachinePrecision] - N[(i * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[((-z) * N[(N[(t$95$5 * t + N[(t$95$1 * y3), $MachinePrecision]), $MachinePrecision] - N[(t$95$6 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.5e+77], t$95$7, If[LessEqual[z, -9.5e-200], N[(N[(N[((-i) * t$95$2 + N[(t$95$3 * y0), $MachinePrecision]), $MachinePrecision] - N[(t$95$4 * y4), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 3.4e-106], N[(N[(N[(t$95$5 * y + N[(t$95$1 * y2), $MachinePrecision]), $MachinePrecision] - N[(t$95$6 * j), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 420000000000.0], N[(N[((-t$95$3) * y1 + N[(t$95$2 * b + N[(t$95$4 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 1.35e+110], N[((-y3) * N[(N[(N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision] * j + N[(t$95$1 * z), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$7]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y0 \cdot c - y1 \cdot a\\
t_2 := y \cdot x - t \cdot z\\
t_3 := y2 \cdot x - y3 \cdot z\\
t_4 := y2 \cdot t - y3 \cdot y\\
t_5 := b \cdot a - i \cdot c\\
t_6 := y0 \cdot b - y1 \cdot i\\
t_7 := \left(-z\right) \cdot \left(\mathsf{fma}\left(t\_5, t, t\_1 \cdot y3\right) - t\_6 \cdot k\right)\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{+77}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-200}:\\
\;\;\;\;\left(\mathsf{fma}\left(-i, t\_2, t\_3 \cdot y0\right) - t\_4 \cdot y4\right) \cdot c\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-106}:\\
\;\;\;\;\left(\mathsf{fma}\left(t\_5, y, t\_1 \cdot y2\right) - t\_6 \cdot j\right) \cdot x\\
\mathbf{elif}\;z \leq 420000000000:\\
\;\;\;\;\mathsf{fma}\left(-t\_3, y1, \mathsf{fma}\left(t\_2, b, t\_4 \cdot y5\right)\right) \cdot a\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+110}:\\
\;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(y4 \cdot y1 - y5 \cdot y0, j, t\_1 \cdot z\right) - \left(y4 \cdot c - y5 \cdot a\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_7\\
\end{array}
\end{array}
if z < -5.50000000000000036e77 or 1.35000000000000005e110 < z Initial program 23.0%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites54.7%
if -5.50000000000000036e77 < z < -9.4999999999999995e-200Initial program 33.1%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites36.9%
if -9.4999999999999995e-200 < z < 3.39999999999999982e-106Initial program 34.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.4%
if 3.39999999999999982e-106 < z < 4.2e11Initial program 31.2%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites44.6%
if 4.2e11 < z < 1.35000000000000005e110Initial program 31.2%
Taylor expanded in y3 around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites36.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* y x) (* t z)))
(t_2 (- (* y2 t) (* y3 y)))
(t_3
(*
(-
(fma (- (* b a) (* i c)) y (* (- (* y0 c) (* y1 a)) y2))
(* (- (* y0 b) (* y1 i)) j))
x))
(t_4 (- (* j t) (* k y))))
(if (<= x -8.5e+176)
t_3
(if (<= x -2.3e+35)
(* (fma (- i) (- (* x y) (* t z)) (* y0 (- (* x y2) (* y3 z)))) c)
(if (<= x -7.4e-261)
(* (- (fma t_1 a (* t_4 y4)) (* (- (* j x) (* k z)) y0)) b)
(if (<= x 6.2e-183)
(* (fma (- (- (* y2 x) (* y3 z))) y1 (fma t_1 b (* t_2 y5))) a)
(if (<= x 52000000000000.0)
(* (- (fma t_4 b (* (- (* y2 k) (* y3 j)) y1)) (* t_2 c)) y4)
t_3)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y * x) - (t * z);
double t_2 = (y2 * t) - (y3 * y);
double t_3 = (fma(((b * a) - (i * c)), y, (((y0 * c) - (y1 * a)) * y2)) - (((y0 * b) - (y1 * i)) * j)) * x;
double t_4 = (j * t) - (k * y);
double tmp;
if (x <= -8.5e+176) {
tmp = t_3;
} else if (x <= -2.3e+35) {
tmp = fma(-i, ((x * y) - (t * z)), (y0 * ((x * y2) - (y3 * z)))) * c;
} else if (x <= -7.4e-261) {
tmp = (fma(t_1, a, (t_4 * y4)) - (((j * x) - (k * z)) * y0)) * b;
} else if (x <= 6.2e-183) {
tmp = fma(-((y2 * x) - (y3 * z)), y1, fma(t_1, b, (t_2 * y5))) * a;
} else if (x <= 52000000000000.0) {
tmp = (fma(t_4, b, (((y2 * k) - (y3 * j)) * y1)) - (t_2 * c)) * y4;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(y * x) - Float64(t * z)) t_2 = Float64(Float64(y2 * t) - Float64(y3 * y)) t_3 = Float64(Float64(fma(Float64(Float64(b * a) - Float64(i * c)), y, Float64(Float64(Float64(y0 * c) - Float64(y1 * a)) * y2)) - Float64(Float64(Float64(y0 * b) - Float64(y1 * i)) * j)) * x) t_4 = Float64(Float64(j * t) - Float64(k * y)) tmp = 0.0 if (x <= -8.5e+176) tmp = t_3; elseif (x <= -2.3e+35) tmp = Float64(fma(Float64(-i), Float64(Float64(x * y) - Float64(t * z)), Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))) * c); elseif (x <= -7.4e-261) tmp = Float64(Float64(fma(t_1, a, Float64(t_4 * y4)) - Float64(Float64(Float64(j * x) - Float64(k * z)) * y0)) * b); elseif (x <= 6.2e-183) tmp = Float64(fma(Float64(-Float64(Float64(y2 * x) - Float64(y3 * z))), y1, fma(t_1, b, Float64(t_2 * y5))) * a); elseif (x <= 52000000000000.0) tmp = Float64(Float64(fma(t_4, b, Float64(Float64(Float64(y2 * k) - Float64(y3 * j)) * y1)) - Float64(t_2 * c)) * y4); else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y2 * t), $MachinePrecision] - N[(y3 * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(b * a), $MachinePrecision] - N[(i * c), $MachinePrecision]), $MachinePrecision] * y + N[(N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision] * y2), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$4 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e+176], t$95$3, If[LessEqual[x, -2.3e+35], N[(N[((-i) * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[x, -7.4e-261], N[(N[(N[(t$95$1 * a + N[(t$95$4 * y4), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision] * y0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 6.2e-183], N[(N[((-N[(N[(y2 * x), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]) * y1 + N[(t$95$1 * b + N[(t$95$2 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, 52000000000000.0], N[(N[(N[(t$95$4 * b + N[(N[(N[(y2 * k), $MachinePrecision] - N[(y3 * j), $MachinePrecision]), $MachinePrecision] * y1), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * c), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot x - t \cdot z\\
t_2 := y2 \cdot t - y3 \cdot y\\
t_3 := \left(\mathsf{fma}\left(b \cdot a - i \cdot c, y, \left(y0 \cdot c - y1 \cdot a\right) \cdot y2\right) - \left(y0 \cdot b - y1 \cdot i\right) \cdot j\right) \cdot x\\
t_4 := j \cdot t - k \cdot y\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+176}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\
\mathbf{elif}\;x \leq -7.4 \cdot 10^{-261}:\\
\;\;\;\;\left(\mathsf{fma}\left(t\_1, a, t\_4 \cdot y4\right) - \left(j \cdot x - k \cdot z\right) \cdot y0\right) \cdot b\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-183}:\\
\;\;\;\;\mathsf{fma}\left(-\left(y2 \cdot x - y3 \cdot z\right), y1, \mathsf{fma}\left(t\_1, b, t\_2 \cdot y5\right)\right) \cdot a\\
\mathbf{elif}\;x \leq 52000000000000:\\
\;\;\;\;\left(\mathsf{fma}\left(t\_4, b, \left(y2 \cdot k - y3 \cdot j\right) \cdot y1\right) - t\_2 \cdot c\right) \cdot y4\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -8.4999999999999995e176 or 5.2e13 < x Initial program 23.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites53.9%
if -8.4999999999999995e176 < x < -2.2999999999999998e35Initial program 27.4%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.2%
Taylor expanded in y4 around 0
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6438.4
Applied rewrites38.4%
if -2.2999999999999998e35 < x < -7.4000000000000004e-261Initial program 33.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.8%
if -7.4000000000000004e-261 < x < 6.19999999999999999e-183Initial program 36.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites36.1%
if 6.19999999999999999e-183 < x < 5.2e13Initial program 33.4%
Taylor expanded in y4 around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites41.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* y0 c) (* y1 a)))
(t_2 (- (* y0 b) (* y1 i)))
(t_3
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) t_2))
(* (- (* x y2) (* z y3)) t_1))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))))
(if (<= t_3 INFINITY)
t_3
(* (- (fma (- (* b a) (* i c)) y (* t_1 y2)) (* t_2 j)) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y0 * c) - (y1 * a);
double t_2 = (y0 * b) - (y1 * i);
double t_3 = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * t_2)) + (((x * y2) - (z * y3)) * t_1)) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = (fma(((b * a) - (i * c)), y, (t_1 * y2)) - (t_2 * j)) * x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(y0 * c) - Float64(y1 * a)) t_2 = Float64(Float64(y0 * b) - Float64(y1 * i)) t_3 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * t_2)) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * t_1)) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(Float64(fma(Float64(Float64(b * a) - Float64(i * c)), y, Float64(t_1 * y2)) - Float64(t_2 * j)) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(N[(N[(N[(N[(b * a), $MachinePrecision] - N[(i * c), $MachinePrecision]), $MachinePrecision] * y + N[(t$95$1 * y2), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * j), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y0 \cdot c - y1 \cdot a\\
t_2 := y0 \cdot b - y1 \cdot i\\
t_3 := \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot t\_2\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot t\_1\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(b \cdot a - i \cdot c, y, t\_1 \cdot y2\right) - t\_2 \cdot j\right) \cdot x\\
\end{array}
\end{array}
if (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) < +inf.0Initial program 91.1%
if +inf.0 < (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) Initial program 0.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* y0 c) (* y1 a)))
(t_2 (- (* y0 b) (* y1 i)))
(t_3
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) t_2))
(* (- (* x y2) (* z y3)) t_1))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))))
(t_4 (- (* y4 y1) (* y5 y0))))
(if (<= (+ t_3 (* (- (* k y2) (* j y3)) t_4)) INFINITY)
(+ t_3 (* (* y2 k) t_4))
(* (- (fma (- (* b a) (* i c)) y (* t_1 y2)) (* t_2 j)) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y0 * c) - (y1 * a);
double t_2 = (y0 * b) - (y1 * i);
double t_3 = ((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * t_2)) + (((x * y2) - (z * y3)) * t_1)) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)));
double t_4 = (y4 * y1) - (y5 * y0);
double tmp;
if ((t_3 + (((k * y2) - (j * y3)) * t_4)) <= ((double) INFINITY)) {
tmp = t_3 + ((y2 * k) * t_4);
} else {
tmp = (fma(((b * a) - (i * c)), y, (t_1 * y2)) - (t_2 * j)) * x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(y0 * c) - Float64(y1 * a)) t_2 = Float64(Float64(y0 * b) - Float64(y1 * i)) t_3 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * t_2)) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * t_1)) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) t_4 = Float64(Float64(y4 * y1) - Float64(y5 * y0)) tmp = 0.0 if (Float64(t_3 + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * t_4)) <= Inf) tmp = Float64(t_3 + Float64(Float64(y2 * k) * t_4)); else tmp = Float64(Float64(fma(Float64(Float64(b * a) - Float64(i * c)), y, Float64(t_1 * y2)) - Float64(t_2 * j)) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$3 + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision], Infinity], N[(t$95$3 + N[(N[(y2 * k), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(b * a), $MachinePrecision] - N[(i * c), $MachinePrecision]), $MachinePrecision] * y + N[(t$95$1 * y2), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * j), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y0 \cdot c - y1 \cdot a\\
t_2 := y0 \cdot b - y1 \cdot i\\
t_3 := \left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot t\_2\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot t\_1\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\\
t_4 := y4 \cdot y1 - y5 \cdot y0\\
\mathbf{if}\;t\_3 + \left(k \cdot y2 - j \cdot y3\right) \cdot t\_4 \leq \infty:\\
\;\;\;\;t\_3 + \left(y2 \cdot k\right) \cdot t\_4\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(b \cdot a - i \cdot c, y, t\_1 \cdot y2\right) - t\_2 \cdot j\right) \cdot x\\
\end{array}
\end{array}
if (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) < +inf.0Initial program 91.1%
Taylor expanded in j around 0
*-commutativeN/A
lower-*.f6484.9
Applied rewrites84.9%
if +inf.0 < (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) Initial program 0.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* j t) (* k y))))
(if (<= y5 -7.5e+74)
(* (* y5 (- (* t y2) (* y y3))) a)
(if (<= y5 -2.3e-287)
(* (fma (- i) (- (* x y) (* t z)) (* y0 (- (* x y2) (* y3 z)))) c)
(if (<= y5 6.2e-169)
(*
(-
(fma t_1 b (* (- (* y2 k) (* y3 j)) y1))
(* (- (* y2 t) (* y3 y)) c))
y4)
(if (<= y5 5.2e+104)
(*
(-
(fma (- (* y x) (* t z)) a (* t_1 y4))
(* (- (* j x) (* k z)) y0))
b)
(* (* j (- (* b y4) (* i y5))) t)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (j * t) - (k * y);
double tmp;
if (y5 <= -7.5e+74) {
tmp = (y5 * ((t * y2) - (y * y3))) * a;
} else if (y5 <= -2.3e-287) {
tmp = fma(-i, ((x * y) - (t * z)), (y0 * ((x * y2) - (y3 * z)))) * c;
} else if (y5 <= 6.2e-169) {
tmp = (fma(t_1, b, (((y2 * k) - (y3 * j)) * y1)) - (((y2 * t) - (y3 * y)) * c)) * y4;
} else if (y5 <= 5.2e+104) {
tmp = (fma(((y * x) - (t * z)), a, (t_1 * y4)) - (((j * x) - (k * z)) * y0)) * b;
} else {
tmp = (j * ((b * y4) - (i * y5))) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(j * t) - Float64(k * y)) tmp = 0.0 if (y5 <= -7.5e+74) tmp = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a); elseif (y5 <= -2.3e-287) tmp = Float64(fma(Float64(-i), Float64(Float64(x * y) - Float64(t * z)), Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))) * c); elseif (y5 <= 6.2e-169) tmp = Float64(Float64(fma(t_1, b, Float64(Float64(Float64(y2 * k) - Float64(y3 * j)) * y1)) - Float64(Float64(Float64(y2 * t) - Float64(y3 * y)) * c)) * y4); elseif (y5 <= 5.2e+104) tmp = Float64(Float64(fma(Float64(Float64(y * x) - Float64(t * z)), a, Float64(t_1 * y4)) - Float64(Float64(Float64(j * x) - Float64(k * z)) * y0)) * b); else tmp = Float64(Float64(j * Float64(Float64(b * y4) - Float64(i * y5))) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -7.5e+74], N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y5, -2.3e-287], N[(N[((-i) * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y5, 6.2e-169], N[(N[(N[(t$95$1 * b + N[(N[(N[(y2 * k), $MachinePrecision] - N[(y3 * j), $MachinePrecision]), $MachinePrecision] * y1), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y2 * t), $MachinePrecision] - N[(y3 * y), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision], If[LessEqual[y5, 5.2e+104], N[(N[(N[(N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] * a + N[(t$95$1 * y4), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision] * y0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[(N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
\mathbf{if}\;y5 \leq -7.5 \cdot 10^{+74}:\\
\;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\
\mathbf{elif}\;y5 \leq -2.3 \cdot 10^{-287}:\\
\;\;\;\;\mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\
\mathbf{elif}\;y5 \leq 6.2 \cdot 10^{-169}:\\
\;\;\;\;\left(\mathsf{fma}\left(t\_1, b, \left(y2 \cdot k - y3 \cdot j\right) \cdot y1\right) - \left(y2 \cdot t - y3 \cdot y\right) \cdot c\right) \cdot y4\\
\mathbf{elif}\;y5 \leq 5.2 \cdot 10^{+104}:\\
\;\;\;\;\left(\mathsf{fma}\left(y \cdot x - t \cdot z, a, t\_1 \cdot y4\right) - \left(j \cdot x - k \cdot z\right) \cdot y0\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\
\end{array}
\end{array}
if y5 < -7.5e74Initial program 23.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites41.5%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6424.7
Applied rewrites24.7%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6442.6
Applied rewrites42.6%
if -7.5e74 < y5 < -2.29999999999999986e-287Initial program 34.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.2%
Taylor expanded in y4 around 0
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6437.1
Applied rewrites37.1%
if -2.29999999999999986e-287 < y5 < 6.2000000000000004e-169Initial program 33.6%
Taylor expanded in y4 around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.1%
if 6.2000000000000004e-169 < y5 < 5.20000000000000001e104Initial program 32.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites38.4%
if 5.20000000000000001e104 < y5 Initial program 20.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.0%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.1
Applied rewrites35.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* t y2) (* y y3)))
(t_2 (- (* y0 c) (* y1 a)))
(t_3 (- (* y0 b) (* y1 i)))
(t_4 (- (* a b) (* c i))))
(if (<=
(+
(-
(+
(+
(- (* (- (* x y) (* z t)) t_4) (* (- (* x j) (* z k)) t_3))
(* (- (* x y2) (* z y3)) t_2))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* t_1 (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
INFINITY)
(-
(fma
(- j)
(* y3 (- (* y1 y4) (* y0 y5)))
(fma
(* j t)
(- (* b y4) (* i y5))
(fma
t_4
(- (* x y) (* t z))
(* (- (* c y0) (* a y1)) (- (* x y2) (* y3 z))))))
(fma (* j x) (- (* b y0) (* i y1)) (* (- (* c y4) (* a y5)) t_1)))
(* (- (fma (- (* b a) (* i c)) y (* t_2 y2)) (* t_3 j)) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (t * y2) - (y * y3);
double t_2 = (y0 * c) - (y1 * a);
double t_3 = (y0 * b) - (y1 * i);
double t_4 = (a * b) - (c * i);
double tmp;
if (((((((((x * y) - (z * t)) * t_4) - (((x * j) - (z * k)) * t_3)) + (((x * y2) - (z * y3)) * t_2)) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (t_1 * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))) <= ((double) INFINITY)) {
tmp = fma(-j, (y3 * ((y1 * y4) - (y0 * y5))), fma((j * t), ((b * y4) - (i * y5)), fma(t_4, ((x * y) - (t * z)), (((c * y0) - (a * y1)) * ((x * y2) - (y3 * z)))))) - fma((j * x), ((b * y0) - (i * y1)), (((c * y4) - (a * y5)) * t_1));
} else {
tmp = (fma(((b * a) - (i * c)), y, (t_2 * y2)) - (t_3 * j)) * x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(t * y2) - Float64(y * y3)) t_2 = Float64(Float64(y0 * c) - Float64(y1 * a)) t_3 = Float64(Float64(y0 * b) - Float64(y1 * i)) t_4 = Float64(Float64(a * b) - Float64(c * i)) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * t_4) - Float64(Float64(Float64(x * j) - Float64(z * k)) * t_3)) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * t_2)) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(t_1 * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) <= Inf) tmp = Float64(fma(Float64(-j), Float64(y3 * Float64(Float64(y1 * y4) - Float64(y0 * y5))), fma(Float64(j * t), Float64(Float64(b * y4) - Float64(i * y5)), fma(t_4, Float64(Float64(x * y) - Float64(t * z)), Float64(Float64(Float64(c * y0) - Float64(a * y1)) * Float64(Float64(x * y2) - Float64(y3 * z)))))) - fma(Float64(j * x), Float64(Float64(b * y0) - Float64(i * y1)), Float64(Float64(Float64(c * y4) - Float64(a * y5)) * t_1))); else tmp = Float64(Float64(fma(Float64(Float64(b * a) - Float64(i * c)), y, Float64(t_2 * y2)) - Float64(t_3 * j)) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[((-j) * N[(y3 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(j * t), $MachinePrecision] * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision] * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * x), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(b * a), $MachinePrecision] - N[(i * c), $MachinePrecision]), $MachinePrecision] * y + N[(t$95$2 * y2), $MachinePrecision]), $MachinePrecision] - N[(t$95$3 * j), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot y2 - y \cdot y3\\
t_2 := y0 \cdot c - y1 \cdot a\\
t_3 := y0 \cdot b - y1 \cdot i\\
t_4 := a \cdot b - c \cdot i\\
\mathbf{if}\;\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot t\_4 - \left(x \cdot j - z \cdot k\right) \cdot t\_3\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot t\_2\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - t\_1 \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(-j, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), \mathsf{fma}\left(j \cdot t, b \cdot y4 - i \cdot y5, \mathsf{fma}\left(t\_4, x \cdot y - t \cdot z, \left(c \cdot y0 - a \cdot y1\right) \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\right)\right) - \mathsf{fma}\left(j \cdot x, b \cdot y0 - i \cdot y1, \left(c \cdot y4 - a \cdot y5\right) \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(b \cdot a - i \cdot c, y, t\_2 \cdot y2\right) - t\_3 \cdot j\right) \cdot x\\
\end{array}
\end{array}
if (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) < +inf.0Initial program 91.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites42.1%
Taylor expanded in k around 0
Applied rewrites71.7%
if +inf.0 < (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) Initial program 0.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (fma (- y) y5 (* y1 z))))
(if (<= y3 -2.7e+85)
(* (* a y3) t_1)
(if (<= y3 1.96e+28)
(*
(-
(fma (- (* b a) (* i c)) y (* (- (* y0 c) (* y1 a)) y2))
(* (- (* y0 b) (* y1 i)) j))
x)
(* (* y3 t_1) a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = fma(-y, y5, (y1 * z));
double tmp;
if (y3 <= -2.7e+85) {
tmp = (a * y3) * t_1;
} else if (y3 <= 1.96e+28) {
tmp = (fma(((b * a) - (i * c)), y, (((y0 * c) - (y1 * a)) * y2)) - (((y0 * b) - (y1 * i)) * j)) * x;
} else {
tmp = (y3 * t_1) * a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = fma(Float64(-y), y5, Float64(y1 * z)) tmp = 0.0 if (y3 <= -2.7e+85) tmp = Float64(Float64(a * y3) * t_1); elseif (y3 <= 1.96e+28) tmp = Float64(Float64(fma(Float64(Float64(b * a) - Float64(i * c)), y, Float64(Float64(Float64(y0 * c) - Float64(y1 * a)) * y2)) - Float64(Float64(Float64(y0 * b) - Float64(y1 * i)) * j)) * x); else tmp = Float64(Float64(y3 * t_1) * a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[((-y) * y5 + N[(y1 * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y3, -2.7e+85], N[(N[(a * y3), $MachinePrecision] * t$95$1), $MachinePrecision], If[LessEqual[y3, 1.96e+28], N[(N[(N[(N[(N[(b * a), $MachinePrecision] - N[(i * c), $MachinePrecision]), $MachinePrecision] * y + N[(N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision] * y2), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[(y3 * t$95$1), $MachinePrecision] * a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, y5, y1 \cdot z\right)\\
\mathbf{if}\;y3 \leq -2.7 \cdot 10^{+85}:\\
\;\;\;\;\left(a \cdot y3\right) \cdot t\_1\\
\mathbf{elif}\;y3 \leq 1.96 \cdot 10^{+28}:\\
\;\;\;\;\left(\mathsf{fma}\left(b \cdot a - i \cdot c, y, \left(y0 \cdot c - y1 \cdot a\right) \cdot y2\right) - \left(y0 \cdot b - y1 \cdot i\right) \cdot j\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(y3 \cdot t\_1\right) \cdot a\\
\end{array}
\end{array}
if y3 < -2.69999999999999983e85Initial program 22.2%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.9%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6437.9
Applied rewrites37.9%
if -2.69999999999999983e85 < y3 < 1.96000000000000006e28Initial program 33.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.8%
if 1.96000000000000006e28 < y3 Initial program 25.2%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.2%
Taylor expanded in y3 around inf
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= i -2.6e+234)
(* (* j (- (* b y4) (* i y5))) t)
(if (<= i -4.8e+130)
(* (- z) (* y0 (- (* c y3) (* b k))))
(if (<= i -3.9e-109)
(* (* y3 (fma (- y) y5 (* y1 z))) a)
(if (<= i -3.9e-280)
(* (* b z) (fma (- a) t (* k y0)))
(if (<= i 2.6e+18)
(* (* y2 (- (* c y0) (* a y1))) x)
(if (<= i 1.6e+126)
(* (* y5 (- (* t y2) (* y y3))) a)
(* (* y (- (* a b) (* c i))) x))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (i <= -2.6e+234) {
tmp = (j * ((b * y4) - (i * y5))) * t;
} else if (i <= -4.8e+130) {
tmp = -z * (y0 * ((c * y3) - (b * k)));
} else if (i <= -3.9e-109) {
tmp = (y3 * fma(-y, y5, (y1 * z))) * a;
} else if (i <= -3.9e-280) {
tmp = (b * z) * fma(-a, t, (k * y0));
} else if (i <= 2.6e+18) {
tmp = (y2 * ((c * y0) - (a * y1))) * x;
} else if (i <= 1.6e+126) {
tmp = (y5 * ((t * y2) - (y * y3))) * a;
} else {
tmp = (y * ((a * b) - (c * i))) * x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (i <= -2.6e+234) tmp = Float64(Float64(j * Float64(Float64(b * y4) - Float64(i * y5))) * t); elseif (i <= -4.8e+130) tmp = Float64(Float64(-z) * Float64(y0 * Float64(Float64(c * y3) - Float64(b * k)))); elseif (i <= -3.9e-109) tmp = Float64(Float64(y3 * fma(Float64(-y), y5, Float64(y1 * z))) * a); elseif (i <= -3.9e-280) tmp = Float64(Float64(b * z) * fma(Float64(-a), t, Float64(k * y0))); elseif (i <= 2.6e+18) tmp = Float64(Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1))) * x); elseif (i <= 1.6e+126) tmp = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a); else tmp = Float64(Float64(y * Float64(Float64(a * b) - Float64(c * i))) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[i, -2.6e+234], N[(N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[i, -4.8e+130], N[((-z) * N[(y0 * N[(N[(c * y3), $MachinePrecision] - N[(b * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -3.9e-109], N[(N[(y3 * N[((-y) * y5 + N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[i, -3.9e-280], N[(N[(b * z), $MachinePrecision] * N[((-a) * t + N[(k * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.6e+18], N[(N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[i, 1.6e+126], N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -2.6 \cdot 10^{+234}:\\
\;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\
\mathbf{elif}\;i \leq -4.8 \cdot 10^{+130}:\\
\;\;\;\;\left(-z\right) \cdot \left(y0 \cdot \left(c \cdot y3 - b \cdot k\right)\right)\\
\mathbf{elif}\;i \leq -3.9 \cdot 10^{-109}:\\
\;\;\;\;\left(y3 \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right)\right) \cdot a\\
\mathbf{elif}\;i \leq -3.9 \cdot 10^{-280}:\\
\;\;\;\;\left(b \cdot z\right) \cdot \mathsf{fma}\left(-a, t, k \cdot y0\right)\\
\mathbf{elif}\;i \leq 2.6 \cdot 10^{+18}:\\
\;\;\;\;\left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) \cdot x\\
\mathbf{elif}\;i \leq 1.6 \cdot 10^{+126}:\\
\;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(a \cdot b - c \cdot i\right)\right) \cdot x\\
\end{array}
\end{array}
if i < -2.60000000000000015e234Initial program 20.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.5%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
if -2.60000000000000015e234 < i < -4.80000000000000048e130Initial program 25.2%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites39.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6425.0
Applied rewrites25.0%
if -4.80000000000000048e130 < i < -3.90000000000000023e-109Initial program 32.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.4%
Taylor expanded in y3 around inf
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6426.1
Applied rewrites26.1%
if -3.90000000000000023e-109 < i < -3.89999999999999998e-280Initial program 34.6%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites38.0%
Taylor expanded in b around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6427.8
Applied rewrites27.8%
if -3.89999999999999998e-280 < i < 2.6e18Initial program 33.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.2%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.7
Applied rewrites27.7%
if 2.6e18 < i < 1.5999999999999999e126Initial program 28.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites38.6%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6427.6
Applied rewrites27.6%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3
Applied rewrites27.3%
if 1.5999999999999999e126 < i Initial program 21.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6437.0
Applied rewrites37.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y5 -2.2e+47)
(* (* y5 (- (* t y2) (* y y3))) a)
(if (<= y5 -9.5e-101)
(* (* k z) (- (* b y0) (* i y1)))
(if (<= y5 -2.4e-287)
(* (* y0 (- (* x y2) (* y3 z))) c)
(if (<= y5 3.5e-179)
(* (* y1 (- (* y3 z) (* x y2))) a)
(if (<= y5 4.3e+104)
(* (- (* a (* x y)) (* (- (* j x) (* k z)) y0)) b)
(* (* j (- (* b y4) (* i y5))) t)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -2.2e+47) {
tmp = (y5 * ((t * y2) - (y * y3))) * a;
} else if (y5 <= -9.5e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= -2.4e-287) {
tmp = (y0 * ((x * y2) - (y3 * z))) * c;
} else if (y5 <= 3.5e-179) {
tmp = (y1 * ((y3 * z) - (x * y2))) * a;
} else if (y5 <= 4.3e+104) {
tmp = ((a * (x * y)) - (((j * x) - (k * z)) * y0)) * b;
} else {
tmp = (j * ((b * y4) - (i * y5))) * t;
}
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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y5 <= (-2.2d+47)) then
tmp = (y5 * ((t * y2) - (y * y3))) * a
else if (y5 <= (-9.5d-101)) then
tmp = (k * z) * ((b * y0) - (i * y1))
else if (y5 <= (-2.4d-287)) then
tmp = (y0 * ((x * y2) - (y3 * z))) * c
else if (y5 <= 3.5d-179) then
tmp = (y1 * ((y3 * z) - (x * y2))) * a
else if (y5 <= 4.3d+104) then
tmp = ((a * (x * y)) - (((j * x) - (k * z)) * y0)) * b
else
tmp = (j * ((b * y4) - (i * y5))) * t
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 y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -2.2e+47) {
tmp = (y5 * ((t * y2) - (y * y3))) * a;
} else if (y5 <= -9.5e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= -2.4e-287) {
tmp = (y0 * ((x * y2) - (y3 * z))) * c;
} else if (y5 <= 3.5e-179) {
tmp = (y1 * ((y3 * z) - (x * y2))) * a;
} else if (y5 <= 4.3e+104) {
tmp = ((a * (x * y)) - (((j * x) - (k * z)) * y0)) * b;
} else {
tmp = (j * ((b * y4) - (i * y5))) * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y5 <= -2.2e+47: tmp = (y5 * ((t * y2) - (y * y3))) * a elif y5 <= -9.5e-101: tmp = (k * z) * ((b * y0) - (i * y1)) elif y5 <= -2.4e-287: tmp = (y0 * ((x * y2) - (y3 * z))) * c elif y5 <= 3.5e-179: tmp = (y1 * ((y3 * z) - (x * y2))) * a elif y5 <= 4.3e+104: tmp = ((a * (x * y)) - (((j * x) - (k * z)) * y0)) * b else: tmp = (j * ((b * y4) - (i * y5))) * t return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y5 <= -2.2e+47) tmp = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a); elseif (y5 <= -9.5e-101) tmp = Float64(Float64(k * z) * Float64(Float64(b * y0) - Float64(i * y1))); elseif (y5 <= -2.4e-287) tmp = Float64(Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))) * c); elseif (y5 <= 3.5e-179) tmp = Float64(Float64(y1 * Float64(Float64(y3 * z) - Float64(x * y2))) * a); elseif (y5 <= 4.3e+104) tmp = Float64(Float64(Float64(a * Float64(x * y)) - Float64(Float64(Float64(j * x) - Float64(k * z)) * y0)) * b); else tmp = Float64(Float64(j * Float64(Float64(b * y4) - Float64(i * y5))) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y5 <= -2.2e+47) tmp = (y5 * ((t * y2) - (y * y3))) * a; elseif (y5 <= -9.5e-101) tmp = (k * z) * ((b * y0) - (i * y1)); elseif (y5 <= -2.4e-287) tmp = (y0 * ((x * y2) - (y3 * z))) * c; elseif (y5 <= 3.5e-179) tmp = (y1 * ((y3 * z) - (x * y2))) * a; elseif (y5 <= 4.3e+104) tmp = ((a * (x * y)) - (((j * x) - (k * z)) * y0)) * b; else tmp = (j * ((b * y4) - (i * y5))) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -2.2e+47], N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y5, -9.5e-101], N[(N[(k * z), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.4e-287], N[(N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y5, 3.5e-179], N[(N[(y1 * N[(N[(y3 * z), $MachinePrecision] - N[(x * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y5, 4.3e+104], N[(N[(N[(a * N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision] * y0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[(N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\
\;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\
\mathbf{elif}\;y5 \leq -9.5 \cdot 10^{-101}:\\
\;\;\;\;\left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right)\\
\mathbf{elif}\;y5 \leq -2.4 \cdot 10^{-287}:\\
\;\;\;\;\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\
\mathbf{elif}\;y5 \leq 3.5 \cdot 10^{-179}:\\
\;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\
\mathbf{elif}\;y5 \leq 4.3 \cdot 10^{+104}:\\
\;\;\;\;\left(a \cdot \left(x \cdot y\right) - \left(j \cdot x - k \cdot z\right) \cdot y0\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\
\end{array}
\end{array}
if y5 < -2.1999999999999999e47Initial program 23.7%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites41.5%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6425.1
Applied rewrites25.1%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.1
Applied rewrites41.1%
if -2.1999999999999999e47 < y5 < -9.49999999999999994e-101Initial program 33.9%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites38.4%
Taylor expanded in k around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
if -9.49999999999999994e-101 < y5 < -2.39999999999999999e-287Initial program 36.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.8%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if -2.39999999999999999e-287 < y5 < 3.50000000000000024e-179Initial program 33.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.0%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6428.4
Applied rewrites28.4%
if 3.50000000000000024e-179 < y5 < 4.3000000000000002e104Initial program 33.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites38.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6431.1
Applied rewrites31.1%
if 4.3000000000000002e104 < y5 Initial program 20.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.0%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.1
Applied rewrites35.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y5 -2.2e+47)
(* (* y5 (- (* t y2) (* y y3))) a)
(if (<= y5 -9.5e-101)
(* (* k z) (- (* b y0) (* i y1)))
(if (<= y5 -2.4e-287)
(* (* y0 (- (* x y2) (* y3 z))) c)
(if (<= y5 9.6e-179)
(* (* y1 (- (* y3 z) (* x y2))) a)
(if (<= y5 1.02e-62)
(* (* b (- (* a y) (* j y0))) x)
(* (* j (- (* b y4) (* i y5))) t)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -2.2e+47) {
tmp = (y5 * ((t * y2) - (y * y3))) * a;
} else if (y5 <= -9.5e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= -2.4e-287) {
tmp = (y0 * ((x * y2) - (y3 * z))) * c;
} else if (y5 <= 9.6e-179) {
tmp = (y1 * ((y3 * z) - (x * y2))) * a;
} else if (y5 <= 1.02e-62) {
tmp = (b * ((a * y) - (j * y0))) * x;
} else {
tmp = (j * ((b * y4) - (i * y5))) * t;
}
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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y5 <= (-2.2d+47)) then
tmp = (y5 * ((t * y2) - (y * y3))) * a
else if (y5 <= (-9.5d-101)) then
tmp = (k * z) * ((b * y0) - (i * y1))
else if (y5 <= (-2.4d-287)) then
tmp = (y0 * ((x * y2) - (y3 * z))) * c
else if (y5 <= 9.6d-179) then
tmp = (y1 * ((y3 * z) - (x * y2))) * a
else if (y5 <= 1.02d-62) then
tmp = (b * ((a * y) - (j * y0))) * x
else
tmp = (j * ((b * y4) - (i * y5))) * t
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 y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -2.2e+47) {
tmp = (y5 * ((t * y2) - (y * y3))) * a;
} else if (y5 <= -9.5e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= -2.4e-287) {
tmp = (y0 * ((x * y2) - (y3 * z))) * c;
} else if (y5 <= 9.6e-179) {
tmp = (y1 * ((y3 * z) - (x * y2))) * a;
} else if (y5 <= 1.02e-62) {
tmp = (b * ((a * y) - (j * y0))) * x;
} else {
tmp = (j * ((b * y4) - (i * y5))) * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y5 <= -2.2e+47: tmp = (y5 * ((t * y2) - (y * y3))) * a elif y5 <= -9.5e-101: tmp = (k * z) * ((b * y0) - (i * y1)) elif y5 <= -2.4e-287: tmp = (y0 * ((x * y2) - (y3 * z))) * c elif y5 <= 9.6e-179: tmp = (y1 * ((y3 * z) - (x * y2))) * a elif y5 <= 1.02e-62: tmp = (b * ((a * y) - (j * y0))) * x else: tmp = (j * ((b * y4) - (i * y5))) * t return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y5 <= -2.2e+47) tmp = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a); elseif (y5 <= -9.5e-101) tmp = Float64(Float64(k * z) * Float64(Float64(b * y0) - Float64(i * y1))); elseif (y5 <= -2.4e-287) tmp = Float64(Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))) * c); elseif (y5 <= 9.6e-179) tmp = Float64(Float64(y1 * Float64(Float64(y3 * z) - Float64(x * y2))) * a); elseif (y5 <= 1.02e-62) tmp = Float64(Float64(b * Float64(Float64(a * y) - Float64(j * y0))) * x); else tmp = Float64(Float64(j * Float64(Float64(b * y4) - Float64(i * y5))) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y5 <= -2.2e+47) tmp = (y5 * ((t * y2) - (y * y3))) * a; elseif (y5 <= -9.5e-101) tmp = (k * z) * ((b * y0) - (i * y1)); elseif (y5 <= -2.4e-287) tmp = (y0 * ((x * y2) - (y3 * z))) * c; elseif (y5 <= 9.6e-179) tmp = (y1 * ((y3 * z) - (x * y2))) * a; elseif (y5 <= 1.02e-62) tmp = (b * ((a * y) - (j * y0))) * x; else tmp = (j * ((b * y4) - (i * y5))) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -2.2e+47], N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y5, -9.5e-101], N[(N[(k * z), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.4e-287], N[(N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y5, 9.6e-179], N[(N[(y1 * N[(N[(y3 * z), $MachinePrecision] - N[(x * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y5, 1.02e-62], N[(N[(b * N[(N[(a * y), $MachinePrecision] - N[(j * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\
\;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\
\mathbf{elif}\;y5 \leq -9.5 \cdot 10^{-101}:\\
\;\;\;\;\left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right)\\
\mathbf{elif}\;y5 \leq -2.4 \cdot 10^{-287}:\\
\;\;\;\;\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\
\mathbf{elif}\;y5 \leq 9.6 \cdot 10^{-179}:\\
\;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\
\mathbf{elif}\;y5 \leq 1.02 \cdot 10^{-62}:\\
\;\;\;\;\left(b \cdot \left(a \cdot y - j \cdot y0\right)\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\
\end{array}
\end{array}
if y5 < -2.1999999999999999e47Initial program 23.7%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites41.5%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6425.1
Applied rewrites25.1%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.1
Applied rewrites41.1%
if -2.1999999999999999e47 < y5 < -9.49999999999999994e-101Initial program 33.9%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites38.4%
Taylor expanded in k around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
if -9.49999999999999994e-101 < y5 < -2.39999999999999999e-287Initial program 36.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.8%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if -2.39999999999999999e-287 < y5 < 9.6000000000000002e-179Initial program 33.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites36.9%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6428.5
Applied rewrites28.5%
if 9.6000000000000002e-179 < y5 < 1.02000000000000005e-62Initial program 34.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6429.6
Applied rewrites29.6%
if 1.02000000000000005e-62 < y5 Initial program 25.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites36.9%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6432.3
Applied rewrites32.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y5 -7.5e+74)
(* (* y5 (- (* t y2) (* y y3))) a)
(if (<= y5 8.5e+77)
(* (fma (- i) (- (* x y) (* t z)) (* y0 (- (* x y2) (* y3 z)))) c)
(* (* j (- (* b y4) (* i y5))) t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -7.5e+74) {
tmp = (y5 * ((t * y2) - (y * y3))) * a;
} else if (y5 <= 8.5e+77) {
tmp = fma(-i, ((x * y) - (t * z)), (y0 * ((x * y2) - (y3 * z)))) * c;
} else {
tmp = (j * ((b * y4) - (i * y5))) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y5 <= -7.5e+74) tmp = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a); elseif (y5 <= 8.5e+77) tmp = Float64(fma(Float64(-i), Float64(Float64(x * y) - Float64(t * z)), Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))) * c); else tmp = Float64(Float64(j * Float64(Float64(b * y4) - Float64(i * y5))) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -7.5e+74], N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y5, 8.5e+77], N[(N[((-i) * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], N[(N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -7.5 \cdot 10^{+74}:\\
\;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\
\mathbf{elif}\;y5 \leq 8.5 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(-i, x \cdot y - t \cdot z, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\
\end{array}
\end{array}
if y5 < -7.5e74Initial program 23.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites41.5%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6424.7
Applied rewrites24.7%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6442.6
Applied rewrites42.6%
if -7.5e74 < y5 < 8.50000000000000018e77Initial program 33.9%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.1%
Taylor expanded in y4 around 0
associate-*r*N/A
mul-1-negN/A
lift-neg.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6436.7
Applied rewrites36.7%
if 8.50000000000000018e77 < y5 Initial program 22.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.3%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6434.5
Applied rewrites34.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (* y1 (fma (- a) y2 (* i j))) x)))
(if (<= y1 -1.25e+34)
t_1
(if (<= y1 2.7e-281)
(* (* y5 (- (* t y2) (* y y3))) a)
(if (<= y1 2.05e+49)
(* (* j (- (* b y4) (* i y5))) t)
(if (<= y1 3.2e+167) (* (* y3 (fma (- y) y5 (* y1 z))) a) 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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y1 * fma(-a, y2, (i * j))) * x;
double tmp;
if (y1 <= -1.25e+34) {
tmp = t_1;
} else if (y1 <= 2.7e-281) {
tmp = (y5 * ((t * y2) - (y * y3))) * a;
} else if (y1 <= 2.05e+49) {
tmp = (j * ((b * y4) - (i * y5))) * t;
} else if (y1 <= 3.2e+167) {
tmp = (y3 * fma(-y, y5, (y1 * z))) * a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(y1 * fma(Float64(-a), y2, Float64(i * j))) * x) tmp = 0.0 if (y1 <= -1.25e+34) tmp = t_1; elseif (y1 <= 2.7e-281) tmp = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a); elseif (y1 <= 2.05e+49) tmp = Float64(Float64(j * Float64(Float64(b * y4) - Float64(i * y5))) * t); elseif (y1 <= 3.2e+167) tmp = Float64(Float64(y3 * fma(Float64(-y), y5, Float64(y1 * z))) * a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y1 * N[((-a) * y2 + N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y1, -1.25e+34], t$95$1, If[LessEqual[y1, 2.7e-281], N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y1, 2.05e+49], N[(N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y1, 3.2e+167], N[(N[(y3 * N[((-y) * y5 + N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y1 \cdot \mathsf{fma}\left(-a, y2, i \cdot j\right)\right) \cdot x\\
\mathbf{if}\;y1 \leq -1.25 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y1 \leq 2.7 \cdot 10^{-281}:\\
\;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\
\mathbf{elif}\;y1 \leq 2.05 \cdot 10^{+49}:\\
\;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\
\mathbf{elif}\;y1 \leq 3.2 \cdot 10^{+167}:\\
\;\;\;\;\left(y3 \cdot \mathsf{fma}\left(-y, y5, y1 \cdot z\right)\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y1 < -1.25e34 or 3.19999999999999981e167 < y1 Initial program 23.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites38.9%
Taylor expanded in y1 around inf
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
distribute-lft-neg-outN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6442.9
Applied rewrites42.9%
if -1.25e34 < y1 < 2.6999999999999999e-281Initial program 34.2%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6415.4
Applied rewrites15.4%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5
Applied rewrites27.5%
if 2.6999999999999999e-281 < y1 < 2.05e49Initial program 33.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6428.5
Applied rewrites28.5%
if 2.05e49 < y1 < 3.19999999999999981e167Initial program 27.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.4%
Taylor expanded in y3 around inf
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6433.3
Applied rewrites33.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y5 -2.2e+47)
(* (* y5 (- (* t y2) (* y y3))) a)
(if (<= y5 -9.5e-101)
(* (* k z) (- (* b y0) (* i y1)))
(if (<= y5 -2.4e-287)
(* (* y0 (- (* x y2) (* y3 z))) c)
(if (<= y5 7.8e-169)
(* (* y1 (- (* y3 z) (* x y2))) a)
(* (* j (- (* b y4) (* i y5))) t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -2.2e+47) {
tmp = (y5 * ((t * y2) - (y * y3))) * a;
} else if (y5 <= -9.5e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= -2.4e-287) {
tmp = (y0 * ((x * y2) - (y3 * z))) * c;
} else if (y5 <= 7.8e-169) {
tmp = (y1 * ((y3 * z) - (x * y2))) * a;
} else {
tmp = (j * ((b * y4) - (i * y5))) * t;
}
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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y5 <= (-2.2d+47)) then
tmp = (y5 * ((t * y2) - (y * y3))) * a
else if (y5 <= (-9.5d-101)) then
tmp = (k * z) * ((b * y0) - (i * y1))
else if (y5 <= (-2.4d-287)) then
tmp = (y0 * ((x * y2) - (y3 * z))) * c
else if (y5 <= 7.8d-169) then
tmp = (y1 * ((y3 * z) - (x * y2))) * a
else
tmp = (j * ((b * y4) - (i * y5))) * t
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 y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -2.2e+47) {
tmp = (y5 * ((t * y2) - (y * y3))) * a;
} else if (y5 <= -9.5e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= -2.4e-287) {
tmp = (y0 * ((x * y2) - (y3 * z))) * c;
} else if (y5 <= 7.8e-169) {
tmp = (y1 * ((y3 * z) - (x * y2))) * a;
} else {
tmp = (j * ((b * y4) - (i * y5))) * t;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y5 <= -2.2e+47: tmp = (y5 * ((t * y2) - (y * y3))) * a elif y5 <= -9.5e-101: tmp = (k * z) * ((b * y0) - (i * y1)) elif y5 <= -2.4e-287: tmp = (y0 * ((x * y2) - (y3 * z))) * c elif y5 <= 7.8e-169: tmp = (y1 * ((y3 * z) - (x * y2))) * a else: tmp = (j * ((b * y4) - (i * y5))) * t return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y5 <= -2.2e+47) tmp = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a); elseif (y5 <= -9.5e-101) tmp = Float64(Float64(k * z) * Float64(Float64(b * y0) - Float64(i * y1))); elseif (y5 <= -2.4e-287) tmp = Float64(Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))) * c); elseif (y5 <= 7.8e-169) tmp = Float64(Float64(y1 * Float64(Float64(y3 * z) - Float64(x * y2))) * a); else tmp = Float64(Float64(j * Float64(Float64(b * y4) - Float64(i * y5))) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y5 <= -2.2e+47) tmp = (y5 * ((t * y2) - (y * y3))) * a; elseif (y5 <= -9.5e-101) tmp = (k * z) * ((b * y0) - (i * y1)); elseif (y5 <= -2.4e-287) tmp = (y0 * ((x * y2) - (y3 * z))) * c; elseif (y5 <= 7.8e-169) tmp = (y1 * ((y3 * z) - (x * y2))) * a; else tmp = (j * ((b * y4) - (i * y5))) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -2.2e+47], N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[y5, -9.5e-101], N[(N[(k * z), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.4e-287], N[(N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y5, 7.8e-169], N[(N[(y1 * N[(N[(y3 * z), $MachinePrecision] - N[(x * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], N[(N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\
\;\;\;\;\left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\
\mathbf{elif}\;y5 \leq -9.5 \cdot 10^{-101}:\\
\;\;\;\;\left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right)\\
\mathbf{elif}\;y5 \leq -2.4 \cdot 10^{-287}:\\
\;\;\;\;\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\
\mathbf{elif}\;y5 \leq 7.8 \cdot 10^{-169}:\\
\;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) \cdot t\\
\end{array}
\end{array}
if y5 < -2.1999999999999999e47Initial program 23.7%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites41.5%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6425.1
Applied rewrites25.1%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.1
Applied rewrites41.1%
if -2.1999999999999999e47 < y5 < -9.49999999999999994e-101Initial program 33.9%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites38.4%
Taylor expanded in k around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
if -9.49999999999999994e-101 < y5 < -2.39999999999999999e-287Initial program 36.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.8%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if -2.39999999999999999e-287 < y5 < 7.79999999999999954e-169Initial program 33.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites36.1%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6427.6
Applied rewrites27.6%
if 7.79999999999999954e-169 < y5 Initial program 27.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.0%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6429.7
Applied rewrites29.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (* y5 (- (* t y2) (* y y3))) a)))
(if (<= y5 -2.2e+47)
t_1
(if (<= y5 -9.5e-101)
(* (* k z) (- (* b y0) (* i y1)))
(if (<= y5 -2.4e-287)
(* (* y0 (- (* x y2) (* y3 z))) c)
(if (<= y5 2.1e+108) (* (* y1 (- (* y3 z) (* x y2))) a) 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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y5 * ((t * y2) - (y * y3))) * a;
double tmp;
if (y5 <= -2.2e+47) {
tmp = t_1;
} else if (y5 <= -9.5e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= -2.4e-287) {
tmp = (y0 * ((x * y2) - (y3 * z))) * c;
} else if (y5 <= 2.1e+108) {
tmp = (y1 * ((y3 * z) - (x * y2))) * a;
} 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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (y5 * ((t * y2) - (y * y3))) * a
if (y5 <= (-2.2d+47)) then
tmp = t_1
else if (y5 <= (-9.5d-101)) then
tmp = (k * z) * ((b * y0) - (i * y1))
else if (y5 <= (-2.4d-287)) then
tmp = (y0 * ((x * y2) - (y3 * z))) * c
else if (y5 <= 2.1d+108) then
tmp = (y1 * ((y3 * z) - (x * y2))) * a
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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y5 * ((t * y2) - (y * y3))) * a;
double tmp;
if (y5 <= -2.2e+47) {
tmp = t_1;
} else if (y5 <= -9.5e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= -2.4e-287) {
tmp = (y0 * ((x * y2) - (y3 * z))) * c;
} else if (y5 <= 2.1e+108) {
tmp = (y1 * ((y3 * z) - (x * y2))) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (y5 * ((t * y2) - (y * y3))) * a tmp = 0 if y5 <= -2.2e+47: tmp = t_1 elif y5 <= -9.5e-101: tmp = (k * z) * ((b * y0) - (i * y1)) elif y5 <= -2.4e-287: tmp = (y0 * ((x * y2) - (y3 * z))) * c elif y5 <= 2.1e+108: tmp = (y1 * ((y3 * z) - (x * y2))) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a) tmp = 0.0 if (y5 <= -2.2e+47) tmp = t_1; elseif (y5 <= -9.5e-101) tmp = Float64(Float64(k * z) * Float64(Float64(b * y0) - Float64(i * y1))); elseif (y5 <= -2.4e-287) tmp = Float64(Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z))) * c); elseif (y5 <= 2.1e+108) tmp = Float64(Float64(y1 * Float64(Float64(y3 * z) - Float64(x * y2))) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (y5 * ((t * y2) - (y * y3))) * a; tmp = 0.0; if (y5 <= -2.2e+47) tmp = t_1; elseif (y5 <= -9.5e-101) tmp = (k * z) * ((b * y0) - (i * y1)); elseif (y5 <= -2.4e-287) tmp = (y0 * ((x * y2) - (y3 * z))) * c; elseif (y5 <= 2.1e+108) tmp = (y1 * ((y3 * z) - (x * y2))) * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[y5, -2.2e+47], t$95$1, If[LessEqual[y5, -9.5e-101], N[(N[(k * z), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.4e-287], N[(N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y5, 2.1e+108], N[(N[(y1 * N[(N[(y3 * z), $MachinePrecision] - N[(x * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\
\mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y5 \leq -9.5 \cdot 10^{-101}:\\
\;\;\;\;\left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right)\\
\mathbf{elif}\;y5 \leq -2.4 \cdot 10^{-287}:\\
\;\;\;\;\left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) \cdot c\\
\mathbf{elif}\;y5 \leq 2.1 \cdot 10^{+108}:\\
\;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y5 < -2.1999999999999999e47 or 2.1000000000000001e108 < y5 Initial program 22.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites41.3%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6425.0
Applied rewrites25.0%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.5
Applied rewrites41.5%
if -2.1999999999999999e47 < y5 < -9.49999999999999994e-101Initial program 33.9%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites38.4%
Taylor expanded in k around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
if -9.49999999999999994e-101 < y5 < -2.39999999999999999e-287Initial program 36.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.8%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if -2.39999999999999999e-287 < y5 < 2.1000000000000001e108Initial program 33.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.0%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (* y5 (- (* t y2) (* y y3))) a)))
(if (<= y5 -2.2e+47)
t_1
(if (<= y5 -4.9e-101)
(* (* k z) (- (* b y0) (* i y1)))
(if (<= y5 -2.3e-287)
(* (* x y0) (- (* c y2) (* b j)))
(if (<= y5 2.1e+108) (* (* y1 (- (* y3 z) (* x y2))) a) 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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y5 * ((t * y2) - (y * y3))) * a;
double tmp;
if (y5 <= -2.2e+47) {
tmp = t_1;
} else if (y5 <= -4.9e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= -2.3e-287) {
tmp = (x * y0) * ((c * y2) - (b * j));
} else if (y5 <= 2.1e+108) {
tmp = (y1 * ((y3 * z) - (x * y2))) * a;
} 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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (y5 * ((t * y2) - (y * y3))) * a
if (y5 <= (-2.2d+47)) then
tmp = t_1
else if (y5 <= (-4.9d-101)) then
tmp = (k * z) * ((b * y0) - (i * y1))
else if (y5 <= (-2.3d-287)) then
tmp = (x * y0) * ((c * y2) - (b * j))
else if (y5 <= 2.1d+108) then
tmp = (y1 * ((y3 * z) - (x * y2))) * a
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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y5 * ((t * y2) - (y * y3))) * a;
double tmp;
if (y5 <= -2.2e+47) {
tmp = t_1;
} else if (y5 <= -4.9e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= -2.3e-287) {
tmp = (x * y0) * ((c * y2) - (b * j));
} else if (y5 <= 2.1e+108) {
tmp = (y1 * ((y3 * z) - (x * y2))) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (y5 * ((t * y2) - (y * y3))) * a tmp = 0 if y5 <= -2.2e+47: tmp = t_1 elif y5 <= -4.9e-101: tmp = (k * z) * ((b * y0) - (i * y1)) elif y5 <= -2.3e-287: tmp = (x * y0) * ((c * y2) - (b * j)) elif y5 <= 2.1e+108: tmp = (y1 * ((y3 * z) - (x * y2))) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3))) * a) tmp = 0.0 if (y5 <= -2.2e+47) tmp = t_1; elseif (y5 <= -4.9e-101) tmp = Float64(Float64(k * z) * Float64(Float64(b * y0) - Float64(i * y1))); elseif (y5 <= -2.3e-287) tmp = Float64(Float64(x * y0) * Float64(Float64(c * y2) - Float64(b * j))); elseif (y5 <= 2.1e+108) tmp = Float64(Float64(y1 * Float64(Float64(y3 * z) - Float64(x * y2))) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (y5 * ((t * y2) - (y * y3))) * a; tmp = 0.0; if (y5 <= -2.2e+47) tmp = t_1; elseif (y5 <= -4.9e-101) tmp = (k * z) * ((b * y0) - (i * y1)); elseif (y5 <= -2.3e-287) tmp = (x * y0) * ((c * y2) - (b * j)); elseif (y5 <= 2.1e+108) tmp = (y1 * ((y3 * z) - (x * y2))) * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[y5, -2.2e+47], t$95$1, If[LessEqual[y5, -4.9e-101], N[(N[(k * z), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.3e-287], N[(N[(x * y0), $MachinePrecision] * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 2.1e+108], N[(N[(y1 * N[(N[(y3 * z), $MachinePrecision] - N[(x * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) \cdot a\\
\mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y5 \leq -4.9 \cdot 10^{-101}:\\
\;\;\;\;\left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right)\\
\mathbf{elif}\;y5 \leq -2.3 \cdot 10^{-287}:\\
\;\;\;\;\left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right)\\
\mathbf{elif}\;y5 \leq 2.1 \cdot 10^{+108}:\\
\;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y5 < -2.1999999999999999e47 or 2.1000000000000001e108 < y5 Initial program 22.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites41.3%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6425.0
Applied rewrites25.0%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.5
Applied rewrites41.5%
if -2.1999999999999999e47 < y5 < -4.9e-101Initial program 34.0%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites38.3%
Taylor expanded in k around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
if -4.9e-101 < y5 < -2.29999999999999986e-287Initial program 35.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.6%
Taylor expanded in y0 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6424.5
Applied rewrites24.5%
if -2.29999999999999986e-287 < y5 < 2.1000000000000001e108Initial program 33.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.0%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (* a y5) (- (* t y2) (* y y3)))))
(if (<= y5 -2.2e+47)
t_1
(if (<= y5 -4.9e-101)
(* (* k z) (- (* b y0) (* i y1)))
(if (<= y5 -2.3e-287)
(* (* x y0) (- (* c y2) (* b j)))
(if (<= y5 2.1e+108) (* (* y1 (- (* y3 z) (* x y2))) a) 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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (a * y5) * ((t * y2) - (y * y3));
double tmp;
if (y5 <= -2.2e+47) {
tmp = t_1;
} else if (y5 <= -4.9e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= -2.3e-287) {
tmp = (x * y0) * ((c * y2) - (b * j));
} else if (y5 <= 2.1e+108) {
tmp = (y1 * ((y3 * z) - (x * y2))) * a;
} 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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (a * y5) * ((t * y2) - (y * y3))
if (y5 <= (-2.2d+47)) then
tmp = t_1
else if (y5 <= (-4.9d-101)) then
tmp = (k * z) * ((b * y0) - (i * y1))
else if (y5 <= (-2.3d-287)) then
tmp = (x * y0) * ((c * y2) - (b * j))
else if (y5 <= 2.1d+108) then
tmp = (y1 * ((y3 * z) - (x * y2))) * a
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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (a * y5) * ((t * y2) - (y * y3));
double tmp;
if (y5 <= -2.2e+47) {
tmp = t_1;
} else if (y5 <= -4.9e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= -2.3e-287) {
tmp = (x * y0) * ((c * y2) - (b * j));
} else if (y5 <= 2.1e+108) {
tmp = (y1 * ((y3 * z) - (x * y2))) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (a * y5) * ((t * y2) - (y * y3)) tmp = 0 if y5 <= -2.2e+47: tmp = t_1 elif y5 <= -4.9e-101: tmp = (k * z) * ((b * y0) - (i * y1)) elif y5 <= -2.3e-287: tmp = (x * y0) * ((c * y2) - (b * j)) elif y5 <= 2.1e+108: tmp = (y1 * ((y3 * z) - (x * y2))) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(a * y5) * Float64(Float64(t * y2) - Float64(y * y3))) tmp = 0.0 if (y5 <= -2.2e+47) tmp = t_1; elseif (y5 <= -4.9e-101) tmp = Float64(Float64(k * z) * Float64(Float64(b * y0) - Float64(i * y1))); elseif (y5 <= -2.3e-287) tmp = Float64(Float64(x * y0) * Float64(Float64(c * y2) - Float64(b * j))); elseif (y5 <= 2.1e+108) tmp = Float64(Float64(y1 * Float64(Float64(y3 * z) - Float64(x * y2))) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (a * y5) * ((t * y2) - (y * y3)); tmp = 0.0; if (y5 <= -2.2e+47) tmp = t_1; elseif (y5 <= -4.9e-101) tmp = (k * z) * ((b * y0) - (i * y1)); elseif (y5 <= -2.3e-287) tmp = (x * y0) * ((c * y2) - (b * j)); elseif (y5 <= 2.1e+108) tmp = (y1 * ((y3 * z) - (x * y2))) * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(a * y5), $MachinePrecision] * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -2.2e+47], t$95$1, If[LessEqual[y5, -4.9e-101], N[(N[(k * z), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -2.3e-287], N[(N[(x * y0), $MachinePrecision] * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 2.1e+108], N[(N[(y1 * N[(N[(y3 * z), $MachinePrecision] - N[(x * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot y5\right) \cdot \left(t \cdot y2 - y \cdot y3\right)\\
\mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y5 \leq -4.9 \cdot 10^{-101}:\\
\;\;\;\;\left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right)\\
\mathbf{elif}\;y5 \leq -2.3 \cdot 10^{-287}:\\
\;\;\;\;\left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right)\\
\mathbf{elif}\;y5 \leq 2.1 \cdot 10^{+108}:\\
\;\;\;\;\left(y1 \cdot \left(y3 \cdot z - x \cdot y2\right)\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y5 < -2.1999999999999999e47 or 2.1000000000000001e108 < y5 Initial program 22.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites41.3%
Taylor expanded in y5 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6438.7
Applied rewrites38.7%
if -2.1999999999999999e47 < y5 < -4.9e-101Initial program 34.0%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites38.3%
Taylor expanded in k around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
if -4.9e-101 < y5 < -2.29999999999999986e-287Initial program 35.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.6%
Taylor expanded in y0 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6424.5
Applied rewrites24.5%
if -2.29999999999999986e-287 < y5 < 2.1000000000000001e108Initial program 33.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.0%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y4 -2.4e+89)
(* (* b y4) (- (* j t) (* k y)))
(if (<= y4 2.9e-61)
(* (* a y5) (- (* t y2) (* y y3)))
(if (<= y4 1.05e+102)
(* (* x y0) (- (* c y2) (* b j)))
(* (* y (* (- k) y4)) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -2.4e+89) {
tmp = (b * y4) * ((j * t) - (k * y));
} else if (y4 <= 2.9e-61) {
tmp = (a * y5) * ((t * y2) - (y * y3));
} else if (y4 <= 1.05e+102) {
tmp = (x * y0) * ((c * y2) - (b * j));
} else {
tmp = (y * (-k * y4)) * 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, j, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y4 <= (-2.4d+89)) then
tmp = (b * y4) * ((j * t) - (k * y))
else if (y4 <= 2.9d-61) then
tmp = (a * y5) * ((t * y2) - (y * y3))
else if (y4 <= 1.05d+102) then
tmp = (x * y0) * ((c * y2) - (b * j))
else
tmp = (y * (-k * y4)) * 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 j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -2.4e+89) {
tmp = (b * y4) * ((j * t) - (k * y));
} else if (y4 <= 2.9e-61) {
tmp = (a * y5) * ((t * y2) - (y * y3));
} else if (y4 <= 1.05e+102) {
tmp = (x * y0) * ((c * y2) - (b * j));
} else {
tmp = (y * (-k * y4)) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y4 <= -2.4e+89: tmp = (b * y4) * ((j * t) - (k * y)) elif y4 <= 2.9e-61: tmp = (a * y5) * ((t * y2) - (y * y3)) elif y4 <= 1.05e+102: tmp = (x * y0) * ((c * y2) - (b * j)) else: tmp = (y * (-k * y4)) * b return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y4 <= -2.4e+89) tmp = Float64(Float64(b * y4) * Float64(Float64(j * t) - Float64(k * y))); elseif (y4 <= 2.9e-61) tmp = Float64(Float64(a * y5) * Float64(Float64(t * y2) - Float64(y * y3))); elseif (y4 <= 1.05e+102) tmp = Float64(Float64(x * y0) * Float64(Float64(c * y2) - Float64(b * j))); else tmp = Float64(Float64(y * Float64(Float64(-k) * y4)) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y4 <= -2.4e+89) tmp = (b * y4) * ((j * t) - (k * y)); elseif (y4 <= 2.9e-61) tmp = (a * y5) * ((t * y2) - (y * y3)); elseif (y4 <= 1.05e+102) tmp = (x * y0) * ((c * y2) - (b * j)); else tmp = (y * (-k * y4)) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -2.4e+89], N[(N[(b * y4), $MachinePrecision] * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 2.9e-61], N[(N[(a * y5), $MachinePrecision] * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1.05e+102], N[(N[(x * y0), $MachinePrecision] * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[((-k) * y4), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y4 \leq -2.4 \cdot 10^{+89}:\\
\;\;\;\;\left(b \cdot y4\right) \cdot \left(j \cdot t - k \cdot y\right)\\
\mathbf{elif}\;y4 \leq 2.9 \cdot 10^{-61}:\\
\;\;\;\;\left(a \cdot y5\right) \cdot \left(t \cdot y2 - y \cdot y3\right)\\
\mathbf{elif}\;y4 \leq 1.05 \cdot 10^{+102}:\\
\;\;\;\;\left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(\left(-k\right) \cdot y4\right)\right) \cdot b\\
\end{array}
\end{array}
if y4 < -2.40000000000000004e89Initial program 24.6%
Taylor expanded in y4 around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites54.1%
Taylor expanded in b around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6439.1
Applied rewrites39.1%
if -2.40000000000000004e89 < y4 < 2.8999999999999999e-61Initial program 33.2%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.7%
Taylor expanded in y5 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6424.7
Applied rewrites24.7%
if 2.8999999999999999e-61 < y4 < 1.05000000000000001e102Initial program 31.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.2%
Taylor expanded in y0 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6425.3
Applied rewrites25.3%
if 1.05000000000000001e102 < y4 Initial program 22.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.2%
Taylor expanded in y around inf
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6437.6
Applied rewrites37.6%
Taylor expanded in x around 0
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-*.f6431.9
Applied rewrites31.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (* a y5) (- (* t y2) (* y y3)))))
(if (<= y5 -2.2e+47)
t_1
(if (<= y5 -4.9e-101)
(* (* k z) (- (* b y0) (* i y1)))
(if (<= y5 1.9e-35) (* (* x y0) (- (* c y2) (* b j))) 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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (a * y5) * ((t * y2) - (y * y3));
double tmp;
if (y5 <= -2.2e+47) {
tmp = t_1;
} else if (y5 <= -4.9e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= 1.9e-35) {
tmp = (x * y0) * ((c * y2) - (b * j));
} 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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (a * y5) * ((t * y2) - (y * y3))
if (y5 <= (-2.2d+47)) then
tmp = t_1
else if (y5 <= (-4.9d-101)) then
tmp = (k * z) * ((b * y0) - (i * y1))
else if (y5 <= 1.9d-35) then
tmp = (x * y0) * ((c * y2) - (b * j))
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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (a * y5) * ((t * y2) - (y * y3));
double tmp;
if (y5 <= -2.2e+47) {
tmp = t_1;
} else if (y5 <= -4.9e-101) {
tmp = (k * z) * ((b * y0) - (i * y1));
} else if (y5 <= 1.9e-35) {
tmp = (x * y0) * ((c * y2) - (b * j));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (a * y5) * ((t * y2) - (y * y3)) tmp = 0 if y5 <= -2.2e+47: tmp = t_1 elif y5 <= -4.9e-101: tmp = (k * z) * ((b * y0) - (i * y1)) elif y5 <= 1.9e-35: tmp = (x * y0) * ((c * y2) - (b * j)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(a * y5) * Float64(Float64(t * y2) - Float64(y * y3))) tmp = 0.0 if (y5 <= -2.2e+47) tmp = t_1; elseif (y5 <= -4.9e-101) tmp = Float64(Float64(k * z) * Float64(Float64(b * y0) - Float64(i * y1))); elseif (y5 <= 1.9e-35) tmp = Float64(Float64(x * y0) * Float64(Float64(c * y2) - Float64(b * j))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (a * y5) * ((t * y2) - (y * y3)); tmp = 0.0; if (y5 <= -2.2e+47) tmp = t_1; elseif (y5 <= -4.9e-101) tmp = (k * z) * ((b * y0) - (i * y1)); elseif (y5 <= 1.9e-35) tmp = (x * y0) * ((c * y2) - (b * j)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(a * y5), $MachinePrecision] * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -2.2e+47], t$95$1, If[LessEqual[y5, -4.9e-101], N[(N[(k * z), $MachinePrecision] * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.9e-35], N[(N[(x * y0), $MachinePrecision] * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot y5\right) \cdot \left(t \cdot y2 - y \cdot y3\right)\\
\mathbf{if}\;y5 \leq -2.2 \cdot 10^{+47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y5 \leq -4.9 \cdot 10^{-101}:\\
\;\;\;\;\left(k \cdot z\right) \cdot \left(b \cdot y0 - i \cdot y1\right)\\
\mathbf{elif}\;y5 \leq 1.9 \cdot 10^{-35}:\\
\;\;\;\;\left(x \cdot y0\right) \cdot \left(c \cdot y2 - b \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y5 < -2.1999999999999999e47 or 1.9000000000000001e-35 < y5 Initial program 24.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.8%
Taylor expanded in y5 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6435.0
Applied rewrites35.0%
if -2.1999999999999999e47 < y5 < -4.9e-101Initial program 34.0%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites38.3%
Taylor expanded in k around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6424.4
Applied rewrites24.4%
if -4.9e-101 < y5 < 1.9000000000000001e-35Initial program 34.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.9%
Taylor expanded in y0 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6425.4
Applied rewrites25.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= c -2.5e+44)
(* (* i z) (- (* c t) (* k y1)))
(if (<= c 8e-270)
(* k (* z (- (* b y0) (* i y1))))
(if (<= c 1.52e-142)
(* (* y1 (* (- x) y2)) a)
(if (<= c 7e+54) (* (- a) (* (* y y3) y5)) (* (* i (* j y1)) x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (c <= -2.5e+44) {
tmp = (i * z) * ((c * t) - (k * y1));
} else if (c <= 8e-270) {
tmp = k * (z * ((b * y0) - (i * y1)));
} else if (c <= 1.52e-142) {
tmp = (y1 * (-x * y2)) * a;
} else if (c <= 7e+54) {
tmp = -a * ((y * y3) * y5);
} else {
tmp = (i * (j * y1)) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (c <= (-2.5d+44)) then
tmp = (i * z) * ((c * t) - (k * y1))
else if (c <= 8d-270) then
tmp = k * (z * ((b * y0) - (i * y1)))
else if (c <= 1.52d-142) then
tmp = (y1 * (-x * y2)) * a
else if (c <= 7d+54) then
tmp = -a * ((y * y3) * y5)
else
tmp = (i * (j * y1)) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (c <= -2.5e+44) {
tmp = (i * z) * ((c * t) - (k * y1));
} else if (c <= 8e-270) {
tmp = k * (z * ((b * y0) - (i * y1)));
} else if (c <= 1.52e-142) {
tmp = (y1 * (-x * y2)) * a;
} else if (c <= 7e+54) {
tmp = -a * ((y * y3) * y5);
} else {
tmp = (i * (j * y1)) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if c <= -2.5e+44: tmp = (i * z) * ((c * t) - (k * y1)) elif c <= 8e-270: tmp = k * (z * ((b * y0) - (i * y1))) elif c <= 1.52e-142: tmp = (y1 * (-x * y2)) * a elif c <= 7e+54: tmp = -a * ((y * y3) * y5) else: tmp = (i * (j * y1)) * x return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (c <= -2.5e+44) tmp = Float64(Float64(i * z) * Float64(Float64(c * t) - Float64(k * y1))); elseif (c <= 8e-270) tmp = Float64(k * Float64(z * Float64(Float64(b * y0) - Float64(i * y1)))); elseif (c <= 1.52e-142) tmp = Float64(Float64(y1 * Float64(Float64(-x) * y2)) * a); elseif (c <= 7e+54) tmp = Float64(Float64(-a) * Float64(Float64(y * y3) * y5)); else tmp = Float64(Float64(i * Float64(j * y1)) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (c <= -2.5e+44) tmp = (i * z) * ((c * t) - (k * y1)); elseif (c <= 8e-270) tmp = k * (z * ((b * y0) - (i * y1))); elseif (c <= 1.52e-142) tmp = (y1 * (-x * y2)) * a; elseif (c <= 7e+54) tmp = -a * ((y * y3) * y5); else tmp = (i * (j * y1)) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[c, -2.5e+44], N[(N[(i * z), $MachinePrecision] * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8e-270], N[(k * N[(z * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.52e-142], N[(N[(y1 * N[((-x) * y2), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[c, 7e+54], N[((-a) * N[(N[(y * y3), $MachinePrecision] * y5), $MachinePrecision]), $MachinePrecision], N[(N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.5 \cdot 10^{+44}:\\
\;\;\;\;\left(i \cdot z\right) \cdot \left(c \cdot t - k \cdot y1\right)\\
\mathbf{elif}\;c \leq 8 \cdot 10^{-270}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{elif}\;c \leq 1.52 \cdot 10^{-142}:\\
\;\;\;\;\left(y1 \cdot \left(\left(-x\right) \cdot y2\right)\right) \cdot a\\
\mathbf{elif}\;c \leq 7 \cdot 10^{+54}:\\
\;\;\;\;\left(-a\right) \cdot \left(\left(y \cdot y3\right) \cdot y5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\
\end{array}
\end{array}
if c < -2.4999999999999998e44Initial program 25.7%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites37.3%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6429.3
Applied rewrites29.3%
if -2.4999999999999998e44 < c < 8.0000000000000003e-270Initial program 34.1%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites36.7%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6419.7
Applied rewrites19.7%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6428.1
Applied rewrites28.1%
if 8.0000000000000003e-270 < c < 1.51999999999999992e-142Initial program 34.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites42.3%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6428.2
Applied rewrites28.2%
Taylor expanded in x around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6418.9
Applied rewrites18.9%
if 1.51999999999999992e-142 < c < 7.0000000000000002e54Initial program 32.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.2%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6424.3
Applied rewrites24.3%
Taylor expanded in y around inf
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-*.f6416.1
Applied rewrites16.1%
Taylor expanded in y around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if 7.0000000000000002e54 < c Initial program 22.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.4%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6423.4
Applied rewrites23.4%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f6415.9
Applied rewrites15.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y -1.85e+167)
(* (* a y3) (* (- y) y5))
(if (<= y -3.4e-66)
(* a (* y1 (* y3 z)))
(if (<= y -3.8e-155)
(* c (* (* i t) z))
(if (<= y 7.4e-199)
(* (* i (* j y1)) x)
(if (<= y 8.8e+83)
(* (* a y3) (* y1 z))
(if (<= y 2.45e+134)
(* (* y1 (* (- x) y2)) a)
(* (* y (* a x)) b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y <= -1.85e+167) {
tmp = (a * y3) * (-y * y5);
} else if (y <= -3.4e-66) {
tmp = a * (y1 * (y3 * z));
} else if (y <= -3.8e-155) {
tmp = c * ((i * t) * z);
} else if (y <= 7.4e-199) {
tmp = (i * (j * y1)) * x;
} else if (y <= 8.8e+83) {
tmp = (a * y3) * (y1 * z);
} else if (y <= 2.45e+134) {
tmp = (y1 * (-x * y2)) * a;
} else {
tmp = (y * (a * x)) * 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, j, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y <= (-1.85d+167)) then
tmp = (a * y3) * (-y * y5)
else if (y <= (-3.4d-66)) then
tmp = a * (y1 * (y3 * z))
else if (y <= (-3.8d-155)) then
tmp = c * ((i * t) * z)
else if (y <= 7.4d-199) then
tmp = (i * (j * y1)) * x
else if (y <= 8.8d+83) then
tmp = (a * y3) * (y1 * z)
else if (y <= 2.45d+134) then
tmp = (y1 * (-x * y2)) * a
else
tmp = (y * (a * x)) * 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 j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y <= -1.85e+167) {
tmp = (a * y3) * (-y * y5);
} else if (y <= -3.4e-66) {
tmp = a * (y1 * (y3 * z));
} else if (y <= -3.8e-155) {
tmp = c * ((i * t) * z);
} else if (y <= 7.4e-199) {
tmp = (i * (j * y1)) * x;
} else if (y <= 8.8e+83) {
tmp = (a * y3) * (y1 * z);
} else if (y <= 2.45e+134) {
tmp = (y1 * (-x * y2)) * a;
} else {
tmp = (y * (a * x)) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y <= -1.85e+167: tmp = (a * y3) * (-y * y5) elif y <= -3.4e-66: tmp = a * (y1 * (y3 * z)) elif y <= -3.8e-155: tmp = c * ((i * t) * z) elif y <= 7.4e-199: tmp = (i * (j * y1)) * x elif y <= 8.8e+83: tmp = (a * y3) * (y1 * z) elif y <= 2.45e+134: tmp = (y1 * (-x * y2)) * a else: tmp = (y * (a * x)) * b return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y <= -1.85e+167) tmp = Float64(Float64(a * y3) * Float64(Float64(-y) * y5)); elseif (y <= -3.4e-66) tmp = Float64(a * Float64(y1 * Float64(y3 * z))); elseif (y <= -3.8e-155) tmp = Float64(c * Float64(Float64(i * t) * z)); elseif (y <= 7.4e-199) tmp = Float64(Float64(i * Float64(j * y1)) * x); elseif (y <= 8.8e+83) tmp = Float64(Float64(a * y3) * Float64(y1 * z)); elseif (y <= 2.45e+134) tmp = Float64(Float64(y1 * Float64(Float64(-x) * y2)) * a); else tmp = Float64(Float64(y * Float64(a * x)) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y <= -1.85e+167) tmp = (a * y3) * (-y * y5); elseif (y <= -3.4e-66) tmp = a * (y1 * (y3 * z)); elseif (y <= -3.8e-155) tmp = c * ((i * t) * z); elseif (y <= 7.4e-199) tmp = (i * (j * y1)) * x; elseif (y <= 8.8e+83) tmp = (a * y3) * (y1 * z); elseif (y <= 2.45e+134) tmp = (y1 * (-x * y2)) * a; else tmp = (y * (a * x)) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y, -1.85e+167], N[(N[(a * y3), $MachinePrecision] * N[((-y) * y5), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.4e-66], N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.8e-155], N[(c * N[(N[(i * t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.4e-199], N[(N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 8.8e+83], N[(N[(a * y3), $MachinePrecision] * N[(y1 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.45e+134], N[(N[(y1 * N[((-x) * y2), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], N[(N[(y * N[(a * x), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+167}:\\
\;\;\;\;\left(a \cdot y3\right) \cdot \left(\left(-y\right) \cdot y5\right)\\
\mathbf{elif}\;y \leq -3.4 \cdot 10^{-66}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-155}:\\
\;\;\;\;c \cdot \left(\left(i \cdot t\right) \cdot z\right)\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{-199}:\\
\;\;\;\;\left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{+83}:\\
\;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\
\mathbf{elif}\;y \leq 2.45 \cdot 10^{+134}:\\
\;\;\;\;\left(y1 \cdot \left(\left(-x\right) \cdot y2\right)\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(a \cdot x\right)\right) \cdot b\\
\end{array}
\end{array}
if y < -1.85e167Initial program 22.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.7%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6436.8
Applied rewrites36.8%
Taylor expanded in y around inf
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-*.f6432.2
Applied rewrites32.2%
if -1.85e167 < y < -3.39999999999999997e-66Initial program 30.7%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.8%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6424.2
Applied rewrites24.2%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6415.8
Applied rewrites15.8%
if -3.39999999999999997e-66 < y < -3.7999999999999998e-155Initial program 34.6%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites40.9%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6423.8
Applied rewrites23.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6416.9
Applied rewrites16.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6417.2
Applied rewrites17.2%
if -3.7999999999999998e-155 < y < 7.39999999999999998e-199Initial program 33.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites33.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.7
Applied rewrites27.7%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f6419.0
Applied rewrites19.0%
if 7.39999999999999998e-199 < y < 8.79999999999999995e83Initial program 32.2%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites38.0%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6421.5
Applied rewrites21.5%
Taylor expanded in y around 0
lift-*.f6417.7
Applied rewrites17.7%
if 8.79999999999999995e83 < y < 2.44999999999999998e134Initial program 23.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
Taylor expanded in x around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6417.2
Applied rewrites17.2%
if 2.44999999999999998e134 < y Initial program 23.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.3%
Taylor expanded in y around inf
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6445.1
Applied rewrites45.1%
Taylor expanded in x around inf
lift-*.f6431.6
Applied rewrites31.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= c -3.6e+44)
(* c (* t (- (* i z) (* y2 y4))))
(if (<= c 1.26e-169)
(* k (* z (- (* b y0) (* i y1))))
(* (* a y5) (- (* t y2) (* y y3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (c <= -3.6e+44) {
tmp = c * (t * ((i * z) - (y2 * y4)));
} else if (c <= 1.26e-169) {
tmp = k * (z * ((b * y0) - (i * y1)));
} else {
tmp = (a * y5) * ((t * y2) - (y * y3));
}
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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (c <= (-3.6d+44)) then
tmp = c * (t * ((i * z) - (y2 * y4)))
else if (c <= 1.26d-169) then
tmp = k * (z * ((b * y0) - (i * y1)))
else
tmp = (a * y5) * ((t * y2) - (y * y3))
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 y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (c <= -3.6e+44) {
tmp = c * (t * ((i * z) - (y2 * y4)));
} else if (c <= 1.26e-169) {
tmp = k * (z * ((b * y0) - (i * y1)));
} else {
tmp = (a * y5) * ((t * y2) - (y * y3));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if c <= -3.6e+44: tmp = c * (t * ((i * z) - (y2 * y4))) elif c <= 1.26e-169: tmp = k * (z * ((b * y0) - (i * y1))) else: tmp = (a * y5) * ((t * y2) - (y * y3)) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (c <= -3.6e+44) tmp = Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))); elseif (c <= 1.26e-169) tmp = Float64(k * Float64(z * Float64(Float64(b * y0) - Float64(i * y1)))); else tmp = Float64(Float64(a * y5) * Float64(Float64(t * y2) - Float64(y * y3))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (c <= -3.6e+44) tmp = c * (t * ((i * z) - (y2 * y4))); elseif (c <= 1.26e-169) tmp = k * (z * ((b * y0) - (i * y1))); else tmp = (a * y5) * ((t * y2) - (y * y3)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[c, -3.6e+44], N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.26e-169], N[(k * N[(z * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * y5), $MachinePrecision] * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -3.6 \cdot 10^{+44}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right)\\
\mathbf{elif}\;c \leq 1.26 \cdot 10^{-169}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot y5\right) \cdot \left(t \cdot y2 - y \cdot y3\right)\\
\end{array}
\end{array}
if c < -3.6e44Initial program 25.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites36.9%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6435.1
Applied rewrites35.1%
if -3.6e44 < c < 1.26e-169Initial program 33.9%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites36.4%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6419.3
Applied rewrites19.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6427.9
Applied rewrites27.9%
if 1.26e-169 < c Initial program 27.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites38.8%
Taylor expanded in y5 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6423.9
Applied rewrites23.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= c -2e+45)
(* (* c i) (* t z))
(if (<= c 8e-270)
(* k (* z (- (* b y0) (* i y1))))
(if (<= c 1.52e-142)
(* (* y1 (* (- x) y2)) a)
(if (<= c 7e+54) (* (- a) (* (* y y3) y5)) (* (* i (* j y1)) x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (c <= -2e+45) {
tmp = (c * i) * (t * z);
} else if (c <= 8e-270) {
tmp = k * (z * ((b * y0) - (i * y1)));
} else if (c <= 1.52e-142) {
tmp = (y1 * (-x * y2)) * a;
} else if (c <= 7e+54) {
tmp = -a * ((y * y3) * y5);
} else {
tmp = (i * (j * y1)) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (c <= (-2d+45)) then
tmp = (c * i) * (t * z)
else if (c <= 8d-270) then
tmp = k * (z * ((b * y0) - (i * y1)))
else if (c <= 1.52d-142) then
tmp = (y1 * (-x * y2)) * a
else if (c <= 7d+54) then
tmp = -a * ((y * y3) * y5)
else
tmp = (i * (j * y1)) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (c <= -2e+45) {
tmp = (c * i) * (t * z);
} else if (c <= 8e-270) {
tmp = k * (z * ((b * y0) - (i * y1)));
} else if (c <= 1.52e-142) {
tmp = (y1 * (-x * y2)) * a;
} else if (c <= 7e+54) {
tmp = -a * ((y * y3) * y5);
} else {
tmp = (i * (j * y1)) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if c <= -2e+45: tmp = (c * i) * (t * z) elif c <= 8e-270: tmp = k * (z * ((b * y0) - (i * y1))) elif c <= 1.52e-142: tmp = (y1 * (-x * y2)) * a elif c <= 7e+54: tmp = -a * ((y * y3) * y5) else: tmp = (i * (j * y1)) * x return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (c <= -2e+45) tmp = Float64(Float64(c * i) * Float64(t * z)); elseif (c <= 8e-270) tmp = Float64(k * Float64(z * Float64(Float64(b * y0) - Float64(i * y1)))); elseif (c <= 1.52e-142) tmp = Float64(Float64(y1 * Float64(Float64(-x) * y2)) * a); elseif (c <= 7e+54) tmp = Float64(Float64(-a) * Float64(Float64(y * y3) * y5)); else tmp = Float64(Float64(i * Float64(j * y1)) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (c <= -2e+45) tmp = (c * i) * (t * z); elseif (c <= 8e-270) tmp = k * (z * ((b * y0) - (i * y1))); elseif (c <= 1.52e-142) tmp = (y1 * (-x * y2)) * a; elseif (c <= 7e+54) tmp = -a * ((y * y3) * y5); else tmp = (i * (j * y1)) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[c, -2e+45], N[(N[(c * i), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8e-270], N[(k * N[(z * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.52e-142], N[(N[(y1 * N[((-x) * y2), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[c, 7e+54], N[((-a) * N[(N[(y * y3), $MachinePrecision] * y5), $MachinePrecision]), $MachinePrecision], N[(N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2 \cdot 10^{+45}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(t \cdot z\right)\\
\mathbf{elif}\;c \leq 8 \cdot 10^{-270}:\\
\;\;\;\;k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{elif}\;c \leq 1.52 \cdot 10^{-142}:\\
\;\;\;\;\left(y1 \cdot \left(\left(-x\right) \cdot y2\right)\right) \cdot a\\
\mathbf{elif}\;c \leq 7 \cdot 10^{+54}:\\
\;\;\;\;\left(-a\right) \cdot \left(\left(y \cdot y3\right) \cdot y5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\
\end{array}
\end{array}
if c < -1.9999999999999999e45Initial program 25.7%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites37.3%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6429.2
Applied rewrites29.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6422.8
Applied rewrites22.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6426.2
Applied rewrites26.2%
if -1.9999999999999999e45 < c < 8.0000000000000003e-270Initial program 34.1%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites36.7%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6419.8
Applied rewrites19.8%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6428.1
Applied rewrites28.1%
if 8.0000000000000003e-270 < c < 1.51999999999999992e-142Initial program 34.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites42.3%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f6428.2
Applied rewrites28.2%
Taylor expanded in x around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f6418.9
Applied rewrites18.9%
if 1.51999999999999992e-142 < c < 7.0000000000000002e54Initial program 32.5%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.2%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6424.3
Applied rewrites24.3%
Taylor expanded in y around inf
mul-1-negN/A
distribute-lft-neg-outN/A
lift-neg.f64N/A
lower-*.f6416.1
Applied rewrites16.1%
Taylor expanded in y around inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if 7.0000000000000002e54 < c Initial program 22.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.4%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6423.4
Applied rewrites23.4%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f6415.9
Applied rewrites15.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* k (* z (- (* b y0) (* i y1))))))
(if (<= z -1.62e+159)
t_1
(if (<= z 1.1e+50) (* (* a y5) (- (* t y2) (* y y3))) 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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = k * (z * ((b * y0) - (i * y1)));
double tmp;
if (z <= -1.62e+159) {
tmp = t_1;
} else if (z <= 1.1e+50) {
tmp = (a * y5) * ((t * y2) - (y * y3));
} 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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = k * (z * ((b * y0) - (i * y1)))
if (z <= (-1.62d+159)) then
tmp = t_1
else if (z <= 1.1d+50) then
tmp = (a * y5) * ((t * y2) - (y * y3))
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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = k * (z * ((b * y0) - (i * y1)));
double tmp;
if (z <= -1.62e+159) {
tmp = t_1;
} else if (z <= 1.1e+50) {
tmp = (a * y5) * ((t * y2) - (y * y3));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = k * (z * ((b * y0) - (i * y1))) tmp = 0 if z <= -1.62e+159: tmp = t_1 elif z <= 1.1e+50: tmp = (a * y5) * ((t * y2) - (y * y3)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(k * Float64(z * Float64(Float64(b * y0) - Float64(i * y1)))) tmp = 0.0 if (z <= -1.62e+159) tmp = t_1; elseif (z <= 1.1e+50) tmp = Float64(Float64(a * y5) * Float64(Float64(t * y2) - Float64(y * y3))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = k * (z * ((b * y0) - (i * y1))); tmp = 0.0; if (z <= -1.62e+159) tmp = t_1; elseif (z <= 1.1e+50) tmp = (a * y5) * ((t * y2) - (y * y3)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(k * N[(z * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.62e+159], t$95$1, If[LessEqual[z, 1.1e+50], N[(N[(a * y5), $MachinePrecision] * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot \left(z \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{if}\;z \leq -1.62 \cdot 10^{+159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+50}:\\
\;\;\;\;\left(a \cdot y5\right) \cdot \left(t \cdot y2 - y \cdot y3\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.62e159 or 1.10000000000000008e50 < z Initial program 23.6%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites54.7%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6
Applied rewrites38.6%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6441.4
Applied rewrites41.4%
if -1.62e159 < z < 1.10000000000000008e50Initial program 32.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites38.7%
Taylor expanded in y5 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6425.0
Applied rewrites25.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y1 -1.32e+79)
(* (* i (* j y1)) x)
(if (<= y1 -1.5e-151)
(* c (* i (* t z)))
(if (<= y1 8e-185)
(* (- a) (* y (* y3 y5)))
(if (<= y1 6e+51)
(* (* y (* a x)) b)
(if (<= y1 3.4e+140) (* (* a y3) (* y1 z)) (* (* j (* i y1)) x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y1 <= -1.32e+79) {
tmp = (i * (j * y1)) * x;
} else if (y1 <= -1.5e-151) {
tmp = c * (i * (t * z));
} else if (y1 <= 8e-185) {
tmp = -a * (y * (y3 * y5));
} else if (y1 <= 6e+51) {
tmp = (y * (a * x)) * b;
} else if (y1 <= 3.4e+140) {
tmp = (a * y3) * (y1 * z);
} else {
tmp = (j * (i * y1)) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y1 <= (-1.32d+79)) then
tmp = (i * (j * y1)) * x
else if (y1 <= (-1.5d-151)) then
tmp = c * (i * (t * z))
else if (y1 <= 8d-185) then
tmp = -a * (y * (y3 * y5))
else if (y1 <= 6d+51) then
tmp = (y * (a * x)) * b
else if (y1 <= 3.4d+140) then
tmp = (a * y3) * (y1 * z)
else
tmp = (j * (i * y1)) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y1 <= -1.32e+79) {
tmp = (i * (j * y1)) * x;
} else if (y1 <= -1.5e-151) {
tmp = c * (i * (t * z));
} else if (y1 <= 8e-185) {
tmp = -a * (y * (y3 * y5));
} else if (y1 <= 6e+51) {
tmp = (y * (a * x)) * b;
} else if (y1 <= 3.4e+140) {
tmp = (a * y3) * (y1 * z);
} else {
tmp = (j * (i * y1)) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y1 <= -1.32e+79: tmp = (i * (j * y1)) * x elif y1 <= -1.5e-151: tmp = c * (i * (t * z)) elif y1 <= 8e-185: tmp = -a * (y * (y3 * y5)) elif y1 <= 6e+51: tmp = (y * (a * x)) * b elif y1 <= 3.4e+140: tmp = (a * y3) * (y1 * z) else: tmp = (j * (i * y1)) * x return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y1 <= -1.32e+79) tmp = Float64(Float64(i * Float64(j * y1)) * x); elseif (y1 <= -1.5e-151) tmp = Float64(c * Float64(i * Float64(t * z))); elseif (y1 <= 8e-185) tmp = Float64(Float64(-a) * Float64(y * Float64(y3 * y5))); elseif (y1 <= 6e+51) tmp = Float64(Float64(y * Float64(a * x)) * b); elseif (y1 <= 3.4e+140) tmp = Float64(Float64(a * y3) * Float64(y1 * z)); else tmp = Float64(Float64(j * Float64(i * y1)) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y1 <= -1.32e+79) tmp = (i * (j * y1)) * x; elseif (y1 <= -1.5e-151) tmp = c * (i * (t * z)); elseif (y1 <= 8e-185) tmp = -a * (y * (y3 * y5)); elseif (y1 <= 6e+51) tmp = (y * (a * x)) * b; elseif (y1 <= 3.4e+140) tmp = (a * y3) * (y1 * z); else tmp = (j * (i * y1)) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y1, -1.32e+79], N[(N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y1, -1.5e-151], N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 8e-185], N[((-a) * N[(y * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 6e+51], N[(N[(y * N[(a * x), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y1, 3.4e+140], N[(N[(a * y3), $MachinePrecision] * N[(y1 * z), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(i * y1), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -1.32 \cdot 10^{+79}:\\
\;\;\;\;\left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\
\mathbf{elif}\;y1 \leq -1.5 \cdot 10^{-151}:\\
\;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\
\mathbf{elif}\;y1 \leq 8 \cdot 10^{-185}:\\
\;\;\;\;\left(-a\right) \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\\
\mathbf{elif}\;y1 \leq 6 \cdot 10^{+51}:\\
\;\;\;\;\left(y \cdot \left(a \cdot x\right)\right) \cdot b\\
\mathbf{elif}\;y1 \leq 3.4 \cdot 10^{+140}:\\
\;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(i \cdot y1\right)\right) \cdot x\\
\end{array}
\end{array}
if y1 < -1.32e79Initial program 24.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.8%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.9
Applied rewrites35.9%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f6431.5
Applied rewrites31.5%
if -1.32e79 < y1 < -1.5e-151Initial program 31.9%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites36.1%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6420.3
Applied rewrites20.3%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6417.5
Applied rewrites17.5%
if -1.5e-151 < y1 < 7.9999999999999999e-185Initial program 34.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites35.1%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6418.7
Applied rewrites18.7%
Taylor expanded in y around inf
mul-1-negN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f64N/A
lower-*.f6418.9
Applied rewrites18.9%
if 7.9999999999999999e-185 < y1 < 6e51Initial program 33.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites38.8%
Taylor expanded in y around inf
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6427.9
Applied rewrites27.9%
Taylor expanded in x around inf
lift-*.f6417.3
Applied rewrites17.3%
if 6e51 < y1 < 3.4e140Initial program 28.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.5%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6427.8
Applied rewrites27.8%
Taylor expanded in y around 0
lift-*.f6421.5
Applied rewrites21.5%
if 3.4e140 < y1 Initial program 22.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.5%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.8
Applied rewrites37.8%
Taylor expanded in b around 0
lift-*.f6434.9
Applied rewrites34.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y1 -1.32e+79)
(* (* i (* j y1)) x)
(if (<= y1 1.95e-184)
(* (* c i) (* t z))
(if (<= y1 6e+51)
(* (* y (* a x)) b)
(if (<= y1 3.4e+140) (* (* a y3) (* y1 z)) (* (* j (* i y1)) x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y1 <= -1.32e+79) {
tmp = (i * (j * y1)) * x;
} else if (y1 <= 1.95e-184) {
tmp = (c * i) * (t * z);
} else if (y1 <= 6e+51) {
tmp = (y * (a * x)) * b;
} else if (y1 <= 3.4e+140) {
tmp = (a * y3) * (y1 * z);
} else {
tmp = (j * (i * y1)) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y1 <= (-1.32d+79)) then
tmp = (i * (j * y1)) * x
else if (y1 <= 1.95d-184) then
tmp = (c * i) * (t * z)
else if (y1 <= 6d+51) then
tmp = (y * (a * x)) * b
else if (y1 <= 3.4d+140) then
tmp = (a * y3) * (y1 * z)
else
tmp = (j * (i * y1)) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y1 <= -1.32e+79) {
tmp = (i * (j * y1)) * x;
} else if (y1 <= 1.95e-184) {
tmp = (c * i) * (t * z);
} else if (y1 <= 6e+51) {
tmp = (y * (a * x)) * b;
} else if (y1 <= 3.4e+140) {
tmp = (a * y3) * (y1 * z);
} else {
tmp = (j * (i * y1)) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y1 <= -1.32e+79: tmp = (i * (j * y1)) * x elif y1 <= 1.95e-184: tmp = (c * i) * (t * z) elif y1 <= 6e+51: tmp = (y * (a * x)) * b elif y1 <= 3.4e+140: tmp = (a * y3) * (y1 * z) else: tmp = (j * (i * y1)) * x return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y1 <= -1.32e+79) tmp = Float64(Float64(i * Float64(j * y1)) * x); elseif (y1 <= 1.95e-184) tmp = Float64(Float64(c * i) * Float64(t * z)); elseif (y1 <= 6e+51) tmp = Float64(Float64(y * Float64(a * x)) * b); elseif (y1 <= 3.4e+140) tmp = Float64(Float64(a * y3) * Float64(y1 * z)); else tmp = Float64(Float64(j * Float64(i * y1)) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y1 <= -1.32e+79) tmp = (i * (j * y1)) * x; elseif (y1 <= 1.95e-184) tmp = (c * i) * (t * z); elseif (y1 <= 6e+51) tmp = (y * (a * x)) * b; elseif (y1 <= 3.4e+140) tmp = (a * y3) * (y1 * z); else tmp = (j * (i * y1)) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y1, -1.32e+79], N[(N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y1, 1.95e-184], N[(N[(c * i), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 6e+51], N[(N[(y * N[(a * x), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y1, 3.4e+140], N[(N[(a * y3), $MachinePrecision] * N[(y1 * z), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(i * y1), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -1.32 \cdot 10^{+79}:\\
\;\;\;\;\left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\
\mathbf{elif}\;y1 \leq 1.95 \cdot 10^{-184}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(t \cdot z\right)\\
\mathbf{elif}\;y1 \leq 6 \cdot 10^{+51}:\\
\;\;\;\;\left(y \cdot \left(a \cdot x\right)\right) \cdot b\\
\mathbf{elif}\;y1 \leq 3.4 \cdot 10^{+140}:\\
\;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(i \cdot y1\right)\right) \cdot x\\
\end{array}
\end{array}
if y1 < -1.32e79Initial program 24.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.8%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.9
Applied rewrites35.9%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f6431.5
Applied rewrites31.5%
if -1.32e79 < y1 < 1.94999999999999997e-184Initial program 33.0%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites36.9%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6419.8
Applied rewrites19.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6417.7
Applied rewrites17.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6417.1
Applied rewrites17.1%
if 1.94999999999999997e-184 < y1 < 6e51Initial program 33.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites38.8%
Taylor expanded in y around inf
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6428.0
Applied rewrites28.0%
Taylor expanded in x around inf
lift-*.f6417.3
Applied rewrites17.3%
if 6e51 < y1 < 3.4e140Initial program 28.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.5%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6427.8
Applied rewrites27.8%
Taylor expanded in y around 0
lift-*.f6421.5
Applied rewrites21.5%
if 3.4e140 < y1 Initial program 22.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.5%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.8
Applied rewrites37.8%
Taylor expanded in b around 0
lift-*.f6434.9
Applied rewrites34.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y1 -1.32e+79)
(* (* i (* j y1)) x)
(if (<= y1 1.7e-33)
(* (* c i) (* t z))
(if (<= y1 3.4e+140) (* (* a y3) (* y1 z)) (* (* j (* i y1)) x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y1 <= -1.32e+79) {
tmp = (i * (j * y1)) * x;
} else if (y1 <= 1.7e-33) {
tmp = (c * i) * (t * z);
} else if (y1 <= 3.4e+140) {
tmp = (a * y3) * (y1 * z);
} else {
tmp = (j * (i * y1)) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y1 <= (-1.32d+79)) then
tmp = (i * (j * y1)) * x
else if (y1 <= 1.7d-33) then
tmp = (c * i) * (t * z)
else if (y1 <= 3.4d+140) then
tmp = (a * y3) * (y1 * z)
else
tmp = (j * (i * y1)) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y1 <= -1.32e+79) {
tmp = (i * (j * y1)) * x;
} else if (y1 <= 1.7e-33) {
tmp = (c * i) * (t * z);
} else if (y1 <= 3.4e+140) {
tmp = (a * y3) * (y1 * z);
} else {
tmp = (j * (i * y1)) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y1 <= -1.32e+79: tmp = (i * (j * y1)) * x elif y1 <= 1.7e-33: tmp = (c * i) * (t * z) elif y1 <= 3.4e+140: tmp = (a * y3) * (y1 * z) else: tmp = (j * (i * y1)) * x return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y1 <= -1.32e+79) tmp = Float64(Float64(i * Float64(j * y1)) * x); elseif (y1 <= 1.7e-33) tmp = Float64(Float64(c * i) * Float64(t * z)); elseif (y1 <= 3.4e+140) tmp = Float64(Float64(a * y3) * Float64(y1 * z)); else tmp = Float64(Float64(j * Float64(i * y1)) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y1 <= -1.32e+79) tmp = (i * (j * y1)) * x; elseif (y1 <= 1.7e-33) tmp = (c * i) * (t * z); elseif (y1 <= 3.4e+140) tmp = (a * y3) * (y1 * z); else tmp = (j * (i * y1)) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y1, -1.32e+79], N[(N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y1, 1.7e-33], N[(N[(c * i), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 3.4e+140], N[(N[(a * y3), $MachinePrecision] * N[(y1 * z), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(i * y1), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -1.32 \cdot 10^{+79}:\\
\;\;\;\;\left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\
\mathbf{elif}\;y1 \leq 1.7 \cdot 10^{-33}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(t \cdot z\right)\\
\mathbf{elif}\;y1 \leq 3.4 \cdot 10^{+140}:\\
\;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(i \cdot y1\right)\right) \cdot x\\
\end{array}
\end{array}
if y1 < -1.32e79Initial program 24.0%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites37.8%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.9
Applied rewrites35.9%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f6431.5
Applied rewrites31.5%
if -1.32e79 < y1 < 1.7e-33Initial program 33.3%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites37.3%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6419.6
Applied rewrites19.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6417.5
Applied rewrites17.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6417.2
Applied rewrites17.2%
if 1.7e-33 < y1 < 3.4e140Initial program 30.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites38.4%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6424.6
Applied rewrites24.6%
Taylor expanded in y around 0
lift-*.f6416.6
Applied rewrites16.6%
if 3.4e140 < y1 Initial program 22.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.5%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.8
Applied rewrites37.8%
Taylor expanded in b around 0
lift-*.f6434.9
Applied rewrites34.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (* i (* j y1)) x)))
(if (<= y1 -1.32e+79)
t_1
(if (<= y1 1.7e-33)
(* (* c i) (* t z))
(if (<= y1 1.4e+165) (* (* a y3) (* y1 z)) 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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (i * (j * y1)) * x;
double tmp;
if (y1 <= -1.32e+79) {
tmp = t_1;
} else if (y1 <= 1.7e-33) {
tmp = (c * i) * (t * z);
} else if (y1 <= 1.4e+165) {
tmp = (a * y3) * (y1 * z);
} 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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (i * (j * y1)) * x
if (y1 <= (-1.32d+79)) then
tmp = t_1
else if (y1 <= 1.7d-33) then
tmp = (c * i) * (t * z)
else if (y1 <= 1.4d+165) then
tmp = (a * y3) * (y1 * z)
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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (i * (j * y1)) * x;
double tmp;
if (y1 <= -1.32e+79) {
tmp = t_1;
} else if (y1 <= 1.7e-33) {
tmp = (c * i) * (t * z);
} else if (y1 <= 1.4e+165) {
tmp = (a * y3) * (y1 * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (i * (j * y1)) * x tmp = 0 if y1 <= -1.32e+79: tmp = t_1 elif y1 <= 1.7e-33: tmp = (c * i) * (t * z) elif y1 <= 1.4e+165: tmp = (a * y3) * (y1 * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(i * Float64(j * y1)) * x) tmp = 0.0 if (y1 <= -1.32e+79) tmp = t_1; elseif (y1 <= 1.7e-33) tmp = Float64(Float64(c * i) * Float64(t * z)); elseif (y1 <= 1.4e+165) tmp = Float64(Float64(a * y3) * Float64(y1 * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (i * (j * y1)) * x; tmp = 0.0; if (y1 <= -1.32e+79) tmp = t_1; elseif (y1 <= 1.7e-33) tmp = (c * i) * (t * z); elseif (y1 <= 1.4e+165) tmp = (a * y3) * (y1 * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[y1, -1.32e+79], t$95$1, If[LessEqual[y1, 1.7e-33], N[(N[(c * i), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 1.4e+165], N[(N[(a * y3), $MachinePrecision] * N[(y1 * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot \left(j \cdot y1\right)\right) \cdot x\\
\mathbf{if}\;y1 \leq -1.32 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y1 \leq 1.7 \cdot 10^{-33}:\\
\;\;\;\;\left(c \cdot i\right) \cdot \left(t \cdot z\right)\\
\mathbf{elif}\;y1 \leq 1.4 \cdot 10^{+165}:\\
\;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y1 < -1.32e79 or 1.3999999999999999e165 < y1 Initial program 23.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites38.9%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f6433.3
Applied rewrites33.3%
if -1.32e79 < y1 < 1.7e-33Initial program 33.3%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites37.3%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6419.6
Applied rewrites19.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6417.5
Applied rewrites17.5%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6417.2
Applied rewrites17.2%
if 1.7e-33 < y1 < 1.3999999999999999e165Initial program 29.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites39.3%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6426.0
Applied rewrites26.0%
Taylor expanded in y around 0
lift-*.f6418.4
Applied rewrites18.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (<= y3 -0.88) (* (* a y3) (* y1 z)) (if (<= y3 2.8e+124) (* c (* i (* t z))) (* a (* y1 (* y3 z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y3 <= -0.88) {
tmp = (a * y3) * (y1 * z);
} else if (y3 <= 2.8e+124) {
tmp = c * (i * (t * z));
} else {
tmp = a * (y1 * (y3 * z));
}
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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y3 <= (-0.88d0)) then
tmp = (a * y3) * (y1 * z)
else if (y3 <= 2.8d+124) then
tmp = c * (i * (t * z))
else
tmp = a * (y1 * (y3 * z))
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 y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y3 <= -0.88) {
tmp = (a * y3) * (y1 * z);
} else if (y3 <= 2.8e+124) {
tmp = c * (i * (t * z));
} else {
tmp = a * (y1 * (y3 * z));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y3 <= -0.88: tmp = (a * y3) * (y1 * z) elif y3 <= 2.8e+124: tmp = c * (i * (t * z)) else: tmp = a * (y1 * (y3 * z)) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y3 <= -0.88) tmp = Float64(Float64(a * y3) * Float64(y1 * z)); elseif (y3 <= 2.8e+124) tmp = Float64(c * Float64(i * Float64(t * z))); else tmp = Float64(a * Float64(y1 * Float64(y3 * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y3 <= -0.88) tmp = (a * y3) * (y1 * z); elseif (y3 <= 2.8e+124) tmp = c * (i * (t * z)); else tmp = a * (y1 * (y3 * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y3, -0.88], N[(N[(a * y3), $MachinePrecision] * N[(y1 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 2.8e+124], N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -0.88:\\
\;\;\;\;\left(a \cdot y3\right) \cdot \left(y1 \cdot z\right)\\
\mathbf{elif}\;y3 \leq 2.8 \cdot 10^{+124}:\\
\;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\
\end{array}
\end{array}
if y3 < -0.880000000000000004Initial program 24.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.6%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6435.9
Applied rewrites35.9%
Taylor expanded in y around 0
lift-*.f6424.7
Applied rewrites24.7%
if -0.880000000000000004 < y3 < 2.8e124Initial program 33.6%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites35.6%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6425.2
Applied rewrites25.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6417.1
Applied rewrites17.1%
if 2.8e124 < y3 Initial program 22.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.4%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6440.6
Applied rewrites40.6%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6432.1
Applied rewrites32.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (let* ((t_1 (* a (* y1 (* y3 z))))) (if (<= y3 -0.88) t_1 (if (<= y3 2.8e+124) (* c (* i (* t z))) 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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = a * (y1 * (y3 * z));
double tmp;
if (y3 <= -0.88) {
tmp = t_1;
} else if (y3 <= 2.8e+124) {
tmp = c * (i * (t * z));
} 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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = a * (y1 * (y3 * z))
if (y3 <= (-0.88d0)) then
tmp = t_1
else if (y3 <= 2.8d+124) then
tmp = c * (i * (t * z))
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 y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = a * (y1 * (y3 * z));
double tmp;
if (y3 <= -0.88) {
tmp = t_1;
} else if (y3 <= 2.8e+124) {
tmp = c * (i * (t * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = a * (y1 * (y3 * z)) tmp = 0 if y3 <= -0.88: tmp = t_1 elif y3 <= 2.8e+124: tmp = c * (i * (t * z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(a * Float64(y1 * Float64(y3 * z))) tmp = 0.0 if (y3 <= -0.88) tmp = t_1; elseif (y3 <= 2.8e+124) tmp = Float64(c * Float64(i * Float64(t * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = a * (y1 * (y3 * z)); tmp = 0.0; if (y3 <= -0.88) tmp = t_1; elseif (y3 <= 2.8e+124) tmp = c * (i * (t * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y3, -0.88], t$95$1, If[LessEqual[y3, 2.8e+124], N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{if}\;y3 \leq -0.88:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y3 \leq 2.8 \cdot 10^{+124}:\\
\;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y3 < -0.880000000000000004 or 2.8e124 < y3 Initial program 23.6%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites40.5%
Taylor expanded in y3 around inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-*.f6437.7
Applied rewrites37.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6429.1
Applied rewrites29.1%
if -0.880000000000000004 < y3 < 2.8e124Initial program 33.6%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites35.6%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6425.2
Applied rewrites25.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6417.1
Applied rewrites17.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* (* c i) (* t z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (c * i) * (t * z);
}
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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = (c * i) * (t * z)
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 y0, double y1, double y2, double y3, double y4, double y5) {
return (c * i) * (t * z);
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return (c * i) * (t * z)
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(Float64(c * i) * Float64(t * z)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = (c * i) * (t * z); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(c * i), $MachinePrecision] * N[(t * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(c \cdot i\right) \cdot \left(t \cdot z\right)
\end{array}
Initial program 29.7%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites37.3%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6424.8
Applied rewrites24.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6417.0
Applied rewrites17.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6416.6
Applied rewrites16.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* c (* i (* t z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return c * (i * (t * z));
}
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, y0, y1, y2, y3, y4, y5)
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), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = c * (i * (t * z))
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 y0, double y1, double y2, double y3, double y4, double y5) {
return c * (i * (t * z));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return c * (i * (t * z))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(c * Float64(i * Float64(t * z))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = c * (i * (t * z)); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
c \cdot \left(i \cdot \left(t \cdot z\right)\right)
\end{array}
Initial program 29.7%
Taylor expanded in z around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
Applied rewrites37.3%
Taylor expanded in i around -inf
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6424.8
Applied rewrites24.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6417.0
Applied rewrites17.0%
herbie shell --seed 2025130
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:name "Linear.Matrix:det44 from linear-1.19.1.3"
:precision binary64
(+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i)))) (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a)))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))