
(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}
Sampling outcomes in binary64 precision:
Herbie found 26 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 (- (* j t) (* k y)))
(t_2 (- (* x y) (* t z)))
(t_3 (- (* j x) (* k z)))
(t_4 (* (- i) (- (fma c t_2 (* y5 t_1)) (* y1 t_3))))
(t_5 (- (* c y0) (* a y1)))
(t_6
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 t_5))
(* j (- (* b y0) (* i y1)))))))
(if (<= i -1.26e+20)
t_4
(if (<= i -1.35e-52)
t_6
(if (<= i 1.75e-308)
(* b (- (fma a t_2 (* y4 t_1)) (* y0 t_3)))
(if (<= i 1.4e-24)
(*
(- y3)
(-
(fma j (- (* y1 y4) (* y0 y5)) (* z t_5))
(* y (- (* c y4) (* a y5)))))
(if (<= i 1.15e+104)
t_6
(if (<= i 2.3e+173)
(*
y4
(-
(fma b (* j t) (* y1 (- (* k y2) (* j y3))))
(* c (* t y2))))
t_4))))))))
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 t_2 = (x * y) - (t * z);
double t_3 = (j * x) - (k * z);
double t_4 = -i * (fma(c, t_2, (y5 * t_1)) - (y1 * t_3));
double t_5 = (c * y0) - (a * y1);
double t_6 = x * (fma(y, ((a * b) - (c * i)), (y2 * t_5)) - (j * ((b * y0) - (i * y1))));
double tmp;
if (i <= -1.26e+20) {
tmp = t_4;
} else if (i <= -1.35e-52) {
tmp = t_6;
} else if (i <= 1.75e-308) {
tmp = b * (fma(a, t_2, (y4 * t_1)) - (y0 * t_3));
} else if (i <= 1.4e-24) {
tmp = -y3 * (fma(j, ((y1 * y4) - (y0 * y5)), (z * t_5)) - (y * ((c * y4) - (a * y5))));
} else if (i <= 1.15e+104) {
tmp = t_6;
} else if (i <= 2.3e+173) {
tmp = y4 * (fma(b, (j * t), (y1 * ((k * y2) - (j * y3)))) - (c * (t * y2)));
} else {
tmp = t_4;
}
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)) t_2 = Float64(Float64(x * y) - Float64(t * z)) t_3 = Float64(Float64(j * x) - Float64(k * z)) t_4 = Float64(Float64(-i) * Float64(fma(c, t_2, Float64(y5 * t_1)) - Float64(y1 * t_3))) t_5 = Float64(Float64(c * y0) - Float64(a * y1)) t_6 = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * t_5)) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))) tmp = 0.0 if (i <= -1.26e+20) tmp = t_4; elseif (i <= -1.35e-52) tmp = t_6; elseif (i <= 1.75e-308) tmp = Float64(b * Float64(fma(a, t_2, Float64(y4 * t_1)) - Float64(y0 * t_3))); elseif (i <= 1.4e-24) tmp = Float64(Float64(-y3) * Float64(fma(j, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(z * t_5)) - Float64(y * Float64(Float64(c * y4) - Float64(a * y5))))); elseif (i <= 1.15e+104) tmp = t_6; elseif (i <= 2.3e+173) tmp = Float64(y4 * Float64(fma(b, Float64(j * t), Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(t * y2)))); else tmp = t_4; 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]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[((-i) * N[(N[(c * t$95$2 + N[(y5 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y1 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.26e+20], t$95$4, If[LessEqual[i, -1.35e-52], t$95$6, If[LessEqual[i, 1.75e-308], N[(b * N[(N[(a * t$95$2 + N[(y4 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.4e-24], N[((-y3) * N[(N[(j * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(z * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.15e+104], t$95$6, If[LessEqual[i, 2.3e+173], N[(y4 * N[(N[(b * N[(j * t), $MachinePrecision] + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
t_2 := x \cdot y - t \cdot z\\
t_3 := j \cdot x - k \cdot z\\
t_4 := \left(-i\right) \cdot \left(\mathsf{fma}\left(c, t\_2, y5 \cdot t\_1\right) - y1 \cdot t\_3\right)\\
t_5 := c \cdot y0 - a \cdot y1\\
t_6 := x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot t\_5\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{if}\;i \leq -1.26 \cdot 10^{+20}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;i \leq -1.35 \cdot 10^{-52}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;i \leq 1.75 \cdot 10^{-308}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_2, y4 \cdot t\_1\right) - y0 \cdot t\_3\right)\\
\mathbf{elif}\;i \leq 1.4 \cdot 10^{-24}:\\
\;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot t\_5\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;i \leq 1.15 \cdot 10^{+104}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;i \leq 2.3 \cdot 10^{+173}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if i < -1.26e20 or 2.29999999999999995e173 < i Initial program 26.2%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites65.0%
if -1.26e20 < i < -1.35000000000000005e-52 or 1.4000000000000001e-24 < i < 1.14999999999999992e104Initial program 25.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites70.2%
if -1.35000000000000005e-52 < i < 1.75e-308Initial program 33.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites61.2%
if 1.75e-308 < i < 1.4000000000000001e-24Initial program 33.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites52.2%
if 1.14999999999999992e104 < i < 2.29999999999999995e173Initial program 15.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites46.8%
Taylor expanded in y around 0
lower--.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lift-*.f6462.1
Applied rewrites62.1%
Final simplification61.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1
(+
(-
(+
(+
(-
(* (- (* 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))))))
(if (<= t_1 INFINITY)
t_1
(*
(- y3)
(-
(fma j (- (* y1 y4) (* y0 y5)) (* z (- (* c y0) (* a y1))))
(* y (- (* c y4) (* a y5))))))))
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 = (((((((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 tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = -y3 * (fma(j, ((y1 * y4) - (y0 * y5)), (z * ((c * y0) - (a * y1)))) - (y * ((c * y4) - (a * y5))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = 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)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(-y3) * Float64(fma(j, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(z * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(y * Float64(Float64(c * y4) - Float64(a * y5))))); 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[(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]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[((-y3) * N[(N[(j * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \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)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\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.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 y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites42.3%
Final simplification57.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* j x) (* k z)))
(t_2 (- (* j t) (* k y)))
(t_3 (- (* x y) (* t z))))
(if (<= y0 -3e+199)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= y0 -7.2e+90)
(*
y4
(-
(fma b t_2 (* y1 (- (* k y2) (* j y3))))
(* c (- (* t y2) (* y y3)))))
(if (<= y0 -5.2e-162)
(* (- i) (- (fma c t_3 (* y5 t_2)) (* y1 t_1)))
(if (<= y0 7.2e-32)
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i y1)))))
(if (<= y0 1.82e+186)
(* b (- (fma a t_3 (* y4 t_2)) (* y0 t_1)))
(* c (* z (fma -1.0 (* y0 y3) (* i 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 * x) - (k * z);
double t_2 = (j * t) - (k * y);
double t_3 = (x * y) - (t * z);
double tmp;
if (y0 <= -3e+199) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y0 <= -7.2e+90) {
tmp = y4 * (fma(b, t_2, (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
} else if (y0 <= -5.2e-162) {
tmp = -i * (fma(c, t_3, (y5 * t_2)) - (y1 * t_1));
} else if (y0 <= 7.2e-32) {
tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
} else if (y0 <= 1.82e+186) {
tmp = b * (fma(a, t_3, (y4 * t_2)) - (y0 * t_1));
} else {
tmp = c * (z * fma(-1.0, (y0 * y3), (i * 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 * x) - Float64(k * z)) t_2 = Float64(Float64(j * t) - Float64(k * y)) t_3 = Float64(Float64(x * y) - Float64(t * z)) tmp = 0.0 if (y0 <= -3e+199) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (y0 <= -7.2e+90) tmp = Float64(y4 * Float64(fma(b, t_2, Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); elseif (y0 <= -5.2e-162) tmp = Float64(Float64(-i) * Float64(fma(c, t_3, Float64(y5 * t_2)) - Float64(y1 * t_1))); elseif (y0 <= 7.2e-32) tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); elseif (y0 <= 1.82e+186) tmp = Float64(b * Float64(fma(a, t_3, Float64(y4 * t_2)) - Float64(y0 * t_1))); else tmp = Float64(c * Float64(z * fma(-1.0, Float64(y0 * y3), Float64(i * 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 * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y0, -3e+199], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, -7.2e+90], N[(y4 * N[(N[(b * t$95$2 + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, -5.2e-162], N[((-i) * N[(N[(c * t$95$3 + N[(y5 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 7.2e-32], N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 1.82e+186], N[(b * N[(N[(a * t$95$3 + N[(y4 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(z * N[(-1.0 * N[(y0 * y3), $MachinePrecision] + N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot x - k \cdot z\\
t_2 := j \cdot t - k \cdot y\\
t_3 := x \cdot y - t \cdot z\\
\mathbf{if}\;y0 \leq -3 \cdot 10^{+199}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;y0 \leq -7.2 \cdot 10^{+90}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_2, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;y0 \leq -5.2 \cdot 10^{-162}:\\
\;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, t\_3, y5 \cdot t\_2\right) - y1 \cdot t\_1\right)\\
\mathbf{elif}\;y0 \leq 7.2 \cdot 10^{-32}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{elif}\;y0 \leq 1.82 \cdot 10^{+186}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_3, y4 \cdot t\_2\right) - y0 \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right)\\
\end{array}
\end{array}
if y0 < -3.0000000000000001e199Initial program 32.0%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites64.4%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6468.4
Applied rewrites68.4%
if -3.0000000000000001e199 < y0 < -7.2e90Initial program 23.3%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites53.8%
if -7.2e90 < y0 < -5.1999999999999999e-162Initial program 35.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites52.7%
if -5.1999999999999999e-162 < y0 < 7.19999999999999986e-32Initial program 30.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites61.7%
if 7.19999999999999986e-32 < y0 < 1.8200000000000001e186Initial program 30.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites59.3%
if 1.8200000000000001e186 < y0 Initial program 13.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites43.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6463.4
Applied rewrites63.4%
Final simplification59.6%
(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 (<= y0 -3e+199)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= y0 -1.22e-104)
(*
y4
(-
(fma b t_1 (* y1 (- (* k y2) (* j y3))))
(* c (- (* t y2) (* y y3)))))
(if (<= y0 7.2e-32)
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i y1)))))
(if (<= y0 1.82e+186)
(*
b
(-
(fma a (- (* x y) (* t z)) (* y4 t_1))
(* y0 (- (* j x) (* k z)))))
(* c (* z (fma -1.0 (* y0 y3) (* i 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 (y0 <= -3e+199) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y0 <= -1.22e-104) {
tmp = y4 * (fma(b, t_1, (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
} else if (y0 <= 7.2e-32) {
tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
} else if (y0 <= 1.82e+186) {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * t_1)) - (y0 * ((j * x) - (k * z))));
} else {
tmp = c * (z * fma(-1.0, (y0 * y3), (i * 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 (y0 <= -3e+199) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (y0 <= -1.22e-104) tmp = Float64(y4 * Float64(fma(b, t_1, Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); elseif (y0 <= 7.2e-32) tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); elseif (y0 <= 1.82e+186) tmp = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * t_1)) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); else tmp = Float64(c * Float64(z * fma(-1.0, Float64(y0 * y3), Float64(i * 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[y0, -3e+199], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, -1.22e-104], N[(y4 * N[(N[(b * t$95$1 + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 7.2e-32], N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 1.82e+186], N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(z * N[(-1.0 * N[(y0 * y3), $MachinePrecision] + N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
\mathbf{if}\;y0 \leq -3 \cdot 10^{+199}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;y0 \leq -1.22 \cdot 10^{-104}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_1, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;y0 \leq 7.2 \cdot 10^{-32}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{elif}\;y0 \leq 1.82 \cdot 10^{+186}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot t\_1\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right)\\
\end{array}
\end{array}
if y0 < -3.0000000000000001e199Initial program 32.0%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites64.4%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6468.4
Applied rewrites68.4%
if -3.0000000000000001e199 < y0 < -1.21999999999999997e-104Initial program 31.3%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.7%
if -1.21999999999999997e-104 < y0 < 7.19999999999999986e-32Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites58.0%
if 7.19999999999999986e-32 < y0 < 1.8200000000000001e186Initial program 30.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites59.3%
if 1.8200000000000001e186 < y0 Initial program 13.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites43.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6463.4
Applied rewrites63.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y0 -4.7e+182)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= y0 -1.25e-190)
(* y (+ (* b (fma -1.0 (* k y4) (* a x))) (* y3 (- (* c y4) (* a y5)))))
(if (<= y0 7.2e-32)
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i y1)))))
(if (<= y0 1.82e+186)
(*
b
(-
(fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
(* y0 (- (* j x) (* k z)))))
(* c (* z (fma -1.0 (* y0 y3) (* i 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 (y0 <= -4.7e+182) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y0 <= -1.25e-190) {
tmp = y * ((b * fma(-1.0, (k * y4), (a * x))) + (y3 * ((c * y4) - (a * y5))));
} else if (y0 <= 7.2e-32) {
tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
} else if (y0 <= 1.82e+186) {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
} else {
tmp = c * (z * fma(-1.0, (y0 * y3), (i * 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 (y0 <= -4.7e+182) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (y0 <= -1.25e-190) tmp = Float64(y * Float64(Float64(b * fma(-1.0, Float64(k * y4), Float64(a * x))) + Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5))))); elseif (y0 <= 7.2e-32) tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); elseif (y0 <= 1.82e+186) tmp = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); else tmp = Float64(c * Float64(z * fma(-1.0, Float64(y0 * y3), Float64(i * t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y0, -4.7e+182], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, -1.25e-190], N[(y * N[(N[(b * N[(-1.0 * N[(k * y4), $MachinePrecision] + N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 7.2e-32], N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 1.82e+186], N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(z * N[(-1.0 * N[(y0 * y3), $MachinePrecision] + N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y0 \leq -4.7 \cdot 10^{+182}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;y0 \leq -1.25 \cdot 10^{-190}:\\
\;\;\;\;y \cdot \left(b \cdot \mathsf{fma}\left(-1, k \cdot y4, a \cdot x\right) + y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;y0 \leq 7.2 \cdot 10^{-32}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{elif}\;y0 \leq 1.82 \cdot 10^{+186}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(z \cdot \mathsf{fma}\left(-1, y0 \cdot y3, i \cdot t\right)\right)\\
\end{array}
\end{array}
if y0 < -4.69999999999999983e182Initial program 36.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites53.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6463.7
Applied rewrites63.7%
if -4.69999999999999983e182 < y0 < -1.25000000000000009e-190Initial program 27.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites41.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6443.4
Applied rewrites43.4%
if -1.25000000000000009e-190 < y0 < 7.19999999999999986e-32Initial program 31.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites61.5%
if 7.19999999999999986e-32 < y0 < 1.8200000000000001e186Initial program 30.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites59.3%
if 1.8200000000000001e186 < y0 Initial program 13.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites43.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6463.4
Applied rewrites63.4%
Final simplification56.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= t -2.75e+187)
(* c (* t (- (* i z) (* y2 y4))))
(if (<= t -2.2e+41)
(* y4 (* b (- (* j t) (* k y))))
(if (<= t -1.55e-282)
(* y (+ (* a (* b x)) (* y3 (- (* c y4) (* a y5)))))
(if (<= t 3e-216)
(* b (* y0 (- (* k z) (* j x))))
(if (<= t 6.3e-152)
(*
y4
(- (fma b (* j t) (* y1 (- (* k y2) (* j y3)))) (* c (* t y2))))
(if (<= t 7.9e+195)
(* x (* b (* y (- a (/ (* j y0) y)))))
(* a (* b (- (* x y) (* 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) {
double tmp;
if (t <= -2.75e+187) {
tmp = c * (t * ((i * z) - (y2 * y4)));
} else if (t <= -2.2e+41) {
tmp = y4 * (b * ((j * t) - (k * y)));
} else if (t <= -1.55e-282) {
tmp = y * ((a * (b * x)) + (y3 * ((c * y4) - (a * y5))));
} else if (t <= 3e-216) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 6.3e-152) {
tmp = y4 * (fma(b, (j * t), (y1 * ((k * y2) - (j * y3)))) - (c * (t * y2)));
} else if (t <= 7.9e+195) {
tmp = x * (b * (y * (a - ((j * y0) / y))));
} else {
tmp = a * (b * ((x * y) - (t * 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 (t <= -2.75e+187) tmp = Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))); elseif (t <= -2.2e+41) tmp = Float64(y4 * Float64(b * Float64(Float64(j * t) - Float64(k * y)))); elseif (t <= -1.55e-282) tmp = Float64(y * Float64(Float64(a * Float64(b * x)) + Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5))))); elseif (t <= 3e-216) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (t <= 6.3e-152) tmp = Float64(y4 * Float64(fma(b, Float64(j * t), Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(t * y2)))); elseif (t <= 7.9e+195) tmp = Float64(x * Float64(b * Float64(y * Float64(a - Float64(Float64(j * y0) / y))))); else tmp = Float64(a * Float64(b * Float64(Float64(x * y) - Float64(t * z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[t, -2.75e+187], N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.2e+41], N[(y4 * N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.55e-282], N[(y * N[(N[(a * N[(b * x), $MachinePrecision]), $MachinePrecision] + N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-216], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.3e-152], N[(y4 * N[(N[(b * N[(j * t), $MachinePrecision] + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.9e+195], N[(x * N[(b * N[(y * N[(a - N[(N[(j * y0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.75 \cdot 10^{+187}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right)\\
\mathbf{elif}\;t \leq -2.2 \cdot 10^{+41}:\\
\;\;\;\;y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{-282}:\\
\;\;\;\;y \cdot \left(a \cdot \left(b \cdot x\right) + y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-216}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;t \leq 6.3 \cdot 10^{-152}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2\right)\right)\\
\mathbf{elif}\;t \leq 7.9 \cdot 10^{+195}:\\
\;\;\;\;x \cdot \left(b \cdot \left(y \cdot \left(a - \frac{j \cdot y0}{y}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -2.74999999999999999e187Initial program 20.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites60.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6470.4
Applied rewrites70.4%
if -2.74999999999999999e187 < t < -2.1999999999999999e41Initial program 21.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.7%
Taylor expanded in b around inf
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6452.4
Applied rewrites52.4%
if -2.1999999999999999e41 < t < -1.55000000000000007e-282Initial program 37.6%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites52.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6455.3
Applied rewrites55.3%
if -1.55000000000000007e-282 < t < 3.00000000000000013e-216Initial program 41.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites60.4%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6455.1
Applied rewrites55.1%
if 3.00000000000000013e-216 < t < 6.3000000000000004e-152Initial program 38.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites69.7%
Taylor expanded in y around 0
lower--.f64N/A
lower-fma.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lift-*.f6456.2
Applied rewrites56.2%
if 6.3000000000000004e-152 < t < 7.9000000000000002e195Initial program 23.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites55.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6448.2
Applied rewrites48.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f6452.1
Applied rewrites52.1%
if 7.9000000000000002e195 < t Initial program 21.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites25.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6450.7
Applied rewrites50.7%
Final simplification54.7%
(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 (or (<= y5 -7e+63) (not (<= y5 5.4e+38)))
(*
(- y5)
(- (fma i t_1 (* y0 (- (* k y2) (* j y3)))) (* a (- (* t y2) (* y y3)))))
(*
b
(- (fma a (- (* x y) (* t z)) (* y4 t_1)) (* y0 (- (* j x) (* k 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 t_1 = (j * t) - (k * y);
double tmp;
if ((y5 <= -7e+63) || !(y5 <= 5.4e+38)) {
tmp = -y5 * (fma(i, t_1, (y0 * ((k * y2) - (j * y3)))) - (a * ((t * y2) - (y * y3))));
} else {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * t_1)) - (y0 * ((j * x) - (k * z))));
}
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 <= -7e+63) || !(y5 <= 5.4e+38)) tmp = Float64(Float64(-y5) * Float64(fma(i, t_1, Float64(y0 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(a * Float64(Float64(t * y2) - Float64(y * y3))))); else tmp = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * t_1)) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); 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[Or[LessEqual[y5, -7e+63], N[Not[LessEqual[y5, 5.4e+38]], $MachinePrecision]], N[((-y5) * N[(N[(i * t$95$1 + N[(y0 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
\mathbf{if}\;y5 \leq -7 \cdot 10^{+63} \lor \neg \left(y5 \leq 5.4 \cdot 10^{+38}\right):\\
\;\;\;\;\left(-y5\right) \cdot \left(\mathsf{fma}\left(i, t\_1, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot t\_1\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\end{array}
\end{array}
if y5 < -7.00000000000000059e63 or 5.39999999999999992e38 < y5 Initial program 27.0%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites62.0%
if -7.00000000000000059e63 < y5 < 5.39999999999999992e38Initial program 29.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites52.6%
Final simplification56.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y5 -5.1e+66)
(* y (* y5 (- (* i k) (* a y3))))
(if (<= y5 3.6e+40)
(*
b
(-
(fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
(* y0 (- (* j x) (* k z)))))
(* y3 (* y5 (- (* j y0) (* a y)))))))
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 <= -5.1e+66) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (y5 <= 3.6e+40) {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
} else {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
}
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 <= -5.1e+66) tmp = Float64(y * Float64(y5 * Float64(Float64(i * k) - Float64(a * y3)))); elseif (y5 <= 3.6e+40) tmp = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); else tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -5.1e+66], N[(y * N[(y5 * N[(N[(i * k), $MachinePrecision] - N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 3.6e+40], N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -5.1 \cdot 10^{+66}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\
\mathbf{elif}\;y5 \leq 3.6 \cdot 10^{+40}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\end{array}
\end{array}
if y5 < -5.10000000000000008e66Initial program 21.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites52.5%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6448.6
Applied rewrites48.6%
if -5.10000000000000008e66 < y5 < 3.59999999999999996e40Initial program 29.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites52.6%
if 3.59999999999999996e40 < y5 Initial program 31.2%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites53.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6450.8
Applied rewrites50.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= t -2.75e+187)
(* c (* t (- (* i z) (* y2 y4))))
(if (<= t -2.2e+41)
(* y4 (* b (- (* j t) (* k y))))
(if (<= t -1.55e-282)
(* y (+ (* a (* b x)) (* y3 (- (* c y4) (* a y5)))))
(if (<= t 8e-87)
(* b (* y0 (- (* k z) (* j x))))
(if (<= t 1.35e-12)
(* x (* y (- (* a b) (* c i))))
(if (<= t 2.7e+109)
(* x (* j (- (* i y1) (* b y0))))
(* a (* b (- (* x y) (* 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) {
double tmp;
if (t <= -2.75e+187) {
tmp = c * (t * ((i * z) - (y2 * y4)));
} else if (t <= -2.2e+41) {
tmp = y4 * (b * ((j * t) - (k * y)));
} else if (t <= -1.55e-282) {
tmp = y * ((a * (b * x)) + (y3 * ((c * y4) - (a * y5))));
} else if (t <= 8e-87) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 1.35e-12) {
tmp = x * (y * ((a * b) - (c * i)));
} else if (t <= 2.7e+109) {
tmp = x * (j * ((i * y1) - (b * y0)));
} else {
tmp = a * (b * ((x * y) - (t * 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 (t <= (-2.75d+187)) then
tmp = c * (t * ((i * z) - (y2 * y4)))
else if (t <= (-2.2d+41)) then
tmp = y4 * (b * ((j * t) - (k * y)))
else if (t <= (-1.55d-282)) then
tmp = y * ((a * (b * x)) + (y3 * ((c * y4) - (a * y5))))
else if (t <= 8d-87) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (t <= 1.35d-12) then
tmp = x * (y * ((a * b) - (c * i)))
else if (t <= 2.7d+109) then
tmp = x * (j * ((i * y1) - (b * y0)))
else
tmp = a * (b * ((x * y) - (t * 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 (t <= -2.75e+187) {
tmp = c * (t * ((i * z) - (y2 * y4)));
} else if (t <= -2.2e+41) {
tmp = y4 * (b * ((j * t) - (k * y)));
} else if (t <= -1.55e-282) {
tmp = y * ((a * (b * x)) + (y3 * ((c * y4) - (a * y5))));
} else if (t <= 8e-87) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 1.35e-12) {
tmp = x * (y * ((a * b) - (c * i)));
} else if (t <= 2.7e+109) {
tmp = x * (j * ((i * y1) - (b * y0)));
} else {
tmp = a * (b * ((x * y) - (t * z)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if t <= -2.75e+187: tmp = c * (t * ((i * z) - (y2 * y4))) elif t <= -2.2e+41: tmp = y4 * (b * ((j * t) - (k * y))) elif t <= -1.55e-282: tmp = y * ((a * (b * x)) + (y3 * ((c * y4) - (a * y5)))) elif t <= 8e-87: tmp = b * (y0 * ((k * z) - (j * x))) elif t <= 1.35e-12: tmp = x * (y * ((a * b) - (c * i))) elif t <= 2.7e+109: tmp = x * (j * ((i * y1) - (b * y0))) else: tmp = a * (b * ((x * y) - (t * 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 (t <= -2.75e+187) tmp = Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))); elseif (t <= -2.2e+41) tmp = Float64(y4 * Float64(b * Float64(Float64(j * t) - Float64(k * y)))); elseif (t <= -1.55e-282) tmp = Float64(y * Float64(Float64(a * Float64(b * x)) + Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5))))); elseif (t <= 8e-87) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (t <= 1.35e-12) tmp = Float64(x * Float64(y * Float64(Float64(a * b) - Float64(c * i)))); elseif (t <= 2.7e+109) tmp = Float64(x * Float64(j * Float64(Float64(i * y1) - Float64(b * y0)))); else tmp = Float64(a * Float64(b * Float64(Float64(x * y) - Float64(t * 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 (t <= -2.75e+187) tmp = c * (t * ((i * z) - (y2 * y4))); elseif (t <= -2.2e+41) tmp = y4 * (b * ((j * t) - (k * y))); elseif (t <= -1.55e-282) tmp = y * ((a * (b * x)) + (y3 * ((c * y4) - (a * y5)))); elseif (t <= 8e-87) tmp = b * (y0 * ((k * z) - (j * x))); elseif (t <= 1.35e-12) tmp = x * (y * ((a * b) - (c * i))); elseif (t <= 2.7e+109) tmp = x * (j * ((i * y1) - (b * y0))); else tmp = a * (b * ((x * y) - (t * 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[t, -2.75e+187], N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.2e+41], N[(y4 * N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.55e-282], N[(y * N[(N[(a * N[(b * x), $MachinePrecision]), $MachinePrecision] + N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-87], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-12], N[(x * N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+109], N[(x * N[(j * N[(N[(i * y1), $MachinePrecision] - N[(b * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.75 \cdot 10^{+187}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right)\\
\mathbf{elif}\;t \leq -2.2 \cdot 10^{+41}:\\
\;\;\;\;y4 \cdot \left(b \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{-282}:\\
\;\;\;\;y \cdot \left(a \cdot \left(b \cdot x\right) + y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-87}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-12}:\\
\;\;\;\;x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right)\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+109}:\\
\;\;\;\;x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -2.74999999999999999e187Initial program 20.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites60.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6470.4
Applied rewrites70.4%
if -2.74999999999999999e187 < t < -2.1999999999999999e41Initial program 21.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.7%
Taylor expanded in b around inf
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6452.4
Applied rewrites52.4%
if -2.1999999999999999e41 < t < -1.55000000000000007e-282Initial program 37.6%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites52.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6455.3
Applied rewrites55.3%
if -1.55000000000000007e-282 < t < 8.00000000000000014e-87Initial program 31.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites53.4%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6448.3
Applied rewrites48.3%
if 8.00000000000000014e-87 < t < 1.3499999999999999e-12Initial program 37.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites68.8%
Taylor expanded in y around inf
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6475.2
Applied rewrites75.2%
if 1.3499999999999999e-12 < t < 2.70000000000000001e109Initial program 28.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites53.8%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6457.6
Applied rewrites57.6%
if 2.70000000000000001e109 < t Initial program 17.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites28.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6445.6
Applied rewrites45.6%
Final simplification54.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y4 (* c (- (* y y3) (* t y2))))))
(if (<= c -7.5e+279)
t_1
(if (<= c -1.18e+19)
(* x (* y (- (* a b) (* c i))))
(if (<= c 1.65e-121)
(* x (* b (* y (- a (/ (* j y0) y)))))
(if (<= c 1.55e-24)
(* b (* y0 (- (* k z) (* j x))))
(if (<= c 8e+220) t_1 (* c (* t (- (* i z) (* y2 y4)))))))))))
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 = y4 * (c * ((y * y3) - (t * y2)));
double tmp;
if (c <= -7.5e+279) {
tmp = t_1;
} else if (c <= -1.18e+19) {
tmp = x * (y * ((a * b) - (c * i)));
} else if (c <= 1.65e-121) {
tmp = x * (b * (y * (a - ((j * y0) / y))));
} else if (c <= 1.55e-24) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (c <= 8e+220) {
tmp = t_1;
} else {
tmp = c * (t * ((i * z) - (y2 * y4)));
}
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 = y4 * (c * ((y * y3) - (t * y2)))
if (c <= (-7.5d+279)) then
tmp = t_1
else if (c <= (-1.18d+19)) then
tmp = x * (y * ((a * b) - (c * i)))
else if (c <= 1.65d-121) then
tmp = x * (b * (y * (a - ((j * y0) / y))))
else if (c <= 1.55d-24) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (c <= 8d+220) then
tmp = t_1
else
tmp = c * (t * ((i * z) - (y2 * y4)))
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 = y4 * (c * ((y * y3) - (t * y2)));
double tmp;
if (c <= -7.5e+279) {
tmp = t_1;
} else if (c <= -1.18e+19) {
tmp = x * (y * ((a * b) - (c * i)));
} else if (c <= 1.65e-121) {
tmp = x * (b * (y * (a - ((j * y0) / y))));
} else if (c <= 1.55e-24) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (c <= 8e+220) {
tmp = t_1;
} else {
tmp = c * (t * ((i * z) - (y2 * y4)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = y4 * (c * ((y * y3) - (t * y2))) tmp = 0 if c <= -7.5e+279: tmp = t_1 elif c <= -1.18e+19: tmp = x * (y * ((a * b) - (c * i))) elif c <= 1.65e-121: tmp = x * (b * (y * (a - ((j * y0) / y)))) elif c <= 1.55e-24: tmp = b * (y0 * ((k * z) - (j * x))) elif c <= 8e+220: tmp = t_1 else: tmp = c * (t * ((i * z) - (y2 * y4))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(y4 * Float64(c * Float64(Float64(y * y3) - Float64(t * y2)))) tmp = 0.0 if (c <= -7.5e+279) tmp = t_1; elseif (c <= -1.18e+19) tmp = Float64(x * Float64(y * Float64(Float64(a * b) - Float64(c * i)))); elseif (c <= 1.65e-121) tmp = Float64(x * Float64(b * Float64(y * Float64(a - Float64(Float64(j * y0) / y))))); elseif (c <= 1.55e-24) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (c <= 8e+220) tmp = t_1; else tmp = Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))); 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 = y4 * (c * ((y * y3) - (t * y2))); tmp = 0.0; if (c <= -7.5e+279) tmp = t_1; elseif (c <= -1.18e+19) tmp = x * (y * ((a * b) - (c * i))); elseif (c <= 1.65e-121) tmp = x * (b * (y * (a - ((j * y0) / y)))); elseif (c <= 1.55e-24) tmp = b * (y0 * ((k * z) - (j * x))); elseif (c <= 8e+220) tmp = t_1; else tmp = c * (t * ((i * z) - (y2 * y4))); 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[(y4 * N[(c * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7.5e+279], t$95$1, If[LessEqual[c, -1.18e+19], N[(x * N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.65e-121], N[(x * N[(b * N[(y * N[(a - N[(N[(j * y0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.55e-24], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8e+220], t$95$1, N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y4 \cdot \left(c \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\mathbf{if}\;c \leq -7.5 \cdot 10^{+279}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.18 \cdot 10^{+19}:\\
\;\;\;\;x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq 1.65 \cdot 10^{-121}:\\
\;\;\;\;x \cdot \left(b \cdot \left(y \cdot \left(a - \frac{j \cdot y0}{y}\right)\right)\right)\\
\mathbf{elif}\;c \leq 1.55 \cdot 10^{-24}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;c \leq 8 \cdot 10^{+220}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right)\\
\end{array}
\end{array}
if c < -7.5000000000000002e279 or 1.55e-24 < c < 8e220Initial program 18.2%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites46.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6456.8
Applied rewrites56.8%
if -7.5000000000000002e279 < c < -1.18e19Initial program 29.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites53.1%
Taylor expanded in y around inf
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6458.9
Applied rewrites58.9%
if -1.18e19 < c < 1.65000000000000005e-121Initial program 34.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites42.2%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f6442.9
Applied rewrites42.9%
if 1.65000000000000005e-121 < c < 1.55e-24Initial program 26.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites65.6%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6461.3
Applied rewrites61.3%
if 8e220 < c Initial program 26.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites69.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6464.5
Applied rewrites64.5%
Final simplification52.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y4 (* c (- (* y y3) (* t y2))))))
(if (<= c -7.5e+279)
t_1
(if (<= c -2.45e-5)
(* x (* y (- (* a b) (* c i))))
(if (<= c -4.5e-137)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= c 1.55e-24)
(* b (* y0 (- (* k z) (* j x))))
(if (<= c 8e+220) t_1 (* c (* t (- (* i z) (* y2 y4)))))))))))
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 = y4 * (c * ((y * y3) - (t * y2)));
double tmp;
if (c <= -7.5e+279) {
tmp = t_1;
} else if (c <= -2.45e-5) {
tmp = x * (y * ((a * b) - (c * i)));
} else if (c <= -4.5e-137) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (c <= 1.55e-24) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (c <= 8e+220) {
tmp = t_1;
} else {
tmp = c * (t * ((i * z) - (y2 * y4)));
}
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 = y4 * (c * ((y * y3) - (t * y2)))
if (c <= (-7.5d+279)) then
tmp = t_1
else if (c <= (-2.45d-5)) then
tmp = x * (y * ((a * b) - (c * i)))
else if (c <= (-4.5d-137)) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else if (c <= 1.55d-24) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (c <= 8d+220) then
tmp = t_1
else
tmp = c * (t * ((i * z) - (y2 * y4)))
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 = y4 * (c * ((y * y3) - (t * y2)));
double tmp;
if (c <= -7.5e+279) {
tmp = t_1;
} else if (c <= -2.45e-5) {
tmp = x * (y * ((a * b) - (c * i)));
} else if (c <= -4.5e-137) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (c <= 1.55e-24) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (c <= 8e+220) {
tmp = t_1;
} else {
tmp = c * (t * ((i * z) - (y2 * y4)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = y4 * (c * ((y * y3) - (t * y2))) tmp = 0 if c <= -7.5e+279: tmp = t_1 elif c <= -2.45e-5: tmp = x * (y * ((a * b) - (c * i))) elif c <= -4.5e-137: tmp = y3 * (y5 * ((j * y0) - (a * y))) elif c <= 1.55e-24: tmp = b * (y0 * ((k * z) - (j * x))) elif c <= 8e+220: tmp = t_1 else: tmp = c * (t * ((i * z) - (y2 * y4))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(y4 * Float64(c * Float64(Float64(y * y3) - Float64(t * y2)))) tmp = 0.0 if (c <= -7.5e+279) tmp = t_1; elseif (c <= -2.45e-5) tmp = Float64(x * Float64(y * Float64(Float64(a * b) - Float64(c * i)))); elseif (c <= -4.5e-137) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (c <= 1.55e-24) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (c <= 8e+220) tmp = t_1; else tmp = Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))); 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 = y4 * (c * ((y * y3) - (t * y2))); tmp = 0.0; if (c <= -7.5e+279) tmp = t_1; elseif (c <= -2.45e-5) tmp = x * (y * ((a * b) - (c * i))); elseif (c <= -4.5e-137) tmp = y3 * (y5 * ((j * y0) - (a * y))); elseif (c <= 1.55e-24) tmp = b * (y0 * ((k * z) - (j * x))); elseif (c <= 8e+220) tmp = t_1; else tmp = c * (t * ((i * z) - (y2 * y4))); 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[(y4 * N[(c * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -7.5e+279], t$95$1, If[LessEqual[c, -2.45e-5], N[(x * N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -4.5e-137], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.55e-24], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8e+220], t$95$1, N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y4 \cdot \left(c \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\mathbf{if}\;c \leq -7.5 \cdot 10^{+279}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -2.45 \cdot 10^{-5}:\\
\;\;\;\;x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right)\\
\mathbf{elif}\;c \leq -4.5 \cdot 10^{-137}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;c \leq 1.55 \cdot 10^{-24}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;c \leq 8 \cdot 10^{+220}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right)\\
\end{array}
\end{array}
if c < -7.5000000000000002e279 or 1.55e-24 < c < 8e220Initial program 18.2%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites46.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6456.8
Applied rewrites56.8%
if -7.5000000000000002e279 < c < -2.45e-5Initial program 27.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites49.5%
Taylor expanded in y around inf
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6458.4
Applied rewrites58.4%
if -2.45e-5 < c < -4.4999999999999997e-137Initial program 24.4%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites48.9%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6455.8
Applied rewrites55.8%
if -4.4999999999999997e-137 < c < 1.55e-24Initial program 36.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites50.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6440.4
Applied rewrites40.4%
if 8e220 < c Initial program 26.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites69.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6464.5
Applied rewrites64.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= t -6.8e+62)
(* c (* t (- (* i z) (* y2 y4))))
(if (<= t -3.1e-206)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= t 4.3e-89)
(* b (* y0 (- (* k z) (* j x))))
(if (<= t 1.36e+144)
(* x (* b (- (* a y) (* j y0))))
(* a (* b (- (* x y) (* 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) {
double tmp;
if (t <= -6.8e+62) {
tmp = c * (t * ((i * z) - (y2 * y4)));
} else if (t <= -3.1e-206) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (t <= 4.3e-89) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 1.36e+144) {
tmp = x * (b * ((a * y) - (j * y0)));
} else {
tmp = a * (b * ((x * y) - (t * 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 (t <= (-6.8d+62)) then
tmp = c * (t * ((i * z) - (y2 * y4)))
else if (t <= (-3.1d-206)) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else if (t <= 4.3d-89) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (t <= 1.36d+144) then
tmp = x * (b * ((a * y) - (j * y0)))
else
tmp = a * (b * ((x * y) - (t * 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 (t <= -6.8e+62) {
tmp = c * (t * ((i * z) - (y2 * y4)));
} else if (t <= -3.1e-206) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (t <= 4.3e-89) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 1.36e+144) {
tmp = x * (b * ((a * y) - (j * y0)));
} else {
tmp = a * (b * ((x * y) - (t * z)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if t <= -6.8e+62: tmp = c * (t * ((i * z) - (y2 * y4))) elif t <= -3.1e-206: tmp = y3 * (y5 * ((j * y0) - (a * y))) elif t <= 4.3e-89: tmp = b * (y0 * ((k * z) - (j * x))) elif t <= 1.36e+144: tmp = x * (b * ((a * y) - (j * y0))) else: tmp = a * (b * ((x * y) - (t * 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 (t <= -6.8e+62) tmp = Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))); elseif (t <= -3.1e-206) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (t <= 4.3e-89) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (t <= 1.36e+144) tmp = Float64(x * Float64(b * Float64(Float64(a * y) - Float64(j * y0)))); else tmp = Float64(a * Float64(b * Float64(Float64(x * y) - Float64(t * 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 (t <= -6.8e+62) tmp = c * (t * ((i * z) - (y2 * y4))); elseif (t <= -3.1e-206) tmp = y3 * (y5 * ((j * y0) - (a * y))); elseif (t <= 4.3e-89) tmp = b * (y0 * ((k * z) - (j * x))); elseif (t <= 1.36e+144) tmp = x * (b * ((a * y) - (j * y0))); else tmp = a * (b * ((x * y) - (t * 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[t, -6.8e+62], N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.1e-206], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e-89], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.36e+144], N[(x * N[(b * N[(N[(a * y), $MachinePrecision] - N[(j * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.8 \cdot 10^{+62}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right)\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-206}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-89}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;t \leq 1.36 \cdot 10^{+144}:\\
\;\;\;\;x \cdot \left(b \cdot \left(a \cdot y - j \cdot y0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -6.80000000000000028e62Initial program 20.8%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites48.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6452.8
Applied rewrites52.8%
if -6.80000000000000028e62 < t < -3.1000000000000003e-206Initial program 30.4%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites51.6%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6442.6
Applied rewrites42.6%
if -3.1000000000000003e-206 < t < 4.29999999999999987e-89Initial program 37.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites56.4%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6448.2
Applied rewrites48.2%
if 4.29999999999999987e-89 < t < 1.35999999999999993e144Initial program 28.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites56.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6450.0
Applied rewrites50.0%
if 1.35999999999999993e144 < t Initial program 18.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites25.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6447.5
Applied rewrites47.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y3 -2.55e+25)
(* y1 (* a (* y3 z)))
(if (<= y3 -2.4e-69)
(* x (* b (* a y)))
(if (<= y3 5.5e-15)
(* x (* i (* j y1)))
(if (<= y3 2.55e+191)
(* x (* a (* b y)))
(* (- j) (* y1 (* y3 y4))))))))
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 <= -2.55e+25) {
tmp = y1 * (a * (y3 * z));
} else if (y3 <= -2.4e-69) {
tmp = x * (b * (a * y));
} else if (y3 <= 5.5e-15) {
tmp = x * (i * (j * y1));
} else if (y3 <= 2.55e+191) {
tmp = x * (a * (b * y));
} else {
tmp = -j * (y1 * (y3 * y4));
}
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 <= (-2.55d+25)) then
tmp = y1 * (a * (y3 * z))
else if (y3 <= (-2.4d-69)) then
tmp = x * (b * (a * y))
else if (y3 <= 5.5d-15) then
tmp = x * (i * (j * y1))
else if (y3 <= 2.55d+191) then
tmp = x * (a * (b * y))
else
tmp = -j * (y1 * (y3 * y4))
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 <= -2.55e+25) {
tmp = y1 * (a * (y3 * z));
} else if (y3 <= -2.4e-69) {
tmp = x * (b * (a * y));
} else if (y3 <= 5.5e-15) {
tmp = x * (i * (j * y1));
} else if (y3 <= 2.55e+191) {
tmp = x * (a * (b * y));
} else {
tmp = -j * (y1 * (y3 * y4));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y3 <= -2.55e+25: tmp = y1 * (a * (y3 * z)) elif y3 <= -2.4e-69: tmp = x * (b * (a * y)) elif y3 <= 5.5e-15: tmp = x * (i * (j * y1)) elif y3 <= 2.55e+191: tmp = x * (a * (b * y)) else: tmp = -j * (y1 * (y3 * y4)) 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 <= -2.55e+25) tmp = Float64(y1 * Float64(a * Float64(y3 * z))); elseif (y3 <= -2.4e-69) tmp = Float64(x * Float64(b * Float64(a * y))); elseif (y3 <= 5.5e-15) tmp = Float64(x * Float64(i * Float64(j * y1))); elseif (y3 <= 2.55e+191) tmp = Float64(x * Float64(a * Float64(b * y))); else tmp = Float64(Float64(-j) * Float64(y1 * Float64(y3 * y4))); 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 <= -2.55e+25) tmp = y1 * (a * (y3 * z)); elseif (y3 <= -2.4e-69) tmp = x * (b * (a * y)); elseif (y3 <= 5.5e-15) tmp = x * (i * (j * y1)); elseif (y3 <= 2.55e+191) tmp = x * (a * (b * y)); else tmp = -j * (y1 * (y3 * y4)); 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, -2.55e+25], N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -2.4e-69], N[(x * N[(b * N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 5.5e-15], N[(x * N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 2.55e+191], N[(x * N[(a * N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-j) * N[(y1 * N[(y3 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -2.55 \cdot 10^{+25}:\\
\;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{elif}\;y3 \leq -2.4 \cdot 10^{-69}:\\
\;\;\;\;x \cdot \left(b \cdot \left(a \cdot y\right)\right)\\
\mathbf{elif}\;y3 \leq 5.5 \cdot 10^{-15}:\\
\;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\
\mathbf{elif}\;y3 \leq 2.55 \cdot 10^{+191}:\\
\;\;\;\;x \cdot \left(a \cdot \left(b \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-j\right) \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\\
\end{array}
\end{array}
if y3 < -2.5500000000000002e25Initial program 26.8%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites61.9%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6440.3
Applied rewrites40.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6438.5
Applied rewrites38.5%
if -2.5500000000000002e25 < y3 < -2.4000000000000001e-69Initial program 39.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6456.1
Applied rewrites56.1%
Taylor expanded in y around inf
lift-*.f6434.3
Applied rewrites34.3%
if -2.4000000000000001e-69 < y3 < 5.5000000000000002e-15Initial program 36.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites50.9%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6440.7
Applied rewrites40.7%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f6427.6
Applied rewrites27.6%
if 5.5000000000000002e-15 < y3 < 2.54999999999999991e191Initial program 14.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites34.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.5
Applied rewrites37.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6432.7
Applied rewrites32.7%
if 2.54999999999999991e191 < y3 Initial program 13.8%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites69.0%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6448.9
Applied rewrites48.9%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6449.1
Applied rewrites49.1%
Final simplification33.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y -4.8e+138)
(* a (* y3 (* (- y) y5)))
(if (<= y 5.5e-253)
(* x (* b (* (- j) y0)))
(if (<= y 1.8e-138)
(* (- y3) (* j (* y1 y4)))
(if (<= y 7.2e-39) (* x (* i (* j y1))) (* x (* b (* a y))))))))
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 <= -4.8e+138) {
tmp = a * (y3 * (-y * y5));
} else if (y <= 5.5e-253) {
tmp = x * (b * (-j * y0));
} else if (y <= 1.8e-138) {
tmp = -y3 * (j * (y1 * y4));
} else if (y <= 7.2e-39) {
tmp = x * (i * (j * y1));
} else {
tmp = x * (b * (a * y));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, 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 <= (-4.8d+138)) then
tmp = a * (y3 * (-y * y5))
else if (y <= 5.5d-253) then
tmp = x * (b * (-j * y0))
else if (y <= 1.8d-138) then
tmp = -y3 * (j * (y1 * y4))
else if (y <= 7.2d-39) then
tmp = x * (i * (j * y1))
else
tmp = x * (b * (a * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y <= -4.8e+138) {
tmp = a * (y3 * (-y * y5));
} else if (y <= 5.5e-253) {
tmp = x * (b * (-j * y0));
} else if (y <= 1.8e-138) {
tmp = -y3 * (j * (y1 * y4));
} else if (y <= 7.2e-39) {
tmp = x * (i * (j * y1));
} else {
tmp = x * (b * (a * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y <= -4.8e+138: tmp = a * (y3 * (-y * y5)) elif y <= 5.5e-253: tmp = x * (b * (-j * y0)) elif y <= 1.8e-138: tmp = -y3 * (j * (y1 * y4)) elif y <= 7.2e-39: tmp = x * (i * (j * y1)) else: tmp = x * (b * (a * y)) 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 <= -4.8e+138) tmp = Float64(a * Float64(y3 * Float64(Float64(-y) * y5))); elseif (y <= 5.5e-253) tmp = Float64(x * Float64(b * Float64(Float64(-j) * y0))); elseif (y <= 1.8e-138) tmp = Float64(Float64(-y3) * Float64(j * Float64(y1 * y4))); elseif (y <= 7.2e-39) tmp = Float64(x * Float64(i * Float64(j * y1))); else tmp = Float64(x * Float64(b * Float64(a * y))); 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 <= -4.8e+138) tmp = a * (y3 * (-y * y5)); elseif (y <= 5.5e-253) tmp = x * (b * (-j * y0)); elseif (y <= 1.8e-138) tmp = -y3 * (j * (y1 * y4)); elseif (y <= 7.2e-39) tmp = x * (i * (j * y1)); else tmp = x * (b * (a * y)); 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, -4.8e+138], N[(a * N[(y3 * N[((-y) * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.5e-253], N[(x * N[(b * N[((-j) * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e-138], N[((-y3) * N[(j * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-39], N[(x * N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(b * N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+138}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(\left(-y\right) \cdot y5\right)\right)\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-253}:\\
\;\;\;\;x \cdot \left(b \cdot \left(\left(-j\right) \cdot y0\right)\right)\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-138}:\\
\;\;\;\;\left(-y3\right) \cdot \left(j \cdot \left(y1 \cdot y4\right)\right)\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-39}:\\
\;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(b \cdot \left(a \cdot y\right)\right)\\
\end{array}
\end{array}
if y < -4.8000000000000002e138Initial program 21.4%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.6%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6445.9
Applied rewrites45.9%
Taylor expanded in y around inf
lower-*.f64N/A
lift-*.f6441.2
Applied rewrites41.2%
if -4.8000000000000002e138 < y < 5.49999999999999974e-253Initial program 37.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6430.5
Applied rewrites30.5%
Taylor expanded in y around 0
lower-*.f64N/A
lift-*.f6427.5
Applied rewrites27.5%
if 5.49999999999999974e-253 < y < 1.80000000000000009e-138Initial program 26.9%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites23.2%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6432.0
Applied rewrites32.0%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6443.1
Applied rewrites43.1%
if 1.80000000000000009e-138 < y < 7.2000000000000001e-39Initial program 22.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.9%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6442.2
Applied rewrites42.2%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f6441.9
Applied rewrites41.9%
if 7.2000000000000001e-39 < y Initial program 22.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites48.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6450.0
Applied rewrites50.0%
Taylor expanded in y around inf
lift-*.f6443.0
Applied rewrites43.0%
Final simplification36.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y1 -4.9e+241)
(* x (* i (* j y1)))
(if (<= y1 -2.5e-76)
(* (- y3) (* j (* y1 y4)))
(if (<= y1 6.6e-23) (* x (* b (* a y))) (* (- j) (* y1 (* y3 y4)))))))
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 <= -4.9e+241) {
tmp = x * (i * (j * y1));
} else if (y1 <= -2.5e-76) {
tmp = -y3 * (j * (y1 * y4));
} else if (y1 <= 6.6e-23) {
tmp = x * (b * (a * y));
} else {
tmp = -j * (y1 * (y3 * y4));
}
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 <= (-4.9d+241)) then
tmp = x * (i * (j * y1))
else if (y1 <= (-2.5d-76)) then
tmp = -y3 * (j * (y1 * y4))
else if (y1 <= 6.6d-23) then
tmp = x * (b * (a * y))
else
tmp = -j * (y1 * (y3 * y4))
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 <= -4.9e+241) {
tmp = x * (i * (j * y1));
} else if (y1 <= -2.5e-76) {
tmp = -y3 * (j * (y1 * y4));
} else if (y1 <= 6.6e-23) {
tmp = x * (b * (a * y));
} else {
tmp = -j * (y1 * (y3 * y4));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y1 <= -4.9e+241: tmp = x * (i * (j * y1)) elif y1 <= -2.5e-76: tmp = -y3 * (j * (y1 * y4)) elif y1 <= 6.6e-23: tmp = x * (b * (a * y)) else: tmp = -j * (y1 * (y3 * y4)) 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 <= -4.9e+241) tmp = Float64(x * Float64(i * Float64(j * y1))); elseif (y1 <= -2.5e-76) tmp = Float64(Float64(-y3) * Float64(j * Float64(y1 * y4))); elseif (y1 <= 6.6e-23) tmp = Float64(x * Float64(b * Float64(a * y))); else tmp = Float64(Float64(-j) * Float64(y1 * Float64(y3 * y4))); 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 <= -4.9e+241) tmp = x * (i * (j * y1)); elseif (y1 <= -2.5e-76) tmp = -y3 * (j * (y1 * y4)); elseif (y1 <= 6.6e-23) tmp = x * (b * (a * y)); else tmp = -j * (y1 * (y3 * y4)); 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, -4.9e+241], N[(x * N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, -2.5e-76], N[((-y3) * N[(j * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 6.6e-23], N[(x * N[(b * N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-j) * N[(y1 * N[(y3 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -4.9 \cdot 10^{+241}:\\
\;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\
\mathbf{elif}\;y1 \leq -2.5 \cdot 10^{-76}:\\
\;\;\;\;\left(-y3\right) \cdot \left(j \cdot \left(y1 \cdot y4\right)\right)\\
\mathbf{elif}\;y1 \leq 6.6 \cdot 10^{-23}:\\
\;\;\;\;x \cdot \left(b \cdot \left(a \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-j\right) \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\\
\end{array}
\end{array}
if y1 < -4.89999999999999972e241Initial program 19.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites39.9%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6473.8
Applied rewrites73.8%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f6474.3
Applied rewrites74.3%
if -4.89999999999999972e241 < y1 < -2.4999999999999999e-76Initial program 28.9%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6429.9
Applied rewrites29.9%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
if -2.4999999999999999e-76 < y1 < 6.60000000000000041e-23Initial program 36.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.5
Applied rewrites41.5%
Taylor expanded in y around inf
lift-*.f6429.0
Applied rewrites29.0%
if 6.60000000000000041e-23 < y1 Initial program 18.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites39.2%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6433.2
Applied rewrites33.2%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6432.9
Applied rewrites32.9%
Final simplification32.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= j -2.45e-157)
(* b (* y0 (- (* k z) (* j x))))
(if (<= j 4.4e+88)
(* x (* y (- (* a b) (* c i))))
(* y3 (* y5 (- (* j y0) (* a y)))))))
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 (j <= -2.45e-157) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (j <= 4.4e+88) {
tmp = x * (y * ((a * b) - (c * i)));
} else {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, 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 (j <= (-2.45d-157)) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (j <= 4.4d+88) then
tmp = x * (y * ((a * b) - (c * i)))
else
tmp = y3 * (y5 * ((j * y0) - (a * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (j <= -2.45e-157) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (j <= 4.4e+88) {
tmp = x * (y * ((a * b) - (c * i)));
} else {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if j <= -2.45e-157: tmp = b * (y0 * ((k * z) - (j * x))) elif j <= 4.4e+88: tmp = x * (y * ((a * b) - (c * i))) else: tmp = y3 * (y5 * ((j * y0) - (a * y))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (j <= -2.45e-157) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (j <= 4.4e+88) tmp = Float64(x * Float64(y * Float64(Float64(a * b) - Float64(c * i)))); else tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); 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 (j <= -2.45e-157) tmp = b * (y0 * ((k * z) - (j * x))); elseif (j <= 4.4e+88) tmp = x * (y * ((a * b) - (c * i))); else tmp = y3 * (y5 * ((j * y0) - (a * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[j, -2.45e-157], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4.4e+88], N[(x * N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.45 \cdot 10^{-157}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;j \leq 4.4 \cdot 10^{+88}:\\
\;\;\;\;x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\end{array}
\end{array}
if j < -2.4499999999999999e-157Initial program 31.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites47.2%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6444.4
Applied rewrites44.4%
if -2.4499999999999999e-157 < j < 4.40000000000000017e88Initial program 31.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.8%
Taylor expanded in y around inf
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6440.2
Applied rewrites40.2%
if 4.40000000000000017e88 < j Initial program 17.0%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites57.5%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6462.8
Applied rewrites62.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= j -8.6e-80)
(* b (* y0 (- (* k z) (* j x))))
(if (<= j 4.4e+88)
(* a (* b (- (* x y) (* t z))))
(* y3 (* y5 (- (* j y0) (* a y)))))))
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 (j <= -8.6e-80) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (j <= 4.4e+88) {
tmp = a * (b * ((x * y) - (t * z)));
} else {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, 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 (j <= (-8.6d-80)) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (j <= 4.4d+88) then
tmp = a * (b * ((x * y) - (t * z)))
else
tmp = y3 * (y5 * ((j * y0) - (a * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (j <= -8.6e-80) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (j <= 4.4e+88) {
tmp = a * (b * ((x * y) - (t * z)));
} else {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if j <= -8.6e-80: tmp = b * (y0 * ((k * z) - (j * x))) elif j <= 4.4e+88: tmp = a * (b * ((x * y) - (t * z))) else: tmp = y3 * (y5 * ((j * y0) - (a * y))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (j <= -8.6e-80) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (j <= 4.4e+88) tmp = Float64(a * Float64(b * Float64(Float64(x * y) - Float64(t * z)))); else tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); 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 (j <= -8.6e-80) tmp = b * (y0 * ((k * z) - (j * x))); elseif (j <= 4.4e+88) tmp = a * (b * ((x * y) - (t * z))); else tmp = y3 * (y5 * ((j * y0) - (a * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[j, -8.6e-80], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4.4e+88], N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -8.6 \cdot 10^{-80}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;j \leq 4.4 \cdot 10^{+88}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\end{array}
\end{array}
if j < -8.6000000000000002e-80Initial program 31.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites47.8%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6448.2
Applied rewrites48.2%
if -8.6000000000000002e-80 < j < 4.40000000000000017e88Initial program 31.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.1%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6435.1
Applied rewrites35.1%
if 4.40000000000000017e88 < j Initial program 17.0%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites57.5%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6462.8
Applied rewrites62.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= j -8.5e+134)
(* x (* b (* (- j) y0)))
(if (<= j 4.4e+88)
(* a (* b (- (* x y) (* t z))))
(* y3 (* y5 (- (* j y0) (* a y)))))))
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 (j <= -8.5e+134) {
tmp = x * (b * (-j * y0));
} else if (j <= 4.4e+88) {
tmp = a * (b * ((x * y) - (t * z)));
} else {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, 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 (j <= (-8.5d+134)) then
tmp = x * (b * (-j * y0))
else if (j <= 4.4d+88) then
tmp = a * (b * ((x * y) - (t * z)))
else
tmp = y3 * (y5 * ((j * y0) - (a * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (j <= -8.5e+134) {
tmp = x * (b * (-j * y0));
} else if (j <= 4.4e+88) {
tmp = a * (b * ((x * y) - (t * z)));
} else {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if j <= -8.5e+134: tmp = x * (b * (-j * y0)) elif j <= 4.4e+88: tmp = a * (b * ((x * y) - (t * z))) else: tmp = y3 * (y5 * ((j * y0) - (a * y))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (j <= -8.5e+134) tmp = Float64(x * Float64(b * Float64(Float64(-j) * y0))); elseif (j <= 4.4e+88) tmp = Float64(a * Float64(b * Float64(Float64(x * y) - Float64(t * z)))); else tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); 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 (j <= -8.5e+134) tmp = x * (b * (-j * y0)); elseif (j <= 4.4e+88) tmp = a * (b * ((x * y) - (t * z))); else tmp = y3 * (y5 * ((j * y0) - (a * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[j, -8.5e+134], N[(x * N[(b * N[((-j) * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4.4e+88], N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -8.5 \cdot 10^{+134}:\\
\;\;\;\;x \cdot \left(b \cdot \left(\left(-j\right) \cdot y0\right)\right)\\
\mathbf{elif}\;j \leq 4.4 \cdot 10^{+88}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\end{array}
\end{array}
if j < -8.50000000000000024e134Initial program 25.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites51.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6449.2
Applied rewrites49.2%
Taylor expanded in y around 0
lower-*.f64N/A
lift-*.f6446.8
Applied rewrites46.8%
if -8.50000000000000024e134 < j < 4.40000000000000017e88Initial program 32.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites43.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6434.4
Applied rewrites34.4%
if 4.40000000000000017e88 < j Initial program 17.0%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites57.5%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6462.8
Applied rewrites62.8%
Final simplification41.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y0 -3.8e-209)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= y0 6.8e+49)
(* a (* y3 (- (* y1 z) (* y y5))))
(* x (* j (* (- b) 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) {
double tmp;
if (y0 <= -3.8e-209) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y0 <= 6.8e+49) {
tmp = a * (y3 * ((y1 * z) - (y * y5)));
} else {
tmp = x * (j * (-b * y0));
}
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 (y0 <= (-3.8d-209)) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else if (y0 <= 6.8d+49) then
tmp = a * (y3 * ((y1 * z) - (y * y5)))
else
tmp = x * (j * (-b * y0))
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 (y0 <= -3.8e-209) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y0 <= 6.8e+49) {
tmp = a * (y3 * ((y1 * z) - (y * y5)));
} else {
tmp = x * (j * (-b * y0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y0 <= -3.8e-209: tmp = y3 * (y5 * ((j * y0) - (a * y))) elif y0 <= 6.8e+49: tmp = a * (y3 * ((y1 * z) - (y * y5))) else: tmp = x * (j * (-b * y0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y0 <= -3.8e-209) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (y0 <= 6.8e+49) tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5)))); else tmp = Float64(x * Float64(j * Float64(Float64(-b) * y0))); 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 (y0 <= -3.8e-209) tmp = y3 * (y5 * ((j * y0) - (a * y))); elseif (y0 <= 6.8e+49) tmp = a * (y3 * ((y1 * z) - (y * y5))); else tmp = x * (j * (-b * y0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y0, -3.8e-209], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 6.8e+49], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(j * N[((-b) * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y0 \leq -3.8 \cdot 10^{-209}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;y0 \leq 6.8 \cdot 10^{+49}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(j \cdot \left(\left(-b\right) \cdot y0\right)\right)\\
\end{array}
\end{array}
if y0 < -3.7999999999999999e-209Initial program 29.5%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites41.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.0
Applied rewrites39.0%
if -3.7999999999999999e-209 < y0 < 6.8000000000000001e49Initial program 32.8%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites39.7%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6431.4
Applied rewrites31.4%
if 6.8000000000000001e49 < y0 Initial program 22.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites31.3%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6447.7
Applied rewrites47.7%
Taylor expanded in b around inf
lower-*.f64N/A
lift-*.f6449.1
Applied rewrites49.1%
Final simplification39.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y -4.8e+138)
(* a (* y3 (* (- y) y5)))
(if (<= y 7.2e-126)
(* x (* j (* (- b) y0)))
(if (<= y 7.2e-39) (* x (* i (* j y1))) (* x (* b (* a y)))))))
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 <= -4.8e+138) {
tmp = a * (y3 * (-y * y5));
} else if (y <= 7.2e-126) {
tmp = x * (j * (-b * y0));
} else if (y <= 7.2e-39) {
tmp = x * (i * (j * y1));
} else {
tmp = x * (b * (a * y));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, 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 <= (-4.8d+138)) then
tmp = a * (y3 * (-y * y5))
else if (y <= 7.2d-126) then
tmp = x * (j * (-b * y0))
else if (y <= 7.2d-39) then
tmp = x * (i * (j * y1))
else
tmp = x * (b * (a * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y <= -4.8e+138) {
tmp = a * (y3 * (-y * y5));
} else if (y <= 7.2e-126) {
tmp = x * (j * (-b * y0));
} else if (y <= 7.2e-39) {
tmp = x * (i * (j * y1));
} else {
tmp = x * (b * (a * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y <= -4.8e+138: tmp = a * (y3 * (-y * y5)) elif y <= 7.2e-126: tmp = x * (j * (-b * y0)) elif y <= 7.2e-39: tmp = x * (i * (j * y1)) else: tmp = x * (b * (a * y)) 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 <= -4.8e+138) tmp = Float64(a * Float64(y3 * Float64(Float64(-y) * y5))); elseif (y <= 7.2e-126) tmp = Float64(x * Float64(j * Float64(Float64(-b) * y0))); elseif (y <= 7.2e-39) tmp = Float64(x * Float64(i * Float64(j * y1))); else tmp = Float64(x * Float64(b * Float64(a * y))); 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 <= -4.8e+138) tmp = a * (y3 * (-y * y5)); elseif (y <= 7.2e-126) tmp = x * (j * (-b * y0)); elseif (y <= 7.2e-39) tmp = x * (i * (j * y1)); else tmp = x * (b * (a * y)); 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, -4.8e+138], N[(a * N[(y3 * N[((-y) * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-126], N[(x * N[(j * N[((-b) * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-39], N[(x * N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(b * N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{+138}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(\left(-y\right) \cdot y5\right)\right)\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-126}:\\
\;\;\;\;x \cdot \left(j \cdot \left(\left(-b\right) \cdot y0\right)\right)\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-39}:\\
\;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(b \cdot \left(a \cdot y\right)\right)\\
\end{array}
\end{array}
if y < -4.8000000000000002e138Initial program 21.4%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.6%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6445.9
Applied rewrites45.9%
Taylor expanded in y around inf
lower-*.f64N/A
lift-*.f6441.2
Applied rewrites41.2%
if -4.8000000000000002e138 < y < 7.1999999999999999e-126Initial program 35.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.9%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6436.2
Applied rewrites36.2%
Taylor expanded in b around inf
lower-*.f64N/A
lift-*.f6429.6
Applied rewrites29.6%
if 7.1999999999999999e-126 < y < 7.2000000000000001e-39Initial program 23.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites42.8%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6439.4
Applied rewrites39.4%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f6443.8
Applied rewrites43.8%
if 7.2000000000000001e-39 < y Initial program 22.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites48.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6450.0
Applied rewrites50.0%
Taylor expanded in y around inf
lift-*.f6443.0
Applied rewrites43.0%
Final simplification36.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (<= y3 -1.25e+25) (* a (* y3 (- (* y1 z) (* y y5)))) (if (<= y3 4.8e+33) (* x (* j (* (- b) y0))) (* y4 (* j (* (- y1) 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 (y3 <= -1.25e+25) {
tmp = a * (y3 * ((y1 * z) - (y * y5)));
} else if (y3 <= 4.8e+33) {
tmp = x * (j * (-b * y0));
} else {
tmp = y4 * (j * (-y1 * 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 (y3 <= (-1.25d+25)) then
tmp = a * (y3 * ((y1 * z) - (y * y5)))
else if (y3 <= 4.8d+33) then
tmp = x * (j * (-b * y0))
else
tmp = y4 * (j * (-y1 * 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 (y3 <= -1.25e+25) {
tmp = a * (y3 * ((y1 * z) - (y * y5)));
} else if (y3 <= 4.8e+33) {
tmp = x * (j * (-b * y0));
} else {
tmp = y4 * (j * (-y1 * y3));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y3 <= -1.25e+25: tmp = a * (y3 * ((y1 * z) - (y * y5))) elif y3 <= 4.8e+33: tmp = x * (j * (-b * y0)) else: tmp = y4 * (j * (-y1 * 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 (y3 <= -1.25e+25) tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5)))); elseif (y3 <= 4.8e+33) tmp = Float64(x * Float64(j * Float64(Float64(-b) * y0))); else tmp = Float64(y4 * Float64(j * Float64(Float64(-y1) * 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 (y3 <= -1.25e+25) tmp = a * (y3 * ((y1 * z) - (y * y5))); elseif (y3 <= 4.8e+33) tmp = x * (j * (-b * y0)); else tmp = y4 * (j * (-y1 * 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[y3, -1.25e+25], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 4.8e+33], N[(x * N[(j * N[((-b) * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y4 * N[(j * N[((-y1) * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -1.25 \cdot 10^{+25}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\
\mathbf{elif}\;y3 \leq 4.8 \cdot 10^{+33}:\\
\;\;\;\;x \cdot \left(j \cdot \left(\left(-b\right) \cdot y0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y4 \cdot \left(j \cdot \left(\left(-y1\right) \cdot y3\right)\right)\\
\end{array}
\end{array}
if y3 < -1.25000000000000006e25Initial program 26.8%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites61.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6450.5
Applied rewrites50.5%
if -1.25000000000000006e25 < y3 < 4.8e33Initial program 35.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites49.0%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6440.1
Applied rewrites40.1%
Taylor expanded in b around inf
lower-*.f64N/A
lift-*.f6429.9
Applied rewrites29.9%
if 4.8e33 < y3 Initial program 14.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites42.9%
Taylor expanded in j around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
Taylor expanded in t around 0
lower-*.f64N/A
lift-*.f6435.4
Applied rewrites35.4%
Final simplification35.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (or (<= b -2.55e+67) (not (<= b 9e+155))) (* x (* a (* b y))) (* x (* i (* j y1)))))
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 ((b <= -2.55e+67) || !(b <= 9e+155)) {
tmp = x * (a * (b * y));
} else {
tmp = x * (i * (j * y1));
}
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 ((b <= (-2.55d+67)) .or. (.not. (b <= 9d+155))) then
tmp = x * (a * (b * y))
else
tmp = x * (i * (j * y1))
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 ((b <= -2.55e+67) || !(b <= 9e+155)) {
tmp = x * (a * (b * y));
} else {
tmp = x * (i * (j * y1));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if (b <= -2.55e+67) or not (b <= 9e+155): tmp = x * (a * (b * y)) else: tmp = x * (i * (j * y1)) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if ((b <= -2.55e+67) || !(b <= 9e+155)) tmp = Float64(x * Float64(a * Float64(b * y))); else tmp = Float64(x * Float64(i * Float64(j * y1))); 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 ((b <= -2.55e+67) || ~((b <= 9e+155))) tmp = x * (a * (b * y)); else tmp = x * (i * (j * y1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[Or[LessEqual[b, -2.55e+67], N[Not[LessEqual[b, 9e+155]], $MachinePrecision]], N[(x * N[(a * N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.55 \cdot 10^{+67} \lor \neg \left(b \leq 9 \cdot 10^{+155}\right):\\
\;\;\;\;x \cdot \left(a \cdot \left(b \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\
\end{array}
\end{array}
if b < -2.5500000000000001e67 or 8.99999999999999947e155 < b Initial program 19.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites39.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6455.6
Applied rewrites55.6%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6441.1
Applied rewrites41.1%
if -2.5500000000000001e67 < b < 8.99999999999999947e155Initial program 33.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites43.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6430.4
Applied rewrites30.4%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f6423.0
Applied rewrites23.0%
Final simplification29.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (<= y -2.6e+37) (* x (* a (* b y))) (if (<= y 7.2e-39) (* x (* i (* j y1))) (* x (* b (* a y))))))
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 <= -2.6e+37) {
tmp = x * (a * (b * y));
} else if (y <= 7.2e-39) {
tmp = x * (i * (j * y1));
} else {
tmp = x * (b * (a * y));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, 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 <= (-2.6d+37)) then
tmp = x * (a * (b * y))
else if (y <= 7.2d-39) then
tmp = x * (i * (j * y1))
else
tmp = x * (b * (a * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y <= -2.6e+37) {
tmp = x * (a * (b * y));
} else if (y <= 7.2e-39) {
tmp = x * (i * (j * y1));
} else {
tmp = x * (b * (a * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y <= -2.6e+37: tmp = x * (a * (b * y)) elif y <= 7.2e-39: tmp = x * (i * (j * y1)) else: tmp = x * (b * (a * y)) 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 <= -2.6e+37) tmp = Float64(x * Float64(a * Float64(b * y))); elseif (y <= 7.2e-39) tmp = Float64(x * Float64(i * Float64(j * y1))); else tmp = Float64(x * Float64(b * Float64(a * y))); 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 <= -2.6e+37) tmp = x * (a * (b * y)); elseif (y <= 7.2e-39) tmp = x * (i * (j * y1)); else tmp = x * (b * (a * y)); 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, -2.6e+37], N[(x * N[(a * N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.2e-39], N[(x * N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(b * N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+37}:\\
\;\;\;\;x \cdot \left(a \cdot \left(b \cdot y\right)\right)\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-39}:\\
\;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(b \cdot \left(a \cdot y\right)\right)\\
\end{array}
\end{array}
if y < -2.5999999999999999e37Initial program 26.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.4
Applied rewrites38.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6429.2
Applied rewrites29.2%
if -2.5999999999999999e37 < y < 7.2000000000000001e-39Initial program 33.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.3%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6435.8
Applied rewrites35.8%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f6421.8
Applied rewrites21.8%
if 7.2000000000000001e-39 < y Initial program 22.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites48.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6450.0
Applied rewrites50.0%
Taylor expanded in y around inf
lift-*.f6443.0
Applied rewrites43.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (<= y3 -2.4e+18) (* y1 (* a (* y3 z))) (* x (* a (* b y)))))
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 <= -2.4e+18) {
tmp = y1 * (a * (y3 * z));
} else {
tmp = x * (a * (b * y));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, 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 <= (-2.4d+18)) then
tmp = y1 * (a * (y3 * z))
else
tmp = x * (a * (b * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y3 <= -2.4e+18) {
tmp = y1 * (a * (y3 * z));
} else {
tmp = x * (a * (b * y));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y3 <= -2.4e+18: tmp = y1 * (a * (y3 * z)) else: tmp = x * (a * (b * y)) 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 <= -2.4e+18) tmp = Float64(y1 * Float64(a * Float64(y3 * z))); else tmp = Float64(x * Float64(a * Float64(b * y))); 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 <= -2.4e+18) tmp = y1 * (a * (y3 * z)); else tmp = x * (a * (b * y)); 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, -2.4e+18], N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(a * N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -2.4 \cdot 10^{+18}:\\
\;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(a \cdot \left(b \cdot y\right)\right)\\
\end{array}
\end{array}
if y3 < -2.4e18Initial program 29.3%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites59.9%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6439.0
Applied rewrites39.0%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6437.3
Applied rewrites37.3%
if -2.4e18 < y3 Initial program 28.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites43.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.9
Applied rewrites35.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6422.1
Applied rewrites22.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* y1 (* a (* 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) {
return y1 * (a * (y3 * 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 = y1 * (a * (y3 * 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 y1 * (a * (y3 * z));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return y1 * (a * (y3 * z))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(y1 * Float64(a * Float64(y3 * z))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = y1 * (a * (y3 * z)); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)
\end{array}
Initial program 28.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites41.0%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6425.5
Applied rewrites25.5%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6414.8
Applied rewrites14.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* 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) {
return a * (y1 * (y3 * 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 = a * (y1 * (y3 * 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 a * (y1 * (y3 * z));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return a * (y1 * (y3 * z))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(a * Float64(y1 * Float64(y3 * z))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = a * (y1 * (y3 * z)); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)
\end{array}
Initial program 28.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites41.0%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6424.6
Applied rewrites24.6%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6413.7
Applied rewrites13.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* y4 c) (* y5 a)))
(t_2 (- (* x y2) (* z y3)))
(t_3 (- (* y2 t) (* y3 y)))
(t_4 (- (* k y2) (* j y3)))
(t_5 (- (* y4 b) (* y5 i)))
(t_6 (* (- (* j t) (* k y)) t_5))
(t_7 (- (* b a) (* i c)))
(t_8 (* t_7 (- (* y x) (* t z))))
(t_9 (- (* j x) (* k z)))
(t_10 (* (- (* b y0) (* i y1)) t_9))
(t_11 (* t_9 (- (* y0 b) (* i y1))))
(t_12 (- (* y4 y1) (* y5 y0)))
(t_13 (* t_4 t_12))
(t_14 (* (- (* y2 k) (* y3 j)) t_12))
(t_15
(+
(-
(-
(- (* (* k y) (* y5 i)) (* (* y b) (* y4 k)))
(* (* y5 t) (* i j)))
(- (* t_3 t_1) t_14))
(- t_8 (- t_11 (* (- (* y2 x) (* y3 z)) (- (* c y0) (* y1 a)))))))
(t_16
(+
(+
(- t_6 (* (* y3 y) (- (* y5 a) (* y4 c))))
(+ (* (* y5 a) (* t y2)) t_13))
(-
(* t_2 (- (* c y0) (* a y1)))
(- t_10 (* (- (* y x) (* z t)) t_7)))))
(t_17 (- (* t y2) (* y y3))))
(if (< y4 -7.206256231996481e+60)
(- (- t_8 (- t_11 t_6)) (- (/ t_3 (/ 1.0 t_1)) t_14))
(if (< y4 -3.364603505246317e-66)
(+
(-
(- (- (* (* t c) (* i z)) (* (* a t) (* b z))) (* (* y c) (* i x)))
t_10)
(-
(* (- (* y0 c) (* a y1)) t_2)
(- (* t_17 (- (* y4 c) (* a y5))) (* (- (* y1 y4) (* y5 y0)) t_4))))
(if (< y4 -1.2000065055686116e-105)
t_16
(if (< y4 6.718963124057495e-279)
t_15
(if (< y4 4.77962681403792e-222)
t_16
(if (< y4 2.2852241541266835e-175)
t_15
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(-
(* k (* i (* z y1)))
(+ (* j (* i (* x y1))) (* y0 (* k (* z b))))))
(-
(* z (* y3 (* a y1)))
(+ (* y2 (* x (* a y1))) (* y0 (* z (* c y3))))))
(* (- (* t j) (* y k)) t_5))
(* t_17 t_1))
t_13)))))))))
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 = (y4 * c) - (y5 * a);
double t_2 = (x * y2) - (z * y3);
double t_3 = (y2 * t) - (y3 * y);
double t_4 = (k * y2) - (j * y3);
double t_5 = (y4 * b) - (y5 * i);
double t_6 = ((j * t) - (k * y)) * t_5;
double t_7 = (b * a) - (i * c);
double t_8 = t_7 * ((y * x) - (t * z));
double t_9 = (j * x) - (k * z);
double t_10 = ((b * y0) - (i * y1)) * t_9;
double t_11 = t_9 * ((y0 * b) - (i * y1));
double t_12 = (y4 * y1) - (y5 * y0);
double t_13 = t_4 * t_12;
double t_14 = ((y2 * k) - (y3 * j)) * t_12;
double t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a)))));
double t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7)));
double t_17 = (t * y2) - (y * y3);
double tmp;
if (y4 < -7.206256231996481e+60) {
tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0 / t_1)) - t_14);
} else if (y4 < -3.364603505246317e-66) {
tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4)));
} else if (y4 < -1.2000065055686116e-105) {
tmp = t_16;
} else if (y4 < 6.718963124057495e-279) {
tmp = t_15;
} else if (y4 < 4.77962681403792e-222) {
tmp = t_16;
} else if (y4 < 2.2852241541266835e-175) {
tmp = t_15;
} else {
tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13;
}
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) :: t_10
real(8) :: t_11
real(8) :: t_12
real(8) :: t_13
real(8) :: t_14
real(8) :: t_15
real(8) :: t_16
real(8) :: t_17
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: t_7
real(8) :: t_8
real(8) :: t_9
real(8) :: tmp
t_1 = (y4 * c) - (y5 * a)
t_2 = (x * y2) - (z * y3)
t_3 = (y2 * t) - (y3 * y)
t_4 = (k * y2) - (j * y3)
t_5 = (y4 * b) - (y5 * i)
t_6 = ((j * t) - (k * y)) * t_5
t_7 = (b * a) - (i * c)
t_8 = t_7 * ((y * x) - (t * z))
t_9 = (j * x) - (k * z)
t_10 = ((b * y0) - (i * y1)) * t_9
t_11 = t_9 * ((y0 * b) - (i * y1))
t_12 = (y4 * y1) - (y5 * y0)
t_13 = t_4 * t_12
t_14 = ((y2 * k) - (y3 * j)) * t_12
t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a)))))
t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7)))
t_17 = (t * y2) - (y * y3)
if (y4 < (-7.206256231996481d+60)) then
tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0d0 / t_1)) - t_14)
else if (y4 < (-3.364603505246317d-66)) then
tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4)))
else if (y4 < (-1.2000065055686116d-105)) then
tmp = t_16
else if (y4 < 6.718963124057495d-279) then
tmp = t_15
else if (y4 < 4.77962681403792d-222) then
tmp = t_16
else if (y4 < 2.2852241541266835d-175) then
tmp = t_15
else
tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13
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 = (y4 * c) - (y5 * a);
double t_2 = (x * y2) - (z * y3);
double t_3 = (y2 * t) - (y3 * y);
double t_4 = (k * y2) - (j * y3);
double t_5 = (y4 * b) - (y5 * i);
double t_6 = ((j * t) - (k * y)) * t_5;
double t_7 = (b * a) - (i * c);
double t_8 = t_7 * ((y * x) - (t * z));
double t_9 = (j * x) - (k * z);
double t_10 = ((b * y0) - (i * y1)) * t_9;
double t_11 = t_9 * ((y0 * b) - (i * y1));
double t_12 = (y4 * y1) - (y5 * y0);
double t_13 = t_4 * t_12;
double t_14 = ((y2 * k) - (y3 * j)) * t_12;
double t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a)))));
double t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7)));
double t_17 = (t * y2) - (y * y3);
double tmp;
if (y4 < -7.206256231996481e+60) {
tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0 / t_1)) - t_14);
} else if (y4 < -3.364603505246317e-66) {
tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4)));
} else if (y4 < -1.2000065055686116e-105) {
tmp = t_16;
} else if (y4 < 6.718963124057495e-279) {
tmp = t_15;
} else if (y4 < 4.77962681403792e-222) {
tmp = t_16;
} else if (y4 < 2.2852241541266835e-175) {
tmp = t_15;
} else {
tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (y4 * c) - (y5 * a) t_2 = (x * y2) - (z * y3) t_3 = (y2 * t) - (y3 * y) t_4 = (k * y2) - (j * y3) t_5 = (y4 * b) - (y5 * i) t_6 = ((j * t) - (k * y)) * t_5 t_7 = (b * a) - (i * c) t_8 = t_7 * ((y * x) - (t * z)) t_9 = (j * x) - (k * z) t_10 = ((b * y0) - (i * y1)) * t_9 t_11 = t_9 * ((y0 * b) - (i * y1)) t_12 = (y4 * y1) - (y5 * y0) t_13 = t_4 * t_12 t_14 = ((y2 * k) - (y3 * j)) * t_12 t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a))))) t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7))) t_17 = (t * y2) - (y * y3) tmp = 0 if y4 < -7.206256231996481e+60: tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0 / t_1)) - t_14) elif y4 < -3.364603505246317e-66: tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4))) elif y4 < -1.2000065055686116e-105: tmp = t_16 elif y4 < 6.718963124057495e-279: tmp = t_15 elif y4 < 4.77962681403792e-222: tmp = t_16 elif y4 < 2.2852241541266835e-175: tmp = t_15 else: tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(y4 * c) - Float64(y5 * a)) t_2 = Float64(Float64(x * y2) - Float64(z * y3)) t_3 = Float64(Float64(y2 * t) - Float64(y3 * y)) t_4 = Float64(Float64(k * y2) - Float64(j * y3)) t_5 = Float64(Float64(y4 * b) - Float64(y5 * i)) t_6 = Float64(Float64(Float64(j * t) - Float64(k * y)) * t_5) t_7 = Float64(Float64(b * a) - Float64(i * c)) t_8 = Float64(t_7 * Float64(Float64(y * x) - Float64(t * z))) t_9 = Float64(Float64(j * x) - Float64(k * z)) t_10 = Float64(Float64(Float64(b * y0) - Float64(i * y1)) * t_9) t_11 = Float64(t_9 * Float64(Float64(y0 * b) - Float64(i * y1))) t_12 = Float64(Float64(y4 * y1) - Float64(y5 * y0)) t_13 = Float64(t_4 * t_12) t_14 = Float64(Float64(Float64(y2 * k) - Float64(y3 * j)) * t_12) t_15 = Float64(Float64(Float64(Float64(Float64(Float64(k * y) * Float64(y5 * i)) - Float64(Float64(y * b) * Float64(y4 * k))) - Float64(Float64(y5 * t) * Float64(i * j))) - Float64(Float64(t_3 * t_1) - t_14)) + Float64(t_8 - Float64(t_11 - Float64(Float64(Float64(y2 * x) - Float64(y3 * z)) * Float64(Float64(c * y0) - Float64(y1 * a)))))) t_16 = Float64(Float64(Float64(t_6 - Float64(Float64(y3 * y) * Float64(Float64(y5 * a) - Float64(y4 * c)))) + Float64(Float64(Float64(y5 * a) * Float64(t * y2)) + t_13)) + Float64(Float64(t_2 * Float64(Float64(c * y0) - Float64(a * y1))) - Float64(t_10 - Float64(Float64(Float64(y * x) - Float64(z * t)) * t_7)))) t_17 = Float64(Float64(t * y2) - Float64(y * y3)) tmp = 0.0 if (y4 < -7.206256231996481e+60) tmp = Float64(Float64(t_8 - Float64(t_11 - t_6)) - Float64(Float64(t_3 / Float64(1.0 / t_1)) - t_14)); elseif (y4 < -3.364603505246317e-66) tmp = Float64(Float64(Float64(Float64(Float64(Float64(t * c) * Float64(i * z)) - Float64(Float64(a * t) * Float64(b * z))) - Float64(Float64(y * c) * Float64(i * x))) - t_10) + Float64(Float64(Float64(Float64(y0 * c) - Float64(a * y1)) * t_2) - Float64(Float64(t_17 * Float64(Float64(y4 * c) - Float64(a * y5))) - Float64(Float64(Float64(y1 * y4) - Float64(y5 * y0)) * t_4)))); elseif (y4 < -1.2000065055686116e-105) tmp = t_16; elseif (y4 < 6.718963124057495e-279) tmp = t_15; elseif (y4 < 4.77962681403792e-222) tmp = t_16; elseif (y4 < 2.2852241541266835e-175) tmp = t_15; else tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(k * Float64(i * Float64(z * y1))) - Float64(Float64(j * Float64(i * Float64(x * y1))) + Float64(y0 * Float64(k * Float64(z * b)))))) + Float64(Float64(z * Float64(y3 * Float64(a * y1))) - Float64(Float64(y2 * Float64(x * Float64(a * y1))) + Float64(y0 * Float64(z * Float64(c * y3)))))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * t_5)) - Float64(t_17 * t_1)) + t_13); 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 = (y4 * c) - (y5 * a); t_2 = (x * y2) - (z * y3); t_3 = (y2 * t) - (y3 * y); t_4 = (k * y2) - (j * y3); t_5 = (y4 * b) - (y5 * i); t_6 = ((j * t) - (k * y)) * t_5; t_7 = (b * a) - (i * c); t_8 = t_7 * ((y * x) - (t * z)); t_9 = (j * x) - (k * z); t_10 = ((b * y0) - (i * y1)) * t_9; t_11 = t_9 * ((y0 * b) - (i * y1)); t_12 = (y4 * y1) - (y5 * y0); t_13 = t_4 * t_12; t_14 = ((y2 * k) - (y3 * j)) * t_12; t_15 = (((((k * y) * (y5 * i)) - ((y * b) * (y4 * k))) - ((y5 * t) * (i * j))) - ((t_3 * t_1) - t_14)) + (t_8 - (t_11 - (((y2 * x) - (y3 * z)) * ((c * y0) - (y1 * a))))); t_16 = ((t_6 - ((y3 * y) * ((y5 * a) - (y4 * c)))) + (((y5 * a) * (t * y2)) + t_13)) + ((t_2 * ((c * y0) - (a * y1))) - (t_10 - (((y * x) - (z * t)) * t_7))); t_17 = (t * y2) - (y * y3); tmp = 0.0; if (y4 < -7.206256231996481e+60) tmp = (t_8 - (t_11 - t_6)) - ((t_3 / (1.0 / t_1)) - t_14); elseif (y4 < -3.364603505246317e-66) tmp = (((((t * c) * (i * z)) - ((a * t) * (b * z))) - ((y * c) * (i * x))) - t_10) + ((((y0 * c) - (a * y1)) * t_2) - ((t_17 * ((y4 * c) - (a * y5))) - (((y1 * y4) - (y5 * y0)) * t_4))); elseif (y4 < -1.2000065055686116e-105) tmp = t_16; elseif (y4 < 6.718963124057495e-279) tmp = t_15; elseif (y4 < 4.77962681403792e-222) tmp = t_16; elseif (y4 < 2.2852241541266835e-175) tmp = t_15; else tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - ((k * (i * (z * y1))) - ((j * (i * (x * y1))) + (y0 * (k * (z * b)))))) + ((z * (y3 * (a * y1))) - ((y2 * (x * (a * y1))) + (y0 * (z * (c * y3)))))) + (((t * j) - (y * k)) * t_5)) - (t_17 * t_1)) + t_13; 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[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y2 * t), $MachinePrecision] - N[(y3 * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision]}, Block[{t$95$7 = N[(N[(b * a), $MachinePrecision] - N[(i * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$8 = N[(t$95$7 * N[(N[(y * x), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$9 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$10 = N[(N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision] * t$95$9), $MachinePrecision]}, Block[{t$95$11 = N[(t$95$9 * N[(N[(y0 * b), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$12 = N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$13 = N[(t$95$4 * t$95$12), $MachinePrecision]}, Block[{t$95$14 = N[(N[(N[(y2 * k), $MachinePrecision] - N[(y3 * j), $MachinePrecision]), $MachinePrecision] * t$95$12), $MachinePrecision]}, Block[{t$95$15 = N[(N[(N[(N[(N[(N[(k * y), $MachinePrecision] * N[(y5 * i), $MachinePrecision]), $MachinePrecision] - N[(N[(y * b), $MachinePrecision] * N[(y4 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y5 * t), $MachinePrecision] * N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$3 * t$95$1), $MachinePrecision] - t$95$14), $MachinePrecision]), $MachinePrecision] + N[(t$95$8 - N[(t$95$11 - N[(N[(N[(y2 * x), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision] * N[(N[(c * y0), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$16 = N[(N[(N[(t$95$6 - N[(N[(y3 * y), $MachinePrecision] * N[(N[(y5 * a), $MachinePrecision] - N[(y4 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y5 * a), $MachinePrecision] * N[(t * y2), $MachinePrecision]), $MachinePrecision] + t$95$13), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$10 - N[(N[(N[(y * x), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * t$95$7), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$17 = N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]}, If[Less[y4, -7.206256231996481e+60], N[(N[(t$95$8 - N[(t$95$11 - t$95$6), $MachinePrecision]), $MachinePrecision] - N[(N[(t$95$3 / N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision] - t$95$14), $MachinePrecision]), $MachinePrecision], If[Less[y4, -3.364603505246317e-66], N[(N[(N[(N[(N[(N[(t * c), $MachinePrecision] * N[(i * z), $MachinePrecision]), $MachinePrecision] - N[(N[(a * t), $MachinePrecision] * N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y * c), $MachinePrecision] * N[(i * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$10), $MachinePrecision] + N[(N[(N[(N[(y0 * c), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(N[(t$95$17 * N[(N[(y4 * c), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y1 * y4), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y4, -1.2000065055686116e-105], t$95$16, If[Less[y4, 6.718963124057495e-279], t$95$15, If[Less[y4, 4.77962681403792e-222], t$95$16, If[Less[y4, 2.2852241541266835e-175], t$95$15, 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[(k * N[(i * N[(z * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * N[(i * N[(x * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y0 * N[(k * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(y3 * N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(y2 * N[(x * N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y0 * N[(z * N[(c * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(t$95$17 * t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$13), $MachinePrecision]]]]]]]]]]]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y4 \cdot c - y5 \cdot a\\
t_2 := x \cdot y2 - z \cdot y3\\
t_3 := y2 \cdot t - y3 \cdot y\\
t_4 := k \cdot y2 - j \cdot y3\\
t_5 := y4 \cdot b - y5 \cdot i\\
t_6 := \left(j \cdot t - k \cdot y\right) \cdot t\_5\\
t_7 := b \cdot a - i \cdot c\\
t_8 := t\_7 \cdot \left(y \cdot x - t \cdot z\right)\\
t_9 := j \cdot x - k \cdot z\\
t_10 := \left(b \cdot y0 - i \cdot y1\right) \cdot t\_9\\
t_11 := t\_9 \cdot \left(y0 \cdot b - i \cdot y1\right)\\
t_12 := y4 \cdot y1 - y5 \cdot y0\\
t_13 := t\_4 \cdot t\_12\\
t_14 := \left(y2 \cdot k - y3 \cdot j\right) \cdot t\_12\\
t_15 := \left(\left(\left(\left(k \cdot y\right) \cdot \left(y5 \cdot i\right) - \left(y \cdot b\right) \cdot \left(y4 \cdot k\right)\right) - \left(y5 \cdot t\right) \cdot \left(i \cdot j\right)\right) - \left(t\_3 \cdot t\_1 - t\_14\right)\right) + \left(t\_8 - \left(t\_11 - \left(y2 \cdot x - y3 \cdot z\right) \cdot \left(c \cdot y0 - y1 \cdot a\right)\right)\right)\\
t_16 := \left(\left(t\_6 - \left(y3 \cdot y\right) \cdot \left(y5 \cdot a - y4 \cdot c\right)\right) + \left(\left(y5 \cdot a\right) \cdot \left(t \cdot y2\right) + t\_13\right)\right) + \left(t\_2 \cdot \left(c \cdot y0 - a \cdot y1\right) - \left(t\_10 - \left(y \cdot x - z \cdot t\right) \cdot t\_7\right)\right)\\
t_17 := t \cdot y2 - y \cdot y3\\
\mathbf{if}\;y4 < -7.206256231996481 \cdot 10^{+60}:\\
\;\;\;\;\left(t\_8 - \left(t\_11 - t\_6\right)\right) - \left(\frac{t\_3}{\frac{1}{t\_1}} - t\_14\right)\\
\mathbf{elif}\;y4 < -3.364603505246317 \cdot 10^{-66}:\\
\;\;\;\;\left(\left(\left(\left(t \cdot c\right) \cdot \left(i \cdot z\right) - \left(a \cdot t\right) \cdot \left(b \cdot z\right)\right) - \left(y \cdot c\right) \cdot \left(i \cdot x\right)\right) - t\_10\right) + \left(\left(y0 \cdot c - a \cdot y1\right) \cdot t\_2 - \left(t\_17 \cdot \left(y4 \cdot c - a \cdot y5\right) - \left(y1 \cdot y4 - y5 \cdot y0\right) \cdot t\_4\right)\right)\\
\mathbf{elif}\;y4 < -1.2000065055686116 \cdot 10^{-105}:\\
\;\;\;\;t\_16\\
\mathbf{elif}\;y4 < 6.718963124057495 \cdot 10^{-279}:\\
\;\;\;\;t\_15\\
\mathbf{elif}\;y4 < 4.77962681403792 \cdot 10^{-222}:\\
\;\;\;\;t\_16\\
\mathbf{elif}\;y4 < 2.2852241541266835 \cdot 10^{-175}:\\
\;\;\;\;t\_15\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(k \cdot \left(i \cdot \left(z \cdot y1\right)\right) - \left(j \cdot \left(i \cdot \left(x \cdot y1\right)\right) + y0 \cdot \left(k \cdot \left(z \cdot b\right)\right)\right)\right)\right) + \left(z \cdot \left(y3 \cdot \left(a \cdot y1\right)\right) - \left(y2 \cdot \left(x \cdot \left(a \cdot y1\right)\right) + y0 \cdot \left(z \cdot \left(c \cdot y3\right)\right)\right)\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot t\_5\right) - t\_17 \cdot t\_1\right) + t\_13\\
\end{array}
\end{array}
herbie shell --seed 2025080
(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
:alt
(! :herbie-platform default (if (< y4 -7206256231996481000000000000000000000000000000000000000000000) (- (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))))) (- (/ (- (* y2 t) (* y3 y)) (/ 1 (- (* y4 c) (* y5 a)))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (if (< y4 -3364603505246317/1000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* t c) (* i z)) (* (* a t) (* b z))) (* (* y c) (* i x))) (* (- (* b y0) (* i y1)) (- (* j x) (* k z)))) (- (* (- (* y0 c) (* a y1)) (- (* x y2) (* z y3))) (- (* (- (* t y2) (* y y3)) (- (* y4 c) (* a y5))) (* (- (* y1 y4) (* y5 y0)) (- (* k y2) (* j y3)))))) (if (< y4 -3000016263921529/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (+ (- (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))) (* (* y3 y) (- (* y5 a) (* y4 c)))) (+ (* (* y5 a) (* t y2)) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* x y2) (* z y3)) (- (* c y0) (* a y1))) (- (* (- (* b y0) (* i y1)) (- (* j x) (* k z))) (* (- (* y x) (* z t)) (- (* b a) (* i c)))))) (if (< y4 1343792624811499/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* k y) (* y5 i)) (* (* y b) (* y4 k))) (* (* y5 t) (* i j))) (- (* (- (* y2 t) (* y3 y)) (- (* y4 c) (* y5 a))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* y2 x) (* y3 z)) (- (* c y0) (* y1 a)))))) (if (< y4 29872667587737/6250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (+ (- (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))) (* (* y3 y) (- (* y5 a) (* y4 c)))) (+ (* (* y5 a) (* t y2)) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* x y2) (* z y3)) (- (* c y0) (* a y1))) (- (* (- (* b y0) (* i y1)) (- (* j x) (* k z))) (* (- (* y x) (* z t)) (- (* b a) (* i c)))))) (if (< y4 4570448308253367/20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* k y) (* y5 i)) (* (* y b) (* y4 k))) (* (* y5 t) (* i j))) (- (* (- (* y2 t) (* y3 y)) (- (* y4 c) (* y5 a))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* y2 x) (* y3 z)) (- (* c y0) (* y1 a)))))) (+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (- (* k (* i (* z y1))) (+ (* j (* i (* x y1))) (* y0 (* k (* z b)))))) (- (* z (* y3 (* a y1))) (+ (* y2 (* x (* a y1))) (* y0 (* z (* c y3)))))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))))))))
(+ (- (+ (+ (- (* (- (* 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)))))