
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)
\end{array}
Herbie found 32 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)
\end{array}
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* c y0) (* a y1)))
(t_2 (- (* k y2) (* j y3)))
(t_3 (- (* y1 y4) (* y0 y5)))
(t_4 (- (* a b) (* c i)))
(t_5 (- (* b y0) (* i y1)))
(t_6 (* x (- (fma y t_4 (* y2 t_1)) (* j t_5)))))
(if (<= x -2e+128)
t_6
(if (<= x -46000.0)
(* -1.0 (* y3 (- (fma j t_3 (* z t_1)) (* y (- (* c y4) (* a y5))))))
(if (<= x -2.6e-180)
(*
y0
(-
(fma -1.0 (* y5 t_2) (* c (- (* x y2) (* y3 z))))
(* b (- (* j x) (* k z)))))
(if (<= x -2.1e-242)
(*
k
(-
(fma -1.0 (* y (- (* b y4) (* i y5))) (* y2 t_3))
(* -1.0 (* z t_5))))
(if (<= x 2e-198)
(*
y4
(-
(fma b (- (* j t) (* k y)) (* y1 t_2))
(* c (- (* t y2) (* y y3)))))
(if (<= x 8e-68)
(* -1.0 (* z (- (fma t t_4 (* y3 t_1)) (* k t_5))))
(if (<= x 1.15e+261)
t_6
(* y2 (* -1.0 (* a (- (* x y1) (* t 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 = (c * y0) - (a * y1);
double t_2 = (k * y2) - (j * y3);
double t_3 = (y1 * y4) - (y0 * y5);
double t_4 = (a * b) - (c * i);
double t_5 = (b * y0) - (i * y1);
double t_6 = x * (fma(y, t_4, (y2 * t_1)) - (j * t_5));
double tmp;
if (x <= -2e+128) {
tmp = t_6;
} else if (x <= -46000.0) {
tmp = -1.0 * (y3 * (fma(j, t_3, (z * t_1)) - (y * ((c * y4) - (a * y5)))));
} else if (x <= -2.6e-180) {
tmp = y0 * (fma(-1.0, (y5 * t_2), (c * ((x * y2) - (y3 * z)))) - (b * ((j * x) - (k * z))));
} else if (x <= -2.1e-242) {
tmp = k * (fma(-1.0, (y * ((b * y4) - (i * y5))), (y2 * t_3)) - (-1.0 * (z * t_5)));
} else if (x <= 2e-198) {
tmp = y4 * (fma(b, ((j * t) - (k * y)), (y1 * t_2)) - (c * ((t * y2) - (y * y3))));
} else if (x <= 8e-68) {
tmp = -1.0 * (z * (fma(t, t_4, (y3 * t_1)) - (k * t_5)));
} else if (x <= 1.15e+261) {
tmp = t_6;
} else {
tmp = y2 * (-1.0 * (a * ((x * y1) - (t * 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(c * y0) - Float64(a * y1)) t_2 = Float64(Float64(k * y2) - Float64(j * y3)) t_3 = Float64(Float64(y1 * y4) - Float64(y0 * y5)) t_4 = Float64(Float64(a * b) - Float64(c * i)) t_5 = Float64(Float64(b * y0) - Float64(i * y1)) t_6 = Float64(x * Float64(fma(y, t_4, Float64(y2 * t_1)) - Float64(j * t_5))) tmp = 0.0 if (x <= -2e+128) tmp = t_6; elseif (x <= -46000.0) tmp = Float64(-1.0 * Float64(y3 * Float64(fma(j, t_3, Float64(z * t_1)) - Float64(y * Float64(Float64(c * y4) - Float64(a * y5)))))); elseif (x <= -2.6e-180) tmp = Float64(y0 * Float64(fma(-1.0, Float64(y5 * t_2), Float64(c * Float64(Float64(x * y2) - Float64(y3 * z)))) - Float64(b * Float64(Float64(j * x) - Float64(k * z))))); elseif (x <= -2.1e-242) tmp = Float64(k * Float64(fma(-1.0, Float64(y * Float64(Float64(b * y4) - Float64(i * y5))), Float64(y2 * t_3)) - Float64(-1.0 * Float64(z * t_5)))); elseif (x <= 2e-198) tmp = Float64(y4 * Float64(fma(b, Float64(Float64(j * t) - Float64(k * y)), Float64(y1 * t_2)) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); elseif (x <= 8e-68) tmp = Float64(-1.0 * Float64(z * Float64(fma(t, t_4, Float64(y3 * t_1)) - Float64(k * t_5)))); elseif (x <= 1.15e+261) tmp = t_6; else tmp = Float64(y2 * Float64(-1.0 * Float64(a * Float64(Float64(x * y1) - Float64(t * 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[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x * N[(N[(y * t$95$4 + N[(y2 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(j * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2e+128], t$95$6, If[LessEqual[x, -46000.0], N[(-1.0 * N[(y3 * N[(N[(j * t$95$3 + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.6e-180], N[(y0 * N[(N[(-1.0 * N[(y5 * t$95$2), $MachinePrecision] + N[(c * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.1e-242], N[(k * N[(N[(-1.0 * N[(y * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y2 * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(z * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e-198], N[(y4 * N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] + N[(y1 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8e-68], N[(-1.0 * N[(z * N[(N[(t * t$95$4 + N[(y3 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(k * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e+261], t$95$6, N[(y2 * N[(-1.0 * N[(a * N[(N[(x * y1), $MachinePrecision] - N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot y0 - a \cdot y1\\
t_2 := k \cdot y2 - j \cdot y3\\
t_3 := y1 \cdot y4 - y0 \cdot y5\\
t_4 := a \cdot b - c \cdot i\\
t_5 := b \cdot y0 - i \cdot y1\\
t_6 := x \cdot \left(\mathsf{fma}\left(y, t\_4, y2 \cdot t\_1\right) - j \cdot t\_5\right)\\
\mathbf{if}\;x \leq -2 \cdot 10^{+128}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x \leq -46000:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, t\_3, z \cdot t\_1\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{-180}:\\
\;\;\;\;y0 \cdot \left(\mathsf{fma}\left(-1, y5 \cdot t\_2, c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-242}:\\
\;\;\;\;k \cdot \left(\mathsf{fma}\left(-1, y \cdot \left(b \cdot y4 - i \cdot y5\right), y2 \cdot t\_3\right) - -1 \cdot \left(z \cdot t\_5\right)\right)\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-198}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot t\_2\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-68}:\\
\;\;\;\;-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, t\_4, y3 \cdot t\_1\right) - k \cdot t\_5\right)\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{+261}:\\
\;\;\;\;t\_6\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(-1 \cdot \left(a \cdot \left(x \cdot y1 - t \cdot y5\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.0000000000000002e128 or 8.00000000000000053e-68 < x < 1.15000000000000003e261Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
if -2.0000000000000002e128 < x < -46000Initial program 29.9%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
if -46000 < x < -2.5999999999999999e-180Initial program 29.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
if -2.5999999999999999e-180 < x < -2.10000000000000019e-242Initial program 29.9%
Taylor expanded in k around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.1%
if -2.10000000000000019e-242 < x < 1.9999999999999998e-198Initial program 29.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
if 1.9999999999999998e-198 < x < 8.00000000000000053e-68Initial program 29.9%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
if 1.15000000000000003e261 < x Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* a b) (* c i)))
(t_2
(*
y4
(-
(fma b (- (* j t) (* k y)) (* y1 (- (* k y2) (* j y3))))
(* c (- (* t y2) (* y y3))))))
(t_3 (- (* c y0) (* a y1)))
(t_4 (- (* c y4) (* a y5))))
(if (<= y4 -1.6e+100)
t_2
(if (<= y4 -8e-6)
(* x (- (fma y t_1 (* y2 t_3)) (* j (- (* b y0) (* i y1)))))
(if (<= y4 -9.2e-129)
(* t (- (fma -1.0 (* z t_1) (* j (- (* b y4) (* i y5)))) (* y2 t_4)))
(if (<= y4 -1.62e-226)
(* a (* x (fma -1.0 (* y1 y2) (* b y))))
(if (<= y4 3.8e-127)
(*
-1.0
(* y3 (- (fma j (- (* y1 y4) (* y0 y5)) (* z t_3)) (* y t_4))))
(if (<= y4 2.1e+30) (* x (* y t_1)) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (a * b) - (c * i);
double t_2 = y4 * (fma(b, ((j * t) - (k * y)), (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
double t_3 = (c * y0) - (a * y1);
double t_4 = (c * y4) - (a * y5);
double tmp;
if (y4 <= -1.6e+100) {
tmp = t_2;
} else if (y4 <= -8e-6) {
tmp = x * (fma(y, t_1, (y2 * t_3)) - (j * ((b * y0) - (i * y1))));
} else if (y4 <= -9.2e-129) {
tmp = t * (fma(-1.0, (z * t_1), (j * ((b * y4) - (i * y5)))) - (y2 * t_4));
} else if (y4 <= -1.62e-226) {
tmp = a * (x * fma(-1.0, (y1 * y2), (b * y)));
} else if (y4 <= 3.8e-127) {
tmp = -1.0 * (y3 * (fma(j, ((y1 * y4) - (y0 * y5)), (z * t_3)) - (y * t_4)));
} else if (y4 <= 2.1e+30) {
tmp = x * (y * t_1);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(a * b) - Float64(c * i)) t_2 = Float64(y4 * Float64(fma(b, Float64(Float64(j * t) - Float64(k * y)), Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))) t_3 = Float64(Float64(c * y0) - Float64(a * y1)) t_4 = Float64(Float64(c * y4) - Float64(a * y5)) tmp = 0.0 if (y4 <= -1.6e+100) tmp = t_2; elseif (y4 <= -8e-6) tmp = Float64(x * Float64(fma(y, t_1, Float64(y2 * t_3)) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); elseif (y4 <= -9.2e-129) tmp = Float64(t * Float64(fma(-1.0, Float64(z * t_1), Float64(j * Float64(Float64(b * y4) - Float64(i * y5)))) - Float64(y2 * t_4))); elseif (y4 <= -1.62e-226) tmp = Float64(a * Float64(x * fma(-1.0, Float64(y1 * y2), Float64(b * y)))); elseif (y4 <= 3.8e-127) tmp = Float64(-1.0 * Float64(y3 * Float64(fma(j, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(z * t_3)) - Float64(y * t_4)))); elseif (y4 <= 2.1e+30) tmp = Float64(x * Float64(y * t_1)); else tmp = t_2; 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[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y4 * N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] + 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]}, Block[{t$95$3 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -1.6e+100], t$95$2, If[LessEqual[y4, -8e-6], N[(x * N[(N[(y * t$95$1 + N[(y2 * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -9.2e-129], N[(t * N[(N[(-1.0 * N[(z * t$95$1), $MachinePrecision] + N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y2 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -1.62e-226], N[(a * N[(x * N[(-1.0 * N[(y1 * y2), $MachinePrecision] + N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 3.8e-127], N[(-1.0 * N[(y3 * N[(N[(j * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(z * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(y * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 2.1e+30], N[(x * N[(y * t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b - c \cdot i\\
t_2 := y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
t_3 := c \cdot y0 - a \cdot y1\\
t_4 := c \cdot y4 - a \cdot y5\\
\mathbf{if}\;y4 \leq -1.6 \cdot 10^{+100}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y4 \leq -8 \cdot 10^{-6}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, t\_1, y2 \cdot t\_3\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{elif}\;y4 \leq -9.2 \cdot 10^{-129}:\\
\;\;\;\;t \cdot \left(\mathsf{fma}\left(-1, z \cdot t\_1, j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - y2 \cdot t\_4\right)\\
\mathbf{elif}\;y4 \leq -1.62 \cdot 10^{-226}:\\
\;\;\;\;a \cdot \left(x \cdot \mathsf{fma}\left(-1, y1 \cdot y2, b \cdot y\right)\right)\\
\mathbf{elif}\;y4 \leq 3.8 \cdot 10^{-127}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot t\_3\right) - y \cdot t\_4\right)\right)\\
\mathbf{elif}\;y4 \leq 2.1 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \left(y \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y4 < -1.5999999999999999e100 or 2.1e30 < y4 Initial program 29.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
if -1.5999999999999999e100 < y4 < -7.99999999999999964e-6Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
if -7.99999999999999964e-6 < y4 < -9.1999999999999998e-129Initial program 29.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
if -9.1999999999999998e-129 < y4 < -1.61999999999999997e-226Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if -1.61999999999999997e-226 < y4 < 3.80000000000000003e-127Initial program 29.9%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
if 3.80000000000000003e-127 < y4 < 2.1e30Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* a b) (* c i)))
(t_2
(*
y4
(-
(fma b (- (* j t) (* k y)) (* y1 (- (* k y2) (* j y3))))
(* c (- (* t y2) (* y y3))))))
(t_3 (- (* c y0) (* a y1))))
(if (<= y4 -1.6e+100)
t_2
(if (<= y4 -4e-7)
(* x (- (fma y t_1 (* y2 t_3)) (* j (- (* b y0) (* i y1)))))
(if (<= y4 1.5e-136)
(* -1.0 (* z (fma t t_1 (* y3 t_3))))
(if (<= y4 2.1e+30) (* x (* y t_1)) t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (a * b) - (c * i);
double t_2 = y4 * (fma(b, ((j * t) - (k * y)), (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
double t_3 = (c * y0) - (a * y1);
double tmp;
if (y4 <= -1.6e+100) {
tmp = t_2;
} else if (y4 <= -4e-7) {
tmp = x * (fma(y, t_1, (y2 * t_3)) - (j * ((b * y0) - (i * y1))));
} else if (y4 <= 1.5e-136) {
tmp = -1.0 * (z * fma(t, t_1, (y3 * t_3)));
} else if (y4 <= 2.1e+30) {
tmp = x * (y * t_1);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(a * b) - Float64(c * i)) t_2 = Float64(y4 * Float64(fma(b, Float64(Float64(j * t) - Float64(k * y)), Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))) t_3 = Float64(Float64(c * y0) - Float64(a * y1)) tmp = 0.0 if (y4 <= -1.6e+100) tmp = t_2; elseif (y4 <= -4e-7) tmp = Float64(x * Float64(fma(y, t_1, Float64(y2 * t_3)) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); elseif (y4 <= 1.5e-136) tmp = Float64(-1.0 * Float64(z * fma(t, t_1, Float64(y3 * t_3)))); elseif (y4 <= 2.1e+30) tmp = Float64(x * Float64(y * t_1)); else tmp = t_2; 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[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y4 * N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] + 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]}, Block[{t$95$3 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -1.6e+100], t$95$2, If[LessEqual[y4, -4e-7], N[(x * N[(N[(y * t$95$1 + N[(y2 * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1.5e-136], N[(-1.0 * N[(z * N[(t * t$95$1 + N[(y3 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 2.1e+30], N[(x * N[(y * t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b - c \cdot i\\
t_2 := y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
t_3 := c \cdot y0 - a \cdot y1\\
\mathbf{if}\;y4 \leq -1.6 \cdot 10^{+100}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y4 \leq -4 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, t\_1, y2 \cdot t\_3\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{elif}\;y4 \leq 1.5 \cdot 10^{-136}:\\
\;\;\;\;-1 \cdot \left(z \cdot \mathsf{fma}\left(t, t\_1, y3 \cdot t\_3\right)\right)\\
\mathbf{elif}\;y4 \leq 2.1 \cdot 10^{+30}:\\
\;\;\;\;x \cdot \left(y \cdot t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y4 < -1.5999999999999999e100 or 2.1e30 < y4 Initial program 29.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
if -1.5999999999999999e100 < y4 < -3.9999999999999998e-7Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
if -3.9999999999999998e-7 < y4 < 1.4999999999999999e-136Initial program 29.9%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in k around 0
lower-*.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.7
Applied rewrites35.7%
if 1.4999999999999999e-136 < y4 < 2.1e30Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* c y0) (* a y1))))
(if (<= y2 -6.2e+43)
(* y2 (- (* x t_1) (* t (- (* c y4) (* a y5)))))
(if (<= y2 -2.9e-94)
(* -1.0 (* y3 (* z t_1)))
(if (<= y2 -1.46e-182)
(* b (* y (fma -1.0 (* k y4) (* a x))))
(if (<= y2 3.2e-282)
(* -1.0 (* i (* j (- (* t y5) (* x y1)))))
(if (<= y2 4.8e-30)
(* x (* y (- (* a b) (* c i))))
(if (<= y2 2e+91)
(* c (* y4 (- (* y y3) (* t y2))))
(* k (* y2 (- (* y1 y4) (* y0 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 = (c * y0) - (a * y1);
double tmp;
if (y2 <= -6.2e+43) {
tmp = y2 * ((x * t_1) - (t * ((c * y4) - (a * y5))));
} else if (y2 <= -2.9e-94) {
tmp = -1.0 * (y3 * (z * t_1));
} else if (y2 <= -1.46e-182) {
tmp = b * (y * fma(-1.0, (k * y4), (a * x)));
} else if (y2 <= 3.2e-282) {
tmp = -1.0 * (i * (j * ((t * y5) - (x * y1))));
} else if (y2 <= 4.8e-30) {
tmp = x * (y * ((a * b) - (c * i)));
} else if (y2 <= 2e+91) {
tmp = c * (y4 * ((y * y3) - (t * y2)));
} else {
tmp = k * (y2 * ((y1 * y4) - (y0 * 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(c * y0) - Float64(a * y1)) tmp = 0.0 if (y2 <= -6.2e+43) tmp = Float64(y2 * Float64(Float64(x * t_1) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5))))); elseif (y2 <= -2.9e-94) tmp = Float64(-1.0 * Float64(y3 * Float64(z * t_1))); elseif (y2 <= -1.46e-182) tmp = Float64(b * Float64(y * fma(-1.0, Float64(k * y4), Float64(a * x)))); elseif (y2 <= 3.2e-282) tmp = Float64(-1.0 * Float64(i * Float64(j * Float64(Float64(t * y5) - Float64(x * y1))))); elseif (y2 <= 4.8e-30) tmp = Float64(x * Float64(y * Float64(Float64(a * b) - Float64(c * i)))); elseif (y2 <= 2e+91) tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2)))); else tmp = Float64(k * Float64(y2 * Float64(Float64(y1 * y4) - Float64(y0 * 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[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -6.2e+43], N[(y2 * N[(N[(x * t$95$1), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -2.9e-94], N[(-1.0 * N[(y3 * N[(z * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -1.46e-182], N[(b * N[(y * N[(-1.0 * N[(k * y4), $MachinePrecision] + N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 3.2e-282], N[(-1.0 * N[(i * N[(j * N[(N[(t * y5), $MachinePrecision] - N[(x * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 4.8e-30], N[(x * N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 2e+91], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y2 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot y0 - a \cdot y1\\
\mathbf{if}\;y2 \leq -6.2 \cdot 10^{+43}:\\
\;\;\;\;y2 \cdot \left(x \cdot t\_1 - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;y2 \leq -2.9 \cdot 10^{-94}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(z \cdot t\_1\right)\right)\\
\mathbf{elif}\;y2 \leq -1.46 \cdot 10^{-182}:\\
\;\;\;\;b \cdot \left(y \cdot \mathsf{fma}\left(-1, k \cdot y4, a \cdot x\right)\right)\\
\mathbf{elif}\;y2 \leq 3.2 \cdot 10^{-282}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5 - x \cdot y1\right)\right)\right)\\
\mathbf{elif}\;y2 \leq 4.8 \cdot 10^{-30}:\\
\;\;\;\;x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right)\\
\mathbf{elif}\;y2 \leq 2 \cdot 10^{+91}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\
\end{array}
\end{array}
if y2 < -6.2000000000000003e43Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in k around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6434.2
Applied rewrites34.2%
if -6.2000000000000003e43 < y2 < -2.89999999999999995e-94Initial program 29.9%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if -2.89999999999999995e-94 < y2 < -1.46e-182Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6425.8
Applied rewrites25.8%
if -1.46e-182 < y2 < 3.19999999999999983e-282Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.4
Applied rewrites27.4%
if 3.19999999999999983e-282 < y2 < 4.7999999999999997e-30Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
if 4.7999999999999997e-30 < y2 < 2.00000000000000016e91Initial program 29.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3
Applied rewrites27.3%
if 2.00000000000000016e91 < y2 Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* a b) (* c i)))
(t_2
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) t_1)
(* (- (* 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_2 INFINITY)
t_2
(*
x
(-
(fma y t_1 (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i 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 t_1 = (a * b) - (c * i);
double t_2 = (((((((x * y) - (z * t)) * t_1) - (((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_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = x * (fma(y, t_1, (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(a * b) - Float64(c * i)) t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * t_1) - 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_2 <= Inf) tmp = t_2; else tmp = Float64(x * Float64(fma(y, t_1, Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); 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[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * t$95$1), $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$2, Infinity], t$95$2, N[(x * N[(N[(y * t$95$1 + 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]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b - c \cdot i\\
t_2 := \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot t\_1 - \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\_2 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, t\_1, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\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 29.9%
if +inf.0 < (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* a b) (* c i))))
(if (<= y -2.8e+37)
(* b (* y (fma -1.0 (* k y4) (* a x))))
(if (<= y -6.4e-294)
(* -1.0 (* z (fma t t_1 (* y3 (- (* c y0) (* a y1))))))
(if (<= y 1.5e-53)
(* y1 (* y4 (- (* k y2) (* j y3))))
(if (<= y 2.9e+122)
(* i (* k (- (* y y5) (* y1 z))))
(if (<= y 4.8e+179)
(* y4 (* c (- (* y y3) (* t y2))))
(* x (* y t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (a * b) - (c * i);
double tmp;
if (y <= -2.8e+37) {
tmp = b * (y * fma(-1.0, (k * y4), (a * x)));
} else if (y <= -6.4e-294) {
tmp = -1.0 * (z * fma(t, t_1, (y3 * ((c * y0) - (a * y1)))));
} else if (y <= 1.5e-53) {
tmp = y1 * (y4 * ((k * y2) - (j * y3)));
} else if (y <= 2.9e+122) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (y <= 4.8e+179) {
tmp = y4 * (c * ((y * y3) - (t * y2)));
} else {
tmp = x * (y * t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(a * b) - Float64(c * i)) tmp = 0.0 if (y <= -2.8e+37) tmp = Float64(b * Float64(y * fma(-1.0, Float64(k * y4), Float64(a * x)))); elseif (y <= -6.4e-294) tmp = Float64(-1.0 * Float64(z * fma(t, t_1, Float64(y3 * Float64(Float64(c * y0) - Float64(a * y1)))))); elseif (y <= 1.5e-53) tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * y3)))); elseif (y <= 2.9e+122) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); elseif (y <= 4.8e+179) tmp = Float64(y4 * Float64(c * Float64(Float64(y * y3) - Float64(t * y2)))); else tmp = Float64(x * Float64(y * t_1)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e+37], N[(b * N[(y * N[(-1.0 * N[(k * y4), $MachinePrecision] + N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.4e-294], N[(-1.0 * N[(z * N[(t * t$95$1 + N[(y3 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-53], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+122], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+179], N[(y4 * N[(c * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b - c \cdot i\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{+37}:\\
\;\;\;\;b \cdot \left(y \cdot \mathsf{fma}\left(-1, k \cdot y4, a \cdot x\right)\right)\\
\mathbf{elif}\;y \leq -6.4 \cdot 10^{-294}:\\
\;\;\;\;-1 \cdot \left(z \cdot \mathsf{fma}\left(t, t\_1, y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\right)\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-53}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+122}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+179}:\\
\;\;\;\;y4 \cdot \left(c \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot t\_1\right)\\
\end{array}
\end{array}
if y < -2.7999999999999998e37Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6425.8
Applied rewrites25.8%
if -2.7999999999999998e37 < y < -6.40000000000000038e-294Initial program 29.9%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in k around 0
lower-*.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.7
Applied rewrites35.7%
if -6.40000000000000038e-294 < y < 1.5000000000000001e-53Initial program 29.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
if 1.5000000000000001e-53 < y < 2.9000000000000001e122Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
if 2.9000000000000001e122 < y < 4.80000000000000025e179Initial program 29.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
if 4.80000000000000025e179 < y Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* c y0) (* a y1)))
(t_2 (* x t_1))
(t_3 (* t (- (* c y4) (* a y5)))))
(if (<= y2 -6.2e+43)
(* y2 (- t_2 t_3))
(if (<= y2 -1.45e-93)
(* -1.0 (* y3 (* z t_1)))
(if (<= y2 3.1e+127)
(*
b
(-
(fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
(* y0 (- (* j x) (* k z)))))
(* y2 (- (fma k (- (* y1 y4) (* y0 y5)) t_2) t_3)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (c * y0) - (a * y1);
double t_2 = x * t_1;
double t_3 = t * ((c * y4) - (a * y5));
double tmp;
if (y2 <= -6.2e+43) {
tmp = y2 * (t_2 - t_3);
} else if (y2 <= -1.45e-93) {
tmp = -1.0 * (y3 * (z * t_1));
} else if (y2 <= 3.1e+127) {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
} else {
tmp = y2 * (fma(k, ((y1 * y4) - (y0 * y5)), t_2) - t_3);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(c * y0) - Float64(a * y1)) t_2 = Float64(x * t_1) t_3 = Float64(t * Float64(Float64(c * y4) - Float64(a * y5))) tmp = 0.0 if (y2 <= -6.2e+43) tmp = Float64(y2 * Float64(t_2 - t_3)); elseif (y2 <= -1.45e-93) tmp = Float64(-1.0 * Float64(y3 * Float64(z * t_1))); elseif (y2 <= 3.1e+127) 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(y2 * Float64(fma(k, Float64(Float64(y1 * y4) - Float64(y0 * y5)), t_2) - t_3)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -6.2e+43], N[(y2 * N[(t$95$2 - t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -1.45e-93], N[(-1.0 * N[(y3 * N[(z * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 3.1e+127], 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[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot y0 - a \cdot y1\\
t_2 := x \cdot t\_1\\
t_3 := t \cdot \left(c \cdot y4 - a \cdot y5\right)\\
\mathbf{if}\;y2 \leq -6.2 \cdot 10^{+43}:\\
\;\;\;\;y2 \cdot \left(t\_2 - t\_3\right)\\
\mathbf{elif}\;y2 \leq -1.45 \cdot 10^{-93}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(z \cdot t\_1\right)\right)\\
\mathbf{elif}\;y2 \leq 3.1 \cdot 10^{+127}:\\
\;\;\;\;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}:\\
\;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, t\_2\right) - t\_3\right)\\
\end{array}
\end{array}
if y2 < -6.2000000000000003e43Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in k around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6434.2
Applied rewrites34.2%
if -6.2000000000000003e43 < y2 < -1.4499999999999999e-93Initial program 29.9%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if -1.4499999999999999e-93 < y2 < 3.1000000000000002e127Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
if 3.1000000000000002e127 < y2 Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* c y0) (* a y1))))
(if (<= y2 -6.2e+43)
(* y2 (- (* x t_1) (* t (- (* c y4) (* a y5)))))
(if (<= y2 -1.45e-93)
(* -1.0 (* y3 (* z t_1)))
(if (<= y2 1.55e+124)
(*
b
(-
(fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
(* y0 (- (* j x) (* k z)))))
(* k (* y2 (- (* y1 y4) (* y0 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 = (c * y0) - (a * y1);
double tmp;
if (y2 <= -6.2e+43) {
tmp = y2 * ((x * t_1) - (t * ((c * y4) - (a * y5))));
} else if (y2 <= -1.45e-93) {
tmp = -1.0 * (y3 * (z * t_1));
} else if (y2 <= 1.55e+124) {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
} else {
tmp = k * (y2 * ((y1 * y4) - (y0 * 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(c * y0) - Float64(a * y1)) tmp = 0.0 if (y2 <= -6.2e+43) tmp = Float64(y2 * Float64(Float64(x * t_1) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5))))); elseif (y2 <= -1.45e-93) tmp = Float64(-1.0 * Float64(y3 * Float64(z * t_1))); elseif (y2 <= 1.55e+124) 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(k * Float64(y2 * Float64(Float64(y1 * y4) - Float64(y0 * 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[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -6.2e+43], N[(y2 * N[(N[(x * t$95$1), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -1.45e-93], N[(-1.0 * N[(y3 * N[(z * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 1.55e+124], 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[(k * N[(y2 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot y0 - a \cdot y1\\
\mathbf{if}\;y2 \leq -6.2 \cdot 10^{+43}:\\
\;\;\;\;y2 \cdot \left(x \cdot t\_1 - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;y2 \leq -1.45 \cdot 10^{-93}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(z \cdot t\_1\right)\right)\\
\mathbf{elif}\;y2 \leq 1.55 \cdot 10^{+124}:\\
\;\;\;\;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}:\\
\;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\
\end{array}
\end{array}
if y2 < -6.2000000000000003e43Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in k around 0
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6434.2
Applied rewrites34.2%
if -6.2000000000000003e43 < y2 < -1.4499999999999999e-93Initial program 29.9%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if -1.4499999999999999e-93 < y2 < 1.5500000000000001e124Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
if 1.5500000000000001e124 < y2 Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y -15500000000.0)
(* b (* y (fma -1.0 (* k y4) (* a x))))
(if (<= y -5.4e-292)
(* a (* z (fma -1.0 (* b t) (* y1 y3))))
(if (<= y 1.5e-53)
(* y1 (* y4 (- (* k y2) (* j y3))))
(if (<= y 2.9e+122)
(* i (* k (- (* y y5) (* y1 z))))
(if (<= y 4.8e+179)
(* y4 (* c (- (* y y3) (* t y2))))
(* x (* y (- (* a b) (* c i))))))))))
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 <= -15500000000.0) {
tmp = b * (y * fma(-1.0, (k * y4), (a * x)));
} else if (y <= -5.4e-292) {
tmp = a * (z * fma(-1.0, (b * t), (y1 * y3)));
} else if (y <= 1.5e-53) {
tmp = y1 * (y4 * ((k * y2) - (j * y3)));
} else if (y <= 2.9e+122) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (y <= 4.8e+179) {
tmp = y4 * (c * ((y * y3) - (t * y2)));
} else {
tmp = x * (y * ((a * b) - (c * i)));
}
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 <= -15500000000.0) tmp = Float64(b * Float64(y * fma(-1.0, Float64(k * y4), Float64(a * x)))); elseif (y <= -5.4e-292) tmp = Float64(a * Float64(z * fma(-1.0, Float64(b * t), Float64(y1 * y3)))); elseif (y <= 1.5e-53) tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * y3)))); elseif (y <= 2.9e+122) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); elseif (y <= 4.8e+179) tmp = Float64(y4 * Float64(c * Float64(Float64(y * y3) - Float64(t * y2)))); else tmp = Float64(x * Float64(y * Float64(Float64(a * b) - Float64(c * i)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y, -15500000000.0], N[(b * N[(y * N[(-1.0 * N[(k * y4), $MachinePrecision] + N[(a * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.4e-292], N[(a * N[(z * N[(-1.0 * N[(b * t), $MachinePrecision] + N[(y1 * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e-53], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+122], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.8e+179], N[(y4 * N[(c * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -15500000000:\\
\;\;\;\;b \cdot \left(y \cdot \mathsf{fma}\left(-1, k \cdot y4, a \cdot x\right)\right)\\
\mathbf{elif}\;y \leq -5.4 \cdot 10^{-292}:\\
\;\;\;\;a \cdot \left(z \cdot \mathsf{fma}\left(-1, b \cdot t, y1 \cdot y3\right)\right)\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-53}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+122}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+179}:\\
\;\;\;\;y4 \cdot \left(c \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot \left(a \cdot b - c \cdot i\right)\right)\\
\end{array}
\end{array}
if y < -1.55e10Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6425.8
Applied rewrites25.8%
if -1.55e10 < y < -5.3999999999999998e-292Initial program 29.9%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if -5.3999999999999998e-292 < y < 1.5000000000000001e-53Initial program 29.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
if 1.5000000000000001e-53 < y < 2.9000000000000001e122Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
if 2.9000000000000001e122 < y < 4.80000000000000025e179Initial program 29.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
if 4.80000000000000025e179 < y Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y2 -1.2e+44)
(* t (* y2 (- (* a y5) (* c y4))))
(if (<= y2 -3.4e-14)
(* y1 (* y4 (- (* k y2) (* j y3))))
(if (<= y2 -8e-200)
(* i (* z (- (* c t) (* k y1))))
(if (<= y2 1.8e-181)
(* i (* k (- (* y y5) (* y1 z))))
(if (<= y2 3.35e-31)
(* b (* -1.0 (* j (* x y0))))
(if (<= y2 2e+91)
(* c (* y4 (- (* y y3) (* t y2))))
(* k (* y2 (- (* y1 y4) (* y0 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 tmp;
if (y2 <= -1.2e+44) {
tmp = t * (y2 * ((a * y5) - (c * y4)));
} else if (y2 <= -3.4e-14) {
tmp = y1 * (y4 * ((k * y2) - (j * y3)));
} else if (y2 <= -8e-200) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (y2 <= 1.8e-181) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (y2 <= 3.35e-31) {
tmp = b * (-1.0 * (j * (x * y0)));
} else if (y2 <= 2e+91) {
tmp = c * (y4 * ((y * y3) - (t * y2)));
} else {
tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
}
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 (y2 <= (-1.2d+44)) then
tmp = t * (y2 * ((a * y5) - (c * y4)))
else if (y2 <= (-3.4d-14)) then
tmp = y1 * (y4 * ((k * y2) - (j * y3)))
else if (y2 <= (-8d-200)) then
tmp = i * (z * ((c * t) - (k * y1)))
else if (y2 <= 1.8d-181) then
tmp = i * (k * ((y * y5) - (y1 * z)))
else if (y2 <= 3.35d-31) then
tmp = b * ((-1.0d0) * (j * (x * y0)))
else if (y2 <= 2d+91) then
tmp = c * (y4 * ((y * y3) - (t * y2)))
else
tmp = k * (y2 * ((y1 * y4) - (y0 * y5)))
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 (y2 <= -1.2e+44) {
tmp = t * (y2 * ((a * y5) - (c * y4)));
} else if (y2 <= -3.4e-14) {
tmp = y1 * (y4 * ((k * y2) - (j * y3)));
} else if (y2 <= -8e-200) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (y2 <= 1.8e-181) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (y2 <= 3.35e-31) {
tmp = b * (-1.0 * (j * (x * y0)));
} else if (y2 <= 2e+91) {
tmp = c * (y4 * ((y * y3) - (t * y2)));
} else {
tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y2 <= -1.2e+44: tmp = t * (y2 * ((a * y5) - (c * y4))) elif y2 <= -3.4e-14: tmp = y1 * (y4 * ((k * y2) - (j * y3))) elif y2 <= -8e-200: tmp = i * (z * ((c * t) - (k * y1))) elif y2 <= 1.8e-181: tmp = i * (k * ((y * y5) - (y1 * z))) elif y2 <= 3.35e-31: tmp = b * (-1.0 * (j * (x * y0))) elif y2 <= 2e+91: tmp = c * (y4 * ((y * y3) - (t * y2))) else: tmp = k * (y2 * ((y1 * y4) - (y0 * y5))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y2 <= -1.2e+44) tmp = Float64(t * Float64(y2 * Float64(Float64(a * y5) - Float64(c * y4)))); elseif (y2 <= -3.4e-14) tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * y3)))); elseif (y2 <= -8e-200) tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); elseif (y2 <= 1.8e-181) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); elseif (y2 <= 3.35e-31) tmp = Float64(b * Float64(-1.0 * Float64(j * Float64(x * y0)))); elseif (y2 <= 2e+91) tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2)))); else tmp = Float64(k * Float64(y2 * Float64(Float64(y1 * y4) - Float64(y0 * y5)))); 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 (y2 <= -1.2e+44) tmp = t * (y2 * ((a * y5) - (c * y4))); elseif (y2 <= -3.4e-14) tmp = y1 * (y4 * ((k * y2) - (j * y3))); elseif (y2 <= -8e-200) tmp = i * (z * ((c * t) - (k * y1))); elseif (y2 <= 1.8e-181) tmp = i * (k * ((y * y5) - (y1 * z))); elseif (y2 <= 3.35e-31) tmp = b * (-1.0 * (j * (x * y0))); elseif (y2 <= 2e+91) tmp = c * (y4 * ((y * y3) - (t * y2))); else tmp = k * (y2 * ((y1 * y4) - (y0 * y5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y2, -1.2e+44], N[(t * N[(y2 * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -3.4e-14], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -8e-200], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 1.8e-181], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 3.35e-31], N[(b * N[(-1.0 * N[(j * N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 2e+91], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y2 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y2 \leq -1.2 \cdot 10^{+44}:\\
\;\;\;\;t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\mathbf{elif}\;y2 \leq -3.4 \cdot 10^{-14}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\mathbf{elif}\;y2 \leq -8 \cdot 10^{-200}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{elif}\;y2 \leq 1.8 \cdot 10^{-181}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{elif}\;y2 \leq 3.35 \cdot 10^{-31}:\\
\;\;\;\;b \cdot \left(-1 \cdot \left(j \cdot \left(x \cdot y0\right)\right)\right)\\
\mathbf{elif}\;y2 \leq 2 \cdot 10^{+91}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\
\end{array}
\end{array}
if y2 < -1.20000000000000007e44Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1
Applied rewrites27.1%
if -1.20000000000000007e44 < y2 < -3.40000000000000003e-14Initial program 29.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
if -3.40000000000000003e-14 < y2 < -7.9999999999999999e-200Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
if -7.9999999999999999e-200 < y2 < 1.8e-181Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
if 1.8e-181 < y2 < 3.35000000000000002e-31Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if 3.35000000000000002e-31 < y2 < 2.00000000000000016e91Initial program 29.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3
Applied rewrites27.3%
if 2.00000000000000016e91 < y2 Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y2 -3.9e+40)
(* t (* y2 (- (* a y5) (* c y4))))
(if (<= y2 -7e-71)
(* j (* y0 (- (* y3 y5) (* b x))))
(if (<= y2 -7.5e-200)
(* b (* y4 (- (* j t) (* k y))))
(if (<= y2 1.8e-181)
(* i (* k (- (* y y5) (* y1 z))))
(if (<= y2 3.35e-31)
(* b (* -1.0 (* j (* x y0))))
(if (<= y2 2e+91)
(* c (* y4 (- (* y y3) (* t y2))))
(* k (* y2 (- (* y1 y4) (* y0 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 tmp;
if (y2 <= -3.9e+40) {
tmp = t * (y2 * ((a * y5) - (c * y4)));
} else if (y2 <= -7e-71) {
tmp = j * (y0 * ((y3 * y5) - (b * x)));
} else if (y2 <= -7.5e-200) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y2 <= 1.8e-181) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (y2 <= 3.35e-31) {
tmp = b * (-1.0 * (j * (x * y0)));
} else if (y2 <= 2e+91) {
tmp = c * (y4 * ((y * y3) - (t * y2)));
} else {
tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
}
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 (y2 <= (-3.9d+40)) then
tmp = t * (y2 * ((a * y5) - (c * y4)))
else if (y2 <= (-7d-71)) then
tmp = j * (y0 * ((y3 * y5) - (b * x)))
else if (y2 <= (-7.5d-200)) then
tmp = b * (y4 * ((j * t) - (k * y)))
else if (y2 <= 1.8d-181) then
tmp = i * (k * ((y * y5) - (y1 * z)))
else if (y2 <= 3.35d-31) then
tmp = b * ((-1.0d0) * (j * (x * y0)))
else if (y2 <= 2d+91) then
tmp = c * (y4 * ((y * y3) - (t * y2)))
else
tmp = k * (y2 * ((y1 * y4) - (y0 * y5)))
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 (y2 <= -3.9e+40) {
tmp = t * (y2 * ((a * y5) - (c * y4)));
} else if (y2 <= -7e-71) {
tmp = j * (y0 * ((y3 * y5) - (b * x)));
} else if (y2 <= -7.5e-200) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y2 <= 1.8e-181) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (y2 <= 3.35e-31) {
tmp = b * (-1.0 * (j * (x * y0)));
} else if (y2 <= 2e+91) {
tmp = c * (y4 * ((y * y3) - (t * y2)));
} else {
tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y2 <= -3.9e+40: tmp = t * (y2 * ((a * y5) - (c * y4))) elif y2 <= -7e-71: tmp = j * (y0 * ((y3 * y5) - (b * x))) elif y2 <= -7.5e-200: tmp = b * (y4 * ((j * t) - (k * y))) elif y2 <= 1.8e-181: tmp = i * (k * ((y * y5) - (y1 * z))) elif y2 <= 3.35e-31: tmp = b * (-1.0 * (j * (x * y0))) elif y2 <= 2e+91: tmp = c * (y4 * ((y * y3) - (t * y2))) else: tmp = k * (y2 * ((y1 * y4) - (y0 * y5))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y2 <= -3.9e+40) tmp = Float64(t * Float64(y2 * Float64(Float64(a * y5) - Float64(c * y4)))); elseif (y2 <= -7e-71) tmp = Float64(j * Float64(y0 * Float64(Float64(y3 * y5) - Float64(b * x)))); elseif (y2 <= -7.5e-200) tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))); elseif (y2 <= 1.8e-181) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); elseif (y2 <= 3.35e-31) tmp = Float64(b * Float64(-1.0 * Float64(j * Float64(x * y0)))); elseif (y2 <= 2e+91) tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2)))); else tmp = Float64(k * Float64(y2 * Float64(Float64(y1 * y4) - Float64(y0 * y5)))); 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 (y2 <= -3.9e+40) tmp = t * (y2 * ((a * y5) - (c * y4))); elseif (y2 <= -7e-71) tmp = j * (y0 * ((y3 * y5) - (b * x))); elseif (y2 <= -7.5e-200) tmp = b * (y4 * ((j * t) - (k * y))); elseif (y2 <= 1.8e-181) tmp = i * (k * ((y * y5) - (y1 * z))); elseif (y2 <= 3.35e-31) tmp = b * (-1.0 * (j * (x * y0))); elseif (y2 <= 2e+91) tmp = c * (y4 * ((y * y3) - (t * y2))); else tmp = k * (y2 * ((y1 * y4) - (y0 * y5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y2, -3.9e+40], N[(t * N[(y2 * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -7e-71], N[(j * N[(y0 * N[(N[(y3 * y5), $MachinePrecision] - N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -7.5e-200], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 1.8e-181], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 3.35e-31], N[(b * N[(-1.0 * N[(j * N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 2e+91], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y2 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y2 \leq -3.9 \cdot 10^{+40}:\\
\;\;\;\;t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\mathbf{elif}\;y2 \leq -7 \cdot 10^{-71}:\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)\\
\mathbf{elif}\;y2 \leq -7.5 \cdot 10^{-200}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{elif}\;y2 \leq 1.8 \cdot 10^{-181}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{elif}\;y2 \leq 3.35 \cdot 10^{-31}:\\
\;\;\;\;b \cdot \left(-1 \cdot \left(j \cdot \left(x \cdot y0\right)\right)\right)\\
\mathbf{elif}\;y2 \leq 2 \cdot 10^{+91}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\
\end{array}
\end{array}
if y2 < -3.9000000000000001e40Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1
Applied rewrites27.1%
if -3.9000000000000001e40 < y2 < -6.9999999999999998e-71Initial program 29.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6428.0
Applied rewrites28.0%
if -6.9999999999999998e-71 < y2 < -7.49999999999999958e-200Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6425.9
Applied rewrites25.9%
if -7.49999999999999958e-200 < y2 < 1.8e-181Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
if 1.8e-181 < y2 < 3.35000000000000002e-31Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if 3.35000000000000002e-31 < y2 < 2.00000000000000016e91Initial program 29.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3
Applied rewrites27.3%
if 2.00000000000000016e91 < y2 Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y4 -4.8e+85)
(* y2 (* y4 (- (* k y1) (* c t))))
(if (<= y4 -8.8e-90)
(* i (* z (- (* c t) (* k y1))))
(if (<= y4 1.5e+100)
(* b (* a (- (* x y) (* t z))))
(* y1 (* y4 (- (* k y2) (* j 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 (y4 <= -4.8e+85) {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
} else if (y4 <= -8.8e-90) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (y4 <= 1.5e+100) {
tmp = b * (a * ((x * y) - (t * z)));
} else {
tmp = y1 * (y4 * ((k * y2) - (j * 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 (y4 <= (-4.8d+85)) then
tmp = y2 * (y4 * ((k * y1) - (c * t)))
else if (y4 <= (-8.8d-90)) then
tmp = i * (z * ((c * t) - (k * y1)))
else if (y4 <= 1.5d+100) then
tmp = b * (a * ((x * y) - (t * z)))
else
tmp = y1 * (y4 * ((k * y2) - (j * 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 (y4 <= -4.8e+85) {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
} else if (y4 <= -8.8e-90) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (y4 <= 1.5e+100) {
tmp = b * (a * ((x * y) - (t * z)));
} else {
tmp = y1 * (y4 * ((k * y2) - (j * y3)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y4 <= -4.8e+85: tmp = y2 * (y4 * ((k * y1) - (c * t))) elif y4 <= -8.8e-90: tmp = i * (z * ((c * t) - (k * y1))) elif y4 <= 1.5e+100: tmp = b * (a * ((x * y) - (t * z))) else: tmp = y1 * (y4 * ((k * y2) - (j * 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 (y4 <= -4.8e+85) tmp = Float64(y2 * Float64(y4 * Float64(Float64(k * y1) - Float64(c * t)))); elseif (y4 <= -8.8e-90) tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); elseif (y4 <= 1.5e+100) tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z)))); else tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * 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 (y4 <= -4.8e+85) tmp = y2 * (y4 * ((k * y1) - (c * t))); elseif (y4 <= -8.8e-90) tmp = i * (z * ((c * t) - (k * y1))); elseif (y4 <= 1.5e+100) tmp = b * (a * ((x * y) - (t * z))); else tmp = y1 * (y4 * ((k * y2) - (j * 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[y4, -4.8e+85], N[(y2 * N[(y4 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -8.8e-90], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1.5e+100], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y4 \leq -4.8 \cdot 10^{+85}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\mathbf{elif}\;y4 \leq -8.8 \cdot 10^{-90}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{elif}\;y4 \leq 1.5 \cdot 10^{+100}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\end{array}
\end{array}
if y4 < -4.79999999999999993e85Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
if -4.79999999999999993e85 < y4 < -8.79999999999999943e-90Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
if -8.79999999999999943e-90 < y4 < 1.49999999999999993e100Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
if 1.49999999999999993e100 < y4 Initial program 29.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y4 -1.9e+109)
(* b (* y4 (- (* j t) (* k y))))
(if (<= y4 -8.8e-90)
(* i (* z (- (* c t) (* k y1))))
(if (<= y4 1.5e+100)
(* b (* a (- (* x y) (* t z))))
(* y1 (* y4 (- (* k y2) (* j 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 (y4 <= -1.9e+109) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y4 <= -8.8e-90) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (y4 <= 1.5e+100) {
tmp = b * (a * ((x * y) - (t * z)));
} else {
tmp = y1 * (y4 * ((k * y2) - (j * 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 (y4 <= (-1.9d+109)) then
tmp = b * (y4 * ((j * t) - (k * y)))
else if (y4 <= (-8.8d-90)) then
tmp = i * (z * ((c * t) - (k * y1)))
else if (y4 <= 1.5d+100) then
tmp = b * (a * ((x * y) - (t * z)))
else
tmp = y1 * (y4 * ((k * y2) - (j * 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 (y4 <= -1.9e+109) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y4 <= -8.8e-90) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (y4 <= 1.5e+100) {
tmp = b * (a * ((x * y) - (t * z)));
} else {
tmp = y1 * (y4 * ((k * y2) - (j * y3)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y4 <= -1.9e+109: tmp = b * (y4 * ((j * t) - (k * y))) elif y4 <= -8.8e-90: tmp = i * (z * ((c * t) - (k * y1))) elif y4 <= 1.5e+100: tmp = b * (a * ((x * y) - (t * z))) else: tmp = y1 * (y4 * ((k * y2) - (j * 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 (y4 <= -1.9e+109) tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))); elseif (y4 <= -8.8e-90) tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); elseif (y4 <= 1.5e+100) tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z)))); else tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * 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 (y4 <= -1.9e+109) tmp = b * (y4 * ((j * t) - (k * y))); elseif (y4 <= -8.8e-90) tmp = i * (z * ((c * t) - (k * y1))); elseif (y4 <= 1.5e+100) tmp = b * (a * ((x * y) - (t * z))); else tmp = y1 * (y4 * ((k * y2) - (j * 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[y4, -1.9e+109], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -8.8e-90], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1.5e+100], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y4 \leq -1.9 \cdot 10^{+109}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{elif}\;y4 \leq -8.8 \cdot 10^{-90}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{elif}\;y4 \leq 1.5 \cdot 10^{+100}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\end{array}
\end{array}
if y4 < -1.90000000000000019e109Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6425.9
Applied rewrites25.9%
if -1.90000000000000019e109 < y4 < -8.79999999999999943e-90Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
if -8.79999999999999943e-90 < y4 < 1.49999999999999993e100Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
if 1.49999999999999993e100 < y4 Initial program 29.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y2 -3.9e+40)
(* t (* y2 (- (* a y5) (* c y4))))
(if (<= y2 -7e-71)
(* j (* y0 (- (* y3 y5) (* b x))))
(if (<= y2 -7.5e-200)
(* b (* y4 (- (* j t) (* k y))))
(if (<= y2 4.6e+120)
(* i (* k (- (* y y5) (* y1 z))))
(* k (* y2 (- (* y1 y4) (* y0 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 tmp;
if (y2 <= -3.9e+40) {
tmp = t * (y2 * ((a * y5) - (c * y4)));
} else if (y2 <= -7e-71) {
tmp = j * (y0 * ((y3 * y5) - (b * x)));
} else if (y2 <= -7.5e-200) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y2 <= 4.6e+120) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else {
tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
}
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 (y2 <= (-3.9d+40)) then
tmp = t * (y2 * ((a * y5) - (c * y4)))
else if (y2 <= (-7d-71)) then
tmp = j * (y0 * ((y3 * y5) - (b * x)))
else if (y2 <= (-7.5d-200)) then
tmp = b * (y4 * ((j * t) - (k * y)))
else if (y2 <= 4.6d+120) then
tmp = i * (k * ((y * y5) - (y1 * z)))
else
tmp = k * (y2 * ((y1 * y4) - (y0 * y5)))
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 (y2 <= -3.9e+40) {
tmp = t * (y2 * ((a * y5) - (c * y4)));
} else if (y2 <= -7e-71) {
tmp = j * (y0 * ((y3 * y5) - (b * x)));
} else if (y2 <= -7.5e-200) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y2 <= 4.6e+120) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else {
tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y2 <= -3.9e+40: tmp = t * (y2 * ((a * y5) - (c * y4))) elif y2 <= -7e-71: tmp = j * (y0 * ((y3 * y5) - (b * x))) elif y2 <= -7.5e-200: tmp = b * (y4 * ((j * t) - (k * y))) elif y2 <= 4.6e+120: tmp = i * (k * ((y * y5) - (y1 * z))) else: tmp = k * (y2 * ((y1 * y4) - (y0 * y5))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y2 <= -3.9e+40) tmp = Float64(t * Float64(y2 * Float64(Float64(a * y5) - Float64(c * y4)))); elseif (y2 <= -7e-71) tmp = Float64(j * Float64(y0 * Float64(Float64(y3 * y5) - Float64(b * x)))); elseif (y2 <= -7.5e-200) tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))); elseif (y2 <= 4.6e+120) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); else tmp = Float64(k * Float64(y2 * Float64(Float64(y1 * y4) - Float64(y0 * y5)))); 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 (y2 <= -3.9e+40) tmp = t * (y2 * ((a * y5) - (c * y4))); elseif (y2 <= -7e-71) tmp = j * (y0 * ((y3 * y5) - (b * x))); elseif (y2 <= -7.5e-200) tmp = b * (y4 * ((j * t) - (k * y))); elseif (y2 <= 4.6e+120) tmp = i * (k * ((y * y5) - (y1 * z))); else tmp = k * (y2 * ((y1 * y4) - (y0 * y5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y2, -3.9e+40], N[(t * N[(y2 * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -7e-71], N[(j * N[(y0 * N[(N[(y3 * y5), $MachinePrecision] - N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -7.5e-200], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 4.6e+120], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y2 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y2 \leq -3.9 \cdot 10^{+40}:\\
\;\;\;\;t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\mathbf{elif}\;y2 \leq -7 \cdot 10^{-71}:\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)\\
\mathbf{elif}\;y2 \leq -7.5 \cdot 10^{-200}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{elif}\;y2 \leq 4.6 \cdot 10^{+120}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\
\end{array}
\end{array}
if y2 < -3.9000000000000001e40Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1
Applied rewrites27.1%
if -3.9000000000000001e40 < y2 < -6.9999999999999998e-71Initial program 29.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6428.0
Applied rewrites28.0%
if -6.9999999999999998e-71 < y2 < -7.49999999999999958e-200Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6425.9
Applied rewrites25.9%
if -7.49999999999999958e-200 < y2 < 4.59999999999999985e120Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
if 4.59999999999999985e120 < y2 Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y2 -1.2e-17)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<= y2 -2e-187)
(* i (* z (- (* c t) (* k y1))))
(if (<= y2 4.6e+120)
(* i (* k (- (* y y5) (* y1 z))))
(* k (* y2 (- (* y1 y4) (* y0 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 tmp;
if (y2 <= -1.2e-17) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y2 <= -2e-187) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (y2 <= 4.6e+120) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else {
tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
}
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 (y2 <= (-1.2d-17)) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else if (y2 <= (-2d-187)) then
tmp = i * (z * ((c * t) - (k * y1)))
else if (y2 <= 4.6d+120) then
tmp = i * (k * ((y * y5) - (y1 * z)))
else
tmp = k * (y2 * ((y1 * y4) - (y0 * y5)))
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 (y2 <= -1.2e-17) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y2 <= -2e-187) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (y2 <= 4.6e+120) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else {
tmp = k * (y2 * ((y1 * y4) - (y0 * y5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y2 <= -1.2e-17: tmp = x * (y2 * ((c * y0) - (a * y1))) elif y2 <= -2e-187: tmp = i * (z * ((c * t) - (k * y1))) elif y2 <= 4.6e+120: tmp = i * (k * ((y * y5) - (y1 * z))) else: tmp = k * (y2 * ((y1 * y4) - (y0 * y5))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y2 <= -1.2e-17) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (y2 <= -2e-187) tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); elseif (y2 <= 4.6e+120) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); else tmp = Float64(k * Float64(y2 * Float64(Float64(y1 * y4) - Float64(y0 * y5)))); 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 (y2 <= -1.2e-17) tmp = x * (y2 * ((c * y0) - (a * y1))); elseif (y2 <= -2e-187) tmp = i * (z * ((c * t) - (k * y1))); elseif (y2 <= 4.6e+120) tmp = i * (k * ((y * y5) - (y1 * z))); else tmp = k * (y2 * ((y1 * y4) - (y0 * y5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y2, -1.2e-17], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -2e-187], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 4.6e+120], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y2 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y2 \leq -1.2 \cdot 10^{-17}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;y2 \leq -2 \cdot 10^{-187}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{elif}\;y2 \leq 4.6 \cdot 10^{+120}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\
\end{array}
\end{array}
if y2 < -1.19999999999999993e-17Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
if -1.19999999999999993e-17 < y2 < -2e-187Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
if -2e-187 < y2 < 4.59999999999999985e120Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
if 4.59999999999999985e120 < y2 Initial program 29.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.7%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* x (* y2 (- (* c y0) (* a y1))))))
(if (<= y0 -5.5e+188)
t_1
(if (<= y0 -1.65e-45)
(* b (* y4 (- (* j t) (* k y))))
(if (<= y0 5e-60) (* i (* z (- (* c t) (* k y1)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = x * (y2 * ((c * y0) - (a * y1)));
double tmp;
if (y0 <= -5.5e+188) {
tmp = t_1;
} else if (y0 <= -1.65e-45) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y0 <= 5e-60) {
tmp = i * (z * ((c * t) - (k * y1)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y2 * ((c * y0) - (a * y1)))
if (y0 <= (-5.5d+188)) then
tmp = t_1
else if (y0 <= (-1.65d-45)) then
tmp = b * (y4 * ((j * t) - (k * y)))
else if (y0 <= 5d-60) then
tmp = i * (z * ((c * t) - (k * y1)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = x * (y2 * ((c * y0) - (a * y1)));
double tmp;
if (y0 <= -5.5e+188) {
tmp = t_1;
} else if (y0 <= -1.65e-45) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y0 <= 5e-60) {
tmp = i * (z * ((c * t) - (k * y1)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = x * (y2 * ((c * y0) - (a * y1))) tmp = 0 if y0 <= -5.5e+188: tmp = t_1 elif y0 <= -1.65e-45: tmp = b * (y4 * ((j * t) - (k * y))) elif y0 <= 5e-60: tmp = i * (z * ((c * t) - (k * y1))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) tmp = 0.0 if (y0 <= -5.5e+188) tmp = t_1; elseif (y0 <= -1.65e-45) tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))); elseif (y0 <= 5e-60) tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = x * (y2 * ((c * y0) - (a * y1))); tmp = 0.0; if (y0 <= -5.5e+188) tmp = t_1; elseif (y0 <= -1.65e-45) tmp = b * (y4 * ((j * t) - (k * y))); elseif (y0 <= 5e-60) tmp = i * (z * ((c * t) - (k * y1))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y0, -5.5e+188], t$95$1, If[LessEqual[y0, -1.65e-45], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 5e-60], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{if}\;y0 \leq -5.5 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y0 \leq -1.65 \cdot 10^{-45}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{elif}\;y0 \leq 5 \cdot 10^{-60}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y0 < -5.50000000000000013e188 or 5.0000000000000001e-60 < y0 Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
if -5.50000000000000013e188 < y0 < -1.65e-45Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6425.9
Applied rewrites25.9%
if -1.65e-45 < y0 < 5.0000000000000001e-60Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* b (* y4 (- (* j t) (* k y))))))
(if (<= y4 -1.9e+109)
t_1
(if (<= y4 -1.95e-101)
(* i (* z (- (* c t) (* k y1))))
(if (<= y4 -6.2e-241)
(* b (* t (* -1.0 (* a z))))
(if (<= y4 1.05e+46) (* i (* y1 (- (* j x) (* k z)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = b * (y4 * ((j * t) - (k * y)));
double tmp;
if (y4 <= -1.9e+109) {
tmp = t_1;
} else if (y4 <= -1.95e-101) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (y4 <= -6.2e-241) {
tmp = b * (t * (-1.0 * (a * z)));
} else if (y4 <= 1.05e+46) {
tmp = i * (y1 * ((j * x) - (k * z)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = b * (y4 * ((j * t) - (k * y)))
if (y4 <= (-1.9d+109)) then
tmp = t_1
else if (y4 <= (-1.95d-101)) then
tmp = i * (z * ((c * t) - (k * y1)))
else if (y4 <= (-6.2d-241)) then
tmp = b * (t * ((-1.0d0) * (a * z)))
else if (y4 <= 1.05d+46) then
tmp = i * (y1 * ((j * x) - (k * z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = b * (y4 * ((j * t) - (k * y)));
double tmp;
if (y4 <= -1.9e+109) {
tmp = t_1;
} else if (y4 <= -1.95e-101) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (y4 <= -6.2e-241) {
tmp = b * (t * (-1.0 * (a * z)));
} else if (y4 <= 1.05e+46) {
tmp = i * (y1 * ((j * x) - (k * z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = b * (y4 * ((j * t) - (k * y))) tmp = 0 if y4 <= -1.9e+109: tmp = t_1 elif y4 <= -1.95e-101: tmp = i * (z * ((c * t) - (k * y1))) elif y4 <= -6.2e-241: tmp = b * (t * (-1.0 * (a * z))) elif y4 <= 1.05e+46: tmp = i * (y1 * ((j * x) - (k * z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) tmp = 0.0 if (y4 <= -1.9e+109) tmp = t_1; elseif (y4 <= -1.95e-101) tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); elseif (y4 <= -6.2e-241) tmp = Float64(b * Float64(t * Float64(-1.0 * Float64(a * z)))); elseif (y4 <= 1.05e+46) tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = b * (y4 * ((j * t) - (k * y))); tmp = 0.0; if (y4 <= -1.9e+109) tmp = t_1; elseif (y4 <= -1.95e-101) tmp = i * (z * ((c * t) - (k * y1))); elseif (y4 <= -6.2e-241) tmp = b * (t * (-1.0 * (a * z))); elseif (y4 <= 1.05e+46) tmp = i * (y1 * ((j * x) - (k * z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -1.9e+109], t$95$1, If[LessEqual[y4, -1.95e-101], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -6.2e-241], N[(b * N[(t * N[(-1.0 * N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1.05e+46], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{if}\;y4 \leq -1.9 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y4 \leq -1.95 \cdot 10^{-101}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{elif}\;y4 \leq -6.2 \cdot 10^{-241}:\\
\;\;\;\;b \cdot \left(t \cdot \left(-1 \cdot \left(a \cdot z\right)\right)\right)\\
\mathbf{elif}\;y4 \leq 1.05 \cdot 10^{+46}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y4 < -1.90000000000000019e109 or 1.05e46 < y4 Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6425.9
Applied rewrites25.9%
if -1.90000000000000019e109 < y4 < -1.95000000000000008e-101Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
if -1.95000000000000008e-101 < y4 < -6.1999999999999998e-241Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
if -6.1999999999999998e-241 < y4 < 1.05e46Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= c -8.5e+165)
(* -1.0 (* y3 (* z (* c y0))))
(if (<= c -1.12e+77)
(* (- (* y5 y) (* y1 z)) (* k i))
(if (<= c 6.8e-76)
(* y1 (* z (- (* a y3) (* i k))))
(* i (* z (- (* c t) (* k 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 (c <= -8.5e+165) {
tmp = -1.0 * (y3 * (z * (c * y0)));
} else if (c <= -1.12e+77) {
tmp = ((y5 * y) - (y1 * z)) * (k * i);
} else if (c <= 6.8e-76) {
tmp = y1 * (z * ((a * y3) - (i * k)));
} else {
tmp = i * (z * ((c * t) - (k * 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 (c <= (-8.5d+165)) then
tmp = (-1.0d0) * (y3 * (z * (c * y0)))
else if (c <= (-1.12d+77)) then
tmp = ((y5 * y) - (y1 * z)) * (k * i)
else if (c <= 6.8d-76) then
tmp = y1 * (z * ((a * y3) - (i * k)))
else
tmp = i * (z * ((c * t) - (k * 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 (c <= -8.5e+165) {
tmp = -1.0 * (y3 * (z * (c * y0)));
} else if (c <= -1.12e+77) {
tmp = ((y5 * y) - (y1 * z)) * (k * i);
} else if (c <= 6.8e-76) {
tmp = y1 * (z * ((a * y3) - (i * k)));
} else {
tmp = i * (z * ((c * t) - (k * y1)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if c <= -8.5e+165: tmp = -1.0 * (y3 * (z * (c * y0))) elif c <= -1.12e+77: tmp = ((y5 * y) - (y1 * z)) * (k * i) elif c <= 6.8e-76: tmp = y1 * (z * ((a * y3) - (i * k))) else: tmp = i * (z * ((c * t) - (k * 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 (c <= -8.5e+165) tmp = Float64(-1.0 * Float64(y3 * Float64(z * Float64(c * y0)))); elseif (c <= -1.12e+77) tmp = Float64(Float64(Float64(y5 * y) - Float64(y1 * z)) * Float64(k * i)); elseif (c <= 6.8e-76) tmp = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k)))); else tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * 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 (c <= -8.5e+165) tmp = -1.0 * (y3 * (z * (c * y0))); elseif (c <= -1.12e+77) tmp = ((y5 * y) - (y1 * z)) * (k * i); elseif (c <= 6.8e-76) tmp = y1 * (z * ((a * y3) - (i * k))); else tmp = i * (z * ((c * t) - (k * y1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[c, -8.5e+165], N[(-1.0 * N[(y3 * N[(z * N[(c * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.12e+77], N[(N[(N[(y5 * y), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision] * N[(k * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.8e-76], N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -8.5 \cdot 10^{+165}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(z \cdot \left(c \cdot y0\right)\right)\right)\\
\mathbf{elif}\;c \leq -1.12 \cdot 10^{+77}:\\
\;\;\;\;\left(y5 \cdot y - y1 \cdot z\right) \cdot \left(k \cdot i\right)\\
\mathbf{elif}\;c \leq 6.8 \cdot 10^{-76}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\end{array}
\end{array}
if c < -8.5000000000000001e165Initial program 29.9%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in a around 0
lower-*.f6416.9
Applied rewrites16.9%
if -8.5000000000000001e165 < c < -1.1199999999999999e77Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4
Applied rewrites24.4%
if -1.1199999999999999e77 < c < 6.7999999999999998e-76Initial program 29.9%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
if 6.7999999999999998e-76 < c Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= c -8.5e+165)
(* -1.0 (* y3 (* z (* c y0))))
(if (<= c -3e-266)
(* i (* k (- (* y y5) (* y1 z))))
(if (<= c 1.5e-90)
(* i (* y1 (- (* j x) (* k z))))
(* i (* z (- (* c t) (* k 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 (c <= -8.5e+165) {
tmp = -1.0 * (y3 * (z * (c * y0)));
} else if (c <= -3e-266) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (c <= 1.5e-90) {
tmp = i * (y1 * ((j * x) - (k * z)));
} else {
tmp = i * (z * ((c * t) - (k * 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 (c <= (-8.5d+165)) then
tmp = (-1.0d0) * (y3 * (z * (c * y0)))
else if (c <= (-3d-266)) then
tmp = i * (k * ((y * y5) - (y1 * z)))
else if (c <= 1.5d-90) then
tmp = i * (y1 * ((j * x) - (k * z)))
else
tmp = i * (z * ((c * t) - (k * 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 (c <= -8.5e+165) {
tmp = -1.0 * (y3 * (z * (c * y0)));
} else if (c <= -3e-266) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (c <= 1.5e-90) {
tmp = i * (y1 * ((j * x) - (k * z)));
} else {
tmp = i * (z * ((c * t) - (k * y1)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if c <= -8.5e+165: tmp = -1.0 * (y3 * (z * (c * y0))) elif c <= -3e-266: tmp = i * (k * ((y * y5) - (y1 * z))) elif c <= 1.5e-90: tmp = i * (y1 * ((j * x) - (k * z))) else: tmp = i * (z * ((c * t) - (k * 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 (c <= -8.5e+165) tmp = Float64(-1.0 * Float64(y3 * Float64(z * Float64(c * y0)))); elseif (c <= -3e-266) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); elseif (c <= 1.5e-90) tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z)))); else tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * 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 (c <= -8.5e+165) tmp = -1.0 * (y3 * (z * (c * y0))); elseif (c <= -3e-266) tmp = i * (k * ((y * y5) - (y1 * z))); elseif (c <= 1.5e-90) tmp = i * (y1 * ((j * x) - (k * z))); else tmp = i * (z * ((c * t) - (k * y1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[c, -8.5e+165], N[(-1.0 * N[(y3 * N[(z * N[(c * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -3e-266], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.5e-90], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -8.5 \cdot 10^{+165}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(z \cdot \left(c \cdot y0\right)\right)\right)\\
\mathbf{elif}\;c \leq -3 \cdot 10^{-266}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{elif}\;c \leq 1.5 \cdot 10^{-90}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\end{array}
\end{array}
if c < -8.5000000000000001e165Initial program 29.9%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in a around 0
lower-*.f6416.9
Applied rewrites16.9%
if -8.5000000000000001e165 < c < -3e-266Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
if -3e-266 < c < 1.5000000000000001e-90Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if 1.5000000000000001e-90 < c Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= j -1.3e+154)
(* y0 (* j (* -1.0 (* b x))))
(if (<= j 1.7e+112)
(* i (* k (- (* y y5) (* y1 z))))
(if (<= j 5.9e+200) (* b (* t (* j y4))) (* y0 (* j (* y3 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 tmp;
if (j <= -1.3e+154) {
tmp = y0 * (j * (-1.0 * (b * x)));
} else if (j <= 1.7e+112) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (j <= 5.9e+200) {
tmp = b * (t * (j * y4));
} else {
tmp = y0 * (j * (y3 * y5));
}
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 <= (-1.3d+154)) then
tmp = y0 * (j * ((-1.0d0) * (b * x)))
else if (j <= 1.7d+112) then
tmp = i * (k * ((y * y5) - (y1 * z)))
else if (j <= 5.9d+200) then
tmp = b * (t * (j * y4))
else
tmp = y0 * (j * (y3 * y5))
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 <= -1.3e+154) {
tmp = y0 * (j * (-1.0 * (b * x)));
} else if (j <= 1.7e+112) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (j <= 5.9e+200) {
tmp = b * (t * (j * y4));
} else {
tmp = y0 * (j * (y3 * y5));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if j <= -1.3e+154: tmp = y0 * (j * (-1.0 * (b * x))) elif j <= 1.7e+112: tmp = i * (k * ((y * y5) - (y1 * z))) elif j <= 5.9e+200: tmp = b * (t * (j * y4)) else: tmp = y0 * (j * (y3 * y5)) 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 <= -1.3e+154) tmp = Float64(y0 * Float64(j * Float64(-1.0 * Float64(b * x)))); elseif (j <= 1.7e+112) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); elseif (j <= 5.9e+200) tmp = Float64(b * Float64(t * Float64(j * y4))); else tmp = Float64(y0 * Float64(j * Float64(y3 * y5))); 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 <= -1.3e+154) tmp = y0 * (j * (-1.0 * (b * x))); elseif (j <= 1.7e+112) tmp = i * (k * ((y * y5) - (y1 * z))); elseif (j <= 5.9e+200) tmp = b * (t * (j * y4)); else tmp = y0 * (j * (y3 * y5)); 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, -1.3e+154], N[(y0 * N[(j * N[(-1.0 * N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.7e+112], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 5.9e+200], N[(b * N[(t * N[(j * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y0 * N[(j * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.3 \cdot 10^{+154}:\\
\;\;\;\;y0 \cdot \left(j \cdot \left(-1 \cdot \left(b \cdot x\right)\right)\right)\\
\mathbf{elif}\;j \leq 1.7 \cdot 10^{+112}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{elif}\;j \leq 5.9 \cdot 10^{+200}:\\
\;\;\;\;b \cdot \left(t \cdot \left(j \cdot y4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y0 \cdot \left(j \cdot \left(y3 \cdot y5\right)\right)\\
\end{array}
\end{array}
if j < -1.29999999999999994e154Initial program 29.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.6
Applied rewrites27.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if -1.29999999999999994e154 < j < 1.69999999999999997e112Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
if 1.69999999999999997e112 < j < 5.9000000000000001e200Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
Taylor expanded in z around 0
lower-*.f6416.8
Applied rewrites16.8%
if 5.9000000000000001e200 < j Initial program 29.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.6
Applied rewrites27.6%
Taylor expanded in x around 0
lower-*.f6417.8
Applied rewrites17.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y -5.2e+134)
(* x (* -1.0 (* (* c y) i)))
(if (<= y -1.9e-40)
(* b (* y0 (* k z)))
(if (<= y -3.8e-306)
(* b (* -1.0 (* a (* t z))))
(if (<= y 2.9e+85)
(* i (* k (* -1.0 (* y1 z))))
(if (<= y 1.35e+155)
(* b (* t (* -1.0 (* a z))))
(* (- (* (* i y) c)) x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y <= -5.2e+134) {
tmp = x * (-1.0 * ((c * y) * i));
} else if (y <= -1.9e-40) {
tmp = b * (y0 * (k * z));
} else if (y <= -3.8e-306) {
tmp = b * (-1.0 * (a * (t * z)));
} else if (y <= 2.9e+85) {
tmp = i * (k * (-1.0 * (y1 * z)));
} else if (y <= 1.35e+155) {
tmp = b * (t * (-1.0 * (a * z)));
} else {
tmp = -((i * y) * c) * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y <= (-5.2d+134)) then
tmp = x * ((-1.0d0) * ((c * y) * i))
else if (y <= (-1.9d-40)) then
tmp = b * (y0 * (k * z))
else if (y <= (-3.8d-306)) then
tmp = b * ((-1.0d0) * (a * (t * z)))
else if (y <= 2.9d+85) then
tmp = i * (k * ((-1.0d0) * (y1 * z)))
else if (y <= 1.35d+155) then
tmp = b * (t * ((-1.0d0) * (a * z)))
else
tmp = -((i * y) * c) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y <= -5.2e+134) {
tmp = x * (-1.0 * ((c * y) * i));
} else if (y <= -1.9e-40) {
tmp = b * (y0 * (k * z));
} else if (y <= -3.8e-306) {
tmp = b * (-1.0 * (a * (t * z)));
} else if (y <= 2.9e+85) {
tmp = i * (k * (-1.0 * (y1 * z)));
} else if (y <= 1.35e+155) {
tmp = b * (t * (-1.0 * (a * z)));
} else {
tmp = -((i * y) * c) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y <= -5.2e+134: tmp = x * (-1.0 * ((c * y) * i)) elif y <= -1.9e-40: tmp = b * (y0 * (k * z)) elif y <= -3.8e-306: tmp = b * (-1.0 * (a * (t * z))) elif y <= 2.9e+85: tmp = i * (k * (-1.0 * (y1 * z))) elif y <= 1.35e+155: tmp = b * (t * (-1.0 * (a * z))) else: tmp = -((i * y) * c) * x return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y <= -5.2e+134) tmp = Float64(x * Float64(-1.0 * Float64(Float64(c * y) * i))); elseif (y <= -1.9e-40) tmp = Float64(b * Float64(y0 * Float64(k * z))); elseif (y <= -3.8e-306) tmp = Float64(b * Float64(-1.0 * Float64(a * Float64(t * z)))); elseif (y <= 2.9e+85) tmp = Float64(i * Float64(k * Float64(-1.0 * Float64(y1 * z)))); elseif (y <= 1.35e+155) tmp = Float64(b * Float64(t * Float64(-1.0 * Float64(a * z)))); else tmp = Float64(Float64(-Float64(Float64(i * y) * c)) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y <= -5.2e+134) tmp = x * (-1.0 * ((c * y) * i)); elseif (y <= -1.9e-40) tmp = b * (y0 * (k * z)); elseif (y <= -3.8e-306) tmp = b * (-1.0 * (a * (t * z))); elseif (y <= 2.9e+85) tmp = i * (k * (-1.0 * (y1 * z))); elseif (y <= 1.35e+155) tmp = b * (t * (-1.0 * (a * z))); else tmp = -((i * y) * c) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y, -5.2e+134], N[(x * N[(-1.0 * N[(N[(c * y), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.9e-40], N[(b * N[(y0 * N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.8e-306], N[(b * N[(-1.0 * N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+85], N[(i * N[(k * N[(-1.0 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+155], N[(b * N[(t * N[(-1.0 * N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-N[(N[(i * y), $MachinePrecision] * c), $MachinePrecision]) * x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+134}:\\
\;\;\;\;x \cdot \left(-1 \cdot \left(\left(c \cdot y\right) \cdot i\right)\right)\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-40}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z\right)\right)\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-306}:\\
\;\;\;\;b \cdot \left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right)\right)\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+85}:\\
\;\;\;\;i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right)\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+155}:\\
\;\;\;\;b \cdot \left(t \cdot \left(-1 \cdot \left(a \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(-\left(i \cdot y\right) \cdot c\right) \cdot x\\
\end{array}
\end{array}
if y < -5.2000000000000003e134Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.2
Applied rewrites26.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6416.9
Applied rewrites16.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6416.6
Applied rewrites16.6%
if -5.2000000000000003e134 < y < -1.8999999999999999e-40Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in x around 0
lower-*.f6416.6
Applied rewrites16.6%
if -1.8999999999999999e-40 < y < -3.8e-306Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if -3.8e-306 < y < 2.89999999999999997e85Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
if 2.89999999999999997e85 < y < 1.34999999999999997e155Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
if 1.34999999999999997e155 < y Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.2
Applied rewrites26.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6416.9
Applied rewrites16.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6416.9
Applied rewrites16.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (- (* (* i y) c)) x)))
(if (<= y -5.2e+134)
t_1
(if (<= y -1.9e-40)
(* b (* y0 (* k z)))
(if (<= y -3.8e-306)
(* b (* -1.0 (* a (* t z))))
(if (<= y 2.9e+85)
(* i (* k (* -1.0 (* y1 z))))
(if (<= y 1.35e+155) (* b (* t (* -1.0 (* a z)))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -((i * y) * c) * x;
double tmp;
if (y <= -5.2e+134) {
tmp = t_1;
} else if (y <= -1.9e-40) {
tmp = b * (y0 * (k * z));
} else if (y <= -3.8e-306) {
tmp = b * (-1.0 * (a * (t * z)));
} else if (y <= 2.9e+85) {
tmp = i * (k * (-1.0 * (y1 * z)));
} else if (y <= 1.35e+155) {
tmp = b * (t * (-1.0 * (a * z)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = -((i * y) * c) * x
if (y <= (-5.2d+134)) then
tmp = t_1
else if (y <= (-1.9d-40)) then
tmp = b * (y0 * (k * z))
else if (y <= (-3.8d-306)) then
tmp = b * ((-1.0d0) * (a * (t * z)))
else if (y <= 2.9d+85) then
tmp = i * (k * ((-1.0d0) * (y1 * z)))
else if (y <= 1.35d+155) then
tmp = b * (t * ((-1.0d0) * (a * z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -((i * y) * c) * x;
double tmp;
if (y <= -5.2e+134) {
tmp = t_1;
} else if (y <= -1.9e-40) {
tmp = b * (y0 * (k * z));
} else if (y <= -3.8e-306) {
tmp = b * (-1.0 * (a * (t * z)));
} else if (y <= 2.9e+85) {
tmp = i * (k * (-1.0 * (y1 * z)));
} else if (y <= 1.35e+155) {
tmp = b * (t * (-1.0 * (a * z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = -((i * y) * c) * x tmp = 0 if y <= -5.2e+134: tmp = t_1 elif y <= -1.9e-40: tmp = b * (y0 * (k * z)) elif y <= -3.8e-306: tmp = b * (-1.0 * (a * (t * z))) elif y <= 2.9e+85: tmp = i * (k * (-1.0 * (y1 * z))) elif y <= 1.35e+155: tmp = b * (t * (-1.0 * (a * z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(-Float64(Float64(i * y) * c)) * x) tmp = 0.0 if (y <= -5.2e+134) tmp = t_1; elseif (y <= -1.9e-40) tmp = Float64(b * Float64(y0 * Float64(k * z))); elseif (y <= -3.8e-306) tmp = Float64(b * Float64(-1.0 * Float64(a * Float64(t * z)))); elseif (y <= 2.9e+85) tmp = Float64(i * Float64(k * Float64(-1.0 * Float64(y1 * z)))); elseif (y <= 1.35e+155) tmp = Float64(b * Float64(t * Float64(-1.0 * Float64(a * z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = -((i * y) * c) * x; tmp = 0.0; if (y <= -5.2e+134) tmp = t_1; elseif (y <= -1.9e-40) tmp = b * (y0 * (k * z)); elseif (y <= -3.8e-306) tmp = b * (-1.0 * (a * (t * z))); elseif (y <= 2.9e+85) tmp = i * (k * (-1.0 * (y1 * z))); elseif (y <= 1.35e+155) tmp = b * (t * (-1.0 * (a * z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[((-N[(N[(i * y), $MachinePrecision] * c), $MachinePrecision]) * x), $MachinePrecision]}, If[LessEqual[y, -5.2e+134], t$95$1, If[LessEqual[y, -1.9e-40], N[(b * N[(y0 * N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.8e-306], N[(b * N[(-1.0 * N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e+85], N[(i * N[(k * N[(-1.0 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.35e+155], N[(b * N[(t * N[(-1.0 * N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-\left(i \cdot y\right) \cdot c\right) \cdot x\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-40}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z\right)\right)\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-306}:\\
\;\;\;\;b \cdot \left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right)\right)\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+85}:\\
\;\;\;\;i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right)\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+155}:\\
\;\;\;\;b \cdot \left(t \cdot \left(-1 \cdot \left(a \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.2000000000000003e134 or 1.34999999999999997e155 < y Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.2
Applied rewrites26.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6416.9
Applied rewrites16.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6416.9
Applied rewrites16.9%
if -5.2000000000000003e134 < y < -1.8999999999999999e-40Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in x around 0
lower-*.f6416.6
Applied rewrites16.6%
if -1.8999999999999999e-40 < y < -3.8e-306Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if -3.8e-306 < y < 2.89999999999999997e85Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
if 2.89999999999999997e85 < y < 1.34999999999999997e155Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (<= x -3.8e+42) (* i (* y1 (- (* j x) (* k z)))) (* i (* k (- (* y y5) (* y1 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 (x <= -3.8e+42) {
tmp = i * (y1 * ((j * x) - (k * z)));
} else {
tmp = i * (k * ((y * y5) - (y1 * 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 (x <= (-3.8d+42)) then
tmp = i * (y1 * ((j * x) - (k * z)))
else
tmp = i * (k * ((y * y5) - (y1 * 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 (x <= -3.8e+42) {
tmp = i * (y1 * ((j * x) - (k * z)));
} else {
tmp = i * (k * ((y * y5) - (y1 * z)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if x <= -3.8e+42: tmp = i * (y1 * ((j * x) - (k * z))) else: tmp = i * (k * ((y * y5) - (y1 * 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 (x <= -3.8e+42) tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z)))); else tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * 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 (x <= -3.8e+42) tmp = i * (y1 * ((j * x) - (k * z))); else tmp = i * (k * ((y * y5) - (y1 * 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[x, -3.8e+42], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{+42}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\end{array}
\end{array}
if x < -3.7999999999999998e42Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if -3.7999999999999998e42 < x Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (- (* (* i y) c)) x)))
(if (<= y -5.2e+134)
t_1
(if (<= y -1.9e-40)
(* b (* y0 (* k z)))
(if (<= y -3.8e-306)
(* b (* -1.0 (* a (* t z))))
(if (<= y 2.2e+124) (* i (* k (* -1.0 (* y1 z)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -((i * y) * c) * x;
double tmp;
if (y <= -5.2e+134) {
tmp = t_1;
} else if (y <= -1.9e-40) {
tmp = b * (y0 * (k * z));
} else if (y <= -3.8e-306) {
tmp = b * (-1.0 * (a * (t * z)));
} else if (y <= 2.2e+124) {
tmp = i * (k * (-1.0 * (y1 * z)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = -((i * y) * c) * x
if (y <= (-5.2d+134)) then
tmp = t_1
else if (y <= (-1.9d-40)) then
tmp = b * (y0 * (k * z))
else if (y <= (-3.8d-306)) then
tmp = b * ((-1.0d0) * (a * (t * z)))
else if (y <= 2.2d+124) then
tmp = i * (k * ((-1.0d0) * (y1 * z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -((i * y) * c) * x;
double tmp;
if (y <= -5.2e+134) {
tmp = t_1;
} else if (y <= -1.9e-40) {
tmp = b * (y0 * (k * z));
} else if (y <= -3.8e-306) {
tmp = b * (-1.0 * (a * (t * z)));
} else if (y <= 2.2e+124) {
tmp = i * (k * (-1.0 * (y1 * z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = -((i * y) * c) * x tmp = 0 if y <= -5.2e+134: tmp = t_1 elif y <= -1.9e-40: tmp = b * (y0 * (k * z)) elif y <= -3.8e-306: tmp = b * (-1.0 * (a * (t * z))) elif y <= 2.2e+124: tmp = i * (k * (-1.0 * (y1 * z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(-Float64(Float64(i * y) * c)) * x) tmp = 0.0 if (y <= -5.2e+134) tmp = t_1; elseif (y <= -1.9e-40) tmp = Float64(b * Float64(y0 * Float64(k * z))); elseif (y <= -3.8e-306) tmp = Float64(b * Float64(-1.0 * Float64(a * Float64(t * z)))); elseif (y <= 2.2e+124) tmp = Float64(i * Float64(k * Float64(-1.0 * Float64(y1 * z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = -((i * y) * c) * x; tmp = 0.0; if (y <= -5.2e+134) tmp = t_1; elseif (y <= -1.9e-40) tmp = b * (y0 * (k * z)); elseif (y <= -3.8e-306) tmp = b * (-1.0 * (a * (t * z))); elseif (y <= 2.2e+124) tmp = i * (k * (-1.0 * (y1 * z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[((-N[(N[(i * y), $MachinePrecision] * c), $MachinePrecision]) * x), $MachinePrecision]}, If[LessEqual[y, -5.2e+134], t$95$1, If[LessEqual[y, -1.9e-40], N[(b * N[(y0 * N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.8e-306], N[(b * N[(-1.0 * N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+124], N[(i * N[(k * N[(-1.0 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-\left(i \cdot y\right) \cdot c\right) \cdot x\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-40}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z\right)\right)\\
\mathbf{elif}\;y \leq -3.8 \cdot 10^{-306}:\\
\;\;\;\;b \cdot \left(-1 \cdot \left(a \cdot \left(t \cdot z\right)\right)\right)\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+124}:\\
\;\;\;\;i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.2000000000000003e134 or 2.2000000000000001e124 < y Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.2
Applied rewrites26.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6416.9
Applied rewrites16.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6416.9
Applied rewrites16.9%
if -5.2000000000000003e134 < y < -1.8999999999999999e-40Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in x around 0
lower-*.f6416.6
Applied rewrites16.6%
if -1.8999999999999999e-40 < y < -3.8e-306Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if -3.8e-306 < y < 2.2000000000000001e124Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (- (* (* i y) c)) x)))
(if (<= y -5.2e+134)
t_1
(if (<= y -3.5e-129)
(* b (* y0 (* k z)))
(if (<= y 2.05e-116)
(* b (* j (* t y4)))
(if (<= y 2.2e+124) (* i (* k (* -1.0 (* y1 z)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -((i * y) * c) * x;
double tmp;
if (y <= -5.2e+134) {
tmp = t_1;
} else if (y <= -3.5e-129) {
tmp = b * (y0 * (k * z));
} else if (y <= 2.05e-116) {
tmp = b * (j * (t * y4));
} else if (y <= 2.2e+124) {
tmp = i * (k * (-1.0 * (y1 * z)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = -((i * y) * c) * x
if (y <= (-5.2d+134)) then
tmp = t_1
else if (y <= (-3.5d-129)) then
tmp = b * (y0 * (k * z))
else if (y <= 2.05d-116) then
tmp = b * (j * (t * y4))
else if (y <= 2.2d+124) then
tmp = i * (k * ((-1.0d0) * (y1 * z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -((i * y) * c) * x;
double tmp;
if (y <= -5.2e+134) {
tmp = t_1;
} else if (y <= -3.5e-129) {
tmp = b * (y0 * (k * z));
} else if (y <= 2.05e-116) {
tmp = b * (j * (t * y4));
} else if (y <= 2.2e+124) {
tmp = i * (k * (-1.0 * (y1 * z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = -((i * y) * c) * x tmp = 0 if y <= -5.2e+134: tmp = t_1 elif y <= -3.5e-129: tmp = b * (y0 * (k * z)) elif y <= 2.05e-116: tmp = b * (j * (t * y4)) elif y <= 2.2e+124: tmp = i * (k * (-1.0 * (y1 * z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(-Float64(Float64(i * y) * c)) * x) tmp = 0.0 if (y <= -5.2e+134) tmp = t_1; elseif (y <= -3.5e-129) tmp = Float64(b * Float64(y0 * Float64(k * z))); elseif (y <= 2.05e-116) tmp = Float64(b * Float64(j * Float64(t * y4))); elseif (y <= 2.2e+124) tmp = Float64(i * Float64(k * Float64(-1.0 * Float64(y1 * z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = -((i * y) * c) * x; tmp = 0.0; if (y <= -5.2e+134) tmp = t_1; elseif (y <= -3.5e-129) tmp = b * (y0 * (k * z)); elseif (y <= 2.05e-116) tmp = b * (j * (t * y4)); elseif (y <= 2.2e+124) tmp = i * (k * (-1.0 * (y1 * z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[((-N[(N[(i * y), $MachinePrecision] * c), $MachinePrecision]) * x), $MachinePrecision]}, If[LessEqual[y, -5.2e+134], t$95$1, If[LessEqual[y, -3.5e-129], N[(b * N[(y0 * N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.05e-116], N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+124], N[(i * N[(k * N[(-1.0 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-\left(i \cdot y\right) \cdot c\right) \cdot x\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{+134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-129}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z\right)\right)\\
\mathbf{elif}\;y \leq 2.05 \cdot 10^{-116}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+124}:\\
\;\;\;\;i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.2000000000000003e134 or 2.2000000000000001e124 < y Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.2
Applied rewrites26.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6416.9
Applied rewrites16.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6416.9
Applied rewrites16.9%
if -5.2000000000000003e134 < y < -3.4999999999999997e-129Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in x around 0
lower-*.f6416.6
Applied rewrites16.6%
if -3.4999999999999997e-129 < y < 2.0499999999999999e-116Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6416.8
Applied rewrites16.8%
if 2.0499999999999999e-116 < y < 2.2000000000000001e124Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y0 (* j (* y3 y5)))))
(if (<= y3 -2.6e+213)
t_1
(if (<= y3 1.9e-239)
(* i (* k (* y y5)))
(if (<= y3 21500000.0) (* (- (* (* i y) c)) x) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y0 * (j * (y3 * y5));
double tmp;
if (y3 <= -2.6e+213) {
tmp = t_1;
} else if (y3 <= 1.9e-239) {
tmp = i * (k * (y * y5));
} else if (y3 <= 21500000.0) {
tmp = -((i * y) * c) * x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = y0 * (j * (y3 * y5))
if (y3 <= (-2.6d+213)) then
tmp = t_1
else if (y3 <= 1.9d-239) then
tmp = i * (k * (y * y5))
else if (y3 <= 21500000.0d0) then
tmp = -((i * y) * c) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y0 * (j * (y3 * y5));
double tmp;
if (y3 <= -2.6e+213) {
tmp = t_1;
} else if (y3 <= 1.9e-239) {
tmp = i * (k * (y * y5));
} else if (y3 <= 21500000.0) {
tmp = -((i * y) * c) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = y0 * (j * (y3 * y5)) tmp = 0 if y3 <= -2.6e+213: tmp = t_1 elif y3 <= 1.9e-239: tmp = i * (k * (y * y5)) elif y3 <= 21500000.0: tmp = -((i * y) * c) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(y0 * Float64(j * Float64(y3 * y5))) tmp = 0.0 if (y3 <= -2.6e+213) tmp = t_1; elseif (y3 <= 1.9e-239) tmp = Float64(i * Float64(k * Float64(y * y5))); elseif (y3 <= 21500000.0) tmp = Float64(Float64(-Float64(Float64(i * y) * c)) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = y0 * (j * (y3 * y5)); tmp = 0.0; if (y3 <= -2.6e+213) tmp = t_1; elseif (y3 <= 1.9e-239) tmp = i * (k * (y * y5)); elseif (y3 <= 21500000.0) tmp = -((i * y) * c) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y0 * N[(j * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y3, -2.6e+213], t$95$1, If[LessEqual[y3, 1.9e-239], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 21500000.0], N[((-N[(N[(i * y), $MachinePrecision] * c), $MachinePrecision]) * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y0 \cdot \left(j \cdot \left(y3 \cdot y5\right)\right)\\
\mathbf{if}\;y3 \leq -2.6 \cdot 10^{+213}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y3 \leq 1.9 \cdot 10^{-239}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{elif}\;y3 \leq 21500000:\\
\;\;\;\;\left(-\left(i \cdot y\right) \cdot c\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y3 < -2.59999999999999999e213 or 2.15e7 < y3 Initial program 29.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.6
Applied rewrites27.6%
Taylor expanded in x around 0
lower-*.f6417.8
Applied rewrites17.8%
if -2.59999999999999999e213 < y3 < 1.9000000000000001e-239Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if 1.9000000000000001e-239 < y3 < 2.15e7Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.2
Applied rewrites26.2%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6416.9
Applied rewrites16.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6416.9
Applied rewrites16.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* i (* k (* y y5)))))
(if (<= y -3.1e+121)
t_1
(if (<= y -3.5e-129)
(* b (* y0 (* k z)))
(if (<= y 26000.0) (* b (* j (* t y4))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = i * (k * (y * y5));
double tmp;
if (y <= -3.1e+121) {
tmp = t_1;
} else if (y <= -3.5e-129) {
tmp = b * (y0 * (k * z));
} else if (y <= 26000.0) {
tmp = b * (j * (t * y4));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = i * (k * (y * y5))
if (y <= (-3.1d+121)) then
tmp = t_1
else if (y <= (-3.5d-129)) then
tmp = b * (y0 * (k * z))
else if (y <= 26000.0d0) then
tmp = b * (j * (t * y4))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = i * (k * (y * y5));
double tmp;
if (y <= -3.1e+121) {
tmp = t_1;
} else if (y <= -3.5e-129) {
tmp = b * (y0 * (k * z));
} else if (y <= 26000.0) {
tmp = b * (j * (t * y4));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = i * (k * (y * y5)) tmp = 0 if y <= -3.1e+121: tmp = t_1 elif y <= -3.5e-129: tmp = b * (y0 * (k * z)) elif y <= 26000.0: tmp = b * (j * (t * y4)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(i * Float64(k * Float64(y * y5))) tmp = 0.0 if (y <= -3.1e+121) tmp = t_1; elseif (y <= -3.5e-129) tmp = Float64(b * Float64(y0 * Float64(k * z))); elseif (y <= 26000.0) tmp = Float64(b * Float64(j * Float64(t * y4))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = i * (k * (y * y5)); tmp = 0.0; if (y <= -3.1e+121) tmp = t_1; elseif (y <= -3.5e-129) tmp = b * (y0 * (k * z)); elseif (y <= 26000.0) tmp = b * (j * (t * y4)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e+121], t$95$1, If[LessEqual[y, -3.5e-129], N[(b * N[(y0 * N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 26000.0], N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-129}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z\right)\right)\\
\mathbf{elif}\;y \leq 26000:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.10000000000000008e121 or 26000 < y Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if -3.10000000000000008e121 < y < -3.4999999999999997e-129Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in x around 0
lower-*.f6416.6
Applied rewrites16.6%
if -3.4999999999999997e-129 < y < 26000Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6416.8
Applied rewrites16.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* i (* k (* y y5)))))
(if (<= y -2.8e+121)
t_1
(if (<= y -3.2e-129)
(* b (* k (* y0 z)))
(if (<= y 26000.0) (* b (* j (* t y4))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = i * (k * (y * y5));
double tmp;
if (y <= -2.8e+121) {
tmp = t_1;
} else if (y <= -3.2e-129) {
tmp = b * (k * (y0 * z));
} else if (y <= 26000.0) {
tmp = b * (j * (t * y4));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = i * (k * (y * y5))
if (y <= (-2.8d+121)) then
tmp = t_1
else if (y <= (-3.2d-129)) then
tmp = b * (k * (y0 * z))
else if (y <= 26000.0d0) then
tmp = b * (j * (t * y4))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = i * (k * (y * y5));
double tmp;
if (y <= -2.8e+121) {
tmp = t_1;
} else if (y <= -3.2e-129) {
tmp = b * (k * (y0 * z));
} else if (y <= 26000.0) {
tmp = b * (j * (t * y4));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = i * (k * (y * y5)) tmp = 0 if y <= -2.8e+121: tmp = t_1 elif y <= -3.2e-129: tmp = b * (k * (y0 * z)) elif y <= 26000.0: tmp = b * (j * (t * y4)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(i * Float64(k * Float64(y * y5))) tmp = 0.0 if (y <= -2.8e+121) tmp = t_1; elseif (y <= -3.2e-129) tmp = Float64(b * Float64(k * Float64(y0 * z))); elseif (y <= 26000.0) tmp = Float64(b * Float64(j * Float64(t * y4))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = i * (k * (y * y5)); tmp = 0.0; if (y <= -2.8e+121) tmp = t_1; elseif (y <= -3.2e-129) tmp = b * (k * (y0 * z)); elseif (y <= 26000.0) tmp = b * (j * (t * y4)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e+121], t$95$1, If[LessEqual[y, -3.2e-129], N[(b * N[(k * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 26000.0], N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-129}:\\
\;\;\;\;b \cdot \left(k \cdot \left(y0 \cdot z\right)\right)\\
\mathbf{elif}\;y \leq 26000:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.80000000000000006e121 or 26000 < y Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if -2.80000000000000006e121 < y < -3.2000000000000003e-129Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in x around 0
lower-*.f64N/A
lower-*.f6416.6
Applied rewrites16.6%
if -3.2000000000000003e-129 < y < 26000Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6416.8
Applied rewrites16.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (<= j -4.4e+175) (* x (* i (* j y1))) (if (<= j 1.5e-33) (* i (* k (* y y5))) (* y0 (* j (* y3 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 tmp;
if (j <= -4.4e+175) {
tmp = x * (i * (j * y1));
} else if (j <= 1.5e-33) {
tmp = i * (k * (y * y5));
} else {
tmp = y0 * (j * (y3 * y5));
}
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 <= (-4.4d+175)) then
tmp = x * (i * (j * y1))
else if (j <= 1.5d-33) then
tmp = i * (k * (y * y5))
else
tmp = y0 * (j * (y3 * y5))
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 <= -4.4e+175) {
tmp = x * (i * (j * y1));
} else if (j <= 1.5e-33) {
tmp = i * (k * (y * y5));
} else {
tmp = y0 * (j * (y3 * y5));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if j <= -4.4e+175: tmp = x * (i * (j * y1)) elif j <= 1.5e-33: tmp = i * (k * (y * y5)) else: tmp = y0 * (j * (y3 * y5)) 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 <= -4.4e+175) tmp = Float64(x * Float64(i * Float64(j * y1))); elseif (j <= 1.5e-33) tmp = Float64(i * Float64(k * Float64(y * y5))); else tmp = Float64(y0 * Float64(j * Float64(y3 * y5))); 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 <= -4.4e+175) tmp = x * (i * (j * y1)); elseif (j <= 1.5e-33) tmp = i * (k * (y * y5)); else tmp = y0 * (j * (y3 * y5)); 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, -4.4e+175], N[(x * N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.5e-33], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y0 * N[(j * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -4.4 \cdot 10^{+175}:\\
\;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\
\mathbf{elif}\;j \leq 1.5 \cdot 10^{-33}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y0 \cdot \left(j \cdot \left(y3 \cdot y5\right)\right)\\
\end{array}
\end{array}
if j < -4.3999999999999999e175Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.2
Applied rewrites26.2%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if -4.3999999999999999e175 < j < 1.5000000000000001e-33Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if 1.5000000000000001e-33 < j Initial program 29.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.6
Applied rewrites27.6%
Taylor expanded in x around 0
lower-*.f6417.8
Applied rewrites17.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (<= j -4.4e+175) (* x (* i (* j y1))) (if (<= j 31.5) (* i (* k (* y y5))) (* b (* t (* j 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 (j <= -4.4e+175) {
tmp = x * (i * (j * y1));
} else if (j <= 31.5) {
tmp = i * (k * (y * y5));
} else {
tmp = b * (t * (j * 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 (j <= (-4.4d+175)) then
tmp = x * (i * (j * y1))
else if (j <= 31.5d0) then
tmp = i * (k * (y * y5))
else
tmp = b * (t * (j * 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 (j <= -4.4e+175) {
tmp = x * (i * (j * y1));
} else if (j <= 31.5) {
tmp = i * (k * (y * y5));
} else {
tmp = b * (t * (j * y4));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if j <= -4.4e+175: tmp = x * (i * (j * y1)) elif j <= 31.5: tmp = i * (k * (y * y5)) else: tmp = b * (t * (j * 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 (j <= -4.4e+175) tmp = Float64(x * Float64(i * Float64(j * y1))); elseif (j <= 31.5) tmp = Float64(i * Float64(k * Float64(y * y5))); else tmp = Float64(b * Float64(t * Float64(j * 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 (j <= -4.4e+175) tmp = x * (i * (j * y1)); elseif (j <= 31.5) tmp = i * (k * (y * y5)); else tmp = b * (t * (j * 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[j, -4.4e+175], N[(x * N[(i * N[(j * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 31.5], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(t * N[(j * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -4.4 \cdot 10^{+175}:\\
\;\;\;\;x \cdot \left(i \cdot \left(j \cdot y1\right)\right)\\
\mathbf{elif}\;j \leq 31.5:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(t \cdot \left(j \cdot y4\right)\right)\\
\end{array}
\end{array}
if j < -4.3999999999999999e175Initial program 29.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.2
Applied rewrites26.2%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if -4.3999999999999999e175 < j < 31.5Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if 31.5 < j Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
Taylor expanded in z around 0
lower-*.f6416.8
Applied rewrites16.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (let* ((t_1 (* b (* j (* t y4))))) (if (<= j -1.16e+155) t_1 (if (<= j 31.5) (* i (* k (* y y5))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = b * (j * (t * y4));
double tmp;
if (j <= -1.16e+155) {
tmp = t_1;
} else if (j <= 31.5) {
tmp = i * (k * (y * y5));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = b * (j * (t * y4))
if (j <= (-1.16d+155)) then
tmp = t_1
else if (j <= 31.5d0) then
tmp = i * (k * (y * y5))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = b * (j * (t * y4));
double tmp;
if (j <= -1.16e+155) {
tmp = t_1;
} else if (j <= 31.5) {
tmp = i * (k * (y * y5));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = b * (j * (t * y4)) tmp = 0 if j <= -1.16e+155: tmp = t_1 elif j <= 31.5: tmp = i * (k * (y * y5)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(b * Float64(j * Float64(t * y4))) tmp = 0.0 if (j <= -1.16e+155) tmp = t_1; elseif (j <= 31.5) tmp = Float64(i * Float64(k * Float64(y * y5))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = b * (j * (t * y4)); tmp = 0.0; if (j <= -1.16e+155) tmp = t_1; elseif (j <= 31.5) tmp = i * (k * (y * y5)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.16e+155], t$95$1, If[LessEqual[j, 31.5], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\
\mathbf{if}\;j \leq -1.16 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 31.5:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.15999999999999992e155 or 31.5 < j Initial program 29.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6416.8
Applied rewrites16.8%
if -1.15999999999999992e155 < j < 31.5Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* i (* k (* y 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) {
return i * (k * (y * y5));
}
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 = i * (k * (y * y5))
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 i * (k * (y * y5));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return i * (k * (y * y5))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(i * Float64(k * Float64(y * y5))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = i * (k * (y * y5)); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
i \cdot \left(k \cdot \left(y \cdot y5\right)\right)
\end{array}
Initial program 29.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.8
Applied rewrites26.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
herbie shell --seed 2025149
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:name "Linear.Matrix:det44 from linear-1.19.1.3"
:precision binary64
(+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i)))) (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a)))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))