
(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 (- (* j t) (* k y)))
(t_3 (- (* t y2) (* y y3)))
(t_4 (- (* x y) (* t z)))
(t_5 (- (* y1 y4) (* y0 y5)))
(t_6 (- (* c y4) (* a y5)))
(t_7 (* y2 (- (fma k t_5 (* x t_1)) (* t t_6)))))
(if (<= y2 -2.55e+63)
t_7
(if (<= y2 -2.55e-105)
(* c (- (fma -1.0 (* i t_4) (* y0 (- (* x y2) (* y3 z)))) (* y4 t_3)))
(if (<= y2 7.2e-282)
(*
-1.0
(*
z
(-
(fma t (- (* a b) (* c i)) (* y3 t_1))
(* k (- (* b y0) (* i y1))))))
(if (<= y2 2.1e-175)
(* b (- (fma a t_4 (* y4 t_2)) (* y0 (- (* j x) (* k z)))))
(if (<= y2 1.1e+63)
(* -1.0 (* y3 (- (fma j t_5 (* z t_1)) (* y t_6))))
(if (<= y2 3.5e+223)
t_7
(*
-1.0
(*
y5
(-
(fma i t_2 (* y0 (- (* k y2) (* j y3))))
(* a 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 = (j * t) - (k * y);
double t_3 = (t * y2) - (y * y3);
double t_4 = (x * y) - (t * z);
double t_5 = (y1 * y4) - (y0 * y5);
double t_6 = (c * y4) - (a * y5);
double t_7 = y2 * (fma(k, t_5, (x * t_1)) - (t * t_6));
double tmp;
if (y2 <= -2.55e+63) {
tmp = t_7;
} else if (y2 <= -2.55e-105) {
tmp = c * (fma(-1.0, (i * t_4), (y0 * ((x * y2) - (y3 * z)))) - (y4 * t_3));
} else if (y2 <= 7.2e-282) {
tmp = -1.0 * (z * (fma(t, ((a * b) - (c * i)), (y3 * t_1)) - (k * ((b * y0) - (i * y1)))));
} else if (y2 <= 2.1e-175) {
tmp = b * (fma(a, t_4, (y4 * t_2)) - (y0 * ((j * x) - (k * z))));
} else if (y2 <= 1.1e+63) {
tmp = -1.0 * (y3 * (fma(j, t_5, (z * t_1)) - (y * t_6)));
} else if (y2 <= 3.5e+223) {
tmp = t_7;
} else {
tmp = -1.0 * (y5 * (fma(i, t_2, (y0 * ((k * y2) - (j * y3)))) - (a * 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(Float64(j * t) - Float64(k * y)) t_3 = Float64(Float64(t * y2) - Float64(y * y3)) t_4 = Float64(Float64(x * y) - Float64(t * z)) t_5 = Float64(Float64(y1 * y4) - Float64(y0 * y5)) t_6 = Float64(Float64(c * y4) - Float64(a * y5)) t_7 = Float64(y2 * Float64(fma(k, t_5, Float64(x * t_1)) - Float64(t * t_6))) tmp = 0.0 if (y2 <= -2.55e+63) tmp = t_7; elseif (y2 <= -2.55e-105) tmp = Float64(c * Float64(fma(-1.0, Float64(i * t_4), Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))) - Float64(y4 * t_3))); elseif (y2 <= 7.2e-282) tmp = Float64(-1.0 * Float64(z * Float64(fma(t, Float64(Float64(a * b) - Float64(c * i)), Float64(y3 * t_1)) - Float64(k * Float64(Float64(b * y0) - Float64(i * y1)))))); elseif (y2 <= 2.1e-175) tmp = Float64(b * Float64(fma(a, t_4, Float64(y4 * t_2)) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); elseif (y2 <= 1.1e+63) tmp = Float64(-1.0 * Float64(y3 * Float64(fma(j, t_5, Float64(z * t_1)) - Float64(y * t_6)))); elseif (y2 <= 3.5e+223) tmp = t_7; else tmp = Float64(-1.0 * Float64(y5 * Float64(fma(i, t_2, Float64(y0 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(a * 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[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(y2 * N[(N[(k * t$95$5 + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(t * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -2.55e+63], t$95$7, If[LessEqual[y2, -2.55e-105], N[(c * N[(N[(-1.0 * N[(i * t$95$4), $MachinePrecision] + N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y4 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 7.2e-282], N[(-1.0 * N[(z * N[(N[(t * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y3 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(k * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 2.1e-175], N[(b * N[(N[(a * t$95$4 + N[(y4 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 1.1e+63], N[(-1.0 * N[(y3 * N[(N[(j * t$95$5 + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y * t$95$6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 3.5e+223], t$95$7, N[(-1.0 * N[(y5 * N[(N[(i * t$95$2 + N[(y0 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot y0 - a \cdot y1\\
t_2 := j \cdot t - k \cdot y\\
t_3 := t \cdot y2 - y \cdot y3\\
t_4 := x \cdot y - t \cdot z\\
t_5 := y1 \cdot y4 - y0 \cdot y5\\
t_6 := c \cdot y4 - a \cdot y5\\
t_7 := y2 \cdot \left(\mathsf{fma}\left(k, t\_5, x \cdot t\_1\right) - t \cdot t\_6\right)\\
\mathbf{if}\;y2 \leq -2.55 \cdot 10^{+63}:\\
\;\;\;\;t\_7\\
\mathbf{elif}\;y2 \leq -2.55 \cdot 10^{-105}:\\
\;\;\;\;c \cdot \left(\mathsf{fma}\left(-1, i \cdot t\_4, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot t\_3\right)\\
\mathbf{elif}\;y2 \leq 7.2 \cdot 10^{-282}:\\
\;\;\;\;-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot t\_1\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)\\
\mathbf{elif}\;y2 \leq 2.1 \cdot 10^{-175}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_4, y4 \cdot t\_2\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;y2 \leq 1.1 \cdot 10^{+63}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, t\_5, z \cdot t\_1\right) - y \cdot t\_6\right)\right)\\
\mathbf{elif}\;y2 \leq 3.5 \cdot 10^{+223}:\\
\;\;\;\;t\_7\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, t\_2, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot t\_3\right)\right)\\
\end{array}
\end{array}
if y2 < -2.5499999999999999e63 or 1.0999999999999999e63 < y2 < 3.5000000000000001e223Initial program 30.2%
Taylor expanded in y2 around inf
Applied rewrites37.5%
if -2.5499999999999999e63 < y2 < -2.55000000000000004e-105Initial program 30.2%
Taylor expanded in c around inf
Applied rewrites35.8%
if -2.55000000000000004e-105 < y2 < 7.1999999999999995e-282Initial program 30.2%
Taylor expanded in z around -inf
Applied rewrites37.5%
if 7.1999999999999995e-282 < y2 < 2.1e-175Initial program 30.2%
Taylor expanded in b around inf
Applied rewrites37.2%
if 2.1e-175 < y2 < 1.0999999999999999e63Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
if 3.5000000000000001e223 < y2 Initial program 30.2%
Taylor expanded in y5 around -inf
Applied rewrites37.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y1 (* k (- (* y2 y4) (* i z)))))
(t_2 (* -1.0 (* y3 (* c (- (* y0 z) (* y y4))))))
(t_3 (- (* j x) (* k z))))
(if (<= k -3.1e+167)
t_1
(if (<= k -28000.0)
(* y0 (- (* -1.0 (* y5 (- (* k y2) (* j y3)))) (* b t_3)))
(if (<= k -2.5e-51)
t_2
(if (<= k -1.5e-137)
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i y1)))))
(if (<= k 1.1e-207)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= k 0.0003)
t_2
(if (<= k 8.6e+92)
(* y1 (* i t_3))
(if (<= k 9.6e+147)
(* b (- (* y4 (- (* j t) (* k y))) (* y0 t_3)))
(if (<= k 6.8e+195)
(* b (* y0 (- (* k z) (* j 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 = y1 * (k * ((y2 * y4) - (i * z)));
double t_2 = -1.0 * (y3 * (c * ((y0 * z) - (y * y4))));
double t_3 = (j * x) - (k * z);
double tmp;
if (k <= -3.1e+167) {
tmp = t_1;
} else if (k <= -28000.0) {
tmp = y0 * ((-1.0 * (y5 * ((k * y2) - (j * y3)))) - (b * t_3));
} else if (k <= -2.5e-51) {
tmp = t_2;
} else if (k <= -1.5e-137) {
tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
} else if (k <= 1.1e-207) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 0.0003) {
tmp = t_2;
} else if (k <= 8.6e+92) {
tmp = y1 * (i * t_3);
} else if (k <= 9.6e+147) {
tmp = b * ((y4 * ((j * t) - (k * y))) - (y0 * t_3));
} else if (k <= 6.8e+195) {
tmp = b * (y0 * ((k * z) - (j * 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(y1 * Float64(k * Float64(Float64(y2 * y4) - Float64(i * z)))) t_2 = Float64(-1.0 * Float64(y3 * Float64(c * Float64(Float64(y0 * z) - Float64(y * y4))))) t_3 = Float64(Float64(j * x) - Float64(k * z)) tmp = 0.0 if (k <= -3.1e+167) tmp = t_1; elseif (k <= -28000.0) tmp = Float64(y0 * Float64(Float64(-1.0 * Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(b * t_3))); elseif (k <= -2.5e-51) tmp = t_2; elseif (k <= -1.5e-137) tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); elseif (k <= 1.1e-207) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (k <= 0.0003) tmp = t_2; elseif (k <= 8.6e+92) tmp = Float64(y1 * Float64(i * t_3)); elseif (k <= 9.6e+147) tmp = Float64(b * Float64(Float64(y4 * Float64(Float64(j * t) - Float64(k * y))) - Float64(y0 * t_3))); elseif (k <= 6.8e+195) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y1 * N[(k * N[(N[(y2 * y4), $MachinePrecision] - N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 * N[(y3 * N[(c * N[(N[(y0 * z), $MachinePrecision] - N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -3.1e+167], t$95$1, If[LessEqual[k, -28000.0], N[(y0 * N[(N[(-1.0 * N[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, -2.5e-51], t$95$2, If[LessEqual[k, -1.5e-137], N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.1e-207], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.0003], t$95$2, If[LessEqual[k, 8.6e+92], N[(y1 * N[(i * t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.6e+147], N[(b * N[(N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.8e+195], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y1 \cdot \left(k \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\
t_2 := -1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z - y \cdot y4\right)\right)\right)\\
t_3 := j \cdot x - k \cdot z\\
\mathbf{if}\;k \leq -3.1 \cdot 10^{+167}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq -28000:\\
\;\;\;\;y0 \cdot \left(-1 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - b \cdot t\_3\right)\\
\mathbf{elif}\;k \leq -2.5 \cdot 10^{-51}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;k \leq -1.5 \cdot 10^{-137}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{elif}\;k \leq 1.1 \cdot 10^{-207}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 0.0003:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;k \leq 8.6 \cdot 10^{+92}:\\
\;\;\;\;y1 \cdot \left(i \cdot t\_3\right)\\
\mathbf{elif}\;k \leq 9.6 \cdot 10^{+147}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right) - y0 \cdot t\_3\right)\\
\mathbf{elif}\;k \leq 6.8 \cdot 10^{+195}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if k < -3.1e167 or 6.80000000000000021e195 < k Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in k around inf
Applied rewrites26.2%
if -3.1e167 < k < -28000Initial program 30.2%
Taylor expanded in y0 around inf
Applied rewrites36.2%
Taylor expanded in c around 0
Applied rewrites34.5%
if -28000 < k < -2.50000000000000002e-51 or 1.0999999999999999e-207 < k < 2.99999999999999974e-4Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in c around inf
Applied rewrites26.3%
if -2.50000000000000002e-51 < k < -1.4999999999999999e-137Initial program 30.2%
Taylor expanded in x around inf
Applied rewrites36.3%
if -1.4999999999999999e-137 < k < 1.0999999999999999e-207Initial program 30.2%
Taylor expanded in y0 around inf
Applied rewrites36.2%
Taylor expanded in c around inf
Applied rewrites26.4%
if 2.99999999999999974e-4 < k < 8.5999999999999996e92Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y2 around inf
Applied rewrites26.9%
Taylor expanded in i around inf
Applied rewrites25.9%
if 8.5999999999999996e92 < k < 9.60000000000000007e147Initial program 30.2%
Taylor expanded in b around inf
Applied rewrites37.2%
Taylor expanded in a around 0
Applied rewrites34.0%
if 9.60000000000000007e147 < k < 6.80000000000000021e195Initial program 30.2%
Taylor expanded in b around inf
Applied rewrites37.2%
Taylor expanded in y0 around inf
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 (- (* c y0) (* a y1)))
(t_2 (- (* j t) (* k y)))
(t_3 (- (* y1 y4) (* y0 y5)))
(t_4 (- (* c y4) (* a y5)))
(t_5 (* y2 (- (fma k t_3 (* x t_1)) (* t t_4)))))
(if (<= y2 -1.45e+68)
t_5
(if (<= y2 7.2e-282)
(*
-1.0
(*
z
(-
(fma t (- (* a b) (* c i)) (* y3 t_1))
(* k (- (* b y0) (* i y1))))))
(if (<= y2 2.1e-175)
(*
b
(-
(fma a (- (* x y) (* t z)) (* y4 t_2))
(* y0 (- (* j x) (* k z)))))
(if (<= y2 1.1e+63)
(* -1.0 (* y3 (- (fma j t_3 (* z t_1)) (* y t_4))))
(if (<= y2 3.5e+223)
t_5
(*
-1.0
(*
y5
(-
(fma i t_2 (* y0 (- (* k y2) (* j y3))))
(* a (- (* t y2) (* y y3)))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (c * y0) - (a * y1);
double t_2 = (j * t) - (k * y);
double t_3 = (y1 * y4) - (y0 * y5);
double t_4 = (c * y4) - (a * y5);
double t_5 = y2 * (fma(k, t_3, (x * t_1)) - (t * t_4));
double tmp;
if (y2 <= -1.45e+68) {
tmp = t_5;
} else if (y2 <= 7.2e-282) {
tmp = -1.0 * (z * (fma(t, ((a * b) - (c * i)), (y3 * t_1)) - (k * ((b * y0) - (i * y1)))));
} else if (y2 <= 2.1e-175) {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * t_2)) - (y0 * ((j * x) - (k * z))));
} else if (y2 <= 1.1e+63) {
tmp = -1.0 * (y3 * (fma(j, t_3, (z * t_1)) - (y * t_4)));
} else if (y2 <= 3.5e+223) {
tmp = t_5;
} else {
tmp = -1.0 * (y5 * (fma(i, t_2, (y0 * ((k * y2) - (j * y3)))) - (a * ((t * y2) - (y * y3)))));
}
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(j * t) - Float64(k * y)) t_3 = Float64(Float64(y1 * y4) - Float64(y0 * y5)) t_4 = Float64(Float64(c * y4) - Float64(a * y5)) t_5 = Float64(y2 * Float64(fma(k, t_3, Float64(x * t_1)) - Float64(t * t_4))) tmp = 0.0 if (y2 <= -1.45e+68) tmp = t_5; elseif (y2 <= 7.2e-282) tmp = Float64(-1.0 * Float64(z * Float64(fma(t, Float64(Float64(a * b) - Float64(c * i)), Float64(y3 * t_1)) - Float64(k * Float64(Float64(b * y0) - Float64(i * y1)))))); elseif (y2 <= 2.1e-175) tmp = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * t_2)) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); elseif (y2 <= 1.1e+63) tmp = Float64(-1.0 * Float64(y3 * Float64(fma(j, t_3, Float64(z * t_1)) - Float64(y * t_4)))); elseif (y2 <= 3.5e+223) tmp = t_5; else tmp = Float64(-1.0 * Float64(y5 * Float64(fma(i, t_2, Float64(y0 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(a * Float64(Float64(t * y2) - Float64(y * y3)))))); 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[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(y2 * N[(N[(k * t$95$3 + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -1.45e+68], t$95$5, If[LessEqual[y2, 7.2e-282], N[(-1.0 * N[(z * N[(N[(t * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y3 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(k * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 2.1e-175], N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 1.1e+63], N[(-1.0 * N[(y3 * N[(N[(j * t$95$3 + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 3.5e+223], t$95$5, N[(-1.0 * N[(y5 * N[(N[(i * t$95$2 + N[(y0 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot y0 - a \cdot y1\\
t_2 := j \cdot t - k \cdot y\\
t_3 := y1 \cdot y4 - y0 \cdot y5\\
t_4 := c \cdot y4 - a \cdot y5\\
t_5 := y2 \cdot \left(\mathsf{fma}\left(k, t\_3, x \cdot t\_1\right) - t \cdot t\_4\right)\\
\mathbf{if}\;y2 \leq -1.45 \cdot 10^{+68}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;y2 \leq 7.2 \cdot 10^{-282}:\\
\;\;\;\;-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, a \cdot b - c \cdot i, y3 \cdot t\_1\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)\\
\mathbf{elif}\;y2 \leq 2.1 \cdot 10^{-175}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot t\_2\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;y2 \leq 1.1 \cdot 10^{+63}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, t\_3, z \cdot t\_1\right) - y \cdot t\_4\right)\right)\\
\mathbf{elif}\;y2 \leq 3.5 \cdot 10^{+223}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, t\_2, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)\\
\end{array}
\end{array}
if y2 < -1.45000000000000006e68 or 1.0999999999999999e63 < y2 < 3.5000000000000001e223Initial program 30.2%
Taylor expanded in y2 around inf
Applied rewrites37.5%
if -1.45000000000000006e68 < y2 < 7.1999999999999995e-282Initial program 30.2%
Taylor expanded in z around -inf
Applied rewrites37.5%
if 7.1999999999999995e-282 < y2 < 2.1e-175Initial program 30.2%
Taylor expanded in b around inf
Applied rewrites37.2%
if 2.1e-175 < y2 < 1.0999999999999999e63Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
if 3.5000000000000001e223 < y2 Initial program 30.2%
Taylor expanded in y5 around -inf
Applied rewrites37.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* k y2) (* j y3)))
(t_2
(+
(-
(+
(+
(-
(* (- (* 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))))
(* t_1 (- (* y4 y1) (* y5 y0))))))
(if (<= t_2 INFINITY)
t_2
(*
y1
(-
(fma -1.0 (* a (- (* x y2) (* y3 z))) (* y4 t_1))
(* -1.0 (* i (- (* j x) (* k z)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (k * y2) - (j * y3);
double t_2 = (((((((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)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
double tmp;
if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = y1 * (fma(-1.0, (a * ((x * y2) - (y3 * z))), (y4 * t_1)) - (-1.0 * (i * ((j * x) - (k * z)))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(k * y2) - Float64(j * y3)) t_2 = 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(t_1 * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) tmp = 0.0 if (t_2 <= Inf) tmp = t_2; else tmp = Float64(y1 * Float64(fma(-1.0, Float64(a * Float64(Float64(x * y2) - Float64(y3 * z))), Float64(y4 * t_1)) - Float64(-1.0 * Float64(i * Float64(Float64(j * x) - Float64(k * z)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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[(t$95$1 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, Infinity], t$95$2, N[(y1 * N[(N[(-1.0 * N[(a * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y4 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(i * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
t_2 := \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) + t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;t\_2 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot t\_1\right) - -1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\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 30.2%
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 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* k y2) (* j y3)))
(t_2 (- (* x y2) (* y3 z)))
(t_3 (- (* j x) (* k z)))
(t_4 (* y1 (- (fma -1.0 (* a t_2) (* y4 t_1)) (* -1.0 (* i t_3))))))
(if (<= y1 -7.8e+230)
(*
a
(-
(fma -1.0 (* y1 t_2) (* b (- (* x y) (* t z))))
(* -1.0 (* y5 (- (* t y2) (* y y3))))))
(if (<= y1 -2.75e-195)
t_4
(if (<= y1 2.9e-288)
(* -1.0 (* y3 (* y (- (* a y5) (* c y4)))))
(if (<= y1 2.85e+150)
(* y0 (- (fma -1.0 (* y5 t_1) (* c t_2)) (* b t_3)))
t_4))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (k * y2) - (j * y3);
double t_2 = (x * y2) - (y3 * z);
double t_3 = (j * x) - (k * z);
double t_4 = y1 * (fma(-1.0, (a * t_2), (y4 * t_1)) - (-1.0 * (i * t_3)));
double tmp;
if (y1 <= -7.8e+230) {
tmp = a * (fma(-1.0, (y1 * t_2), (b * ((x * y) - (t * z)))) - (-1.0 * (y5 * ((t * y2) - (y * y3)))));
} else if (y1 <= -2.75e-195) {
tmp = t_4;
} else if (y1 <= 2.9e-288) {
tmp = -1.0 * (y3 * (y * ((a * y5) - (c * y4))));
} else if (y1 <= 2.85e+150) {
tmp = y0 * (fma(-1.0, (y5 * t_1), (c * t_2)) - (b * t_3));
} else {
tmp = t_4;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(k * y2) - Float64(j * y3)) t_2 = Float64(Float64(x * y2) - Float64(y3 * z)) t_3 = Float64(Float64(j * x) - Float64(k * z)) t_4 = Float64(y1 * Float64(fma(-1.0, Float64(a * t_2), Float64(y4 * t_1)) - Float64(-1.0 * Float64(i * t_3)))) tmp = 0.0 if (y1 <= -7.8e+230) tmp = Float64(a * Float64(fma(-1.0, Float64(y1 * t_2), Float64(b * Float64(Float64(x * y) - Float64(t * z)))) - Float64(-1.0 * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))))); elseif (y1 <= -2.75e-195) tmp = t_4; elseif (y1 <= 2.9e-288) tmp = Float64(-1.0 * Float64(y3 * Float64(y * Float64(Float64(a * y5) - Float64(c * y4))))); elseif (y1 <= 2.85e+150) tmp = Float64(y0 * Float64(fma(-1.0, Float64(y5 * t_1), Float64(c * t_2)) - Float64(b * t_3))); else tmp = t_4; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y1 * N[(N[(-1.0 * N[(a * t$95$2), $MachinePrecision] + N[(y4 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(i * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y1, -7.8e+230], N[(a * N[(N[(-1.0 * N[(y1 * t$95$2), $MachinePrecision] + N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, -2.75e-195], t$95$4, If[LessEqual[y1, 2.9e-288], N[(-1.0 * N[(y3 * N[(y * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 2.85e+150], N[(y0 * N[(N[(-1.0 * N[(y5 * t$95$1), $MachinePrecision] + N[(c * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(b * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
t_2 := x \cdot y2 - y3 \cdot z\\
t_3 := j \cdot x - k \cdot z\\
t_4 := y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot t\_2, y4 \cdot t\_1\right) - -1 \cdot \left(i \cdot t\_3\right)\right)\\
\mathbf{if}\;y1 \leq -7.8 \cdot 10^{+230}:\\
\;\;\;\;a \cdot \left(\mathsf{fma}\left(-1, y1 \cdot t\_2, b \cdot \left(x \cdot y - t \cdot z\right)\right) - -1 \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)\\
\mathbf{elif}\;y1 \leq -2.75 \cdot 10^{-195}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y1 \leq 2.9 \cdot 10^{-288}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(y \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\right)\\
\mathbf{elif}\;y1 \leq 2.85 \cdot 10^{+150}:\\
\;\;\;\;y0 \cdot \left(\mathsf{fma}\left(-1, y5 \cdot t\_1, c \cdot t\_2\right) - b \cdot t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y1 < -7.7999999999999996e230Initial program 30.2%
Taylor expanded in a around inf
Applied rewrites36.0%
if -7.7999999999999996e230 < y1 < -2.7500000000000002e-195 or 2.8500000000000001e150 < y1 Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
if -2.7500000000000002e-195 < y1 < 2.90000000000000015e-288Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in y around inf
Applied rewrites27.0%
if 2.90000000000000015e-288 < y1 < 2.8500000000000001e150Initial program 30.2%
Taylor expanded in y0 around inf
Applied rewrites36.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* j t) (* k y)))
(t_2 (- (* c y0) (* a y1)))
(t_3 (- (* y1 y4) (* y0 y5)))
(t_4 (- (* c y4) (* a y5)))
(t_5 (* y2 (- (fma k t_3 (* x t_2)) (* t t_4))))
(t_6 (* -1.0 (* y3 (- (fma j t_3 (* z t_2)) (* y t_4))))))
(if (<= y2 -4.2e+59)
t_5
(if (<= y2 3e-278)
t_6
(if (<= y2 2.05e-175)
(* b (- (* y4 t_1) (* y0 (- (* j x) (* k z)))))
(if (<= y2 1.1e+63)
t_6
(if (<= y2 3.5e+223)
t_5
(*
-1.0
(*
y5
(-
(fma i t_1 (* y0 (- (* k y2) (* j y3))))
(* a (- (* t y2) (* y y3)))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (j * t) - (k * y);
double t_2 = (c * y0) - (a * y1);
double t_3 = (y1 * y4) - (y0 * y5);
double t_4 = (c * y4) - (a * y5);
double t_5 = y2 * (fma(k, t_3, (x * t_2)) - (t * t_4));
double t_6 = -1.0 * (y3 * (fma(j, t_3, (z * t_2)) - (y * t_4)));
double tmp;
if (y2 <= -4.2e+59) {
tmp = t_5;
} else if (y2 <= 3e-278) {
tmp = t_6;
} else if (y2 <= 2.05e-175) {
tmp = b * ((y4 * t_1) - (y0 * ((j * x) - (k * z))));
} else if (y2 <= 1.1e+63) {
tmp = t_6;
} else if (y2 <= 3.5e+223) {
tmp = t_5;
} else {
tmp = -1.0 * (y5 * (fma(i, t_1, (y0 * ((k * y2) - (j * y3)))) - (a * ((t * y2) - (y * y3)))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(j * t) - Float64(k * y)) t_2 = Float64(Float64(c * y0) - Float64(a * y1)) t_3 = Float64(Float64(y1 * y4) - Float64(y0 * y5)) t_4 = Float64(Float64(c * y4) - Float64(a * y5)) t_5 = Float64(y2 * Float64(fma(k, t_3, Float64(x * t_2)) - Float64(t * t_4))) t_6 = Float64(-1.0 * Float64(y3 * Float64(fma(j, t_3, Float64(z * t_2)) - Float64(y * t_4)))) tmp = 0.0 if (y2 <= -4.2e+59) tmp = t_5; elseif (y2 <= 3e-278) tmp = t_6; elseif (y2 <= 2.05e-175) tmp = Float64(b * Float64(Float64(y4 * t_1) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); elseif (y2 <= 1.1e+63) tmp = t_6; elseif (y2 <= 3.5e+223) tmp = t_5; else tmp = Float64(-1.0 * Float64(y5 * Float64(fma(i, t_1, Float64(y0 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(a * Float64(Float64(t * y2) - Float64(y * y3)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(y2 * N[(N[(k * t$95$3 + N[(x * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(-1.0 * N[(y3 * N[(N[(j * t$95$3 + N[(z * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -4.2e+59], t$95$5, If[LessEqual[y2, 3e-278], t$95$6, If[LessEqual[y2, 2.05e-175], N[(b * N[(N[(y4 * t$95$1), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 1.1e+63], t$95$6, If[LessEqual[y2, 3.5e+223], t$95$5, N[(-1.0 * N[(y5 * N[(N[(i * t$95$1 + N[(y0 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
t_2 := c \cdot y0 - a \cdot y1\\
t_3 := y1 \cdot y4 - y0 \cdot y5\\
t_4 := c \cdot y4 - a \cdot y5\\
t_5 := y2 \cdot \left(\mathsf{fma}\left(k, t\_3, x \cdot t\_2\right) - t \cdot t\_4\right)\\
t_6 := -1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, t\_3, z \cdot t\_2\right) - y \cdot t\_4\right)\right)\\
\mathbf{if}\;y2 \leq -4.2 \cdot 10^{+59}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;y2 \leq 3 \cdot 10^{-278}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;y2 \leq 2.05 \cdot 10^{-175}:\\
\;\;\;\;b \cdot \left(y4 \cdot t\_1 - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;y2 \leq 1.1 \cdot 10^{+63}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;y2 \leq 3.5 \cdot 10^{+223}:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(y5 \cdot \left(\mathsf{fma}\left(i, t\_1, y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - a \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\right)\\
\end{array}
\end{array}
if y2 < -4.19999999999999968e59 or 1.0999999999999999e63 < y2 < 3.5000000000000001e223Initial program 30.2%
Taylor expanded in y2 around inf
Applied rewrites37.5%
if -4.19999999999999968e59 < y2 < 3e-278 or 2.04999999999999999e-175 < y2 < 1.0999999999999999e63Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
if 3e-278 < y2 < 2.04999999999999999e-175Initial program 30.2%
Taylor expanded in b around inf
Applied rewrites37.2%
Taylor expanded in a around 0
Applied rewrites34.0%
if 3.5000000000000001e223 < y2 Initial program 30.2%
Taylor expanded in y5 around -inf
Applied rewrites37.9%
(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 (- (* y1 y4) (* y0 y5)))
(t_3 (- (* c y4) (* a y5)))
(t_4 (* y2 (- (fma k t_2 (* x t_1)) (* t t_3))))
(t_5 (* -1.0 (* y3 (- (fma j t_2 (* z t_1)) (* y t_3))))))
(if (<= y2 -4.2e+59)
t_4
(if (<= y2 3e-278)
t_5
(if (<= y2 2.05e-175)
(* b (- (* y4 (- (* j t) (* k y))) (* y0 (- (* j x) (* k z)))))
(if (<= y2 1.1e+63)
t_5
(if (<= y2 5.5e+223) t_4 (* y1 (* k (- (* y2 y4) (* i z)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (c * y0) - (a * y1);
double t_2 = (y1 * y4) - (y0 * y5);
double t_3 = (c * y4) - (a * y5);
double t_4 = y2 * (fma(k, t_2, (x * t_1)) - (t * t_3));
double t_5 = -1.0 * (y3 * (fma(j, t_2, (z * t_1)) - (y * t_3)));
double tmp;
if (y2 <= -4.2e+59) {
tmp = t_4;
} else if (y2 <= 3e-278) {
tmp = t_5;
} else if (y2 <= 2.05e-175) {
tmp = b * ((y4 * ((j * t) - (k * y))) - (y0 * ((j * x) - (k * z))));
} else if (y2 <= 1.1e+63) {
tmp = t_5;
} else if (y2 <= 5.5e+223) {
tmp = t_4;
} else {
tmp = y1 * (k * ((y2 * y4) - (i * z)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(c * y0) - Float64(a * y1)) t_2 = Float64(Float64(y1 * y4) - Float64(y0 * y5)) t_3 = Float64(Float64(c * y4) - Float64(a * y5)) t_4 = Float64(y2 * Float64(fma(k, t_2, Float64(x * t_1)) - Float64(t * t_3))) t_5 = Float64(-1.0 * Float64(y3 * Float64(fma(j, t_2, Float64(z * t_1)) - Float64(y * t_3)))) tmp = 0.0 if (y2 <= -4.2e+59) tmp = t_4; elseif (y2 <= 3e-278) tmp = t_5; elseif (y2 <= 2.05e-175) tmp = Float64(b * Float64(Float64(y4 * Float64(Float64(j * t) - Float64(k * y))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); elseif (y2 <= 1.1e+63) tmp = t_5; elseif (y2 <= 5.5e+223) tmp = t_4; else tmp = Float64(y1 * Float64(k * Float64(Float64(y2 * y4) - Float64(i * z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(y2 * N[(N[(k * t$95$2 + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(-1.0 * N[(y3 * N[(N[(j * t$95$2 + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -4.2e+59], t$95$4, If[LessEqual[y2, 3e-278], t$95$5, If[LessEqual[y2, 2.05e-175], N[(b * N[(N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 1.1e+63], t$95$5, If[LessEqual[y2, 5.5e+223], t$95$4, N[(y1 * N[(k * N[(N[(y2 * y4), $MachinePrecision] - N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot y0 - a \cdot y1\\
t_2 := y1 \cdot y4 - y0 \cdot y5\\
t_3 := c \cdot y4 - a \cdot y5\\
t_4 := y2 \cdot \left(\mathsf{fma}\left(k, t\_2, x \cdot t\_1\right) - t \cdot t\_3\right)\\
t_5 := -1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, t\_2, z \cdot t\_1\right) - y \cdot t\_3\right)\right)\\
\mathbf{if}\;y2 \leq -4.2 \cdot 10^{+59}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y2 \leq 3 \cdot 10^{-278}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;y2 \leq 2.05 \cdot 10^{-175}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;y2 \leq 1.1 \cdot 10^{+63}:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;y2 \leq 5.5 \cdot 10^{+223}:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(k \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\
\end{array}
\end{array}
if y2 < -4.19999999999999968e59 or 1.0999999999999999e63 < y2 < 5.4999999999999999e223Initial program 30.2%
Taylor expanded in y2 around inf
Applied rewrites37.5%
if -4.19999999999999968e59 < y2 < 3e-278 or 2.04999999999999999e-175 < y2 < 1.0999999999999999e63Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
if 3e-278 < y2 < 2.04999999999999999e-175Initial program 30.2%
Taylor expanded in b around inf
Applied rewrites37.2%
Taylor expanded in a around 0
Applied rewrites34.0%
if 5.4999999999999999e223 < y2 Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in k around inf
Applied rewrites26.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y1 (* k (- (* y2 y4) (* i z))))) (t_2 (- (* j x) (* k z))))
(if (<= k -7.2e+144)
t_1
(if (<= k 1.1e-207)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= k 0.0003)
(* -1.0 (* y3 (* c (- (* y0 z) (* y y4)))))
(if (<= k 8.6e+92)
(* y1 (* i t_2))
(if (<= k 9.6e+147)
(* b (- (* y4 (- (* j t) (* k y))) (* y0 t_2)))
(if (<= k 6.8e+195) (* b (* y0 (- (* k z) (* j 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 = y1 * (k * ((y2 * y4) - (i * z)));
double t_2 = (j * x) - (k * z);
double tmp;
if (k <= -7.2e+144) {
tmp = t_1;
} else if (k <= 1.1e-207) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 0.0003) {
tmp = -1.0 * (y3 * (c * ((y0 * z) - (y * y4))));
} else if (k <= 8.6e+92) {
tmp = y1 * (i * t_2);
} else if (k <= 9.6e+147) {
tmp = b * ((y4 * ((j * t) - (k * y))) - (y0 * t_2));
} else if (k <= 6.8e+195) {
tmp = b * (y0 * ((k * z) - (j * 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) :: t_2
real(8) :: tmp
t_1 = y1 * (k * ((y2 * y4) - (i * z)))
t_2 = (j * x) - (k * z)
if (k <= (-7.2d+144)) then
tmp = t_1
else if (k <= 1.1d-207) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else if (k <= 0.0003d0) then
tmp = (-1.0d0) * (y3 * (c * ((y0 * z) - (y * y4))))
else if (k <= 8.6d+92) then
tmp = y1 * (i * t_2)
else if (k <= 9.6d+147) then
tmp = b * ((y4 * ((j * t) - (k * y))) - (y0 * t_2))
else if (k <= 6.8d+195) then
tmp = b * (y0 * ((k * z) - (j * 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 = y1 * (k * ((y2 * y4) - (i * z)));
double t_2 = (j * x) - (k * z);
double tmp;
if (k <= -7.2e+144) {
tmp = t_1;
} else if (k <= 1.1e-207) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 0.0003) {
tmp = -1.0 * (y3 * (c * ((y0 * z) - (y * y4))));
} else if (k <= 8.6e+92) {
tmp = y1 * (i * t_2);
} else if (k <= 9.6e+147) {
tmp = b * ((y4 * ((j * t) - (k * y))) - (y0 * t_2));
} else if (k <= 6.8e+195) {
tmp = b * (y0 * ((k * z) - (j * 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 = y1 * (k * ((y2 * y4) - (i * z))) t_2 = (j * x) - (k * z) tmp = 0 if k <= -7.2e+144: tmp = t_1 elif k <= 1.1e-207: tmp = c * (y0 * ((x * y2) - (y3 * z))) elif k <= 0.0003: tmp = -1.0 * (y3 * (c * ((y0 * z) - (y * y4)))) elif k <= 8.6e+92: tmp = y1 * (i * t_2) elif k <= 9.6e+147: tmp = b * ((y4 * ((j * t) - (k * y))) - (y0 * t_2)) elif k <= 6.8e+195: tmp = b * (y0 * ((k * z) - (j * 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(y1 * Float64(k * Float64(Float64(y2 * y4) - Float64(i * z)))) t_2 = Float64(Float64(j * x) - Float64(k * z)) tmp = 0.0 if (k <= -7.2e+144) tmp = t_1; elseif (k <= 1.1e-207) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (k <= 0.0003) tmp = Float64(-1.0 * Float64(y3 * Float64(c * Float64(Float64(y0 * z) - Float64(y * y4))))); elseif (k <= 8.6e+92) tmp = Float64(y1 * Float64(i * t_2)); elseif (k <= 9.6e+147) tmp = Float64(b * Float64(Float64(y4 * Float64(Float64(j * t) - Float64(k * y))) - Float64(y0 * t_2))); elseif (k <= 6.8e+195) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * 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 = y1 * (k * ((y2 * y4) - (i * z))); t_2 = (j * x) - (k * z); tmp = 0.0; if (k <= -7.2e+144) tmp = t_1; elseif (k <= 1.1e-207) tmp = c * (y0 * ((x * y2) - (y3 * z))); elseif (k <= 0.0003) tmp = -1.0 * (y3 * (c * ((y0 * z) - (y * y4)))); elseif (k <= 8.6e+92) tmp = y1 * (i * t_2); elseif (k <= 9.6e+147) tmp = b * ((y4 * ((j * t) - (k * y))) - (y0 * t_2)); elseif (k <= 6.8e+195) tmp = b * (y0 * ((k * z) - (j * 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[(y1 * N[(k * N[(N[(y2 * y4), $MachinePrecision] - N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -7.2e+144], t$95$1, If[LessEqual[k, 1.1e-207], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.0003], N[(-1.0 * N[(y3 * N[(c * N[(N[(y0 * z), $MachinePrecision] - N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.6e+92], N[(y1 * N[(i * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.6e+147], N[(b * N[(N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.8e+195], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y1 \cdot \left(k \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\
t_2 := j \cdot x - k \cdot z\\
\mathbf{if}\;k \leq -7.2 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq 1.1 \cdot 10^{-207}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 0.0003:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z - y \cdot y4\right)\right)\right)\\
\mathbf{elif}\;k \leq 8.6 \cdot 10^{+92}:\\
\;\;\;\;y1 \cdot \left(i \cdot t\_2\right)\\
\mathbf{elif}\;k \leq 9.6 \cdot 10^{+147}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right) - y0 \cdot t\_2\right)\\
\mathbf{elif}\;k \leq 6.8 \cdot 10^{+195}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if k < -7.1999999999999995e144 or 6.80000000000000021e195 < k Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in k around inf
Applied rewrites26.2%
if -7.1999999999999995e144 < k < 1.0999999999999999e-207Initial program 30.2%
Taylor expanded in y0 around inf
Applied rewrites36.2%
Taylor expanded in c around inf
Applied rewrites26.4%
if 1.0999999999999999e-207 < k < 2.99999999999999974e-4Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in c around inf
Applied rewrites26.3%
if 2.99999999999999974e-4 < k < 8.5999999999999996e92Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y2 around inf
Applied rewrites26.9%
Taylor expanded in i around inf
Applied rewrites25.9%
if 8.5999999999999996e92 < k < 9.60000000000000007e147Initial program 30.2%
Taylor expanded in b around inf
Applied rewrites37.2%
Taylor expanded in a around 0
Applied rewrites34.0%
if 9.60000000000000007e147 < k < 6.80000000000000021e195Initial program 30.2%
Taylor expanded in b around inf
Applied rewrites37.2%
Taylor expanded in y0 around inf
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) (* z y3)) (- (* y0 c) (* y1 a))))
(t_2 (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(t_3 (- (* j x) (* k z)))
(t_4 (- (* k y2) (* j y3)))
(t_5 (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(t_6 (* t_4 (- (* y4 y1) (* y5 y0)))))
(if (<=
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
t_1)
t_5)
t_2)
t_6)
INFINITY)
(+ (- (+ (+ (* i (* y1 t_3)) t_1) t_5) t_2) t_6)
(*
y1
(-
(fma -1.0 (* a (- (* x y2) (* y3 z))) (* y4 t_4))
(* -1.0 (* i 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 = ((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a));
double t_2 = ((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a));
double t_3 = (j * x) - (k * z);
double t_4 = (k * y2) - (j * y3);
double t_5 = ((t * j) - (y * k)) * ((y4 * b) - (y5 * i));
double t_6 = t_4 * ((y4 * y1) - (y5 * y0));
double tmp;
if (((((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + t_1) + t_5) - t_2) + t_6) <= ((double) INFINITY)) {
tmp = ((((i * (y1 * t_3)) + t_1) + t_5) - t_2) + t_6;
} else {
tmp = y1 * (fma(-1.0, (a * ((x * y2) - (y3 * z))), (y4 * t_4)) - (-1.0 * (i * 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(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a))) t_2 = Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a))) t_3 = Float64(Float64(j * x) - Float64(k * z)) t_4 = Float64(Float64(k * y2) - Float64(j * y3)) t_5 = Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i))) t_6 = Float64(t_4 * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (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)))) + t_1) + t_5) - t_2) + t_6) <= Inf) tmp = Float64(Float64(Float64(Float64(Float64(i * Float64(y1 * t_3)) + t_1) + t_5) - t_2) + t_6); else tmp = Float64(y1 * Float64(fma(-1.0, Float64(a * Float64(Float64(x * y2) - Float64(y3 * z))), Float64(y4 * t_4)) - Float64(-1.0 * Float64(i * 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[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$4 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[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] + t$95$1), $MachinePrecision] + t$95$5), $MachinePrecision] - t$95$2), $MachinePrecision] + t$95$6), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(i * N[(y1 * t$95$3), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$5), $MachinePrecision] - t$95$2), $MachinePrecision] + t$95$6), $MachinePrecision], N[(y1 * N[(N[(-1.0 * N[(a * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y4 * t$95$4), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(i * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\\
t_2 := \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\\
t_3 := j \cdot x - k \cdot z\\
t_4 := k \cdot y2 - j \cdot y3\\
t_5 := \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\\
t_6 := t\_4 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;\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) + t\_1\right) + t\_5\right) - t\_2\right) + t\_6 \leq \infty:\\
\;\;\;\;\left(\left(\left(i \cdot \left(y1 \cdot t\_3\right) + t\_1\right) + t\_5\right) - t\_2\right) + t\_6\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(x \cdot y2 - y3 \cdot z\right), y4 \cdot t\_4\right) - -1 \cdot \left(i \cdot t\_3\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 30.2%
Taylor expanded in y1 around inf
Applied rewrites32.6%
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 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y1 (* k (- (* y2 y4) (* i z)))))
(t_2 (* -1.0 (* y3 (* c (- (* y0 z) (* y y4)))))))
(if (<= k -7.2e+144)
t_1
(if (<= k 1.1e-207)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= k 0.0003)
t_2
(if (<= k 4.7e+107)
(* y1 (* i (- (* j x) (* k z))))
(if (<= k 1.2e+195) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y1 * (k * ((y2 * y4) - (i * z)));
double t_2 = -1.0 * (y3 * (c * ((y0 * z) - (y * y4))));
double tmp;
if (k <= -7.2e+144) {
tmp = t_1;
} else if (k <= 1.1e-207) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 0.0003) {
tmp = t_2;
} else if (k <= 4.7e+107) {
tmp = y1 * (i * ((j * x) - (k * z)));
} else if (k <= 1.2e+195) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = y1 * (k * ((y2 * y4) - (i * z)))
t_2 = (-1.0d0) * (y3 * (c * ((y0 * z) - (y * y4))))
if (k <= (-7.2d+144)) then
tmp = t_1
else if (k <= 1.1d-207) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else if (k <= 0.0003d0) then
tmp = t_2
else if (k <= 4.7d+107) then
tmp = y1 * (i * ((j * x) - (k * z)))
else if (k <= 1.2d+195) then
tmp = t_2
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 = y1 * (k * ((y2 * y4) - (i * z)));
double t_2 = -1.0 * (y3 * (c * ((y0 * z) - (y * y4))));
double tmp;
if (k <= -7.2e+144) {
tmp = t_1;
} else if (k <= 1.1e-207) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 0.0003) {
tmp = t_2;
} else if (k <= 4.7e+107) {
tmp = y1 * (i * ((j * x) - (k * z)));
} else if (k <= 1.2e+195) {
tmp = t_2;
} 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 = y1 * (k * ((y2 * y4) - (i * z))) t_2 = -1.0 * (y3 * (c * ((y0 * z) - (y * y4)))) tmp = 0 if k <= -7.2e+144: tmp = t_1 elif k <= 1.1e-207: tmp = c * (y0 * ((x * y2) - (y3 * z))) elif k <= 0.0003: tmp = t_2 elif k <= 4.7e+107: tmp = y1 * (i * ((j * x) - (k * z))) elif k <= 1.2e+195: tmp = t_2 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(y1 * Float64(k * Float64(Float64(y2 * y4) - Float64(i * z)))) t_2 = Float64(-1.0 * Float64(y3 * Float64(c * Float64(Float64(y0 * z) - Float64(y * y4))))) tmp = 0.0 if (k <= -7.2e+144) tmp = t_1; elseif (k <= 1.1e-207) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (k <= 0.0003) tmp = t_2; elseif (k <= 4.7e+107) tmp = Float64(y1 * Float64(i * Float64(Float64(j * x) - Float64(k * z)))); elseif (k <= 1.2e+195) tmp = t_2; 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 = y1 * (k * ((y2 * y4) - (i * z))); t_2 = -1.0 * (y3 * (c * ((y0 * z) - (y * y4)))); tmp = 0.0; if (k <= -7.2e+144) tmp = t_1; elseif (k <= 1.1e-207) tmp = c * (y0 * ((x * y2) - (y3 * z))); elseif (k <= 0.0003) tmp = t_2; elseif (k <= 4.7e+107) tmp = y1 * (i * ((j * x) - (k * z))); elseif (k <= 1.2e+195) tmp = t_2; 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[(y1 * N[(k * N[(N[(y2 * y4), $MachinePrecision] - N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-1.0 * N[(y3 * N[(c * N[(N[(y0 * z), $MachinePrecision] - N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -7.2e+144], t$95$1, If[LessEqual[k, 1.1e-207], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 0.0003], t$95$2, If[LessEqual[k, 4.7e+107], N[(y1 * N[(i * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.2e+195], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y1 \cdot \left(k \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\
t_2 := -1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z - y \cdot y4\right)\right)\right)\\
\mathbf{if}\;k \leq -7.2 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq 1.1 \cdot 10^{-207}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 0.0003:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;k \leq 4.7 \cdot 10^{+107}:\\
\;\;\;\;y1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 1.2 \cdot 10^{+195}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if k < -7.1999999999999995e144 or 1.2000000000000001e195 < k Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in k around inf
Applied rewrites26.2%
if -7.1999999999999995e144 < k < 1.0999999999999999e-207Initial program 30.2%
Taylor expanded in y0 around inf
Applied rewrites36.2%
Taylor expanded in c around inf
Applied rewrites26.4%
if 1.0999999999999999e-207 < k < 2.99999999999999974e-4 or 4.7000000000000001e107 < k < 1.2000000000000001e195Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in c around inf
Applied rewrites26.3%
if 2.99999999999999974e-4 < k < 4.7000000000000001e107Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y2 around inf
Applied rewrites26.9%
Taylor expanded in i around inf
Applied rewrites25.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* k y2) (* j y3))))
(if (<= y0 -6e+75)
(* y0 (- (* -1.0 (* y5 t_1)) (* b (- (* j x) (* k z)))))
(if (<= y0 -1.95e-227)
(*
y2
(-
(fma k (- (* y1 y4) (* y0 y5)) (* x (- (* c y0) (* a y1))))
(* t (- (* c y4) (* a y5)))))
(if (<= y0 2.1e+104)
(*
y4
(-
(fma b (- (* j t) (* k y)) (* y1 t_1))
(* c (- (* t y2) (* y y3)))))
(if (<= y0 1.9e+233)
(* j (* y0 (- (* y3 y5) (* b x))))
(* -1.0 (* y3 (* c (* y0 z))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (k * y2) - (j * y3);
double tmp;
if (y0 <= -6e+75) {
tmp = y0 * ((-1.0 * (y5 * t_1)) - (b * ((j * x) - (k * z))));
} else if (y0 <= -1.95e-227) {
tmp = y2 * (fma(k, ((y1 * y4) - (y0 * y5)), (x * ((c * y0) - (a * y1)))) - (t * ((c * y4) - (a * y5))));
} else if (y0 <= 2.1e+104) {
tmp = y4 * (fma(b, ((j * t) - (k * y)), (y1 * t_1)) - (c * ((t * y2) - (y * y3))));
} else if (y0 <= 1.9e+233) {
tmp = j * (y0 * ((y3 * y5) - (b * x)));
} else {
tmp = -1.0 * (y3 * (c * (y0 * z)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(k * y2) - Float64(j * y3)) tmp = 0.0 if (y0 <= -6e+75) tmp = Float64(y0 * Float64(Float64(-1.0 * Float64(y5 * t_1)) - Float64(b * Float64(Float64(j * x) - Float64(k * z))))); elseif (y0 <= -1.95e-227) tmp = Float64(y2 * Float64(fma(k, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(x * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5))))); elseif (y0 <= 2.1e+104) tmp = Float64(y4 * Float64(fma(b, Float64(Float64(j * t) - Float64(k * y)), Float64(y1 * t_1)) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); elseif (y0 <= 1.9e+233) tmp = Float64(j * Float64(y0 * Float64(Float64(y3 * y5) - Float64(b * x)))); else tmp = Float64(-1.0 * Float64(y3 * Float64(c * Float64(y0 * z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y0, -6e+75], N[(y0 * N[(N[(-1.0 * N[(y5 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, -1.95e-227], N[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 2.1e+104], N[(y4 * N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] + N[(y1 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 1.9e+233], N[(j * N[(y0 * N[(N[(y3 * y5), $MachinePrecision] - N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(y3 * N[(c * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
\mathbf{if}\;y0 \leq -6 \cdot 10^{+75}:\\
\;\;\;\;y0 \cdot \left(-1 \cdot \left(y5 \cdot t\_1\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;y0 \leq -1.95 \cdot 10^{-227}:\\
\;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, y1 \cdot y4 - y0 \cdot y5, x \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;y0 \leq 2.1 \cdot 10^{+104}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot t\_1\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;y0 \leq 1.9 \cdot 10^{+233}:\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if y0 < -6e75Initial program 30.2%
Taylor expanded in y0 around inf
Applied rewrites36.2%
Taylor expanded in c around 0
Applied rewrites34.5%
if -6e75 < y0 < -1.95e-227Initial program 30.2%
Taylor expanded in y2 around inf
Applied rewrites37.5%
if -1.95e-227 < y0 < 2.0999999999999998e104Initial program 30.2%
Taylor expanded in y4 around inf
Applied rewrites38.1%
if 2.0999999999999998e104 < y0 < 1.8999999999999999e233Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in y0 around inf
Applied rewrites27.0%
if 1.8999999999999999e233 < y0 Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in c around inf
Applied rewrites26.3%
Taylor expanded in y around 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 (* y1 (* k (- (* y2 y4) (* i z))))))
(if (<= k -7.2e+144)
t_1
(if (<= k 1.15e-219)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= k 7.8e+43)
(* y (* y3 (- (* c y4) (* a y5))))
(if (<= k 5.1e+82)
(* y1 (* i (- (* j x) (* k z))))
(if (<= k 6.8e+195) (* b (* y0 (- (* k z) (* j 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 = y1 * (k * ((y2 * y4) - (i * z)));
double tmp;
if (k <= -7.2e+144) {
tmp = t_1;
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 7.8e+43) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} else if (k <= 5.1e+82) {
tmp = y1 * (i * ((j * x) - (k * z)));
} else if (k <= 6.8e+195) {
tmp = b * (y0 * ((k * z) - (j * 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 = y1 * (k * ((y2 * y4) - (i * z)))
if (k <= (-7.2d+144)) then
tmp = t_1
else if (k <= 1.15d-219) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else if (k <= 7.8d+43) then
tmp = y * (y3 * ((c * y4) - (a * y5)))
else if (k <= 5.1d+82) then
tmp = y1 * (i * ((j * x) - (k * z)))
else if (k <= 6.8d+195) then
tmp = b * (y0 * ((k * z) - (j * 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 = y1 * (k * ((y2 * y4) - (i * z)));
double tmp;
if (k <= -7.2e+144) {
tmp = t_1;
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 7.8e+43) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} else if (k <= 5.1e+82) {
tmp = y1 * (i * ((j * x) - (k * z)));
} else if (k <= 6.8e+195) {
tmp = b * (y0 * ((k * z) - (j * 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 = y1 * (k * ((y2 * y4) - (i * z))) tmp = 0 if k <= -7.2e+144: tmp = t_1 elif k <= 1.15e-219: tmp = c * (y0 * ((x * y2) - (y3 * z))) elif k <= 7.8e+43: tmp = y * (y3 * ((c * y4) - (a * y5))) elif k <= 5.1e+82: tmp = y1 * (i * ((j * x) - (k * z))) elif k <= 6.8e+195: tmp = b * (y0 * ((k * z) - (j * 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(y1 * Float64(k * Float64(Float64(y2 * y4) - Float64(i * z)))) tmp = 0.0 if (k <= -7.2e+144) tmp = t_1; elseif (k <= 1.15e-219) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (k <= 7.8e+43) tmp = Float64(y * Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5)))); elseif (k <= 5.1e+82) tmp = Float64(y1 * Float64(i * Float64(Float64(j * x) - Float64(k * z)))); elseif (k <= 6.8e+195) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * 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 = y1 * (k * ((y2 * y4) - (i * z))); tmp = 0.0; if (k <= -7.2e+144) tmp = t_1; elseif (k <= 1.15e-219) tmp = c * (y0 * ((x * y2) - (y3 * z))); elseif (k <= 7.8e+43) tmp = y * (y3 * ((c * y4) - (a * y5))); elseif (k <= 5.1e+82) tmp = y1 * (i * ((j * x) - (k * z))); elseif (k <= 6.8e+195) tmp = b * (y0 * ((k * z) - (j * 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[(y1 * N[(k * N[(N[(y2 * y4), $MachinePrecision] - N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -7.2e+144], t$95$1, If[LessEqual[k, 1.15e-219], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.8e+43], N[(y * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.1e+82], N[(y1 * N[(i * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.8e+195], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y1 \cdot \left(k \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\
\mathbf{if}\;k \leq -7.2 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq 1.15 \cdot 10^{-219}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 7.8 \cdot 10^{+43}:\\
\;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;k \leq 5.1 \cdot 10^{+82}:\\
\;\;\;\;y1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 6.8 \cdot 10^{+195}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if k < -7.1999999999999995e144 or 6.80000000000000021e195 < k Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in k around inf
Applied rewrites26.2%
if -7.1999999999999995e144 < k < 1.14999999999999994e-219Initial program 30.2%
Taylor expanded in y0 around inf
Applied rewrites36.2%
Taylor expanded in c around inf
Applied rewrites26.4%
if 1.14999999999999994e-219 < k < 7.8000000000000001e43Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in y around -inf
Applied rewrites27.1%
if 7.8000000000000001e43 < k < 5.1000000000000003e82Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y2 around inf
Applied rewrites26.9%
Taylor expanded in i around inf
Applied rewrites25.9%
if 5.1000000000000003e82 < k < 6.80000000000000021e195Initial program 30.2%
Taylor expanded in b around inf
Applied rewrites37.2%
Taylor expanded in y0 around inf
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= k -5.2e+119)
(* k (* y1 (- (* y2 y4) (* i z))))
(if (<= k 1.15e-219)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= k 7.8e+43)
(* y (* y3 (- (* c y4) (* a y5))))
(if (<= k 5.1e+82)
(* y1 (* i (- (* j x) (* k z))))
(if (<= k 6.6e+207)
(* b (* y0 (- (* k z) (* j x))))
(* 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 (k <= -5.2e+119) {
tmp = k * (y1 * ((y2 * y4) - (i * z)));
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 7.8e+43) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} else if (k <= 5.1e+82) {
tmp = y1 * (i * ((j * x) - (k * z)));
} else if (k <= 6.6e+207) {
tmp = b * (y0 * ((k * z) - (j * x)));
} 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 (k <= (-5.2d+119)) then
tmp = k * (y1 * ((y2 * y4) - (i * z)))
else if (k <= 1.15d-219) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else if (k <= 7.8d+43) then
tmp = y * (y3 * ((c * y4) - (a * y5)))
else if (k <= 5.1d+82) then
tmp = y1 * (i * ((j * x) - (k * z)))
else if (k <= 6.6d+207) then
tmp = b * (y0 * ((k * z) - (j * x)))
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 (k <= -5.2e+119) {
tmp = k * (y1 * ((y2 * y4) - (i * z)));
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 7.8e+43) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} else if (k <= 5.1e+82) {
tmp = y1 * (i * ((j * x) - (k * z)));
} else if (k <= 6.6e+207) {
tmp = b * (y0 * ((k * z) - (j * x)));
} 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 k <= -5.2e+119: tmp = k * (y1 * ((y2 * y4) - (i * z))) elif k <= 1.15e-219: tmp = c * (y0 * ((x * y2) - (y3 * z))) elif k <= 7.8e+43: tmp = y * (y3 * ((c * y4) - (a * y5))) elif k <= 5.1e+82: tmp = y1 * (i * ((j * x) - (k * z))) elif k <= 6.6e+207: tmp = b * (y0 * ((k * z) - (j * x))) 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 (k <= -5.2e+119) tmp = Float64(k * Float64(y1 * Float64(Float64(y2 * y4) - Float64(i * z)))); elseif (k <= 1.15e-219) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (k <= 7.8e+43) tmp = Float64(y * Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5)))); elseif (k <= 5.1e+82) tmp = Float64(y1 * Float64(i * Float64(Float64(j * x) - Float64(k * z)))); elseif (k <= 6.6e+207) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); 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 (k <= -5.2e+119) tmp = k * (y1 * ((y2 * y4) - (i * z))); elseif (k <= 1.15e-219) tmp = c * (y0 * ((x * y2) - (y3 * z))); elseif (k <= 7.8e+43) tmp = y * (y3 * ((c * y4) - (a * y5))); elseif (k <= 5.1e+82) tmp = y1 * (i * ((j * x) - (k * z))); elseif (k <= 6.6e+207) tmp = b * (y0 * ((k * z) - (j * x))); 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[k, -5.2e+119], N[(k * N[(y1 * N[(N[(y2 * y4), $MachinePrecision] - N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.15e-219], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.8e+43], N[(y * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.1e+82], N[(y1 * N[(i * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.6e+207], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $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}\;k \leq -5.2 \cdot 10^{+119}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 1.15 \cdot 10^{-219}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 7.8 \cdot 10^{+43}:\\
\;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;k \leq 5.1 \cdot 10^{+82}:\\
\;\;\;\;y1 \cdot \left(i \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 6.6 \cdot 10^{+207}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\end{array}
\end{array}
if k < -5.2e119Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in k around inf
Applied rewrites26.3%
if -5.2e119 < k < 1.14999999999999994e-219Initial program 30.2%
Taylor expanded in y0 around inf
Applied rewrites36.2%
Taylor expanded in c around inf
Applied rewrites26.4%
if 1.14999999999999994e-219 < k < 7.8000000000000001e43Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in y around -inf
Applied rewrites27.1%
if 7.8000000000000001e43 < k < 5.1000000000000003e82Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y2 around inf
Applied rewrites26.9%
Taylor expanded in i around inf
Applied rewrites25.9%
if 5.1000000000000003e82 < k < 6.6e207Initial program 30.2%
Taylor expanded in b around inf
Applied rewrites37.2%
Taylor expanded in y0 around inf
Applied rewrites26.9%
if 6.6e207 < k Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y4 around inf
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= k -5.2e+119)
(* k (* y1 (- (* y2 y4) (* i z))))
(if (<= k 1.15e-219)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= k 9.5e+52)
(* y (* y3 (- (* c y4) (* a y5))))
(if (<= k 2.2e+125)
(* i (* z (- (* c t) (* k y1))))
(if (<= k 6.6e+207)
(* b (* y0 (- (* k z) (* j x))))
(* 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 (k <= -5.2e+119) {
tmp = k * (y1 * ((y2 * y4) - (i * z)));
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 9.5e+52) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} else if (k <= 2.2e+125) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (k <= 6.6e+207) {
tmp = b * (y0 * ((k * z) - (j * x)));
} 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 (k <= (-5.2d+119)) then
tmp = k * (y1 * ((y2 * y4) - (i * z)))
else if (k <= 1.15d-219) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else if (k <= 9.5d+52) then
tmp = y * (y3 * ((c * y4) - (a * y5)))
else if (k <= 2.2d+125) then
tmp = i * (z * ((c * t) - (k * y1)))
else if (k <= 6.6d+207) then
tmp = b * (y0 * ((k * z) - (j * x)))
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 (k <= -5.2e+119) {
tmp = k * (y1 * ((y2 * y4) - (i * z)));
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 9.5e+52) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} else if (k <= 2.2e+125) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (k <= 6.6e+207) {
tmp = b * (y0 * ((k * z) - (j * x)));
} 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 k <= -5.2e+119: tmp = k * (y1 * ((y2 * y4) - (i * z))) elif k <= 1.15e-219: tmp = c * (y0 * ((x * y2) - (y3 * z))) elif k <= 9.5e+52: tmp = y * (y3 * ((c * y4) - (a * y5))) elif k <= 2.2e+125: tmp = i * (z * ((c * t) - (k * y1))) elif k <= 6.6e+207: tmp = b * (y0 * ((k * z) - (j * x))) 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 (k <= -5.2e+119) tmp = Float64(k * Float64(y1 * Float64(Float64(y2 * y4) - Float64(i * z)))); elseif (k <= 1.15e-219) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (k <= 9.5e+52) tmp = Float64(y * Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5)))); elseif (k <= 2.2e+125) tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); elseif (k <= 6.6e+207) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); 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 (k <= -5.2e+119) tmp = k * (y1 * ((y2 * y4) - (i * z))); elseif (k <= 1.15e-219) tmp = c * (y0 * ((x * y2) - (y3 * z))); elseif (k <= 9.5e+52) tmp = y * (y3 * ((c * y4) - (a * y5))); elseif (k <= 2.2e+125) tmp = i * (z * ((c * t) - (k * y1))); elseif (k <= 6.6e+207) tmp = b * (y0 * ((k * z) - (j * x))); 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[k, -5.2e+119], N[(k * N[(y1 * N[(N[(y2 * y4), $MachinePrecision] - N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.15e-219], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.5e+52], N[(y * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.2e+125], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.6e+207], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $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}\;k \leq -5.2 \cdot 10^{+119}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 1.15 \cdot 10^{-219}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 9.5 \cdot 10^{+52}:\\
\;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;k \leq 2.2 \cdot 10^{+125}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{elif}\;k \leq 6.6 \cdot 10^{+207}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\end{array}
\end{array}
if k < -5.2e119Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in k around inf
Applied rewrites26.3%
if -5.2e119 < k < 1.14999999999999994e-219Initial program 30.2%
Taylor expanded in y0 around inf
Applied rewrites36.2%
Taylor expanded in c around inf
Applied rewrites26.4%
if 1.14999999999999994e-219 < k < 9.49999999999999994e52Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in y around -inf
Applied rewrites27.1%
if 9.49999999999999994e52 < k < 2.19999999999999991e125Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in z around -inf
Applied rewrites26.3%
if 2.19999999999999991e125 < k < 6.6e207Initial program 30.2%
Taylor expanded in b around inf
Applied rewrites37.2%
Taylor expanded in y0 around inf
Applied rewrites26.9%
if 6.6e207 < k Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y4 around inf
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= k -5.2e+119)
(* k (* y1 (- (* y2 y4) (* i z))))
(if (<= k 1.15e-219)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= k 1e+46)
(* y (* y3 (- (* c y4) (* a y5))))
(if (<= k 1.02e+205)
(* 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 (k <= -5.2e+119) {
tmp = k * (y1 * ((y2 * y4) - (i * z)));
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 1e+46) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} else if (k <= 1.02e+205) {
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 (k <= (-5.2d+119)) then
tmp = k * (y1 * ((y2 * y4) - (i * z)))
else if (k <= 1.15d-219) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else if (k <= 1d+46) then
tmp = y * (y3 * ((c * y4) - (a * y5)))
else if (k <= 1.02d+205) 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 (k <= -5.2e+119) {
tmp = k * (y1 * ((y2 * y4) - (i * z)));
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 1e+46) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} else if (k <= 1.02e+205) {
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 k <= -5.2e+119: tmp = k * (y1 * ((y2 * y4) - (i * z))) elif k <= 1.15e-219: tmp = c * (y0 * ((x * y2) - (y3 * z))) elif k <= 1e+46: tmp = y * (y3 * ((c * y4) - (a * y5))) elif k <= 1.02e+205: 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 (k <= -5.2e+119) tmp = Float64(k * Float64(y1 * Float64(Float64(y2 * y4) - Float64(i * z)))); elseif (k <= 1.15e-219) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (k <= 1e+46) tmp = Float64(y * Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5)))); elseif (k <= 1.02e+205) 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 (k <= -5.2e+119) tmp = k * (y1 * ((y2 * y4) - (i * z))); elseif (k <= 1.15e-219) tmp = c * (y0 * ((x * y2) - (y3 * z))); elseif (k <= 1e+46) tmp = y * (y3 * ((c * y4) - (a * y5))); elseif (k <= 1.02e+205) 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[k, -5.2e+119], N[(k * N[(y1 * N[(N[(y2 * y4), $MachinePrecision] - N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.15e-219], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1e+46], N[(y * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.02e+205], 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}\;k \leq -5.2 \cdot 10^{+119}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 1.15 \cdot 10^{-219}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 10^{+46}:\\
\;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;k \leq 1.02 \cdot 10^{+205}:\\
\;\;\;\;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 k < -5.2e119Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in k around inf
Applied rewrites26.3%
if -5.2e119 < k < 1.14999999999999994e-219Initial program 30.2%
Taylor expanded in y0 around inf
Applied rewrites36.2%
Taylor expanded in c around inf
Applied rewrites26.4%
if 1.14999999999999994e-219 < k < 9.9999999999999999e45Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in y around -inf
Applied rewrites27.1%
if 9.9999999999999999e45 < k < 1.0200000000000001e205Initial program 30.2%
Taylor expanded in b around inf
Applied rewrites37.2%
Taylor expanded in a around inf
Applied rewrites26.1%
if 1.0200000000000001e205 < k Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y4 around inf
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= k -5.2e+119)
(* k (* y1 (- (* y2 y4) (* i z))))
(if (<= k 1.15e-219)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= k 3.2e+197)
(* y (* y3 (- (* c y4) (* a y5))))
(* 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 (k <= -5.2e+119) {
tmp = k * (y1 * ((y2 * y4) - (i * z)));
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 3.2e+197) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} 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 (k <= (-5.2d+119)) then
tmp = k * (y1 * ((y2 * y4) - (i * z)))
else if (k <= 1.15d-219) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else if (k <= 3.2d+197) then
tmp = y * (y3 * ((c * y4) - (a * y5)))
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 (k <= -5.2e+119) {
tmp = k * (y1 * ((y2 * y4) - (i * z)));
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 3.2e+197) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} 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 k <= -5.2e+119: tmp = k * (y1 * ((y2 * y4) - (i * z))) elif k <= 1.15e-219: tmp = c * (y0 * ((x * y2) - (y3 * z))) elif k <= 3.2e+197: tmp = y * (y3 * ((c * y4) - (a * y5))) 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 (k <= -5.2e+119) tmp = Float64(k * Float64(y1 * Float64(Float64(y2 * y4) - Float64(i * z)))); elseif (k <= 1.15e-219) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (k <= 3.2e+197) tmp = Float64(y * Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5)))); 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 (k <= -5.2e+119) tmp = k * (y1 * ((y2 * y4) - (i * z))); elseif (k <= 1.15e-219) tmp = c * (y0 * ((x * y2) - (y3 * z))); elseif (k <= 3.2e+197) tmp = y * (y3 * ((c * y4) - (a * y5))); 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[k, -5.2e+119], N[(k * N[(y1 * N[(N[(y2 * y4), $MachinePrecision] - N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.15e-219], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.2e+197], N[(y * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $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}\;k \leq -5.2 \cdot 10^{+119}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 1.15 \cdot 10^{-219}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 3.2 \cdot 10^{+197}:\\
\;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\end{array}
\end{array}
if k < -5.2e119Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in k around inf
Applied rewrites26.3%
if -5.2e119 < k < 1.14999999999999994e-219Initial program 30.2%
Taylor expanded in y0 around inf
Applied rewrites36.2%
Taylor expanded in c around inf
Applied rewrites26.4%
if 1.14999999999999994e-219 < k < 3.1999999999999998e197Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in y around -inf
Applied rewrites27.1%
if 3.1999999999999998e197 < k Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y4 around inf
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= k -5.2e+119)
(* k (* y1 (- (* y2 y4) (* i z))))
(if (<= k 1.15e-219)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= k 3.1e+196)
(* y (* y3 (- (* c y4) (* a y5))))
(* 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 (k <= -5.2e+119) {
tmp = k * (y1 * ((y2 * y4) - (i * z)));
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 3.1e+196) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} 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 (k <= (-5.2d+119)) then
tmp = k * (y1 * ((y2 * y4) - (i * z)))
else if (k <= 1.15d-219) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else if (k <= 3.1d+196) then
tmp = y * (y3 * ((c * y4) - (a * y5)))
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 (k <= -5.2e+119) {
tmp = k * (y1 * ((y2 * y4) - (i * z)));
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 3.1e+196) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} 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 k <= -5.2e+119: tmp = k * (y1 * ((y2 * y4) - (i * z))) elif k <= 1.15e-219: tmp = c * (y0 * ((x * y2) - (y3 * z))) elif k <= 3.1e+196: tmp = y * (y3 * ((c * y4) - (a * y5))) 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 (k <= -5.2e+119) tmp = Float64(k * Float64(y1 * Float64(Float64(y2 * y4) - Float64(i * z)))); elseif (k <= 1.15e-219) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (k <= 3.1e+196) tmp = Float64(y * Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5)))); 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 (k <= -5.2e+119) tmp = k * (y1 * ((y2 * y4) - (i * z))); elseif (k <= 1.15e-219) tmp = c * (y0 * ((x * y2) - (y3 * z))); elseif (k <= 3.1e+196) tmp = y * (y3 * ((c * y4) - (a * y5))); 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[k, -5.2e+119], N[(k * N[(y1 * N[(N[(y2 * y4), $MachinePrecision] - N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.15e-219], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.1e+196], N[(y * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $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}\;k \leq -5.2 \cdot 10^{+119}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4 - i \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 1.15 \cdot 10^{-219}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 3.1 \cdot 10^{+196}:\\
\;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\end{array}
\end{array}
if k < -5.2e119Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in k around inf
Applied rewrites26.3%
if -5.2e119 < k < 1.14999999999999994e-219Initial program 30.2%
Taylor expanded in y0 around inf
Applied rewrites36.2%
Taylor expanded in c around inf
Applied rewrites26.4%
if 1.14999999999999994e-219 < k < 3.1000000000000001e196Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in y around -inf
Applied rewrites27.1%
if 3.1000000000000001e196 < k Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in k around -inf
Applied rewrites26.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= k -1.05e+176)
(* i (* z (- (* c t) (* k y1))))
(if (<= k 1.15e-219)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= k 3.1e+196)
(* y (* y3 (- (* c y4) (* a y5))))
(* 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 (k <= -1.05e+176) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 3.1e+196) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} 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 (k <= (-1.05d+176)) then
tmp = i * (z * ((c * t) - (k * y1)))
else if (k <= 1.15d-219) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else if (k <= 3.1d+196) then
tmp = y * (y3 * ((c * y4) - (a * y5)))
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 (k <= -1.05e+176) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (k <= 1.15e-219) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (k <= 3.1e+196) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} 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 k <= -1.05e+176: tmp = i * (z * ((c * t) - (k * y1))) elif k <= 1.15e-219: tmp = c * (y0 * ((x * y2) - (y3 * z))) elif k <= 3.1e+196: tmp = y * (y3 * ((c * y4) - (a * y5))) 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 (k <= -1.05e+176) tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); elseif (k <= 1.15e-219) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (k <= 3.1e+196) tmp = Float64(y * Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5)))); 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 (k <= -1.05e+176) tmp = i * (z * ((c * t) - (k * y1))); elseif (k <= 1.15e-219) tmp = c * (y0 * ((x * y2) - (y3 * z))); elseif (k <= 3.1e+196) tmp = y * (y3 * ((c * y4) - (a * y5))); 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[k, -1.05e+176], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.15e-219], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.1e+196], N[(y * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $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}\;k \leq -1.05 \cdot 10^{+176}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{elif}\;k \leq 1.15 \cdot 10^{-219}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;k \leq 3.1 \cdot 10^{+196}:\\
\;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\end{array}
\end{array}
if k < -1.05e176Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in z around -inf
Applied rewrites26.3%
if -1.05e176 < k < 1.14999999999999994e-219Initial program 30.2%
Taylor expanded in y0 around inf
Applied rewrites36.2%
Taylor expanded in c around inf
Applied rewrites26.4%
if 1.14999999999999994e-219 < k < 3.1000000000000001e196Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in y around -inf
Applied rewrites27.1%
if 3.1000000000000001e196 < k Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in k around -inf
Applied rewrites26.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= z -9.5e+250)
(* a (* y3 (- (* y1 z) (* y y5))))
(if (<= z -2.8e+180)
(* -1.0 (* y3 (* c (* y0 z))))
(if (<= z -1.65e+30)
(* j (* t (- (* b y4) (* i y5))))
(if (<= z 3.05e+99)
(* y (* y3 (- (* c y4) (* a y5))))
(* 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 (z <= -9.5e+250) {
tmp = a * (y3 * ((y1 * z) - (y * y5)));
} else if (z <= -2.8e+180) {
tmp = -1.0 * (y3 * (c * (y0 * z)));
} else if (z <= -1.65e+30) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (z <= 3.05e+99) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} 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 (z <= (-9.5d+250)) then
tmp = a * (y3 * ((y1 * z) - (y * y5)))
else if (z <= (-2.8d+180)) then
tmp = (-1.0d0) * (y3 * (c * (y0 * z)))
else if (z <= (-1.65d+30)) then
tmp = j * (t * ((b * y4) - (i * y5)))
else if (z <= 3.05d+99) then
tmp = y * (y3 * ((c * y4) - (a * y5)))
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 (z <= -9.5e+250) {
tmp = a * (y3 * ((y1 * z) - (y * y5)));
} else if (z <= -2.8e+180) {
tmp = -1.0 * (y3 * (c * (y0 * z)));
} else if (z <= -1.65e+30) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (z <= 3.05e+99) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} 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 z <= -9.5e+250: tmp = a * (y3 * ((y1 * z) - (y * y5))) elif z <= -2.8e+180: tmp = -1.0 * (y3 * (c * (y0 * z))) elif z <= -1.65e+30: tmp = j * (t * ((b * y4) - (i * y5))) elif z <= 3.05e+99: tmp = y * (y3 * ((c * y4) - (a * y5))) 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 (z <= -9.5e+250) tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5)))); elseif (z <= -2.8e+180) tmp = Float64(-1.0 * Float64(y3 * Float64(c * Float64(y0 * z)))); elseif (z <= -1.65e+30) tmp = Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))); elseif (z <= 3.05e+99) tmp = Float64(y * Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5)))); 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 (z <= -9.5e+250) tmp = a * (y3 * ((y1 * z) - (y * y5))); elseif (z <= -2.8e+180) tmp = -1.0 * (y3 * (c * (y0 * z))); elseif (z <= -1.65e+30) tmp = j * (t * ((b * y4) - (i * y5))); elseif (z <= 3.05e+99) tmp = y * (y3 * ((c * y4) - (a * y5))); 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[z, -9.5e+250], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.8e+180], N[(-1.0 * N[(y3 * N[(c * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.65e+30], N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.05e+99], N[(y * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $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}\;z \leq -9.5 \cdot 10^{+250}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{+180}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right)\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{+30}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+99}:\\
\;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\end{array}
\end{array}
if z < -9.49999999999999957e250Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in a around -inf
Applied rewrites26.6%
if -9.49999999999999957e250 < z < -2.80000000000000012e180Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in c around inf
Applied rewrites26.3%
Taylor expanded in y around 0
Applied rewrites17.0%
if -2.80000000000000012e180 < z < -1.65000000000000013e30Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in t around inf
Applied rewrites26.0%
if -1.65000000000000013e30 < z < 3.04999999999999986e99Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in y around -inf
Applied rewrites27.1%
if 3.04999999999999986e99 < z Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in z around -inf
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 (* y3 (* y5 (- (* j y0) (* a y))))))
(if (<= y5 -9.6e-97)
t_1
(if (<= y5 -2.25e-257)
(* i (* z (- (* c t) (* k y1))))
(if (<= y5 8.6e-138)
(* b (* y4 (- (* j t) (* k y))))
(if (<= y5 1.45e+225) (* y (* y3 (- (* c y4) (* a 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 = y3 * (y5 * ((j * y0) - (a * y)));
double tmp;
if (y5 <= -9.6e-97) {
tmp = t_1;
} else if (y5 <= -2.25e-257) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (y5 <= 8.6e-138) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y5 <= 1.45e+225) {
tmp = y * (y3 * ((c * y4) - (a * 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 = y3 * (y5 * ((j * y0) - (a * y)))
if (y5 <= (-9.6d-97)) then
tmp = t_1
else if (y5 <= (-2.25d-257)) then
tmp = i * (z * ((c * t) - (k * y1)))
else if (y5 <= 8.6d-138) then
tmp = b * (y4 * ((j * t) - (k * y)))
else if (y5 <= 1.45d+225) then
tmp = y * (y3 * ((c * y4) - (a * 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 = y3 * (y5 * ((j * y0) - (a * y)));
double tmp;
if (y5 <= -9.6e-97) {
tmp = t_1;
} else if (y5 <= -2.25e-257) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (y5 <= 8.6e-138) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y5 <= 1.45e+225) {
tmp = y * (y3 * ((c * y4) - (a * 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 = y3 * (y5 * ((j * y0) - (a * y))) tmp = 0 if y5 <= -9.6e-97: tmp = t_1 elif y5 <= -2.25e-257: tmp = i * (z * ((c * t) - (k * y1))) elif y5 <= 8.6e-138: tmp = b * (y4 * ((j * t) - (k * y))) elif y5 <= 1.45e+225: tmp = y * (y3 * ((c * y4) - (a * 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(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))) tmp = 0.0 if (y5 <= -9.6e-97) tmp = t_1; elseif (y5 <= -2.25e-257) tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); elseif (y5 <= 8.6e-138) tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))); elseif (y5 <= 1.45e+225) tmp = Float64(y * Float64(y3 * Float64(Float64(c * y4) - Float64(a * 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 = y3 * (y5 * ((j * y0) - (a * y))); tmp = 0.0; if (y5 <= -9.6e-97) tmp = t_1; elseif (y5 <= -2.25e-257) tmp = i * (z * ((c * t) - (k * y1))); elseif (y5 <= 8.6e-138) tmp = b * (y4 * ((j * t) - (k * y))); elseif (y5 <= 1.45e+225) tmp = y * (y3 * ((c * y4) - (a * 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[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -9.6e-97], t$95$1, If[LessEqual[y5, -2.25e-257], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 8.6e-138], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.45e+225], N[(y * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{if}\;y5 \leq -9.6 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y5 \leq -2.25 \cdot 10^{-257}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{elif}\;y5 \leq 8.6 \cdot 10^{-138}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{elif}\;y5 \leq 1.45 \cdot 10^{+225}:\\
\;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y5 < -9.5999999999999999e-97 or 1.4500000000000001e225 < y5 Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in y5 around -inf
Applied rewrites27.0%
if -9.5999999999999999e-97 < y5 < -2.2500000000000001e-257Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in z around -inf
Applied rewrites26.3%
if -2.2500000000000001e-257 < y5 < 8.6000000000000001e-138Initial program 30.2%
Taylor expanded in b around inf
Applied rewrites37.2%
Taylor expanded in y4 around inf
Applied rewrites26.4%
if 8.6000000000000001e-138 < y5 < 1.4500000000000001e225Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in y around -inf
Applied rewrites27.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= z -9.5e+250)
(* a (* y3 (- (* y1 z) (* y y5))))
(if (<= z -3e+87)
(* -1.0 (* y3 (* c (* y0 z))))
(if (<= z -2.2e+30)
(* -1.0 (* i (* j (* t y5))))
(if (<= z 3.05e+99)
(* y (* y3 (- (* c y4) (* a y5))))
(* 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 (z <= -9.5e+250) {
tmp = a * (y3 * ((y1 * z) - (y * y5)));
} else if (z <= -3e+87) {
tmp = -1.0 * (y3 * (c * (y0 * z)));
} else if (z <= -2.2e+30) {
tmp = -1.0 * (i * (j * (t * y5)));
} else if (z <= 3.05e+99) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} 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 (z <= (-9.5d+250)) then
tmp = a * (y3 * ((y1 * z) - (y * y5)))
else if (z <= (-3d+87)) then
tmp = (-1.0d0) * (y3 * (c * (y0 * z)))
else if (z <= (-2.2d+30)) then
tmp = (-1.0d0) * (i * (j * (t * y5)))
else if (z <= 3.05d+99) then
tmp = y * (y3 * ((c * y4) - (a * y5)))
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 (z <= -9.5e+250) {
tmp = a * (y3 * ((y1 * z) - (y * y5)));
} else if (z <= -3e+87) {
tmp = -1.0 * (y3 * (c * (y0 * z)));
} else if (z <= -2.2e+30) {
tmp = -1.0 * (i * (j * (t * y5)));
} else if (z <= 3.05e+99) {
tmp = y * (y3 * ((c * y4) - (a * y5)));
} 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 z <= -9.5e+250: tmp = a * (y3 * ((y1 * z) - (y * y5))) elif z <= -3e+87: tmp = -1.0 * (y3 * (c * (y0 * z))) elif z <= -2.2e+30: tmp = -1.0 * (i * (j * (t * y5))) elif z <= 3.05e+99: tmp = y * (y3 * ((c * y4) - (a * y5))) 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 (z <= -9.5e+250) tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5)))); elseif (z <= -3e+87) tmp = Float64(-1.0 * Float64(y3 * Float64(c * Float64(y0 * z)))); elseif (z <= -2.2e+30) tmp = Float64(-1.0 * Float64(i * Float64(j * Float64(t * y5)))); elseif (z <= 3.05e+99) tmp = Float64(y * Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5)))); 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 (z <= -9.5e+250) tmp = a * (y3 * ((y1 * z) - (y * y5))); elseif (z <= -3e+87) tmp = -1.0 * (y3 * (c * (y0 * z))); elseif (z <= -2.2e+30) tmp = -1.0 * (i * (j * (t * y5))); elseif (z <= 3.05e+99) tmp = y * (y3 * ((c * y4) - (a * y5))); 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[z, -9.5e+250], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3e+87], N[(-1.0 * N[(y3 * N[(c * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.2e+30], N[(-1.0 * N[(i * N[(j * N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.05e+99], N[(y * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $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}\;z \leq -9.5 \cdot 10^{+250}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\
\mathbf{elif}\;z \leq -3 \cdot 10^{+87}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right)\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{+30}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right)\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+99}:\\
\;\;\;\;y \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\end{array}
\end{array}
if z < -9.49999999999999957e250Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in a around -inf
Applied rewrites26.6%
if -9.49999999999999957e250 < z < -2.9999999999999999e87Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in c around inf
Applied rewrites26.3%
Taylor expanded in y around 0
Applied rewrites17.0%
if -2.9999999999999999e87 < z < -2.2e30Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in t around inf
Applied rewrites26.0%
Taylor expanded in b around 0
Applied rewrites17.8%
if -2.2e30 < z < 3.04999999999999986e99Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in y around -inf
Applied rewrites27.1%
if 3.04999999999999986e99 < z Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in z around -inf
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 (* -1.0 (* y3 (* c (* y0 z))))))
(if (<= c -3.2e+132)
t_1
(if (<= c -8.2e-107)
(* y1 (* k (* y2 y4)))
(if (<= c 7.6e-231)
(* i (* k (- (* y y5) (* y1 z))))
(if (<= c 6.2e-5) (* a (* y3 (- (* y1 z) (* 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 = -1.0 * (y3 * (c * (y0 * z)));
double tmp;
if (c <= -3.2e+132) {
tmp = t_1;
} else if (c <= -8.2e-107) {
tmp = y1 * (k * (y2 * y4));
} else if (c <= 7.6e-231) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (c <= 6.2e-5) {
tmp = a * (y3 * ((y1 * z) - (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 = (-1.0d0) * (y3 * (c * (y0 * z)))
if (c <= (-3.2d+132)) then
tmp = t_1
else if (c <= (-8.2d-107)) then
tmp = y1 * (k * (y2 * y4))
else if (c <= 7.6d-231) then
tmp = i * (k * ((y * y5) - (y1 * z)))
else if (c <= 6.2d-5) then
tmp = a * (y3 * ((y1 * z) - (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 = -1.0 * (y3 * (c * (y0 * z)));
double tmp;
if (c <= -3.2e+132) {
tmp = t_1;
} else if (c <= -8.2e-107) {
tmp = y1 * (k * (y2 * y4));
} else if (c <= 7.6e-231) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (c <= 6.2e-5) {
tmp = a * (y3 * ((y1 * z) - (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 = -1.0 * (y3 * (c * (y0 * z))) tmp = 0 if c <= -3.2e+132: tmp = t_1 elif c <= -8.2e-107: tmp = y1 * (k * (y2 * y4)) elif c <= 7.6e-231: tmp = i * (k * ((y * y5) - (y1 * z))) elif c <= 6.2e-5: tmp = a * (y3 * ((y1 * z) - (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(-1.0 * Float64(y3 * Float64(c * Float64(y0 * z)))) tmp = 0.0 if (c <= -3.2e+132) tmp = t_1; elseif (c <= -8.2e-107) tmp = Float64(y1 * Float64(k * Float64(y2 * y4))); elseif (c <= 7.6e-231) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); elseif (c <= 6.2e-5) tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - 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 = -1.0 * (y3 * (c * (y0 * z))); tmp = 0.0; if (c <= -3.2e+132) tmp = t_1; elseif (c <= -8.2e-107) tmp = y1 * (k * (y2 * y4)); elseif (c <= 7.6e-231) tmp = i * (k * ((y * y5) - (y1 * z))); elseif (c <= 6.2e-5) tmp = a * (y3 * ((y1 * z) - (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[(-1.0 * N[(y3 * N[(c * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.2e+132], t$95$1, If[LessEqual[c, -8.2e-107], N[(y1 * N[(k * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 7.6e-231], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.2e-5], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right)\\
\mathbf{if}\;c \leq -3.2 \cdot 10^{+132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -8.2 \cdot 10^{-107}:\\
\;\;\;\;y1 \cdot \left(k \cdot \left(y2 \cdot y4\right)\right)\\
\mathbf{elif}\;c \leq 7.6 \cdot 10^{-231}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{elif}\;c \leq 6.2 \cdot 10^{-5}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -3.1999999999999997e132 or 6.20000000000000027e-5 < c Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in c around inf
Applied rewrites26.3%
Taylor expanded in y around 0
Applied rewrites17.0%
if -3.1999999999999997e132 < c < -8.1999999999999998e-107Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y2 around inf
Applied rewrites26.9%
Taylor expanded in x around 0
Applied rewrites17.1%
if -8.1999999999999998e-107 < c < 7.60000000000000026e-231Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in k around -inf
Applied rewrites26.7%
if 7.60000000000000026e-231 < c < 6.20000000000000027e-5Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in a around -inf
Applied rewrites26.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* -1.0 (* y3 (* c (* y0 z))))))
(if (<= c -3.2e+132)
t_1
(if (<= c -8.2e-107)
(* y1 (* k (* y2 y4)))
(if (<= c 940.0) (* i (* k (- (* y y5) (* 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 = -1.0 * (y3 * (c * (y0 * z)));
double tmp;
if (c <= -3.2e+132) {
tmp = t_1;
} else if (c <= -8.2e-107) {
tmp = y1 * (k * (y2 * y4));
} else if (c <= 940.0) {
tmp = i * (k * ((y * y5) - (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 = (-1.0d0) * (y3 * (c * (y0 * z)))
if (c <= (-3.2d+132)) then
tmp = t_1
else if (c <= (-8.2d-107)) then
tmp = y1 * (k * (y2 * y4))
else if (c <= 940.0d0) then
tmp = i * (k * ((y * y5) - (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 = -1.0 * (y3 * (c * (y0 * z)));
double tmp;
if (c <= -3.2e+132) {
tmp = t_1;
} else if (c <= -8.2e-107) {
tmp = y1 * (k * (y2 * y4));
} else if (c <= 940.0) {
tmp = i * (k * ((y * y5) - (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 = -1.0 * (y3 * (c * (y0 * z))) tmp = 0 if c <= -3.2e+132: tmp = t_1 elif c <= -8.2e-107: tmp = y1 * (k * (y2 * y4)) elif c <= 940.0: tmp = i * (k * ((y * y5) - (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(-1.0 * Float64(y3 * Float64(c * Float64(y0 * z)))) tmp = 0.0 if (c <= -3.2e+132) tmp = t_1; elseif (c <= -8.2e-107) tmp = Float64(y1 * Float64(k * Float64(y2 * y4))); elseif (c <= 940.0) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - 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 = -1.0 * (y3 * (c * (y0 * z))); tmp = 0.0; if (c <= -3.2e+132) tmp = t_1; elseif (c <= -8.2e-107) tmp = y1 * (k * (y2 * y4)); elseif (c <= 940.0) tmp = i * (k * ((y * y5) - (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[(-1.0 * N[(y3 * N[(c * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.2e+132], t$95$1, If[LessEqual[c, -8.2e-107], N[(y1 * N[(k * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 940.0], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right)\\
\mathbf{if}\;c \leq -3.2 \cdot 10^{+132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -8.2 \cdot 10^{-107}:\\
\;\;\;\;y1 \cdot \left(k \cdot \left(y2 \cdot y4\right)\right)\\
\mathbf{elif}\;c \leq 940:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -3.1999999999999997e132 or 940 < c Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in c around inf
Applied rewrites26.3%
Taylor expanded in y around 0
Applied rewrites17.0%
if -3.1999999999999997e132 < c < -8.1999999999999998e-107Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y2 around inf
Applied rewrites26.9%
Taylor expanded in x around 0
Applied rewrites17.1%
if -8.1999999999999998e-107 < c < 940Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in k around -inf
Applied rewrites26.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= k -3.8e+147)
(* i (* y1 (* -1.0 (* k z))))
(if (<= k 2.15e-91)
(* -1.0 (* y3 (* c (* y0 z))))
(if (<= k 1.35e+83) (* j (* i (* x y1))) (* y1 (* y2 (* k 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 (k <= -3.8e+147) {
tmp = i * (y1 * (-1.0 * (k * z)));
} else if (k <= 2.15e-91) {
tmp = -1.0 * (y3 * (c * (y0 * z)));
} else if (k <= 1.35e+83) {
tmp = j * (i * (x * y1));
} else {
tmp = y1 * (y2 * (k * 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 (k <= (-3.8d+147)) then
tmp = i * (y1 * ((-1.0d0) * (k * z)))
else if (k <= 2.15d-91) then
tmp = (-1.0d0) * (y3 * (c * (y0 * z)))
else if (k <= 1.35d+83) then
tmp = j * (i * (x * y1))
else
tmp = y1 * (y2 * (k * 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 (k <= -3.8e+147) {
tmp = i * (y1 * (-1.0 * (k * z)));
} else if (k <= 2.15e-91) {
tmp = -1.0 * (y3 * (c * (y0 * z)));
} else if (k <= 1.35e+83) {
tmp = j * (i * (x * y1));
} else {
tmp = y1 * (y2 * (k * y4));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if k <= -3.8e+147: tmp = i * (y1 * (-1.0 * (k * z))) elif k <= 2.15e-91: tmp = -1.0 * (y3 * (c * (y0 * z))) elif k <= 1.35e+83: tmp = j * (i * (x * y1)) else: tmp = y1 * (y2 * (k * 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 (k <= -3.8e+147) tmp = Float64(i * Float64(y1 * Float64(-1.0 * Float64(k * z)))); elseif (k <= 2.15e-91) tmp = Float64(-1.0 * Float64(y3 * Float64(c * Float64(y0 * z)))); elseif (k <= 1.35e+83) tmp = Float64(j * Float64(i * Float64(x * y1))); else tmp = Float64(y1 * Float64(y2 * Float64(k * 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 (k <= -3.8e+147) tmp = i * (y1 * (-1.0 * (k * z))); elseif (k <= 2.15e-91) tmp = -1.0 * (y3 * (c * (y0 * z))); elseif (k <= 1.35e+83) tmp = j * (i * (x * y1)); else tmp = y1 * (y2 * (k * 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[k, -3.8e+147], N[(i * N[(y1 * N[(-1.0 * N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.15e-91], N[(-1.0 * N[(y3 * N[(c * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.35e+83], N[(j * N[(i * N[(x * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(y2 * N[(k * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -3.8 \cdot 10^{+147}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(-1 \cdot \left(k \cdot z\right)\right)\right)\\
\mathbf{elif}\;k \leq 2.15 \cdot 10^{-91}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right)\\
\mathbf{elif}\;k \leq 1.35 \cdot 10^{+83}:\\
\;\;\;\;j \cdot \left(i \cdot \left(x \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(y2 \cdot \left(k \cdot y4\right)\right)\\
\end{array}
\end{array}
if k < -3.7999999999999997e147Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in i around inf
Applied rewrites26.0%
Taylor expanded in x around 0
Applied rewrites16.8%
if -3.7999999999999997e147 < k < 2.15e-91Initial program 30.2%
Taylor expanded in y3 around -inf
Applied rewrites37.5%
Taylor expanded in c around inf
Applied rewrites26.3%
Taylor expanded in y around 0
Applied rewrites17.0%
if 2.15e-91 < k < 1.35000000000000003e83Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in x around inf
Applied rewrites26.2%
Taylor expanded in b around 0
Applied rewrites16.8%
if 1.35000000000000003e83 < k Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y2 around inf
Applied rewrites26.9%
Taylor expanded in x around 0
Applied rewrites17.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= k -1.46e-46)
(* i (* y1 (* -1.0 (* k z))))
(if (<= k 1.8e-91)
(* -1.0 (* i (* j (* t y5))))
(if (<= k 1.35e+83) (* j (* i (* x y1))) (* y1 (* y2 (* k 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 (k <= -1.46e-46) {
tmp = i * (y1 * (-1.0 * (k * z)));
} else if (k <= 1.8e-91) {
tmp = -1.0 * (i * (j * (t * y5)));
} else if (k <= 1.35e+83) {
tmp = j * (i * (x * y1));
} else {
tmp = y1 * (y2 * (k * 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 (k <= (-1.46d-46)) then
tmp = i * (y1 * ((-1.0d0) * (k * z)))
else if (k <= 1.8d-91) then
tmp = (-1.0d0) * (i * (j * (t * y5)))
else if (k <= 1.35d+83) then
tmp = j * (i * (x * y1))
else
tmp = y1 * (y2 * (k * 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 (k <= -1.46e-46) {
tmp = i * (y1 * (-1.0 * (k * z)));
} else if (k <= 1.8e-91) {
tmp = -1.0 * (i * (j * (t * y5)));
} else if (k <= 1.35e+83) {
tmp = j * (i * (x * y1));
} else {
tmp = y1 * (y2 * (k * y4));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if k <= -1.46e-46: tmp = i * (y1 * (-1.0 * (k * z))) elif k <= 1.8e-91: tmp = -1.0 * (i * (j * (t * y5))) elif k <= 1.35e+83: tmp = j * (i * (x * y1)) else: tmp = y1 * (y2 * (k * 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 (k <= -1.46e-46) tmp = Float64(i * Float64(y1 * Float64(-1.0 * Float64(k * z)))); elseif (k <= 1.8e-91) tmp = Float64(-1.0 * Float64(i * Float64(j * Float64(t * y5)))); elseif (k <= 1.35e+83) tmp = Float64(j * Float64(i * Float64(x * y1))); else tmp = Float64(y1 * Float64(y2 * Float64(k * 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 (k <= -1.46e-46) tmp = i * (y1 * (-1.0 * (k * z))); elseif (k <= 1.8e-91) tmp = -1.0 * (i * (j * (t * y5))); elseif (k <= 1.35e+83) tmp = j * (i * (x * y1)); else tmp = y1 * (y2 * (k * 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[k, -1.46e-46], N[(i * N[(y1 * N[(-1.0 * N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.8e-91], N[(-1.0 * N[(i * N[(j * N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.35e+83], N[(j * N[(i * N[(x * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(y2 * N[(k * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -1.46 \cdot 10^{-46}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(-1 \cdot \left(k \cdot z\right)\right)\right)\\
\mathbf{elif}\;k \leq 1.8 \cdot 10^{-91}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right)\\
\mathbf{elif}\;k \leq 1.35 \cdot 10^{+83}:\\
\;\;\;\;j \cdot \left(i \cdot \left(x \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(y2 \cdot \left(k \cdot y4\right)\right)\\
\end{array}
\end{array}
if k < -1.46000000000000008e-46Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in i around inf
Applied rewrites26.0%
Taylor expanded in x around 0
Applied rewrites16.8%
if -1.46000000000000008e-46 < k < 1.8e-91Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in t around inf
Applied rewrites26.0%
Taylor expanded in b around 0
Applied rewrites17.8%
if 1.8e-91 < k < 1.35000000000000003e83Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in x around inf
Applied rewrites26.2%
Taylor expanded in b around 0
Applied rewrites16.8%
if 1.35000000000000003e83 < k Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y2 around inf
Applied rewrites26.9%
Taylor expanded in x around 0
Applied rewrites17.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y5 -5.8e-60)
(* i (* k (* y y5)))
(if (<= y5 -1.5e-217)
(* i (* k (* -1.0 (* y1 z))))
(if (<= y5 4.6e-41)
(* y1 (* y2 (* k y4)))
(* -1.0 (* i (* j (* 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 tmp;
if (y5 <= -5.8e-60) {
tmp = i * (k * (y * y5));
} else if (y5 <= -1.5e-217) {
tmp = i * (k * (-1.0 * (y1 * z)));
} else if (y5 <= 4.6e-41) {
tmp = y1 * (y2 * (k * y4));
} else {
tmp = -1.0 * (i * (j * (t * 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 (y5 <= (-5.8d-60)) then
tmp = i * (k * (y * y5))
else if (y5 <= (-1.5d-217)) then
tmp = i * (k * ((-1.0d0) * (y1 * z)))
else if (y5 <= 4.6d-41) then
tmp = y1 * (y2 * (k * y4))
else
tmp = (-1.0d0) * (i * (j * (t * 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 (y5 <= -5.8e-60) {
tmp = i * (k * (y * y5));
} else if (y5 <= -1.5e-217) {
tmp = i * (k * (-1.0 * (y1 * z)));
} else if (y5 <= 4.6e-41) {
tmp = y1 * (y2 * (k * y4));
} else {
tmp = -1.0 * (i * (j * (t * y5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y5 <= -5.8e-60: tmp = i * (k * (y * y5)) elif y5 <= -1.5e-217: tmp = i * (k * (-1.0 * (y1 * z))) elif y5 <= 4.6e-41: tmp = y1 * (y2 * (k * y4)) else: tmp = -1.0 * (i * (j * (t * 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 (y5 <= -5.8e-60) tmp = Float64(i * Float64(k * Float64(y * y5))); elseif (y5 <= -1.5e-217) tmp = Float64(i * Float64(k * Float64(-1.0 * Float64(y1 * z)))); elseif (y5 <= 4.6e-41) tmp = Float64(y1 * Float64(y2 * Float64(k * y4))); else tmp = Float64(-1.0 * Float64(i * Float64(j * Float64(t * 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 (y5 <= -5.8e-60) tmp = i * (k * (y * y5)); elseif (y5 <= -1.5e-217) tmp = i * (k * (-1.0 * (y1 * z))); elseif (y5 <= 4.6e-41) tmp = y1 * (y2 * (k * y4)); else tmp = -1.0 * (i * (j * (t * 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[y5, -5.8e-60], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -1.5e-217], N[(i * N[(k * N[(-1.0 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 4.6e-41], N[(y1 * N[(y2 * N[(k * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(i * N[(j * N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -5.8 \cdot 10^{-60}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{elif}\;y5 \leq -1.5 \cdot 10^{-217}:\\
\;\;\;\;i \cdot \left(k \cdot \left(-1 \cdot \left(y1 \cdot z\right)\right)\right)\\
\mathbf{elif}\;y5 \leq 4.6 \cdot 10^{-41}:\\
\;\;\;\;y1 \cdot \left(y2 \cdot \left(k \cdot y4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(j \cdot \left(t \cdot y5\right)\right)\right)\\
\end{array}
\end{array}
if y5 < -5.7999999999999999e-60Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in k around -inf
Applied rewrites26.7%
Taylor expanded in y around inf
Applied rewrites17.7%
if -5.7999999999999999e-60 < y5 < -1.50000000000000002e-217Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in k around -inf
Applied rewrites26.7%
Taylor expanded in y around 0
Applied rewrites16.7%
if -1.50000000000000002e-217 < y5 < 4.6000000000000002e-41Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y2 around inf
Applied rewrites26.9%
Taylor expanded in x around 0
Applied rewrites17.1%
if 4.6000000000000002e-41 < y5 Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in t around inf
Applied rewrites26.0%
Taylor expanded in b around 0
Applied rewrites17.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* j (* b (* t y4)))))
(if (<= b -3.5e+199)
t_1
(if (<= b 4.2e-184)
(* i (* k (* y y5)))
(if (<= b 6e+35) (* j (* x (* i 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 = j * (b * (t * y4));
double tmp;
if (b <= -3.5e+199) {
tmp = t_1;
} else if (b <= 4.2e-184) {
tmp = i * (k * (y * y5));
} else if (b <= 6e+35) {
tmp = j * (x * (i * 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 = j * (b * (t * y4))
if (b <= (-3.5d+199)) then
tmp = t_1
else if (b <= 4.2d-184) then
tmp = i * (k * (y * y5))
else if (b <= 6d+35) then
tmp = j * (x * (i * 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 = j * (b * (t * y4));
double tmp;
if (b <= -3.5e+199) {
tmp = t_1;
} else if (b <= 4.2e-184) {
tmp = i * (k * (y * y5));
} else if (b <= 6e+35) {
tmp = j * (x * (i * 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 = j * (b * (t * y4)) tmp = 0 if b <= -3.5e+199: tmp = t_1 elif b <= 4.2e-184: tmp = i * (k * (y * y5)) elif b <= 6e+35: tmp = j * (x * (i * 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(j * Float64(b * Float64(t * y4))) tmp = 0.0 if (b <= -3.5e+199) tmp = t_1; elseif (b <= 4.2e-184) tmp = Float64(i * Float64(k * Float64(y * y5))); elseif (b <= 6e+35) tmp = Float64(j * Float64(x * Float64(i * 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 = j * (b * (t * y4)); tmp = 0.0; if (b <= -3.5e+199) tmp = t_1; elseif (b <= 4.2e-184) tmp = i * (k * (y * y5)); elseif (b <= 6e+35) tmp = j * (x * (i * 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[(j * N[(b * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.5e+199], t$95$1, If[LessEqual[b, 4.2e-184], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e+35], N[(j * N[(x * N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(b \cdot \left(t \cdot y4\right)\right)\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{+199}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{-184}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{elif}\;b \leq 6 \cdot 10^{+35}:\\
\;\;\;\;j \cdot \left(x \cdot \left(i \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.49999999999999981e199 or 5.99999999999999981e35 < b Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in t around inf
Applied rewrites26.0%
Taylor expanded in b around inf
Applied rewrites16.4%
if -3.49999999999999981e199 < b < 4.1999999999999998e-184Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in k around -inf
Applied rewrites26.7%
Taylor expanded in y around inf
Applied rewrites17.7%
if 4.1999999999999998e-184 < b < 5.99999999999999981e35Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in x around inf
Applied rewrites26.2%
Taylor expanded in b around 0
Applied rewrites16.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (<= x -2.3e+140) (* j (* i (* x y1))) (if (<= x 1.45e+60) (* y1 (* y2 (* k y4))) (* i (* j (* x 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 (x <= -2.3e+140) {
tmp = j * (i * (x * y1));
} else if (x <= 1.45e+60) {
tmp = y1 * (y2 * (k * y4));
} else {
tmp = i * (j * (x * 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 (x <= (-2.3d+140)) then
tmp = j * (i * (x * y1))
else if (x <= 1.45d+60) then
tmp = y1 * (y2 * (k * y4))
else
tmp = i * (j * (x * 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 (x <= -2.3e+140) {
tmp = j * (i * (x * y1));
} else if (x <= 1.45e+60) {
tmp = y1 * (y2 * (k * y4));
} else {
tmp = i * (j * (x * y1));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if x <= -2.3e+140: tmp = j * (i * (x * y1)) elif x <= 1.45e+60: tmp = y1 * (y2 * (k * y4)) else: tmp = i * (j * (x * 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 (x <= -2.3e+140) tmp = Float64(j * Float64(i * Float64(x * y1))); elseif (x <= 1.45e+60) tmp = Float64(y1 * Float64(y2 * Float64(k * y4))); else tmp = Float64(i * Float64(j * Float64(x * 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 (x <= -2.3e+140) tmp = j * (i * (x * y1)); elseif (x <= 1.45e+60) tmp = y1 * (y2 * (k * y4)); else tmp = i * (j * (x * 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[x, -2.3e+140], N[(j * N[(i * N[(x * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.45e+60], N[(y1 * N[(y2 * N[(k * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(j * N[(x * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{+140}:\\
\;\;\;\;j \cdot \left(i \cdot \left(x \cdot y1\right)\right)\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{+60}:\\
\;\;\;\;y1 \cdot \left(y2 \cdot \left(k \cdot y4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(j \cdot \left(x \cdot y1\right)\right)\\
\end{array}
\end{array}
if x < -2.2999999999999999e140Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in x around inf
Applied rewrites26.2%
Taylor expanded in b around 0
Applied rewrites16.8%
if -2.2999999999999999e140 < x < 1.45e60Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y2 around inf
Applied rewrites26.9%
Taylor expanded in x around 0
Applied rewrites17.1%
if 1.45e60 < x Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in i around inf
Applied rewrites26.0%
Taylor expanded in x around inf
Applied rewrites16.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (<= x -1.95e+212) (* j (* i (* x y1))) (if (<= x 1.15e+61) (* y1 (* k (* y2 y4))) (* i (* j (* x 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 (x <= -1.95e+212) {
tmp = j * (i * (x * y1));
} else if (x <= 1.15e+61) {
tmp = y1 * (k * (y2 * y4));
} else {
tmp = i * (j * (x * 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 (x <= (-1.95d+212)) then
tmp = j * (i * (x * y1))
else if (x <= 1.15d+61) then
tmp = y1 * (k * (y2 * y4))
else
tmp = i * (j * (x * 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 (x <= -1.95e+212) {
tmp = j * (i * (x * y1));
} else if (x <= 1.15e+61) {
tmp = y1 * (k * (y2 * y4));
} else {
tmp = i * (j * (x * y1));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if x <= -1.95e+212: tmp = j * (i * (x * y1)) elif x <= 1.15e+61: tmp = y1 * (k * (y2 * y4)) else: tmp = i * (j * (x * 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 (x <= -1.95e+212) tmp = Float64(j * Float64(i * Float64(x * y1))); elseif (x <= 1.15e+61) tmp = Float64(y1 * Float64(k * Float64(y2 * y4))); else tmp = Float64(i * Float64(j * Float64(x * 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 (x <= -1.95e+212) tmp = j * (i * (x * y1)); elseif (x <= 1.15e+61) tmp = y1 * (k * (y2 * y4)); else tmp = i * (j * (x * 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[x, -1.95e+212], N[(j * N[(i * N[(x * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e+61], N[(y1 * N[(k * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(j * N[(x * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.95 \cdot 10^{+212}:\\
\;\;\;\;j \cdot \left(i \cdot \left(x \cdot y1\right)\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{+61}:\\
\;\;\;\;y1 \cdot \left(k \cdot \left(y2 \cdot y4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(j \cdot \left(x \cdot y1\right)\right)\\
\end{array}
\end{array}
if x < -1.9500000000000001e212Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in x around inf
Applied rewrites26.2%
Taylor expanded in b around 0
Applied rewrites16.8%
if -1.9500000000000001e212 < x < 1.15e61Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in y2 around inf
Applied rewrites26.9%
Taylor expanded in x around 0
Applied rewrites17.1%
if 1.15e61 < x Initial program 30.2%
Taylor expanded in y1 around inf
Applied rewrites37.1%
Taylor expanded in i around inf
Applied rewrites26.0%
Taylor expanded in x around inf
Applied rewrites16.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (<= t -4.9e+58) (* j (* b (* t y4))) (if (<= t 2.1e+52) (* i (* k (* y y5))) (* b (* j (* t 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 (t <= -4.9e+58) {
tmp = j * (b * (t * y4));
} else if (t <= 2.1e+52) {
tmp = i * (k * (y * y5));
} else {
tmp = b * (j * (t * 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 (t <= (-4.9d+58)) then
tmp = j * (b * (t * y4))
else if (t <= 2.1d+52) then
tmp = i * (k * (y * y5))
else
tmp = b * (j * (t * 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 (t <= -4.9e+58) {
tmp = j * (b * (t * y4));
} else if (t <= 2.1e+52) {
tmp = i * (k * (y * y5));
} else {
tmp = b * (j * (t * y4));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if t <= -4.9e+58: tmp = j * (b * (t * y4)) elif t <= 2.1e+52: tmp = i * (k * (y * y5)) else: tmp = b * (j * (t * 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 (t <= -4.9e+58) tmp = Float64(j * Float64(b * Float64(t * y4))); elseif (t <= 2.1e+52) tmp = Float64(i * Float64(k * Float64(y * y5))); else tmp = Float64(b * Float64(j * Float64(t * 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 (t <= -4.9e+58) tmp = j * (b * (t * y4)); elseif (t <= 2.1e+52) tmp = i * (k * (y * y5)); else tmp = b * (j * (t * 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[t, -4.9e+58], N[(j * N[(b * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e+52], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.9 \cdot 10^{+58}:\\
\;\;\;\;j \cdot \left(b \cdot \left(t \cdot y4\right)\right)\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+52}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\
\end{array}
\end{array}
if t < -4.90000000000000018e58Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in t around inf
Applied rewrites26.0%
Taylor expanded in b around inf
Applied rewrites16.4%
if -4.90000000000000018e58 < t < 2.1e52Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in k around -inf
Applied rewrites26.7%
Taylor expanded in y around inf
Applied rewrites17.7%
if 2.1e52 < t Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in t around inf
Applied rewrites26.0%
Taylor expanded in b around inf
Applied rewrites16.6%
(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 (<= t -64.0) t_1 (if (<= t 2.1e+52) (* 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 (t <= -64.0) {
tmp = t_1;
} else if (t <= 2.1e+52) {
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 (t <= (-64.0d0)) then
tmp = t_1
else if (t <= 2.1d+52) 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 (t <= -64.0) {
tmp = t_1;
} else if (t <= 2.1e+52) {
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 t <= -64.0: tmp = t_1 elif t <= 2.1e+52: 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 (t <= -64.0) tmp = t_1; elseif (t <= 2.1e+52) 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 (t <= -64.0) tmp = t_1; elseif (t <= 2.1e+52) 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[t, -64.0], t$95$1, If[LessEqual[t, 2.1e+52], 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}\;t \leq -64:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+52}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -64 or 2.1e52 < t Initial program 30.2%
Taylor expanded in j around inf
Applied rewrites35.9%
Taylor expanded in t around inf
Applied rewrites26.0%
Taylor expanded in b around inf
Applied rewrites16.6%
if -64 < t < 2.1e52Initial program 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in k around -inf
Applied rewrites26.7%
Taylor expanded in y around inf
Applied rewrites17.7%
(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 30.2%
Taylor expanded in i around -inf
Applied rewrites37.7%
Taylor expanded in k around -inf
Applied rewrites26.7%
Taylor expanded in y around inf
Applied rewrites17.7%
herbie shell --seed 2025160
(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)))))