
(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]
\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)
Herbie found 44 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]
\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)
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* c y0) (* a y1)))
(t_2
(*
x
(-
(+ (* y (- (* a b) (* c i))) (* y2 t_1))
(* j (- (* b y0) (* i y1))))))
(t_3 (- (* c y4) (* a y5)))
(t_4 (- (* k y2) (* j y3)))
(t_5 (* t_4 (- (* y4 y1) (* y5 y0)))))
(if (<= x -1.25e+89)
t_2
(if (<= x -5.8e+44)
(* y2 (- (* k (- (* y1 y4) (* y0 y5))) (* t t_3)))
(if (<= x -3.1e-59)
(+ (* -1.0 (* y3 (- (* z t_1) (* y t_3)))) t_5)
(if (<= x 3e-264)
(+ (* c (* t (- (* i z) (* y2 y4)))) t_5)
(if (<= x 2.2e-136)
(*
y4
(-
(+ (* b (- (* j t) (* k y))) (* y1 t_4))
(* c (- (* t y2) (* y y3)))))
(if (<= x 3.7e-19)
(*
y0
(-
(+ (* -1.0 (* y5 t_4)) (* c (- (* x y2) (* y3 z))))
(* b (- (* j x) (* k z)))))
(if (<= x 3.2e+153)
(+
(* c (* x (+ (* -1.0 (* i y)) (* y0 y2))))
(* t_4 (* y1 y4)))
t_2)))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (c * y0) - (a * y1);
double t_2 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1))));
double t_3 = (c * y4) - (a * y5);
double t_4 = (k * y2) - (j * y3);
double t_5 = t_4 * ((y4 * y1) - (y5 * y0));
double tmp;
if (x <= -1.25e+89) {
tmp = t_2;
} else if (x <= -5.8e+44) {
tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * t_3));
} else if (x <= -3.1e-59) {
tmp = (-1.0 * (y3 * ((z * t_1) - (y * t_3)))) + t_5;
} else if (x <= 3e-264) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_5;
} else if (x <= 2.2e-136) {
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_4)) - (c * ((t * y2) - (y * y3))));
} else if (x <= 3.7e-19) {
tmp = y0 * (((-1.0 * (y5 * t_4)) + (c * ((x * y2) - (y3 * z)))) - (b * ((j * x) - (k * z))));
} else if (x <= 3.2e+153) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_4 * (y1 * y4));
} else {
tmp = t_2;
}
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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = (c * y0) - (a * y1)
t_2 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1))))
t_3 = (c * y4) - (a * y5)
t_4 = (k * y2) - (j * y3)
t_5 = t_4 * ((y4 * y1) - (y5 * y0))
if (x <= (-1.25d+89)) then
tmp = t_2
else if (x <= (-5.8d+44)) then
tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * t_3))
else if (x <= (-3.1d-59)) then
tmp = ((-1.0d0) * (y3 * ((z * t_1) - (y * t_3)))) + t_5
else if (x <= 3d-264) then
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_5
else if (x <= 2.2d-136) then
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_4)) - (c * ((t * y2) - (y * y3))))
else if (x <= 3.7d-19) then
tmp = y0 * ((((-1.0d0) * (y5 * t_4)) + (c * ((x * y2) - (y3 * z)))) - (b * ((j * x) - (k * z))))
else if (x <= 3.2d+153) then
tmp = (c * (x * (((-1.0d0) * (i * y)) + (y0 * y2)))) + (t_4 * (y1 * y4))
else
tmp = t_2
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 = (c * y0) - (a * y1);
double t_2 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1))));
double t_3 = (c * y4) - (a * y5);
double t_4 = (k * y2) - (j * y3);
double t_5 = t_4 * ((y4 * y1) - (y5 * y0));
double tmp;
if (x <= -1.25e+89) {
tmp = t_2;
} else if (x <= -5.8e+44) {
tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * t_3));
} else if (x <= -3.1e-59) {
tmp = (-1.0 * (y3 * ((z * t_1) - (y * t_3)))) + t_5;
} else if (x <= 3e-264) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_5;
} else if (x <= 2.2e-136) {
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_4)) - (c * ((t * y2) - (y * y3))));
} else if (x <= 3.7e-19) {
tmp = y0 * (((-1.0 * (y5 * t_4)) + (c * ((x * y2) - (y3 * z)))) - (b * ((j * x) - (k * z))));
} else if (x <= 3.2e+153) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_4 * (y1 * y4));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (c * y0) - (a * y1) t_2 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1)))) t_3 = (c * y4) - (a * y5) t_4 = (k * y2) - (j * y3) t_5 = t_4 * ((y4 * y1) - (y5 * y0)) tmp = 0 if x <= -1.25e+89: tmp = t_2 elif x <= -5.8e+44: tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * t_3)) elif x <= -3.1e-59: tmp = (-1.0 * (y3 * ((z * t_1) - (y * t_3)))) + t_5 elif x <= 3e-264: tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_5 elif x <= 2.2e-136: tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_4)) - (c * ((t * y2) - (y * y3)))) elif x <= 3.7e-19: tmp = y0 * (((-1.0 * (y5 * t_4)) + (c * ((x * y2) - (y3 * z)))) - (b * ((j * x) - (k * z)))) elif x <= 3.2e+153: tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_4 * (y1 * y4)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(c * y0) - Float64(a * y1)) t_2 = Float64(x * Float64(Float64(Float64(y * Float64(Float64(a * b) - Float64(c * i))) + Float64(y2 * t_1)) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))) t_3 = Float64(Float64(c * y4) - Float64(a * y5)) t_4 = Float64(Float64(k * y2) - Float64(j * y3)) t_5 = Float64(t_4 * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (x <= -1.25e+89) tmp = t_2; elseif (x <= -5.8e+44) tmp = Float64(y2 * Float64(Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5))) - Float64(t * t_3))); elseif (x <= -3.1e-59) tmp = Float64(Float64(-1.0 * Float64(y3 * Float64(Float64(z * t_1) - Float64(y * t_3)))) + t_5); elseif (x <= 3e-264) tmp = Float64(Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_5); elseif (x <= 2.2e-136) tmp = Float64(y4 * Float64(Float64(Float64(b * Float64(Float64(j * t) - Float64(k * y))) + Float64(y1 * t_4)) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); elseif (x <= 3.7e-19) tmp = Float64(y0 * Float64(Float64(Float64(-1.0 * Float64(y5 * t_4)) + Float64(c * Float64(Float64(x * y2) - Float64(y3 * z)))) - Float64(b * Float64(Float64(j * x) - Float64(k * z))))); elseif (x <= 3.2e+153) tmp = Float64(Float64(c * Float64(x * Float64(Float64(-1.0 * Float64(i * y)) + Float64(y0 * y2)))) + Float64(t_4 * Float64(y1 * y4))); else tmp = t_2; 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 = (c * y0) - (a * y1); t_2 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1)))); t_3 = (c * y4) - (a * y5); t_4 = (k * y2) - (j * y3); t_5 = t_4 * ((y4 * y1) - (y5 * y0)); tmp = 0.0; if (x <= -1.25e+89) tmp = t_2; elseif (x <= -5.8e+44) tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * t_3)); elseif (x <= -3.1e-59) tmp = (-1.0 * (y3 * ((z * t_1) - (y * t_3)))) + t_5; elseif (x <= 3e-264) tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_5; elseif (x <= 2.2e-136) tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_4)) - (c * ((t * y2) - (y * y3)))); elseif (x <= 3.7e-19) tmp = y0 * (((-1.0 * (y5 * t_4)) + (c * ((x * y2) - (y3 * z)))) - (b * ((j * x) - (k * z)))); elseif (x <= 3.2e+153) tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_4 * (y1 * y4)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y2 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.25e+89], t$95$2, If[LessEqual[x, -5.8e+44], N[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.1e-59], N[(N[(-1.0 * N[(y3 * N[(N[(z * t$95$1), $MachinePrecision] - N[(y * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision], If[LessEqual[x, 3e-264], N[(N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision], If[LessEqual[x, 2.2e-136], N[(y4 * N[(N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y1 * t$95$4), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e-19], N[(y0 * N[(N[(N[(-1.0 * N[(y5 * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(c * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e+153], N[(N[(c * N[(x * N[(N[(-1.0 * N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$4 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]]
\begin{array}{l}
t_1 := c \cdot y0 - a \cdot y1\\
t_2 := x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot t\_1\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
t_3 := c \cdot y4 - a \cdot y5\\
t_4 := k \cdot y2 - j \cdot y3\\
t_5 := t\_4 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;x \leq -1.25 \cdot 10^{+89}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{+44}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) - t \cdot t\_3\right)\\
\mathbf{elif}\;x \leq -3.1 \cdot 10^{-59}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(z \cdot t\_1 - y \cdot t\_3\right)\right) + t\_5\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-264}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_5\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-136}:\\
\;\;\;\;y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot t\_4\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-19}:\\
\;\;\;\;y0 \cdot \left(\left(-1 \cdot \left(y5 \cdot t\_4\right) + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+153}:\\
\;\;\;\;c \cdot \left(x \cdot \left(-1 \cdot \left(i \cdot y\right) + y0 \cdot y2\right)\right) + t\_4 \cdot \left(y1 \cdot y4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if x < -1.25e89 or 3.2000000000000001e153 < x Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.5%
if -1.25e89 < x < -5.8000000000000004e44Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6434.3%
Applied rewrites34.3%
if -5.8000000000000004e44 < x < -3.1e-59Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
if -3.1e-59 < x < 3e-264Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if 3e-264 < x < 2.2000000000000001e-136Initial program 29.7%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
if 2.2000000000000001e-136 < x < 3.7000000000000001e-19Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
if 3.7000000000000001e-19 < x < 3.2000000000000001e153Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6437.9%
Applied rewrites37.9%
Taylor expanded in y0 around 0
lower-*.f6433.5%
Applied rewrites33.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* x y2) (* y3 z)))
(t_2 (- (* j x) (* k z)))
(t_3 (- (* c y0) (* a y1)))
(t_4
(*
x
(-
(+ (* y (- (* a b) (* c i))) (* y2 t_3))
(* j (- (* b y0) (* i y1))))))
(t_5 (- (* k y2) (* j y3)))
(t_6 (* t_5 (- (* y4 y1) (* y5 y0)))))
(if (<= x -6.8e+246)
t_4
(if (<= x -4e+46)
(*
y2
(-
(+ (* k (- (* y1 y4) (* y0 y5))) (* x t_3))
(* t (- (* c y4) (* a y5)))))
(if (<= x -3.2e-93)
(+ (* -1.0 (* y1 (- (* a t_1) (* i t_2)))) t_6)
(if (<= x 3e-264)
(+ (* c (* t (- (* i z) (* y2 y4)))) t_6)
(if (<= x 2.2e-136)
(*
y4
(-
(+ (* b (- (* j t) (* k y))) (* y1 t_5))
(* c (- (* t y2) (* y y3)))))
(if (<= x 3.7e-19)
(* y0 (- (+ (* -1.0 (* y5 t_5)) (* c t_1)) (* b t_2)))
(if (<= x 3.2e+153)
(+
(* c (* x (+ (* -1.0 (* i y)) (* y0 y2))))
(* t_5 (* y1 y4)))
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 = (x * y2) - (y3 * z);
double t_2 = (j * x) - (k * z);
double t_3 = (c * y0) - (a * y1);
double t_4 = x * (((y * ((a * b) - (c * i))) + (y2 * t_3)) - (j * ((b * y0) - (i * y1))));
double t_5 = (k * y2) - (j * y3);
double t_6 = t_5 * ((y4 * y1) - (y5 * y0));
double tmp;
if (x <= -6.8e+246) {
tmp = t_4;
} else if (x <= -4e+46) {
tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_3)) - (t * ((c * y4) - (a * y5))));
} else if (x <= -3.2e-93) {
tmp = (-1.0 * (y1 * ((a * t_1) - (i * t_2)))) + t_6;
} else if (x <= 3e-264) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_6;
} else if (x <= 2.2e-136) {
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_5)) - (c * ((t * y2) - (y * y3))));
} else if (x <= 3.7e-19) {
tmp = y0 * (((-1.0 * (y5 * t_5)) + (c * t_1)) - (b * t_2));
} else if (x <= 3.2e+153) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_5 * (y1 * y4));
} else {
tmp = t_4;
}
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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: t_6
real(8) :: tmp
t_1 = (x * y2) - (y3 * z)
t_2 = (j * x) - (k * z)
t_3 = (c * y0) - (a * y1)
t_4 = x * (((y * ((a * b) - (c * i))) + (y2 * t_3)) - (j * ((b * y0) - (i * y1))))
t_5 = (k * y2) - (j * y3)
t_6 = t_5 * ((y4 * y1) - (y5 * y0))
if (x <= (-6.8d+246)) then
tmp = t_4
else if (x <= (-4d+46)) then
tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_3)) - (t * ((c * y4) - (a * y5))))
else if (x <= (-3.2d-93)) then
tmp = ((-1.0d0) * (y1 * ((a * t_1) - (i * t_2)))) + t_6
else if (x <= 3d-264) then
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_6
else if (x <= 2.2d-136) then
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_5)) - (c * ((t * y2) - (y * y3))))
else if (x <= 3.7d-19) then
tmp = y0 * ((((-1.0d0) * (y5 * t_5)) + (c * t_1)) - (b * t_2))
else if (x <= 3.2d+153) then
tmp = (c * (x * (((-1.0d0) * (i * y)) + (y0 * y2)))) + (t_5 * (y1 * y4))
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y2) - (y3 * z);
double t_2 = (j * x) - (k * z);
double t_3 = (c * y0) - (a * y1);
double t_4 = x * (((y * ((a * b) - (c * i))) + (y2 * t_3)) - (j * ((b * y0) - (i * y1))));
double t_5 = (k * y2) - (j * y3);
double t_6 = t_5 * ((y4 * y1) - (y5 * y0));
double tmp;
if (x <= -6.8e+246) {
tmp = t_4;
} else if (x <= -4e+46) {
tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_3)) - (t * ((c * y4) - (a * y5))));
} else if (x <= -3.2e-93) {
tmp = (-1.0 * (y1 * ((a * t_1) - (i * t_2)))) + t_6;
} else if (x <= 3e-264) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_6;
} else if (x <= 2.2e-136) {
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_5)) - (c * ((t * y2) - (y * y3))));
} else if (x <= 3.7e-19) {
tmp = y0 * (((-1.0 * (y5 * t_5)) + (c * t_1)) - (b * t_2));
} else if (x <= 3.2e+153) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_5 * (y1 * y4));
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (x * y2) - (y3 * z) t_2 = (j * x) - (k * z) t_3 = (c * y0) - (a * y1) t_4 = x * (((y * ((a * b) - (c * i))) + (y2 * t_3)) - (j * ((b * y0) - (i * y1)))) t_5 = (k * y2) - (j * y3) t_6 = t_5 * ((y4 * y1) - (y5 * y0)) tmp = 0 if x <= -6.8e+246: tmp = t_4 elif x <= -4e+46: tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_3)) - (t * ((c * y4) - (a * y5)))) elif x <= -3.2e-93: tmp = (-1.0 * (y1 * ((a * t_1) - (i * t_2)))) + t_6 elif x <= 3e-264: tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_6 elif x <= 2.2e-136: tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_5)) - (c * ((t * y2) - (y * y3)))) elif x <= 3.7e-19: tmp = y0 * (((-1.0 * (y5 * t_5)) + (c * t_1)) - (b * t_2)) elif x <= 3.2e+153: tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_5 * (y1 * y4)) 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(x * y2) - Float64(y3 * z)) t_2 = Float64(Float64(j * x) - Float64(k * z)) t_3 = Float64(Float64(c * y0) - Float64(a * y1)) t_4 = Float64(x * Float64(Float64(Float64(y * Float64(Float64(a * b) - Float64(c * i))) + Float64(y2 * t_3)) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))) t_5 = Float64(Float64(k * y2) - Float64(j * y3)) t_6 = Float64(t_5 * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (x <= -6.8e+246) tmp = t_4; elseif (x <= -4e+46) tmp = Float64(y2 * Float64(Float64(Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5))) + Float64(x * t_3)) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5))))); elseif (x <= -3.2e-93) tmp = Float64(Float64(-1.0 * Float64(y1 * Float64(Float64(a * t_1) - Float64(i * t_2)))) + t_6); elseif (x <= 3e-264) tmp = Float64(Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_6); elseif (x <= 2.2e-136) tmp = Float64(y4 * Float64(Float64(Float64(b * Float64(Float64(j * t) - Float64(k * y))) + Float64(y1 * t_5)) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); elseif (x <= 3.7e-19) tmp = Float64(y0 * Float64(Float64(Float64(-1.0 * Float64(y5 * t_5)) + Float64(c * t_1)) - Float64(b * t_2))); elseif (x <= 3.2e+153) tmp = Float64(Float64(c * Float64(x * Float64(Float64(-1.0 * Float64(i * y)) + Float64(y0 * y2)))) + Float64(t_5 * Float64(y1 * y4))); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (x * y2) - (y3 * z); t_2 = (j * x) - (k * z); t_3 = (c * y0) - (a * y1); t_4 = x * (((y * ((a * b) - (c * i))) + (y2 * t_3)) - (j * ((b * y0) - (i * y1)))); t_5 = (k * y2) - (j * y3); t_6 = t_5 * ((y4 * y1) - (y5 * y0)); tmp = 0.0; if (x <= -6.8e+246) tmp = t_4; elseif (x <= -4e+46) tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_3)) - (t * ((c * y4) - (a * y5)))); elseif (x <= -3.2e-93) tmp = (-1.0 * (y1 * ((a * t_1) - (i * t_2)))) + t_6; elseif (x <= 3e-264) tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_6; elseif (x <= 2.2e-136) tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_5)) - (c * ((t * y2) - (y * y3)))); elseif (x <= 3.7e-19) tmp = y0 * (((-1.0 * (y5 * t_5)) + (c * t_1)) - (b * t_2)); elseif (x <= 3.2e+153) tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_5 * (y1 * y4)); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x * N[(N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y2 * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(t$95$5 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.8e+246], t$95$4, If[LessEqual[x, -4e+46], N[(y2 * N[(N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.2e-93], N[(N[(-1.0 * N[(y1 * N[(N[(a * t$95$1), $MachinePrecision] - N[(i * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision], If[LessEqual[x, 3e-264], N[(N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$6), $MachinePrecision], If[LessEqual[x, 2.2e-136], N[(y4 * N[(N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y1 * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e-19], N[(y0 * N[(N[(N[(-1.0 * N[(y5 * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(c * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(b * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e+153], N[(N[(c * N[(x * N[(N[(-1.0 * N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]]]]
\begin{array}{l}
t_1 := x \cdot y2 - y3 \cdot z\\
t_2 := j \cdot x - k \cdot z\\
t_3 := c \cdot y0 - a \cdot y1\\
t_4 := x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot t\_3\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
t_5 := k \cdot y2 - j \cdot y3\\
t_6 := t\_5 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{+246}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x \leq -4 \cdot 10^{+46}:\\
\;\;\;\;y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot t\_3\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-93}:\\
\;\;\;\;-1 \cdot \left(y1 \cdot \left(a \cdot t\_1 - i \cdot t\_2\right)\right) + t\_6\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-264}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_6\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-136}:\\
\;\;\;\;y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot t\_5\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-19}:\\
\;\;\;\;y0 \cdot \left(\left(-1 \cdot \left(y5 \cdot t\_5\right) + c \cdot t\_1\right) - b \cdot t\_2\right)\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+153}:\\
\;\;\;\;c \cdot \left(x \cdot \left(-1 \cdot \left(i \cdot y\right) + y0 \cdot y2\right)\right) + t\_5 \cdot \left(y1 \cdot y4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
if x < -6.7999999999999998e246 or 3.2000000000000001e153 < x Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.5%
if -6.7999999999999998e246 < x < -4e46Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
if -4e46 < x < -3.1999999999999999e-93Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f6436.0%
Applied rewrites36.0%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
if -3.1999999999999999e-93 < x < 3e-264Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if 3e-264 < x < 2.2000000000000001e-136Initial program 29.7%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
if 2.2000000000000001e-136 < x < 3.7000000000000001e-19Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
if 3.7000000000000001e-19 < x < 3.2000000000000001e153Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6437.9%
Applied rewrites37.9%
Taylor expanded in y0 around 0
lower-*.f6433.5%
Applied rewrites33.5%
(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 x) (* k z)))
(t_3
(*
x
(-
(+ (* y (- (* a b) (* c i))) (* y2 t_1))
(* j (- (* b y0) (* i y1))))))
(t_4 (- (* x y2) (* y3 z)))
(t_5 (- (* k y2) (* j y3))))
(if (<= x -6.8e+246)
t_3
(if (<= x -3.8e+46)
(*
y2
(-
(+ (* k (- (* y1 y4) (* y0 y5))) (* x t_1))
(* t (- (* c y4) (* a y5)))))
(if (<= x -2.2e-92)
(*
y1
(- (+ (* -1.0 (* a t_4)) (* y4 t_5)) (* -1.0 (* i t_2))))
(if (<= x 3e-264)
(+
(* c (* t (- (* i z) (* y2 y4))))
(* t_5 (- (* y4 y1) (* y5 y0))))
(if (<= x 2.2e-136)
(*
y4
(-
(+ (* b (- (* j t) (* k y))) (* y1 t_5))
(* c (- (* t y2) (* y y3)))))
(if (<= x 3.7e-19)
(* y0 (- (+ (* -1.0 (* y5 t_5)) (* c t_4)) (* b t_2)))
(if (<= x 3.2e+153)
(+
(* c (* x (+ (* -1.0 (* i y)) (* y0 y2))))
(* t_5 (* y1 y4)))
t_3)))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (c * y0) - (a * y1);
double t_2 = (j * x) - (k * z);
double t_3 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1))));
double t_4 = (x * y2) - (y3 * z);
double t_5 = (k * y2) - (j * y3);
double tmp;
if (x <= -6.8e+246) {
tmp = t_3;
} else if (x <= -3.8e+46) {
tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_1)) - (t * ((c * y4) - (a * y5))));
} else if (x <= -2.2e-92) {
tmp = y1 * (((-1.0 * (a * t_4)) + (y4 * t_5)) - (-1.0 * (i * t_2)));
} else if (x <= 3e-264) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + (t_5 * ((y4 * y1) - (y5 * y0)));
} else if (x <= 2.2e-136) {
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_5)) - (c * ((t * y2) - (y * y3))));
} else if (x <= 3.7e-19) {
tmp = y0 * (((-1.0 * (y5 * t_5)) + (c * t_4)) - (b * t_2));
} else if (x <= 3.2e+153) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_5 * (y1 * y4));
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = (c * y0) - (a * y1)
t_2 = (j * x) - (k * z)
t_3 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1))))
t_4 = (x * y2) - (y3 * z)
t_5 = (k * y2) - (j * y3)
if (x <= (-6.8d+246)) then
tmp = t_3
else if (x <= (-3.8d+46)) then
tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_1)) - (t * ((c * y4) - (a * y5))))
else if (x <= (-2.2d-92)) then
tmp = y1 * ((((-1.0d0) * (a * t_4)) + (y4 * t_5)) - ((-1.0d0) * (i * t_2)))
else if (x <= 3d-264) then
tmp = (c * (t * ((i * z) - (y2 * y4)))) + (t_5 * ((y4 * y1) - (y5 * y0)))
else if (x <= 2.2d-136) then
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_5)) - (c * ((t * y2) - (y * y3))))
else if (x <= 3.7d-19) then
tmp = y0 * ((((-1.0d0) * (y5 * t_5)) + (c * t_4)) - (b * t_2))
else if (x <= 3.2d+153) then
tmp = (c * (x * (((-1.0d0) * (i * y)) + (y0 * y2)))) + (t_5 * (y1 * y4))
else
tmp = t_3
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 = (c * y0) - (a * y1);
double t_2 = (j * x) - (k * z);
double t_3 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1))));
double t_4 = (x * y2) - (y3 * z);
double t_5 = (k * y2) - (j * y3);
double tmp;
if (x <= -6.8e+246) {
tmp = t_3;
} else if (x <= -3.8e+46) {
tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_1)) - (t * ((c * y4) - (a * y5))));
} else if (x <= -2.2e-92) {
tmp = y1 * (((-1.0 * (a * t_4)) + (y4 * t_5)) - (-1.0 * (i * t_2)));
} else if (x <= 3e-264) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + (t_5 * ((y4 * y1) - (y5 * y0)));
} else if (x <= 2.2e-136) {
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_5)) - (c * ((t * y2) - (y * y3))));
} else if (x <= 3.7e-19) {
tmp = y0 * (((-1.0 * (y5 * t_5)) + (c * t_4)) - (b * t_2));
} else if (x <= 3.2e+153) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_5 * (y1 * y4));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (c * y0) - (a * y1) t_2 = (j * x) - (k * z) t_3 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1)))) t_4 = (x * y2) - (y3 * z) t_5 = (k * y2) - (j * y3) tmp = 0 if x <= -6.8e+246: tmp = t_3 elif x <= -3.8e+46: tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_1)) - (t * ((c * y4) - (a * y5)))) elif x <= -2.2e-92: tmp = y1 * (((-1.0 * (a * t_4)) + (y4 * t_5)) - (-1.0 * (i * t_2))) elif x <= 3e-264: tmp = (c * (t * ((i * z) - (y2 * y4)))) + (t_5 * ((y4 * y1) - (y5 * y0))) elif x <= 2.2e-136: tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_5)) - (c * ((t * y2) - (y * y3)))) elif x <= 3.7e-19: tmp = y0 * (((-1.0 * (y5 * t_5)) + (c * t_4)) - (b * t_2)) elif x <= 3.2e+153: tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_5 * (y1 * y4)) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(c * y0) - Float64(a * y1)) t_2 = Float64(Float64(j * x) - Float64(k * z)) t_3 = Float64(x * Float64(Float64(Float64(y * Float64(Float64(a * b) - Float64(c * i))) + Float64(y2 * t_1)) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))) t_4 = Float64(Float64(x * y2) - Float64(y3 * z)) t_5 = Float64(Float64(k * y2) - Float64(j * y3)) tmp = 0.0 if (x <= -6.8e+246) tmp = t_3; elseif (x <= -3.8e+46) tmp = Float64(y2 * Float64(Float64(Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5))) + Float64(x * t_1)) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5))))); elseif (x <= -2.2e-92) tmp = Float64(y1 * Float64(Float64(Float64(-1.0 * Float64(a * t_4)) + Float64(y4 * t_5)) - Float64(-1.0 * Float64(i * t_2)))); elseif (x <= 3e-264) tmp = Float64(Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))) + Float64(t_5 * Float64(Float64(y4 * y1) - Float64(y5 * y0)))); elseif (x <= 2.2e-136) tmp = Float64(y4 * Float64(Float64(Float64(b * Float64(Float64(j * t) - Float64(k * y))) + Float64(y1 * t_5)) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); elseif (x <= 3.7e-19) tmp = Float64(y0 * Float64(Float64(Float64(-1.0 * Float64(y5 * t_5)) + Float64(c * t_4)) - Float64(b * t_2))); elseif (x <= 3.2e+153) tmp = Float64(Float64(c * Float64(x * Float64(Float64(-1.0 * Float64(i * y)) + Float64(y0 * y2)))) + Float64(t_5 * Float64(y1 * y4))); else tmp = t_3; 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 = (c * y0) - (a * y1); t_2 = (j * x) - (k * z); t_3 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1)))); t_4 = (x * y2) - (y3 * z); t_5 = (k * y2) - (j * y3); tmp = 0.0; if (x <= -6.8e+246) tmp = t_3; elseif (x <= -3.8e+46) tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_1)) - (t * ((c * y4) - (a * y5)))); elseif (x <= -2.2e-92) tmp = y1 * (((-1.0 * (a * t_4)) + (y4 * t_5)) - (-1.0 * (i * t_2))); elseif (x <= 3e-264) tmp = (c * (t * ((i * z) - (y2 * y4)))) + (t_5 * ((y4 * y1) - (y5 * y0))); elseif (x <= 2.2e-136) tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_5)) - (c * ((t * y2) - (y * y3)))); elseif (x <= 3.7e-19) tmp = y0 * (((-1.0 * (y5 * t_5)) + (c * t_4)) - (b * t_2)); elseif (x <= 3.2e+153) tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_5 * (y1 * y4)); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y2 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.8e+246], t$95$3, If[LessEqual[x, -3.8e+46], N[(y2 * N[(N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.2e-92], N[(y1 * N[(N[(N[(-1.0 * N[(a * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(y4 * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(i * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3e-264], N[(N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e-136], N[(y4 * N[(N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y1 * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e-19], N[(y0 * N[(N[(N[(-1.0 * N[(y5 * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(c * t$95$4), $MachinePrecision]), $MachinePrecision] - N[(b * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e+153], N[(N[(c * N[(x * N[(N[(-1.0 * N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$5 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]]
\begin{array}{l}
t_1 := c \cdot y0 - a \cdot y1\\
t_2 := j \cdot x - k \cdot z\\
t_3 := x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot t\_1\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
t_4 := x \cdot y2 - y3 \cdot z\\
t_5 := k \cdot y2 - j \cdot y3\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{+246}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -3.8 \cdot 10^{+46}:\\
\;\;\;\;y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot t\_1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-92}:\\
\;\;\;\;y1 \cdot \left(\left(-1 \cdot \left(a \cdot t\_4\right) + y4 \cdot t\_5\right) - -1 \cdot \left(i \cdot t\_2\right)\right)\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-264}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_5 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-136}:\\
\;\;\;\;y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot t\_5\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-19}:\\
\;\;\;\;y0 \cdot \left(\left(-1 \cdot \left(y5 \cdot t\_5\right) + c \cdot t\_4\right) - b \cdot t\_2\right)\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+153}:\\
\;\;\;\;c \cdot \left(x \cdot \left(-1 \cdot \left(i \cdot y\right) + y0 \cdot y2\right)\right) + t\_5 \cdot \left(y1 \cdot y4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
if x < -6.7999999999999998e246 or 3.2000000000000001e153 < x Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.5%
if -6.7999999999999998e246 < x < -3.7999999999999999e46Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
if -3.7999999999999999e46 < x < -2.1999999999999999e-92Initial program 29.7%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.1%
if -2.1999999999999999e-92 < x < 3e-264Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if 3e-264 < x < 2.2000000000000001e-136Initial program 29.7%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
if 2.2000000000000001e-136 < x < 3.7000000000000001e-19Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
if 3.7000000000000001e-19 < x < 3.2000000000000001e153Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6437.9%
Applied rewrites37.9%
Taylor expanded in y0 around 0
lower-*.f6433.5%
Applied rewrites33.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* c y0) (* a y1)))
(t_2
(*
x
(-
(+ (* y (- (* a b) (* c i))) (* y2 t_1))
(* j (- (* b y0) (* i y1))))))
(t_3 (- (* k y2) (* j y3)))
(t_4 (* t_3 (- (* y4 y1) (* y5 y0)))))
(if (<= x -6.8e+246)
t_2
(if (<= x -1.9e+17)
(*
y2
(-
(+ (* k (- (* y1 y4) (* y0 y5))) (* x t_1))
(* t (- (* c y4) (* a y5)))))
(if (<= x -1.75e-171)
(+ (* -1.0 (* y3 (* z t_1))) t_4)
(if (<= x 3e-264)
(+ (* c (* t (- (* i z) (* y2 y4)))) t_4)
(if (<= x 2.2e-136)
(*
y4
(-
(+ (* b (- (* j t) (* k y))) (* y1 t_3))
(* c (- (* t y2) (* y y3)))))
(if (<= x 3.7e-19)
(*
y0
(-
(+ (* -1.0 (* y5 t_3)) (* c (- (* x y2) (* y3 z))))
(* b (- (* j x) (* k z)))))
(if (<= x 3.2e+153)
(+
(* c (* x (+ (* -1.0 (* i y)) (* y0 y2))))
(* t_3 (* y1 y4)))
t_2)))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (c * y0) - (a * y1);
double t_2 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1))));
double t_3 = (k * y2) - (j * y3);
double t_4 = t_3 * ((y4 * y1) - (y5 * y0));
double tmp;
if (x <= -6.8e+246) {
tmp = t_2;
} else if (x <= -1.9e+17) {
tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_1)) - (t * ((c * y4) - (a * y5))));
} else if (x <= -1.75e-171) {
tmp = (-1.0 * (y3 * (z * t_1))) + t_4;
} else if (x <= 3e-264) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_4;
} else if (x <= 2.2e-136) {
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_3)) - (c * ((t * y2) - (y * y3))));
} else if (x <= 3.7e-19) {
tmp = y0 * (((-1.0 * (y5 * t_3)) + (c * ((x * y2) - (y3 * z)))) - (b * ((j * x) - (k * z))));
} else if (x <= 3.2e+153) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_3 * (y1 * y4));
} else {
tmp = t_2;
}
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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (c * y0) - (a * y1)
t_2 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1))))
t_3 = (k * y2) - (j * y3)
t_4 = t_3 * ((y4 * y1) - (y5 * y0))
if (x <= (-6.8d+246)) then
tmp = t_2
else if (x <= (-1.9d+17)) then
tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_1)) - (t * ((c * y4) - (a * y5))))
else if (x <= (-1.75d-171)) then
tmp = ((-1.0d0) * (y3 * (z * t_1))) + t_4
else if (x <= 3d-264) then
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_4
else if (x <= 2.2d-136) then
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_3)) - (c * ((t * y2) - (y * y3))))
else if (x <= 3.7d-19) then
tmp = y0 * ((((-1.0d0) * (y5 * t_3)) + (c * ((x * y2) - (y3 * z)))) - (b * ((j * x) - (k * z))))
else if (x <= 3.2d+153) then
tmp = (c * (x * (((-1.0d0) * (i * y)) + (y0 * y2)))) + (t_3 * (y1 * y4))
else
tmp = t_2
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 = (c * y0) - (a * y1);
double t_2 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1))));
double t_3 = (k * y2) - (j * y3);
double t_4 = t_3 * ((y4 * y1) - (y5 * y0));
double tmp;
if (x <= -6.8e+246) {
tmp = t_2;
} else if (x <= -1.9e+17) {
tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_1)) - (t * ((c * y4) - (a * y5))));
} else if (x <= -1.75e-171) {
tmp = (-1.0 * (y3 * (z * t_1))) + t_4;
} else if (x <= 3e-264) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_4;
} else if (x <= 2.2e-136) {
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_3)) - (c * ((t * y2) - (y * y3))));
} else if (x <= 3.7e-19) {
tmp = y0 * (((-1.0 * (y5 * t_3)) + (c * ((x * y2) - (y3 * z)))) - (b * ((j * x) - (k * z))));
} else if (x <= 3.2e+153) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_3 * (y1 * y4));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (c * y0) - (a * y1) t_2 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1)))) t_3 = (k * y2) - (j * y3) t_4 = t_3 * ((y4 * y1) - (y5 * y0)) tmp = 0 if x <= -6.8e+246: tmp = t_2 elif x <= -1.9e+17: tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_1)) - (t * ((c * y4) - (a * y5)))) elif x <= -1.75e-171: tmp = (-1.0 * (y3 * (z * t_1))) + t_4 elif x <= 3e-264: tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_4 elif x <= 2.2e-136: tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_3)) - (c * ((t * y2) - (y * y3)))) elif x <= 3.7e-19: tmp = y0 * (((-1.0 * (y5 * t_3)) + (c * ((x * y2) - (y3 * z)))) - (b * ((j * x) - (k * z)))) elif x <= 3.2e+153: tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_3 * (y1 * y4)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(c * y0) - Float64(a * y1)) t_2 = Float64(x * Float64(Float64(Float64(y * Float64(Float64(a * b) - Float64(c * i))) + Float64(y2 * t_1)) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))) t_3 = Float64(Float64(k * y2) - Float64(j * y3)) t_4 = Float64(t_3 * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (x <= -6.8e+246) tmp = t_2; elseif (x <= -1.9e+17) tmp = Float64(y2 * Float64(Float64(Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5))) + Float64(x * t_1)) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5))))); elseif (x <= -1.75e-171) tmp = Float64(Float64(-1.0 * Float64(y3 * Float64(z * t_1))) + t_4); elseif (x <= 3e-264) tmp = Float64(Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_4); elseif (x <= 2.2e-136) tmp = Float64(y4 * Float64(Float64(Float64(b * Float64(Float64(j * t) - Float64(k * y))) + Float64(y1 * t_3)) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); elseif (x <= 3.7e-19) tmp = Float64(y0 * Float64(Float64(Float64(-1.0 * Float64(y5 * t_3)) + Float64(c * Float64(Float64(x * y2) - Float64(y3 * z)))) - Float64(b * Float64(Float64(j * x) - Float64(k * z))))); elseif (x <= 3.2e+153) tmp = Float64(Float64(c * Float64(x * Float64(Float64(-1.0 * Float64(i * y)) + Float64(y0 * y2)))) + Float64(t_3 * Float64(y1 * y4))); else tmp = t_2; 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 = (c * y0) - (a * y1); t_2 = x * (((y * ((a * b) - (c * i))) + (y2 * t_1)) - (j * ((b * y0) - (i * y1)))); t_3 = (k * y2) - (j * y3); t_4 = t_3 * ((y4 * y1) - (y5 * y0)); tmp = 0.0; if (x <= -6.8e+246) tmp = t_2; elseif (x <= -1.9e+17) tmp = y2 * (((k * ((y1 * y4) - (y0 * y5))) + (x * t_1)) - (t * ((c * y4) - (a * y5)))); elseif (x <= -1.75e-171) tmp = (-1.0 * (y3 * (z * t_1))) + t_4; elseif (x <= 3e-264) tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_4; elseif (x <= 2.2e-136) tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_3)) - (c * ((t * y2) - (y * y3)))); elseif (x <= 3.7e-19) tmp = y0 * (((-1.0 * (y5 * t_3)) + (c * ((x * y2) - (y3 * z)))) - (b * ((j * x) - (k * z)))); elseif (x <= 3.2e+153) tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_3 * (y1 * y4)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y2 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.8e+246], t$95$2, If[LessEqual[x, -1.9e+17], N[(y2 * N[(N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.75e-171], N[(N[(-1.0 * N[(y3 * N[(z * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision], If[LessEqual[x, 3e-264], N[(N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision], If[LessEqual[x, 2.2e-136], N[(y4 * N[(N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y1 * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e-19], N[(y0 * N[(N[(N[(-1.0 * N[(y5 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(c * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.2e+153], N[(N[(c * N[(x * N[(N[(-1.0 * N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]]
\begin{array}{l}
t_1 := c \cdot y0 - a \cdot y1\\
t_2 := x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot t\_1\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
t_3 := k \cdot y2 - j \cdot y3\\
t_4 := t\_3 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{+246}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{+17}:\\
\;\;\;\;y2 \cdot \left(\left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot t\_1\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;x \leq -1.75 \cdot 10^{-171}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(z \cdot t\_1\right)\right) + t\_4\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-264}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_4\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-136}:\\
\;\;\;\;y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot t\_3\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-19}:\\
\;\;\;\;y0 \cdot \left(\left(-1 \cdot \left(y5 \cdot t\_3\right) + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+153}:\\
\;\;\;\;c \cdot \left(x \cdot \left(-1 \cdot \left(i \cdot y\right) + y0 \cdot y2\right)\right) + t\_3 \cdot \left(y1 \cdot y4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if x < -6.7999999999999998e246 or 3.2000000000000001e153 < x Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.5%
if -6.7999999999999998e246 < x < -1.9e17Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
if -1.9e17 < x < -1.75e-171Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6436.3%
Applied rewrites36.3%
if -1.75e-171 < x < 3e-264Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if 3e-264 < x < 2.2000000000000001e-136Initial program 29.7%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
if 2.2000000000000001e-136 < x < 3.7000000000000001e-19Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
if 3.7000000000000001e-19 < x < 3.2000000000000001e153Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6437.9%
Applied rewrites37.9%
Taylor expanded in y0 around 0
lower-*.f6433.5%
Applied rewrites33.5%
(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)) (- (* y4 y1) (* y5 y0))))
(t_2 (- (* a b) (* c i)))
(t_3 (- (* b y0) (* i y1)))
(t_4 (- (* c y0) (* a y1)))
(t_5 (- (* x y) (* t z))))
(if (<= y -2.35e+151)
(+
(*
y
(-
(+ (* -1.0 (* k (- (* b y4) (* i y5)))) (* x t_2))
(* -1.0 (* y3 (- (* c y4) (* a y5))))))
t_1)
(if (<= y -5.6e-136)
(* x (- (+ (* y t_2) (* y2 t_4)) (* j t_3)))
(if (<= y 1.3e-173)
(+
(*
c
(-
(+ (* -1.0 (* i t_5)) (* y0 (- (* x y2) (* y3 z))))
(* y4 (- (* t y2) (* y y3)))))
t_1)
(if (<= y 420000000.0)
(* -1.0 (* z (- (+ (* t t_2) (* y3 t_4)) (* k t_3))))
(if (<= y 3.3e+176)
(*
b
(-
(+ (* a t_5) (* y4 (- (* j t) (* k y))))
(* y0 (- (* j x) (* k z)))))
(+ (* c (* x (+ (* -1.0 (* i y)) (* y0 y2)))) t_1))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double t_2 = (a * b) - (c * i);
double t_3 = (b * y0) - (i * y1);
double t_4 = (c * y0) - (a * y1);
double t_5 = (x * y) - (t * z);
double tmp;
if (y <= -2.35e+151) {
tmp = (y * (((-1.0 * (k * ((b * y4) - (i * y5)))) + (x * t_2)) - (-1.0 * (y3 * ((c * y4) - (a * y5)))))) + t_1;
} else if (y <= -5.6e-136) {
tmp = x * (((y * t_2) + (y2 * t_4)) - (j * t_3));
} else if (y <= 1.3e-173) {
tmp = (c * (((-1.0 * (i * t_5)) + (y0 * ((x * y2) - (y3 * z)))) - (y4 * ((t * y2) - (y * y3))))) + t_1;
} else if (y <= 420000000.0) {
tmp = -1.0 * (z * (((t * t_2) + (y3 * t_4)) - (k * t_3)));
} else if (y <= 3.3e+176) {
tmp = b * (((a * t_5) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
} else {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + 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) :: t_3
real(8) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
t_2 = (a * b) - (c * i)
t_3 = (b * y0) - (i * y1)
t_4 = (c * y0) - (a * y1)
t_5 = (x * y) - (t * z)
if (y <= (-2.35d+151)) then
tmp = (y * ((((-1.0d0) * (k * ((b * y4) - (i * y5)))) + (x * t_2)) - ((-1.0d0) * (y3 * ((c * y4) - (a * y5)))))) + t_1
else if (y <= (-5.6d-136)) then
tmp = x * (((y * t_2) + (y2 * t_4)) - (j * t_3))
else if (y <= 1.3d-173) then
tmp = (c * ((((-1.0d0) * (i * t_5)) + (y0 * ((x * y2) - (y3 * z)))) - (y4 * ((t * y2) - (y * y3))))) + t_1
else if (y <= 420000000.0d0) then
tmp = (-1.0d0) * (z * (((t * t_2) + (y3 * t_4)) - (k * t_3)))
else if (y <= 3.3d+176) then
tmp = b * (((a * t_5) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))))
else
tmp = (c * (x * (((-1.0d0) * (i * y)) + (y0 * y2)))) + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double t_2 = (a * b) - (c * i);
double t_3 = (b * y0) - (i * y1);
double t_4 = (c * y0) - (a * y1);
double t_5 = (x * y) - (t * z);
double tmp;
if (y <= -2.35e+151) {
tmp = (y * (((-1.0 * (k * ((b * y4) - (i * y5)))) + (x * t_2)) - (-1.0 * (y3 * ((c * y4) - (a * y5)))))) + t_1;
} else if (y <= -5.6e-136) {
tmp = x * (((y * t_2) + (y2 * t_4)) - (j * t_3));
} else if (y <= 1.3e-173) {
tmp = (c * (((-1.0 * (i * t_5)) + (y0 * ((x * y2) - (y3 * z)))) - (y4 * ((t * y2) - (y * y3))))) + t_1;
} else if (y <= 420000000.0) {
tmp = -1.0 * (z * (((t * t_2) + (y3 * t_4)) - (k * t_3)));
} else if (y <= 3.3e+176) {
tmp = b * (((a * t_5) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
} else {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)) t_2 = (a * b) - (c * i) t_3 = (b * y0) - (i * y1) t_4 = (c * y0) - (a * y1) t_5 = (x * y) - (t * z) tmp = 0 if y <= -2.35e+151: tmp = (y * (((-1.0 * (k * ((b * y4) - (i * y5)))) + (x * t_2)) - (-1.0 * (y3 * ((c * y4) - (a * y5)))))) + t_1 elif y <= -5.6e-136: tmp = x * (((y * t_2) + (y2 * t_4)) - (j * t_3)) elif y <= 1.3e-173: tmp = (c * (((-1.0 * (i * t_5)) + (y0 * ((x * y2) - (y3 * z)))) - (y4 * ((t * y2) - (y * y3))))) + t_1 elif y <= 420000000.0: tmp = -1.0 * (z * (((t * t_2) + (y3 * t_4)) - (k * t_3))) elif y <= 3.3e+176: tmp = b * (((a * t_5) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z)))) else: tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) t_2 = Float64(Float64(a * b) - Float64(c * i)) t_3 = Float64(Float64(b * y0) - Float64(i * y1)) t_4 = Float64(Float64(c * y0) - Float64(a * y1)) t_5 = Float64(Float64(x * y) - Float64(t * z)) tmp = 0.0 if (y <= -2.35e+151) tmp = Float64(Float64(y * Float64(Float64(Float64(-1.0 * Float64(k * Float64(Float64(b * y4) - Float64(i * y5)))) + Float64(x * t_2)) - Float64(-1.0 * Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5)))))) + t_1); elseif (y <= -5.6e-136) tmp = Float64(x * Float64(Float64(Float64(y * t_2) + Float64(y2 * t_4)) - Float64(j * t_3))); elseif (y <= 1.3e-173) tmp = Float64(Float64(c * Float64(Float64(Float64(-1.0 * Float64(i * t_5)) + Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))) - Float64(y4 * Float64(Float64(t * y2) - Float64(y * y3))))) + t_1); elseif (y <= 420000000.0) tmp = Float64(-1.0 * Float64(z * Float64(Float64(Float64(t * t_2) + Float64(y3 * t_4)) - Float64(k * t_3)))); elseif (y <= 3.3e+176) tmp = Float64(b * Float64(Float64(Float64(a * t_5) + Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); else tmp = Float64(Float64(c * Float64(x * Float64(Float64(-1.0 * Float64(i * y)) + Float64(y0 * y2)))) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)); t_2 = (a * b) - (c * i); t_3 = (b * y0) - (i * y1); t_4 = (c * y0) - (a * y1); t_5 = (x * y) - (t * z); tmp = 0.0; if (y <= -2.35e+151) tmp = (y * (((-1.0 * (k * ((b * y4) - (i * y5)))) + (x * t_2)) - (-1.0 * (y3 * ((c * y4) - (a * y5)))))) + t_1; elseif (y <= -5.6e-136) tmp = x * (((y * t_2) + (y2 * t_4)) - (j * t_3)); elseif (y <= 1.3e-173) tmp = (c * (((-1.0 * (i * t_5)) + (y0 * ((x * y2) - (y3 * z)))) - (y4 * ((t * y2) - (y * y3))))) + t_1; elseif (y <= 420000000.0) tmp = -1.0 * (z * (((t * t_2) + (y3 * t_4)) - (k * t_3))); elseif (y <= 3.3e+176) tmp = b * (((a * t_5) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z)))); else tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.35e+151], N[(N[(y * N[(N[(N[(-1.0 * N[(k * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[y, -5.6e-136], N[(x * N[(N[(N[(y * t$95$2), $MachinePrecision] + N[(y2 * t$95$4), $MachinePrecision]), $MachinePrecision] - N[(j * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e-173], N[(N[(c * N[(N[(N[(-1.0 * N[(i * t$95$5), $MachinePrecision]), $MachinePrecision] + N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y4 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[y, 420000000.0], N[(-1.0 * N[(z * N[(N[(N[(t * t$95$2), $MachinePrecision] + N[(y3 * t$95$4), $MachinePrecision]), $MachinePrecision] - N[(k * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+176], N[(b * N[(N[(N[(a * t$95$5), $MachinePrecision] + N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * N[(x * N[(N[(-1.0 * N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
t_2 := a \cdot b - c \cdot i\\
t_3 := b \cdot y0 - i \cdot y1\\
t_4 := c \cdot y0 - a \cdot y1\\
t_5 := x \cdot y - t \cdot z\\
\mathbf{if}\;y \leq -2.35 \cdot 10^{+151}:\\
\;\;\;\;y \cdot \left(\left(-1 \cdot \left(k \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + x \cdot t\_2\right) - -1 \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right) + t\_1\\
\mathbf{elif}\;y \leq -5.6 \cdot 10^{-136}:\\
\;\;\;\;x \cdot \left(\left(y \cdot t\_2 + y2 \cdot t\_4\right) - j \cdot t\_3\right)\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-173}:\\
\;\;\;\;c \cdot \left(\left(-1 \cdot \left(i \cdot t\_5\right) + y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right) + t\_1\\
\mathbf{elif}\;y \leq 420000000:\\
\;\;\;\;-1 \cdot \left(z \cdot \left(\left(t \cdot t\_2 + y3 \cdot t\_4\right) - k \cdot t\_3\right)\right)\\
\mathbf{elif}\;y \leq 3.3 \cdot 10^{+176}:\\
\;\;\;\;b \cdot \left(\left(a \cdot t\_5 + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(x \cdot \left(-1 \cdot \left(i \cdot y\right) + y0 \cdot y2\right)\right) + t\_1\\
\end{array}
if y < -2.3499999999999999e151Initial program 29.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.7%
if -2.3499999999999999e151 < y < -5.6000000000000002e-136Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.5%
if -5.6000000000000002e-136 < y < 1.3e-173Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
if 1.3e-173 < y < 4.2e8Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.5%
if 4.2e8 < y < 3.3000000000000002e176Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.8%
if 3.3000000000000002e176 < y Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6437.9%
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 (- (* y4 y1) (* y5 y0)))
(t_2 (* y2 (* c (- (* x y0) (* t y4)))))
(t_3 (* (- (* k y2) (* j y3)) t_1)))
(if (<= c -1.65e+223)
t_2
(if (<= c -3.7e-144)
(+ (* a (* y1 (* y3 z))) (* (* y3 (- (/ (* k y2) y3) j)) t_1))
(if (<= c 6.9e-298)
(* -1.0 (* a (* y2 (- (* x y1) (* t y5)))))
(if (<= c 2.2e-163)
(+ (* -1.0 (* c (* y0 (* y3 z)))) t_3)
(if (<= c 5.5e-48)
(* j (* x (- (* i y1) (* b y0))))
(if (<= c 2.6e+215)
(+ (* c (* t (- (* i z) (* y2 y4)))) t_3)
t_2))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y4 * y1) - (y5 * y0);
double t_2 = y2 * (c * ((x * y0) - (t * y4)));
double t_3 = ((k * y2) - (j * y3)) * t_1;
double tmp;
if (c <= -1.65e+223) {
tmp = t_2;
} else if (c <= -3.7e-144) {
tmp = (a * (y1 * (y3 * z))) + ((y3 * (((k * y2) / y3) - j)) * t_1);
} else if (c <= 6.9e-298) {
tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5))));
} else if (c <= 2.2e-163) {
tmp = (-1.0 * (c * (y0 * (y3 * z)))) + t_3;
} else if (c <= 5.5e-48) {
tmp = j * (x * ((i * y1) - (b * y0)));
} else if (c <= 2.6e+215) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_3;
} else {
tmp = t_2;
}
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) :: t_3
real(8) :: tmp
t_1 = (y4 * y1) - (y5 * y0)
t_2 = y2 * (c * ((x * y0) - (t * y4)))
t_3 = ((k * y2) - (j * y3)) * t_1
if (c <= (-1.65d+223)) then
tmp = t_2
else if (c <= (-3.7d-144)) then
tmp = (a * (y1 * (y3 * z))) + ((y3 * (((k * y2) / y3) - j)) * t_1)
else if (c <= 6.9d-298) then
tmp = (-1.0d0) * (a * (y2 * ((x * y1) - (t * y5))))
else if (c <= 2.2d-163) then
tmp = ((-1.0d0) * (c * (y0 * (y3 * z)))) + t_3
else if (c <= 5.5d-48) then
tmp = j * (x * ((i * y1) - (b * y0)))
else if (c <= 2.6d+215) then
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y4 * y1) - (y5 * y0);
double t_2 = y2 * (c * ((x * y0) - (t * y4)));
double t_3 = ((k * y2) - (j * y3)) * t_1;
double tmp;
if (c <= -1.65e+223) {
tmp = t_2;
} else if (c <= -3.7e-144) {
tmp = (a * (y1 * (y3 * z))) + ((y3 * (((k * y2) / y3) - j)) * t_1);
} else if (c <= 6.9e-298) {
tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5))));
} else if (c <= 2.2e-163) {
tmp = (-1.0 * (c * (y0 * (y3 * z)))) + t_3;
} else if (c <= 5.5e-48) {
tmp = j * (x * ((i * y1) - (b * y0)));
} else if (c <= 2.6e+215) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (y4 * y1) - (y5 * y0) t_2 = y2 * (c * ((x * y0) - (t * y4))) t_3 = ((k * y2) - (j * y3)) * t_1 tmp = 0 if c <= -1.65e+223: tmp = t_2 elif c <= -3.7e-144: tmp = (a * (y1 * (y3 * z))) + ((y3 * (((k * y2) / y3) - j)) * t_1) elif c <= 6.9e-298: tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5)))) elif c <= 2.2e-163: tmp = (-1.0 * (c * (y0 * (y3 * z)))) + t_3 elif c <= 5.5e-48: tmp = j * (x * ((i * y1) - (b * y0))) elif c <= 2.6e+215: tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(y4 * y1) - Float64(y5 * y0)) t_2 = Float64(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) t_3 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * t_1) tmp = 0.0 if (c <= -1.65e+223) tmp = t_2; elseif (c <= -3.7e-144) tmp = Float64(Float64(a * Float64(y1 * Float64(y3 * z))) + Float64(Float64(y3 * Float64(Float64(Float64(k * y2) / y3) - j)) * t_1)); elseif (c <= 6.9e-298) tmp = Float64(-1.0 * Float64(a * Float64(y2 * Float64(Float64(x * y1) - Float64(t * y5))))); elseif (c <= 2.2e-163) tmp = Float64(Float64(-1.0 * Float64(c * Float64(y0 * Float64(y3 * z)))) + t_3); elseif (c <= 5.5e-48) tmp = Float64(j * Float64(x * Float64(Float64(i * y1) - Float64(b * y0)))); elseif (c <= 2.6e+215) tmp = Float64(Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_3); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (y4 * y1) - (y5 * y0); t_2 = y2 * (c * ((x * y0) - (t * y4))); t_3 = ((k * y2) - (j * y3)) * t_1; tmp = 0.0; if (c <= -1.65e+223) tmp = t_2; elseif (c <= -3.7e-144) tmp = (a * (y1 * (y3 * z))) + ((y3 * (((k * y2) / y3) - j)) * t_1); elseif (c <= 6.9e-298) tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5)))); elseif (c <= 2.2e-163) tmp = (-1.0 * (c * (y0 * (y3 * z)))) + t_3; elseif (c <= 5.5e-48) tmp = j * (x * ((i * y1) - (b * y0))); elseif (c <= 2.6e+215) tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, If[LessEqual[c, -1.65e+223], t$95$2, If[LessEqual[c, -3.7e-144], N[(N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y3 * N[(N[(N[(k * y2), $MachinePrecision] / y3), $MachinePrecision] - j), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 6.9e-298], N[(-1.0 * N[(a * N[(y2 * N[(N[(x * y1), $MachinePrecision] - N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.2e-163], N[(N[(-1.0 * N[(c * N[(y0 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision], If[LessEqual[c, 5.5e-48], N[(j * N[(x * N[(N[(i * y1), $MachinePrecision] - N[(b * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.6e+215], N[(N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
t_1 := y4 \cdot y1 - y5 \cdot y0\\
t_2 := y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\
t_3 := \left(k \cdot y2 - j \cdot y3\right) \cdot t\_1\\
\mathbf{if}\;c \leq -1.65 \cdot 10^{+223}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -3.7 \cdot 10^{-144}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) + \left(y3 \cdot \left(\frac{k \cdot y2}{y3} - j\right)\right) \cdot t\_1\\
\mathbf{elif}\;c \leq 6.9 \cdot 10^{-298}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(y2 \cdot \left(x \cdot y1 - t \cdot y5\right)\right)\right)\\
\mathbf{elif}\;c \leq 2.2 \cdot 10^{-163}:\\
\;\;\;\;-1 \cdot \left(c \cdot \left(y0 \cdot \left(y3 \cdot z\right)\right)\right) + t\_3\\
\mathbf{elif}\;c \leq 5.5 \cdot 10^{-48}:\\
\;\;\;\;j \cdot \left(x \cdot \left(i \cdot y1 - b \cdot y0\right)\right)\\
\mathbf{elif}\;c \leq 2.6 \cdot 10^{+215}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
if c < -1.65e223 or 2.6e215 < c Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -1.65e223 < c < -3.7000000000000003e-144Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.8%
Applied rewrites34.8%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6436.4%
Applied rewrites36.4%
if -3.7000000000000003e-144 < c < 6.9000000000000002e-298Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
if 6.9000000000000002e-298 < c < 2.2000000000000001e-163Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.8%
Applied rewrites34.8%
if 2.2000000000000001e-163 < c < 5.5000000000000005e-48Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 5.5000000000000005e-48 < c < 2.6e215Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1
(*
b
(-
(+ (* a (- (* x y) (* t z))) (* y4 (- (* j t) (* k y))))
(* y0 (- (* j x) (* k z)))))))
(if (<= b -4.3e+167)
t_1
(if (<= b 6.8e-131)
(+
(* c (* t (- (* i z) (* y2 y4))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
(if (<= b 8.6e+60)
(*
x
(-
(+ (* y (- (* a b) (* c i))) (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* 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 = b * (((a * ((x * y) - (t * z))) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
double tmp;
if (b <= -4.3e+167) {
tmp = t_1;
} else if (b <= 6.8e-131) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
} else if (b <= 8.6e+60) {
tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (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 = b * (((a * ((x * y) - (t * z))) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))))
if (b <= (-4.3d+167)) then
tmp = t_1
else if (b <= 6.8d-131) then
tmp = (c * (t * ((i * z) - (y2 * y4)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
else if (b <= 8.6d+60) then
tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (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 = b * (((a * ((x * y) - (t * z))) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
double tmp;
if (b <= -4.3e+167) {
tmp = t_1;
} else if (b <= 6.8e-131) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
} else if (b <= 8.6e+60) {
tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (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 = b * (((a * ((x * y) - (t * z))) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z)))) tmp = 0 if b <= -4.3e+167: tmp = t_1 elif b <= 6.8e-131: tmp = (c * (t * ((i * z) - (y2 * y4)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))) elif b <= 8.6e+60: tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (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(b * Float64(Float64(Float64(a * Float64(Float64(x * y) - Float64(t * z))) + Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))) tmp = 0.0 if (b <= -4.3e+167) tmp = t_1; elseif (b <= 6.8e-131) tmp = Float64(Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))); elseif (b <= 8.6e+60) tmp = Float64(x * Float64(Float64(Float64(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))))); 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 * (((a * ((x * y) - (t * z))) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z)))); tmp = 0.0; if (b <= -4.3e+167) tmp = t_1; elseif (b <= 6.8e-131) tmp = (c * (t * ((i * z) - (y2 * y4)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); elseif (b <= 8.6e+60) tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (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[(b * N[(N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.3e+167], t$95$1, If[LessEqual[b, 6.8e-131], N[(N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8.6e+60], N[(x * N[(N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $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], t$95$1]]]]
\begin{array}{l}
t_1 := b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{if}\;b \leq -4.3 \cdot 10^{+167}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 6.8 \cdot 10^{-131}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{elif}\;b \leq 8.6 \cdot 10^{+60}:\\
\;\;\;\;x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -4.3000000000000002e167 or 8.5999999999999994e60 < b Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.8%
if -4.3000000000000002e167 < b < 6.7999999999999999e-131Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if 6.7999999999999999e-131 < b < 8.5999999999999994e60Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.5%
(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)) (- (* y4 y1) (* y5 y0)))))
(if (<= t -2.1e+182)
(* j (* y5 (+ (* -1.0 (* i t)) (* y0 y3))))
(if (<= t -1.22e+39)
(* y2 (* t (- (* a y5) (* c y4))))
(if (<= t -1.35e-186)
(+ (* c (* x (+ (* -1.0 (* i y)) (* y0 y2)))) t_1)
(if (<= t 2.2e-204)
(* y2 (* x (- (* c y0) (* a y1))))
(if (<= t 1.7e+239)
(+ (* c (* t (- (* i z) (* y2 y4)))) t_1)
(* b (* j (* x (- (/ (* t y4) x) y0)))))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (t <= -2.1e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -1.22e+39) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (t <= -1.35e-186) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + t_1;
} else if (t <= 2.2e-204) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 1.7e+239) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_1;
} else {
tmp = b * (j * (x * (((t * y4) / x) - y0)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
if (t <= (-2.1d+182)) then
tmp = j * (y5 * (((-1.0d0) * (i * t)) + (y0 * y3)))
else if (t <= (-1.22d+39)) then
tmp = y2 * (t * ((a * y5) - (c * y4)))
else if (t <= (-1.35d-186)) then
tmp = (c * (x * (((-1.0d0) * (i * y)) + (y0 * y2)))) + t_1
else if (t <= 2.2d-204) then
tmp = y2 * (x * ((c * y0) - (a * y1)))
else if (t <= 1.7d+239) then
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_1
else
tmp = b * (j * (x * (((t * y4) / x) - y0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (t <= -2.1e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -1.22e+39) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (t <= -1.35e-186) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + t_1;
} else if (t <= 2.2e-204) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 1.7e+239) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_1;
} else {
tmp = b * (j * (x * (((t * y4) / x) - y0)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)) tmp = 0 if t <= -2.1e+182: tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))) elif t <= -1.22e+39: tmp = y2 * (t * ((a * y5) - (c * y4))) elif t <= -1.35e-186: tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + t_1 elif t <= 2.2e-204: tmp = y2 * (x * ((c * y0) - (a * y1))) elif t <= 1.7e+239: tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_1 else: tmp = b * (j * (x * (((t * y4) / x) - y0))) 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(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (t <= -2.1e+182) tmp = Float64(j * Float64(y5 * Float64(Float64(-1.0 * Float64(i * t)) + Float64(y0 * y3)))); elseif (t <= -1.22e+39) tmp = Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))); elseif (t <= -1.35e-186) tmp = Float64(Float64(c * Float64(x * Float64(Float64(-1.0 * Float64(i * y)) + Float64(y0 * y2)))) + t_1); elseif (t <= 2.2e-204) tmp = Float64(y2 * Float64(x * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (t <= 1.7e+239) tmp = Float64(Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_1); else tmp = Float64(b * Float64(j * Float64(x * Float64(Float64(Float64(t * y4) / x) - y0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)); tmp = 0.0; if (t <= -2.1e+182) tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))); elseif (t <= -1.22e+39) tmp = y2 * (t * ((a * y5) - (c * y4))); elseif (t <= -1.35e-186) tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + t_1; elseif (t <= 2.2e-204) tmp = y2 * (x * ((c * y0) - (a * y1))); elseif (t <= 1.7e+239) tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_1; else tmp = b * (j * (x * (((t * y4) / x) - y0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+182], N[(j * N[(y5 * N[(N[(-1.0 * N[(i * t), $MachinePrecision]), $MachinePrecision] + N[(y0 * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.22e+39], N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e-186], N[(N[(c * N[(x * N[(N[(-1.0 * N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 2.2e-204], N[(y2 * N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e+239], N[(N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(b * N[(j * N[(x * N[(N[(N[(t * y4), $MachinePrecision] / x), $MachinePrecision] - y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+182}:\\
\;\;\;\;j \cdot \left(y5 \cdot \left(-1 \cdot \left(i \cdot t\right) + y0 \cdot y3\right)\right)\\
\mathbf{elif}\;t \leq -1.22 \cdot 10^{+39}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-186}:\\
\;\;\;\;c \cdot \left(x \cdot \left(-1 \cdot \left(i \cdot y\right) + y0 \cdot y2\right)\right) + t\_1\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-204}:\\
\;\;\;\;y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+239}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(j \cdot \left(x \cdot \left(\frac{t \cdot y4}{x} - y0\right)\right)\right)\\
\end{array}
if t < -2.0999999999999999e182Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -2.0999999999999999e182 < t < -1.22e39Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if -1.22e39 < t < -1.3499999999999999e-186Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6437.9%
Applied rewrites37.9%
if -1.3499999999999999e-186 < t < 2.1999999999999998e-204Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 2.1999999999999998e-204 < t < 1.7e239Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if 1.7e239 < t Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6428.6%
Applied rewrites28.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1
(*
b
(-
(+ (* a (- (* x y) (* t z))) (* y4 (- (* j t) (* k y))))
(* y0 (- (* j x) (* k z))))))
(t_2 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
(if (<= b -4.3e+167)
t_1
(if (<= b 1.55e-128)
(+ (* c (* t (- (* i z) (* y2 y4)))) t_2)
(if (<= b 5.7e+60)
(+ (* c (* x (+ (* -1.0 (* i y)) (* y0 y2)))) 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 = b * (((a * ((x * y) - (t * z))) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (b <= -4.3e+167) {
tmp = t_1;
} else if (b <= 1.55e-128) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_2;
} else if (b <= 5.7e+60) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + 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 = b * (((a * ((x * y) - (t * z))) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))))
t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
if (b <= (-4.3d+167)) then
tmp = t_1
else if (b <= 1.55d-128) then
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_2
else if (b <= 5.7d+60) then
tmp = (c * (x * (((-1.0d0) * (i * y)) + (y0 * y2)))) + 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 = b * (((a * ((x * y) - (t * z))) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (b <= -4.3e+167) {
tmp = t_1;
} else if (b <= 1.55e-128) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_2;
} else if (b <= 5.7e+60) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + 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 = b * (((a * ((x * y) - (t * z))) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z)))) t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)) tmp = 0 if b <= -4.3e+167: tmp = t_1 elif b <= 1.55e-128: tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_2 elif b <= 5.7e+60: tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + 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(b * Float64(Float64(Float64(a * Float64(Float64(x * y) - Float64(t * z))) + Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))) t_2 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (b <= -4.3e+167) tmp = t_1; elseif (b <= 1.55e-128) tmp = Float64(Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_2); elseif (b <= 5.7e+60) tmp = Float64(Float64(c * Float64(x * Float64(Float64(-1.0 * Float64(i * y)) + Float64(y0 * y2)))) + 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 = b * (((a * ((x * y) - (t * z))) + (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z)))); t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)); tmp = 0.0; if (b <= -4.3e+167) tmp = t_1; elseif (b <= 1.55e-128) tmp = (c * (t * ((i * z) - (y2 * y4)))) + t_2; elseif (b <= 5.7e+60) tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + 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[(b * N[(N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.3e+167], t$95$1, If[LessEqual[b, 1.55e-128], N[(N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, 5.7e+60], N[(N[(c * N[(x * N[(N[(-1.0 * N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := b \cdot \left(\left(a \cdot \left(x \cdot y - t \cdot z\right) + y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
t_2 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;b \leq -4.3 \cdot 10^{+167}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.55 \cdot 10^{-128}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_2\\
\mathbf{elif}\;b \leq 5.7 \cdot 10^{+60}:\\
\;\;\;\;c \cdot \left(x \cdot \left(-1 \cdot \left(i \cdot y\right) + y0 \cdot y2\right)\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -4.3000000000000002e167 or 5.6999999999999998e60 < b Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.8%
if -4.3000000000000002e167 < b < 1.55e-128Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
if 1.55e-128 < b < 5.6999999999999998e60Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6437.9%
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 (* y2 (* c (- (* x y0) (* t y4)))))
(t_2 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
(if (<= c -1.65e+223)
t_1
(if (<= c -3.7e-144)
(+ (* a (* y1 (* y3 z))) t_2)
(if (<= c 6.9e-298)
(* -1.0 (* a (* y2 (- (* x y1) (* t y5)))))
(if (<= c 2.2e-163)
(+ (* -1.0 (* c (* y0 (* y3 z)))) t_2)
(if (<= c 5.5e-48)
(* j (* x (- (* i y1) (* b y0))))
(if (<= c 2.6e+215)
(+ (* c (* t (- (* i z) (* y2 y4)))) 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 = y2 * (c * ((x * y0) - (t * y4)));
double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (c <= -1.65e+223) {
tmp = t_1;
} else if (c <= -3.7e-144) {
tmp = (a * (y1 * (y3 * z))) + t_2;
} else if (c <= 6.9e-298) {
tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5))));
} else if (c <= 2.2e-163) {
tmp = (-1.0 * (c * (y0 * (y3 * z)))) + t_2;
} else if (c <= 5.5e-48) {
tmp = j * (x * ((i * y1) - (b * y0)));
} else if (c <= 2.6e+215) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + 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 = y2 * (c * ((x * y0) - (t * y4)))
t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
if (c <= (-1.65d+223)) then
tmp = t_1
else if (c <= (-3.7d-144)) then
tmp = (a * (y1 * (y3 * z))) + t_2
else if (c <= 6.9d-298) then
tmp = (-1.0d0) * (a * (y2 * ((x * y1) - (t * y5))))
else if (c <= 2.2d-163) then
tmp = ((-1.0d0) * (c * (y0 * (y3 * z)))) + t_2
else if (c <= 5.5d-48) then
tmp = j * (x * ((i * y1) - (b * y0)))
else if (c <= 2.6d+215) then
tmp = (c * (t * ((i * z) - (y2 * y4)))) + 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 = y2 * (c * ((x * y0) - (t * y4)));
double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (c <= -1.65e+223) {
tmp = t_1;
} else if (c <= -3.7e-144) {
tmp = (a * (y1 * (y3 * z))) + t_2;
} else if (c <= 6.9e-298) {
tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5))));
} else if (c <= 2.2e-163) {
tmp = (-1.0 * (c * (y0 * (y3 * z)))) + t_2;
} else if (c <= 5.5e-48) {
tmp = j * (x * ((i * y1) - (b * y0)));
} else if (c <= 2.6e+215) {
tmp = (c * (t * ((i * z) - (y2 * y4)))) + 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 = y2 * (c * ((x * y0) - (t * y4))) t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)) tmp = 0 if c <= -1.65e+223: tmp = t_1 elif c <= -3.7e-144: tmp = (a * (y1 * (y3 * z))) + t_2 elif c <= 6.9e-298: tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5)))) elif c <= 2.2e-163: tmp = (-1.0 * (c * (y0 * (y3 * z)))) + t_2 elif c <= 5.5e-48: tmp = j * (x * ((i * y1) - (b * y0))) elif c <= 2.6e+215: tmp = (c * (t * ((i * z) - (y2 * y4)))) + 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(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) t_2 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (c <= -1.65e+223) tmp = t_1; elseif (c <= -3.7e-144) tmp = Float64(Float64(a * Float64(y1 * Float64(y3 * z))) + t_2); elseif (c <= 6.9e-298) tmp = Float64(-1.0 * Float64(a * Float64(y2 * Float64(Float64(x * y1) - Float64(t * y5))))); elseif (c <= 2.2e-163) tmp = Float64(Float64(-1.0 * Float64(c * Float64(y0 * Float64(y3 * z)))) + t_2); elseif (c <= 5.5e-48) tmp = Float64(j * Float64(x * Float64(Float64(i * y1) - Float64(b * y0)))); elseif (c <= 2.6e+215) tmp = Float64(Float64(c * Float64(t * Float64(Float64(i * z) - Float64(y2 * y4)))) + 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 = y2 * (c * ((x * y0) - (t * y4))); t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)); tmp = 0.0; if (c <= -1.65e+223) tmp = t_1; elseif (c <= -3.7e-144) tmp = (a * (y1 * (y3 * z))) + t_2; elseif (c <= 6.9e-298) tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5)))); elseif (c <= 2.2e-163) tmp = (-1.0 * (c * (y0 * (y3 * z)))) + t_2; elseif (c <= 5.5e-48) tmp = j * (x * ((i * y1) - (b * y0))); elseif (c <= 2.6e+215) tmp = (c * (t * ((i * z) - (y2 * y4)))) + 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[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.65e+223], t$95$1, If[LessEqual[c, -3.7e-144], N[(N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[c, 6.9e-298], N[(-1.0 * N[(a * N[(y2 * N[(N[(x * y1), $MachinePrecision] - N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.2e-163], N[(N[(-1.0 * N[(c * N[(y0 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[c, 5.5e-48], N[(j * N[(x * N[(N[(i * y1), $MachinePrecision] - N[(b * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.6e+215], N[(N[(c * N[(t * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
t_1 := y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\
t_2 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;c \leq -1.65 \cdot 10^{+223}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -3.7 \cdot 10^{-144}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) + t\_2\\
\mathbf{elif}\;c \leq 6.9 \cdot 10^{-298}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(y2 \cdot \left(x \cdot y1 - t \cdot y5\right)\right)\right)\\
\mathbf{elif}\;c \leq 2.2 \cdot 10^{-163}:\\
\;\;\;\;-1 \cdot \left(c \cdot \left(y0 \cdot \left(y3 \cdot z\right)\right)\right) + t\_2\\
\mathbf{elif}\;c \leq 5.5 \cdot 10^{-48}:\\
\;\;\;\;j \cdot \left(x \cdot \left(i \cdot y1 - b \cdot y0\right)\right)\\
\mathbf{elif}\;c \leq 2.6 \cdot 10^{+215}:\\
\;\;\;\;c \cdot \left(t \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if c < -1.65e223 or 2.6e215 < c Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -1.65e223 < c < -3.7000000000000003e-144Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.8%
Applied rewrites34.8%
if -3.7000000000000003e-144 < c < 6.9000000000000002e-298Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
if 6.9000000000000002e-298 < c < 2.2000000000000001e-163Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.8%
Applied rewrites34.8%
if 2.2000000000000001e-163 < c < 5.5000000000000005e-48Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 5.5000000000000005e-48 < c < 2.6e215Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.6%
Applied rewrites38.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* a b) (* c i)))
(t_2
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) t_1)
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))))
(if (<= t_2 INFINITY)
t_2
(*
-1.0
(*
z
(-
(+ (* t t_1) (* y3 (- (* c y0) (* a y1))))
(* k (- (* b y0) (* i y1)))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (a * b) - (c * i);
double t_2 = (((((((x * y) - (z * t)) * t_1) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
double tmp;
if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = -1.0 * (z * (((t * t_1) + (y3 * ((c * y0) - (a * y1)))) - (k * ((b * y0) - (i * y1)))));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (a * b) - (c * i);
double t_2 = (((((((x * y) - (z * t)) * t_1) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
double tmp;
if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = -1.0 * (z * (((t * t_1) + (y3 * ((c * y0) - (a * y1)))) - (k * ((b * y0) - (i * y1)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (a * b) - (c * i) t_2 = (((((((x * y) - (z * t)) * t_1) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))) tmp = 0 if t_2 <= math.inf: tmp = t_2 else: tmp = -1.0 * (z * (((t * t_1) + (y3 * ((c * y0) - (a * y1)))) - (k * ((b * y0) - (i * y1))))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(a * b) - Float64(c * i)) t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * t_1) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) tmp = 0.0 if (t_2 <= Inf) tmp = t_2; else tmp = Float64(-1.0 * Float64(z * Float64(Float64(Float64(t * t_1) + Float64(y3 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(k * Float64(Float64(b * y0) - Float64(i * 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) t_1 = (a * b) - (c * i); t_2 = (((((((x * y) - (z * t)) * t_1) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); tmp = 0.0; if (t_2 <= Inf) tmp = t_2; else tmp = -1.0 * (z * (((t * t_1) + (y3 * ((c * y0) - (a * y1)))) - (k * ((b * y0) - (i * y1))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, Infinity], t$95$2, N[(-1.0 * N[(z * N[(N[(N[(t * t$95$1), $MachinePrecision] + N[(y3 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := a \cdot b - c \cdot i\\
t_2 := \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot t\_1 - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;t\_2 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(z \cdot \left(\left(t \cdot t\_1 + y3 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - k \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\right)\\
\end{array}
if (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) < +inf.0Initial program 29.7%
if +inf.0 < (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.5%
(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
(+
(* c (* x (+ (* -1.0 (* i y)) (* y0 y2))))
(* t_1 (* y1 y4)))))
(if (<= x -1.7e+127)
t_2
(if (<= x -5.5e+44)
(*
y2
(- (* k (- (* y1 y4) (* y0 y5))) (* t (- (* c y4) (* a y5)))))
(if (<= x 2.8e-288)
(+
(* -1.0 (* y3 (* c (* y0 z))))
(* t_1 (- (* y4 y1) (* y5 y0))))
(if (<= x 3e-91)
(* y0 (* y3 (+ (* -1.0 (* c z)) (* j y5))))
(if (<= x 8.5e+212)
t_2
(if (<= x 4.9e+256)
(* j (* -1.0 (* y1 (- (* y3 y4) (* i x)))))
(* y0 (* y2 (+ (* -1.0 (* k y5)) (* c x))))))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (k * y2) - (j * y3);
double t_2 = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_1 * (y1 * y4));
double tmp;
if (x <= -1.7e+127) {
tmp = t_2;
} else if (x <= -5.5e+44) {
tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * y5))));
} else if (x <= 2.8e-288) {
tmp = (-1.0 * (y3 * (c * (y0 * z)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
} else if (x <= 3e-91) {
tmp = y0 * (y3 * ((-1.0 * (c * z)) + (j * y5)));
} else if (x <= 8.5e+212) {
tmp = t_2;
} else if (x <= 4.9e+256) {
tmp = j * (-1.0 * (y1 * ((y3 * y4) - (i * x))));
} else {
tmp = y0 * (y2 * ((-1.0 * (k * y5)) + (c * x)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (k * y2) - (j * y3)
t_2 = (c * (x * (((-1.0d0) * (i * y)) + (y0 * y2)))) + (t_1 * (y1 * y4))
if (x <= (-1.7d+127)) then
tmp = t_2
else if (x <= (-5.5d+44)) then
tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * y5))))
else if (x <= 2.8d-288) then
tmp = ((-1.0d0) * (y3 * (c * (y0 * z)))) + (t_1 * ((y4 * y1) - (y5 * y0)))
else if (x <= 3d-91) then
tmp = y0 * (y3 * (((-1.0d0) * (c * z)) + (j * y5)))
else if (x <= 8.5d+212) then
tmp = t_2
else if (x <= 4.9d+256) then
tmp = j * ((-1.0d0) * (y1 * ((y3 * y4) - (i * x))))
else
tmp = y0 * (y2 * (((-1.0d0) * (k * y5)) + (c * x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (k * y2) - (j * y3);
double t_2 = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_1 * (y1 * y4));
double tmp;
if (x <= -1.7e+127) {
tmp = t_2;
} else if (x <= -5.5e+44) {
tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * y5))));
} else if (x <= 2.8e-288) {
tmp = (-1.0 * (y3 * (c * (y0 * z)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
} else if (x <= 3e-91) {
tmp = y0 * (y3 * ((-1.0 * (c * z)) + (j * y5)));
} else if (x <= 8.5e+212) {
tmp = t_2;
} else if (x <= 4.9e+256) {
tmp = j * (-1.0 * (y1 * ((y3 * y4) - (i * x))));
} else {
tmp = y0 * (y2 * ((-1.0 * (k * y5)) + (c * x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (k * y2) - (j * y3) t_2 = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_1 * (y1 * y4)) tmp = 0 if x <= -1.7e+127: tmp = t_2 elif x <= -5.5e+44: tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * y5)))) elif x <= 2.8e-288: tmp = (-1.0 * (y3 * (c * (y0 * z)))) + (t_1 * ((y4 * y1) - (y5 * y0))) elif x <= 3e-91: tmp = y0 * (y3 * ((-1.0 * (c * z)) + (j * y5))) elif x <= 8.5e+212: tmp = t_2 elif x <= 4.9e+256: tmp = j * (-1.0 * (y1 * ((y3 * y4) - (i * x)))) else: tmp = y0 * (y2 * ((-1.0 * (k * y5)) + (c * x))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(k * y2) - Float64(j * y3)) t_2 = Float64(Float64(c * Float64(x * Float64(Float64(-1.0 * Float64(i * y)) + Float64(y0 * y2)))) + Float64(t_1 * Float64(y1 * y4))) tmp = 0.0 if (x <= -1.7e+127) tmp = t_2; elseif (x <= -5.5e+44) tmp = Float64(y2 * Float64(Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5))) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5))))); elseif (x <= 2.8e-288) tmp = Float64(Float64(-1.0 * Float64(y3 * Float64(c * Float64(y0 * z)))) + Float64(t_1 * Float64(Float64(y4 * y1) - Float64(y5 * y0)))); elseif (x <= 3e-91) tmp = Float64(y0 * Float64(y3 * Float64(Float64(-1.0 * Float64(c * z)) + Float64(j * y5)))); elseif (x <= 8.5e+212) tmp = t_2; elseif (x <= 4.9e+256) tmp = Float64(j * Float64(-1.0 * Float64(y1 * Float64(Float64(y3 * y4) - Float64(i * x))))); else tmp = Float64(y0 * Float64(y2 * Float64(Float64(-1.0 * Float64(k * y5)) + Float64(c * x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (k * y2) - (j * y3); t_2 = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + (t_1 * (y1 * y4)); tmp = 0.0; if (x <= -1.7e+127) tmp = t_2; elseif (x <= -5.5e+44) tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * y5)))); elseif (x <= 2.8e-288) tmp = (-1.0 * (y3 * (c * (y0 * z)))) + (t_1 * ((y4 * y1) - (y5 * y0))); elseif (x <= 3e-91) tmp = y0 * (y3 * ((-1.0 * (c * z)) + (j * y5))); elseif (x <= 8.5e+212) tmp = t_2; elseif (x <= 4.9e+256) tmp = j * (-1.0 * (y1 * ((y3 * y4) - (i * x)))); else tmp = y0 * (y2 * ((-1.0 * (k * y5)) + (c * x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * N[(x * N[(N[(-1.0 * N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.7e+127], t$95$2, If[LessEqual[x, -5.5e+44], N[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e-288], N[(N[(-1.0 * N[(y3 * N[(c * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3e-91], N[(y0 * N[(y3 * N[(N[(-1.0 * N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(j * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.5e+212], t$95$2, If[LessEqual[x, 4.9e+256], N[(j * N[(-1.0 * N[(y1 * N[(N[(y3 * y4), $MachinePrecision] - N[(i * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y0 * N[(y2 * N[(N[(-1.0 * N[(k * y5), $MachinePrecision]), $MachinePrecision] + N[(c * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
t_2 := c \cdot \left(x \cdot \left(-1 \cdot \left(i \cdot y\right) + y0 \cdot y2\right)\right) + t\_1 \cdot \left(y1 \cdot y4\right)\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{+44}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-288}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(c \cdot \left(y0 \cdot z\right)\right)\right) + t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-91}:\\
\;\;\;\;y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right)\right)\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+212}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 4.9 \cdot 10^{+256}:\\
\;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4 - i \cdot x\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y0 \cdot \left(y2 \cdot \left(-1 \cdot \left(k \cdot y5\right) + c \cdot x\right)\right)\\
\end{array}
if x < -1.6999999999999999e127 or 3.0000000000000002e-91 < x < 8.4999999999999998e212Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6437.9%
Applied rewrites37.9%
Taylor expanded in y0 around 0
lower-*.f6433.5%
Applied rewrites33.5%
if -1.6999999999999999e127 < x < -5.5000000000000001e44Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6434.3%
Applied rewrites34.3%
if -5.5000000000000001e44 < x < 2.7999999999999999e-288Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f6436.0%
Applied rewrites36.0%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower-*.f6435.6%
Applied rewrites35.6%
if 2.7999999999999999e-288 < x < 3.0000000000000002e-91Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 8.4999999999999998e212 < x < 4.9000000000000002e256Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.0%
Applied rewrites26.0%
if 4.9000000000000002e256 < x Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in k around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites32.3%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6427.0%
Applied rewrites27.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y2 (* t (- (* a y5) (* c y4)))))
(t_2 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
(if (<= t -2.1e+182)
(* j (* y5 (+ (* -1.0 (* i t)) (* y0 y3))))
(if (<= t -2.05e+29)
t_1
(if (<= t -1.6e-186)
(+ (* -1.0 (* y3 (* a (* y y5)))) t_2)
(if (<= t 2.8e-137)
(* y2 (* x (- (* c y0) (* a y1))))
(if (<= t 3.3e-72)
(* b (* y0 (- (* k z) (* j x))))
(if (<= t 5.9e+144)
(+ (* -1.0 (* c (* y0 (* y3 z)))) 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 = y2 * (t * ((a * y5) - (c * y4)));
double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (t <= -2.1e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -2.05e+29) {
tmp = t_1;
} else if (t <= -1.6e-186) {
tmp = (-1.0 * (y3 * (a * (y * y5)))) + t_2;
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 3.3e-72) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 5.9e+144) {
tmp = (-1.0 * (c * (y0 * (y3 * z)))) + 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 = y2 * (t * ((a * y5) - (c * y4)))
t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
if (t <= (-2.1d+182)) then
tmp = j * (y5 * (((-1.0d0) * (i * t)) + (y0 * y3)))
else if (t <= (-2.05d+29)) then
tmp = t_1
else if (t <= (-1.6d-186)) then
tmp = ((-1.0d0) * (y3 * (a * (y * y5)))) + t_2
else if (t <= 2.8d-137) then
tmp = y2 * (x * ((c * y0) - (a * y1)))
else if (t <= 3.3d-72) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (t <= 5.9d+144) then
tmp = ((-1.0d0) * (c * (y0 * (y3 * z)))) + 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 = y2 * (t * ((a * y5) - (c * y4)));
double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (t <= -2.1e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -2.05e+29) {
tmp = t_1;
} else if (t <= -1.6e-186) {
tmp = (-1.0 * (y3 * (a * (y * y5)))) + t_2;
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 3.3e-72) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 5.9e+144) {
tmp = (-1.0 * (c * (y0 * (y3 * z)))) + 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 = y2 * (t * ((a * y5) - (c * y4))) t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)) tmp = 0 if t <= -2.1e+182: tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))) elif t <= -2.05e+29: tmp = t_1 elif t <= -1.6e-186: tmp = (-1.0 * (y3 * (a * (y * y5)))) + t_2 elif t <= 2.8e-137: tmp = y2 * (x * ((c * y0) - (a * y1))) elif t <= 3.3e-72: tmp = b * (y0 * ((k * z) - (j * x))) elif t <= 5.9e+144: tmp = (-1.0 * (c * (y0 * (y3 * z)))) + 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(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))) t_2 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (t <= -2.1e+182) tmp = Float64(j * Float64(y5 * Float64(Float64(-1.0 * Float64(i * t)) + Float64(y0 * y3)))); elseif (t <= -2.05e+29) tmp = t_1; elseif (t <= -1.6e-186) tmp = Float64(Float64(-1.0 * Float64(y3 * Float64(a * Float64(y * y5)))) + t_2); elseif (t <= 2.8e-137) tmp = Float64(y2 * Float64(x * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (t <= 3.3e-72) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (t <= 5.9e+144) tmp = Float64(Float64(-1.0 * Float64(c * Float64(y0 * Float64(y3 * z)))) + 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 = y2 * (t * ((a * y5) - (c * y4))); t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)); tmp = 0.0; if (t <= -2.1e+182) tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))); elseif (t <= -2.05e+29) tmp = t_1; elseif (t <= -1.6e-186) tmp = (-1.0 * (y3 * (a * (y * y5)))) + t_2; elseif (t <= 2.8e-137) tmp = y2 * (x * ((c * y0) - (a * y1))); elseif (t <= 3.3e-72) tmp = b * (y0 * ((k * z) - (j * x))); elseif (t <= 5.9e+144) tmp = (-1.0 * (c * (y0 * (y3 * z)))) + 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[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+182], N[(j * N[(y5 * N[(N[(-1.0 * N[(i * t), $MachinePrecision]), $MachinePrecision] + N[(y0 * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.05e+29], t$95$1, If[LessEqual[t, -1.6e-186], N[(N[(-1.0 * N[(y3 * N[(a * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t, 2.8e-137], N[(y2 * N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e-72], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.9e+144], N[(N[(-1.0 * N[(c * N[(y0 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
t_1 := y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
t_2 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+182}:\\
\;\;\;\;j \cdot \left(y5 \cdot \left(-1 \cdot \left(i \cdot t\right) + y0 \cdot y3\right)\right)\\
\mathbf{elif}\;t \leq -2.05 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-186}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(a \cdot \left(y \cdot y5\right)\right)\right) + t\_2\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-137}:\\
\;\;\;\;y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-72}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;t \leq 5.9 \cdot 10^{+144}:\\
\;\;\;\;-1 \cdot \left(c \cdot \left(y0 \cdot \left(y3 \cdot z\right)\right)\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -2.0999999999999999e182Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -2.0999999999999999e182 < t < -2.0500000000000002e29 or 5.8999999999999999e144 < t Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if -2.0500000000000002e29 < t < -1.6e-186Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f6436.0%
Applied rewrites36.0%
if -1.6e-186 < t < 2.7999999999999999e-137Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 2.7999999999999999e-137 < t < 3.3000000000000002e-72Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 3.3000000000000002e-72 < t < 5.8999999999999999e144Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.8%
Applied rewrites34.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y2 (* c (- (* x y0) (* t y4))))))
(if (<= c -8.5e+169)
t_1
(if (<= c -1.15e-147)
(* -1.0 (* k (* y0 (- (* y2 y5) (* b z)))))
(if (<= c -3.4e-307)
(* -1.0 (* a (* y2 (- (* x y1) (* t y5)))))
(if (<= c 2.2e-163)
(* y2 (* k (- (* y1 y4) (* y0 y5))))
(if (<= c 1.35e-34)
(* j (* x (- (* i y1) (* b y0))))
(if (<= c 1.6e+49)
(* y2 (* t (- (* a y5) (* c y4))))
(if (<= c 2.1e+160)
(* b (* j (- (* t y4) (* x y0))))
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 = y2 * (c * ((x * y0) - (t * y4)));
double tmp;
if (c <= -8.5e+169) {
tmp = t_1;
} else if (c <= -1.15e-147) {
tmp = -1.0 * (k * (y0 * ((y2 * y5) - (b * z))));
} else if (c <= -3.4e-307) {
tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5))));
} else if (c <= 2.2e-163) {
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)));
} else if (c <= 1.35e-34) {
tmp = j * (x * ((i * y1) - (b * y0)));
} else if (c <= 1.6e+49) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (c <= 2.1e+160) {
tmp = b * (j * ((t * y4) - (x * y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4)))
if (c <= (-8.5d+169)) then
tmp = t_1
else if (c <= (-1.15d-147)) then
tmp = (-1.0d0) * (k * (y0 * ((y2 * y5) - (b * z))))
else if (c <= (-3.4d-307)) then
tmp = (-1.0d0) * (a * (y2 * ((x * y1) - (t * y5))))
else if (c <= 2.2d-163) then
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)))
else if (c <= 1.35d-34) then
tmp = j * (x * ((i * y1) - (b * y0)))
else if (c <= 1.6d+49) then
tmp = y2 * (t * ((a * y5) - (c * y4)))
else if (c <= 2.1d+160) then
tmp = b * (j * ((t * y4) - (x * y0)))
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 = y2 * (c * ((x * y0) - (t * y4)));
double tmp;
if (c <= -8.5e+169) {
tmp = t_1;
} else if (c <= -1.15e-147) {
tmp = -1.0 * (k * (y0 * ((y2 * y5) - (b * z))));
} else if (c <= -3.4e-307) {
tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5))));
} else if (c <= 2.2e-163) {
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)));
} else if (c <= 1.35e-34) {
tmp = j * (x * ((i * y1) - (b * y0)));
} else if (c <= 1.6e+49) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (c <= 2.1e+160) {
tmp = b * (j * ((t * y4) - (x * y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4))) tmp = 0 if c <= -8.5e+169: tmp = t_1 elif c <= -1.15e-147: tmp = -1.0 * (k * (y0 * ((y2 * y5) - (b * z)))) elif c <= -3.4e-307: tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5)))) elif c <= 2.2e-163: tmp = y2 * (k * ((y1 * y4) - (y0 * y5))) elif c <= 1.35e-34: tmp = j * (x * ((i * y1) - (b * y0))) elif c <= 1.6e+49: tmp = y2 * (t * ((a * y5) - (c * y4))) elif c <= 2.1e+160: tmp = b * (j * ((t * y4) - (x * y0))) 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(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) tmp = 0.0 if (c <= -8.5e+169) tmp = t_1; elseif (c <= -1.15e-147) tmp = Float64(-1.0 * Float64(k * Float64(y0 * Float64(Float64(y2 * y5) - Float64(b * z))))); elseif (c <= -3.4e-307) tmp = Float64(-1.0 * Float64(a * Float64(y2 * Float64(Float64(x * y1) - Float64(t * y5))))); elseif (c <= 2.2e-163) tmp = Float64(y2 * Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5)))); elseif (c <= 1.35e-34) tmp = Float64(j * Float64(x * Float64(Float64(i * y1) - Float64(b * y0)))); elseif (c <= 1.6e+49) tmp = Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))); elseif (c <= 2.1e+160) tmp = Float64(b * Float64(j * Float64(Float64(t * y4) - Float64(x * y0)))); 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 = y2 * (c * ((x * y0) - (t * y4))); tmp = 0.0; if (c <= -8.5e+169) tmp = t_1; elseif (c <= -1.15e-147) tmp = -1.0 * (k * (y0 * ((y2 * y5) - (b * z)))); elseif (c <= -3.4e-307) tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5)))); elseif (c <= 2.2e-163) tmp = y2 * (k * ((y1 * y4) - (y0 * y5))); elseif (c <= 1.35e-34) tmp = j * (x * ((i * y1) - (b * y0))); elseif (c <= 1.6e+49) tmp = y2 * (t * ((a * y5) - (c * y4))); elseif (c <= 2.1e+160) tmp = b * (j * ((t * y4) - (x * y0))); 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[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8.5e+169], t$95$1, If[LessEqual[c, -1.15e-147], N[(-1.0 * N[(k * N[(y0 * N[(N[(y2 * y5), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -3.4e-307], N[(-1.0 * N[(a * N[(y2 * N[(N[(x * y1), $MachinePrecision] - N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.2e-163], N[(y2 * N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.35e-34], N[(j * N[(x * N[(N[(i * y1), $MachinePrecision] - N[(b * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.6e+49], N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.1e+160], N[(b * N[(j * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
t_1 := y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\
\mathbf{if}\;c \leq -8.5 \cdot 10^{+169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.15 \cdot 10^{-147}:\\
\;\;\;\;-1 \cdot \left(k \cdot \left(y0 \cdot \left(y2 \cdot y5 - b \cdot z\right)\right)\right)\\
\mathbf{elif}\;c \leq -3.4 \cdot 10^{-307}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(y2 \cdot \left(x \cdot y1 - t \cdot y5\right)\right)\right)\\
\mathbf{elif}\;c \leq 2.2 \cdot 10^{-163}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{-34}:\\
\;\;\;\;j \cdot \left(x \cdot \left(i \cdot y1 - b \cdot y0\right)\right)\\
\mathbf{elif}\;c \leq 1.6 \cdot 10^{+49}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\mathbf{elif}\;c \leq 2.1 \cdot 10^{+160}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if c < -8.5000000000000004e169 or 2.1e160 < c Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -8.5000000000000004e169 < c < -1.15e-147Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -1.15e-147 < c < -3.3999999999999999e-307Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
if -3.3999999999999999e-307 < c < 2.2000000000000001e-163Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in k around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if 2.2000000000000001e-163 < c < 1.3500000000000001e-34Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 1.3500000000000001e-34 < c < 1.6000000000000001e49Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if 1.6000000000000001e49 < c < 2.1e160Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* y1 y4) (* y0 y5))))
(if (<= t -2.1e+182)
(* j (* y5 (+ (* -1.0 (* i t)) (* y0 y3))))
(if (<= t -1.05e+32)
(* y2 (* t (- (* a y5) (* c y4))))
(if (<= t -1.12e-173)
(+ (* a (* y1 (* y3 z))) (* k (* y2 t_1)))
(if (<= t 2.8e-137)
(* y2 (* x (- (* c y0) (* a y1))))
(if (<= t 7.8e-72)
(* b (* y0 (- (* k z) (* j x))))
(if (<= t 1.45e+79)
(+
(* -1.0 (* y3 (* a (* y y5))))
(* (- (* k y2) (* j y3)) (* y1 y4)))
(* y2 (- (* k t_1) (* t (- (* c y4) (* a y5)))))))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y1 * y4) - (y0 * y5);
double tmp;
if (t <= -2.1e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -1.05e+32) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (t <= -1.12e-173) {
tmp = (a * (y1 * (y3 * z))) + (k * (y2 * t_1));
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 7.8e-72) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 1.45e+79) {
tmp = (-1.0 * (y3 * (a * (y * y5)))) + (((k * y2) - (j * y3)) * (y1 * y4));
} else {
tmp = y2 * ((k * t_1) - (t * ((c * y4) - (a * 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) :: t_1
real(8) :: tmp
t_1 = (y1 * y4) - (y0 * y5)
if (t <= (-2.1d+182)) then
tmp = j * (y5 * (((-1.0d0) * (i * t)) + (y0 * y3)))
else if (t <= (-1.05d+32)) then
tmp = y2 * (t * ((a * y5) - (c * y4)))
else if (t <= (-1.12d-173)) then
tmp = (a * (y1 * (y3 * z))) + (k * (y2 * t_1))
else if (t <= 2.8d-137) then
tmp = y2 * (x * ((c * y0) - (a * y1)))
else if (t <= 7.8d-72) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (t <= 1.45d+79) then
tmp = ((-1.0d0) * (y3 * (a * (y * y5)))) + (((k * y2) - (j * y3)) * (y1 * y4))
else
tmp = y2 * ((k * t_1) - (t * ((c * y4) - (a * 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 t_1 = (y1 * y4) - (y0 * y5);
double tmp;
if (t <= -2.1e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -1.05e+32) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (t <= -1.12e-173) {
tmp = (a * (y1 * (y3 * z))) + (k * (y2 * t_1));
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 7.8e-72) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 1.45e+79) {
tmp = (-1.0 * (y3 * (a * (y * y5)))) + (((k * y2) - (j * y3)) * (y1 * y4));
} else {
tmp = y2 * ((k * t_1) - (t * ((c * y4) - (a * y5))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (y1 * y4) - (y0 * y5) tmp = 0 if t <= -2.1e+182: tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))) elif t <= -1.05e+32: tmp = y2 * (t * ((a * y5) - (c * y4))) elif t <= -1.12e-173: tmp = (a * (y1 * (y3 * z))) + (k * (y2 * t_1)) elif t <= 2.8e-137: tmp = y2 * (x * ((c * y0) - (a * y1))) elif t <= 7.8e-72: tmp = b * (y0 * ((k * z) - (j * x))) elif t <= 1.45e+79: tmp = (-1.0 * (y3 * (a * (y * y5)))) + (((k * y2) - (j * y3)) * (y1 * y4)) else: tmp = y2 * ((k * t_1) - (t * ((c * y4) - (a * y5)))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(y1 * y4) - Float64(y0 * y5)) tmp = 0.0 if (t <= -2.1e+182) tmp = Float64(j * Float64(y5 * Float64(Float64(-1.0 * Float64(i * t)) + Float64(y0 * y3)))); elseif (t <= -1.05e+32) tmp = Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))); elseif (t <= -1.12e-173) tmp = Float64(Float64(a * Float64(y1 * Float64(y3 * z))) + Float64(k * Float64(y2 * t_1))); elseif (t <= 2.8e-137) tmp = Float64(y2 * Float64(x * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (t <= 7.8e-72) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (t <= 1.45e+79) tmp = Float64(Float64(-1.0 * Float64(y3 * Float64(a * Float64(y * y5)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(y1 * y4))); else tmp = Float64(y2 * Float64(Float64(k * t_1) - Float64(t * Float64(Float64(c * y4) - Float64(a * 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) t_1 = (y1 * y4) - (y0 * y5); tmp = 0.0; if (t <= -2.1e+182) tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))); elseif (t <= -1.05e+32) tmp = y2 * (t * ((a * y5) - (c * y4))); elseif (t <= -1.12e-173) tmp = (a * (y1 * (y3 * z))) + (k * (y2 * t_1)); elseif (t <= 2.8e-137) tmp = y2 * (x * ((c * y0) - (a * y1))); elseif (t <= 7.8e-72) tmp = b * (y0 * ((k * z) - (j * x))); elseif (t <= 1.45e+79) tmp = (-1.0 * (y3 * (a * (y * y5)))) + (((k * y2) - (j * y3)) * (y1 * y4)); else tmp = y2 * ((k * t_1) - (t * ((c * y4) - (a * y5)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+182], N[(j * N[(y5 * N[(N[(-1.0 * N[(i * t), $MachinePrecision]), $MachinePrecision] + N[(y0 * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.05e+32], N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.12e-173], N[(N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(k * N[(y2 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-137], N[(y2 * N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-72], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+79], N[(N[(-1.0 * N[(y3 * N[(a * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(N[(k * t$95$1), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_1 := y1 \cdot y4 - y0 \cdot y5\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+182}:\\
\;\;\;\;j \cdot \left(y5 \cdot \left(-1 \cdot \left(i \cdot t\right) + y0 \cdot y3\right)\right)\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{+32}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-173}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) + k \cdot \left(y2 \cdot t\_1\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-137}:\\
\;\;\;\;y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-72}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+79}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(a \cdot \left(y \cdot y5\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y1 \cdot y4\right)\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(k \cdot t\_1 - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\end{array}
if t < -2.0999999999999999e182Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -2.0999999999999999e182 < t < -1.05e32Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if -1.05e32 < t < -1.12e-173Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.8%
Applied rewrites34.8%
Taylor expanded in j around 0
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6430.9%
Applied rewrites30.9%
if -1.12e-173 < t < 2.7999999999999999e-137Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 2.7999999999999999e-137 < t < 7.8000000000000004e-72Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 7.8000000000000004e-72 < t < 1.45e79Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f6436.0%
Applied rewrites36.0%
Taylor expanded in y0 around 0
lower-*.f6430.4%
Applied rewrites30.4%
if 1.45e79 < t Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6434.3%
Applied rewrites34.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* a (* y1 (* y3 z)))) (t_2 (- (* y1 y4) (* y0 y5))))
(if (<= t -2.1e+182)
(* j (* y5 (+ (* -1.0 (* i t)) (* y0 y3))))
(if (<= t -1.05e+32)
(* y2 (* t (- (* a y5) (* c y4))))
(if (<= t -1.12e-173)
(+ t_1 (* k (* y2 t_2)))
(if (<= t 2.8e-137)
(* y2 (* x (- (* c y0) (* a y1))))
(if (<= t 5.2e-59)
(* b (* y0 (- (* k z) (* j x))))
(if (<= t 1.58e+75)
(+ t_1 (* (- (* k y2) (* j y3)) (* y1 y4)))
(* y2 (- (* k t_2) (* t (- (* c y4) (* a y5)))))))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = a * (y1 * (y3 * z));
double t_2 = (y1 * y4) - (y0 * y5);
double tmp;
if (t <= -2.1e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -1.05e+32) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (t <= -1.12e-173) {
tmp = t_1 + (k * (y2 * t_2));
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 5.2e-59) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 1.58e+75) {
tmp = t_1 + (((k * y2) - (j * y3)) * (y1 * y4));
} else {
tmp = y2 * ((k * t_2) - (t * ((c * y4) - (a * 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (y1 * (y3 * z))
t_2 = (y1 * y4) - (y0 * y5)
if (t <= (-2.1d+182)) then
tmp = j * (y5 * (((-1.0d0) * (i * t)) + (y0 * y3)))
else if (t <= (-1.05d+32)) then
tmp = y2 * (t * ((a * y5) - (c * y4)))
else if (t <= (-1.12d-173)) then
tmp = t_1 + (k * (y2 * t_2))
else if (t <= 2.8d-137) then
tmp = y2 * (x * ((c * y0) - (a * y1)))
else if (t <= 5.2d-59) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (t <= 1.58d+75) then
tmp = t_1 + (((k * y2) - (j * y3)) * (y1 * y4))
else
tmp = y2 * ((k * t_2) - (t * ((c * y4) - (a * 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 t_1 = a * (y1 * (y3 * z));
double t_2 = (y1 * y4) - (y0 * y5);
double tmp;
if (t <= -2.1e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -1.05e+32) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (t <= -1.12e-173) {
tmp = t_1 + (k * (y2 * t_2));
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 5.2e-59) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 1.58e+75) {
tmp = t_1 + (((k * y2) - (j * y3)) * (y1 * y4));
} else {
tmp = y2 * ((k * t_2) - (t * ((c * y4) - (a * y5))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = a * (y1 * (y3 * z)) t_2 = (y1 * y4) - (y0 * y5) tmp = 0 if t <= -2.1e+182: tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))) elif t <= -1.05e+32: tmp = y2 * (t * ((a * y5) - (c * y4))) elif t <= -1.12e-173: tmp = t_1 + (k * (y2 * t_2)) elif t <= 2.8e-137: tmp = y2 * (x * ((c * y0) - (a * y1))) elif t <= 5.2e-59: tmp = b * (y0 * ((k * z) - (j * x))) elif t <= 1.58e+75: tmp = t_1 + (((k * y2) - (j * y3)) * (y1 * y4)) else: tmp = y2 * ((k * t_2) - (t * ((c * y4) - (a * y5)))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(a * Float64(y1 * Float64(y3 * z))) t_2 = Float64(Float64(y1 * y4) - Float64(y0 * y5)) tmp = 0.0 if (t <= -2.1e+182) tmp = Float64(j * Float64(y5 * Float64(Float64(-1.0 * Float64(i * t)) + Float64(y0 * y3)))); elseif (t <= -1.05e+32) tmp = Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))); elseif (t <= -1.12e-173) tmp = Float64(t_1 + Float64(k * Float64(y2 * t_2))); elseif (t <= 2.8e-137) tmp = Float64(y2 * Float64(x * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (t <= 5.2e-59) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (t <= 1.58e+75) tmp = Float64(t_1 + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(y1 * y4))); else tmp = Float64(y2 * Float64(Float64(k * t_2) - Float64(t * Float64(Float64(c * y4) - Float64(a * 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) t_1 = a * (y1 * (y3 * z)); t_2 = (y1 * y4) - (y0 * y5); tmp = 0.0; if (t <= -2.1e+182) tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))); elseif (t <= -1.05e+32) tmp = y2 * (t * ((a * y5) - (c * y4))); elseif (t <= -1.12e-173) tmp = t_1 + (k * (y2 * t_2)); elseif (t <= 2.8e-137) tmp = y2 * (x * ((c * y0) - (a * y1))); elseif (t <= 5.2e-59) tmp = b * (y0 * ((k * z) - (j * x))); elseif (t <= 1.58e+75) tmp = t_1 + (((k * y2) - (j * y3)) * (y1 * y4)); else tmp = y2 * ((k * t_2) - (t * ((c * y4) - (a * y5)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+182], N[(j * N[(y5 * N[(N[(-1.0 * N[(i * t), $MachinePrecision]), $MachinePrecision] + N[(y0 * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.05e+32], N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.12e-173], N[(t$95$1 + N[(k * N[(y2 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-137], N[(y2 * N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-59], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.58e+75], N[(t$95$1 + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(N[(k * t$95$2), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
t_1 := a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\
t_2 := y1 \cdot y4 - y0 \cdot y5\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+182}:\\
\;\;\;\;j \cdot \left(y5 \cdot \left(-1 \cdot \left(i \cdot t\right) + y0 \cdot y3\right)\right)\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{+32}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-173}:\\
\;\;\;\;t\_1 + k \cdot \left(y2 \cdot t\_2\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-137}:\\
\;\;\;\;y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-59}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;t \leq 1.58 \cdot 10^{+75}:\\
\;\;\;\;t\_1 + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y1 \cdot y4\right)\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(k \cdot t\_2 - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\end{array}
if t < -2.0999999999999999e182Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -2.0999999999999999e182 < t < -1.05e32Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if -1.05e32 < t < -1.12e-173Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.8%
Applied rewrites34.8%
Taylor expanded in j around 0
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6430.9%
Applied rewrites30.9%
if -1.12e-173 < t < 2.7999999999999999e-137Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 2.7999999999999999e-137 < t < 5.2e-59Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 5.2e-59 < t < 1.58e75Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.8%
Applied rewrites34.8%
Taylor expanded in y0 around 0
lower-*.f6426.2%
Applied rewrites26.2%
if 1.58e75 < t Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6434.3%
Applied rewrites34.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= t -2.1e+182)
(* j (* y5 (+ (* -1.0 (* i t)) (* y0 y3))))
(if (<= t -1.05e+32)
(* y2 (* t (- (* a y5) (* c y4))))
(if (<= t -1.12e-173)
(+ (* a (* y1 (* y3 z))) (* k (* y2 (- (* y1 y4) (* y0 y5)))))
(if (<= t 2.8e-137)
(* y2 (* x (- (* c y0) (* a y1))))
(if (<= t 2.3e-29)
(* j (* y0 (- (* y3 y5) (* b x))))
(if (<= t 4.8e+238)
(* y2 (* y4 (- (* k y1) (* c t))))
(* b (* j (* x (- (/ (* t y4) x) y0)))))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (t <= -2.1e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -1.05e+32) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (t <= -1.12e-173) {
tmp = (a * (y1 * (y3 * z))) + (k * (y2 * ((y1 * y4) - (y0 * y5))));
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 2.3e-29) {
tmp = j * (y0 * ((y3 * y5) - (b * x)));
} else if (t <= 4.8e+238) {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
} else {
tmp = b * (j * (x * (((t * y4) / x) - y0)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (t <= (-2.1d+182)) then
tmp = j * (y5 * (((-1.0d0) * (i * t)) + (y0 * y3)))
else if (t <= (-1.05d+32)) then
tmp = y2 * (t * ((a * y5) - (c * y4)))
else if (t <= (-1.12d-173)) then
tmp = (a * (y1 * (y3 * z))) + (k * (y2 * ((y1 * y4) - (y0 * y5))))
else if (t <= 2.8d-137) then
tmp = y2 * (x * ((c * y0) - (a * y1)))
else if (t <= 2.3d-29) then
tmp = j * (y0 * ((y3 * y5) - (b * x)))
else if (t <= 4.8d+238) then
tmp = y2 * (y4 * ((k * y1) - (c * t)))
else
tmp = b * (j * (x * (((t * y4) / x) - y0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (t <= -2.1e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -1.05e+32) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (t <= -1.12e-173) {
tmp = (a * (y1 * (y3 * z))) + (k * (y2 * ((y1 * y4) - (y0 * y5))));
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 2.3e-29) {
tmp = j * (y0 * ((y3 * y5) - (b * x)));
} else if (t <= 4.8e+238) {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
} else {
tmp = b * (j * (x * (((t * y4) / x) - y0)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if t <= -2.1e+182: tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))) elif t <= -1.05e+32: tmp = y2 * (t * ((a * y5) - (c * y4))) elif t <= -1.12e-173: tmp = (a * (y1 * (y3 * z))) + (k * (y2 * ((y1 * y4) - (y0 * y5)))) elif t <= 2.8e-137: tmp = y2 * (x * ((c * y0) - (a * y1))) elif t <= 2.3e-29: tmp = j * (y0 * ((y3 * y5) - (b * x))) elif t <= 4.8e+238: tmp = y2 * (y4 * ((k * y1) - (c * t))) else: tmp = b * (j * (x * (((t * y4) / x) - y0))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (t <= -2.1e+182) tmp = Float64(j * Float64(y5 * Float64(Float64(-1.0 * Float64(i * t)) + Float64(y0 * y3)))); elseif (t <= -1.05e+32) tmp = Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))); elseif (t <= -1.12e-173) tmp = Float64(Float64(a * Float64(y1 * Float64(y3 * z))) + Float64(k * Float64(y2 * Float64(Float64(y1 * y4) - Float64(y0 * y5))))); elseif (t <= 2.8e-137) tmp = Float64(y2 * Float64(x * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (t <= 2.3e-29) tmp = Float64(j * Float64(y0 * Float64(Float64(y3 * y5) - Float64(b * x)))); elseif (t <= 4.8e+238) tmp = Float64(y2 * Float64(y4 * Float64(Float64(k * y1) - Float64(c * t)))); else tmp = Float64(b * Float64(j * Float64(x * Float64(Float64(Float64(t * y4) / x) - y0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (t <= -2.1e+182) tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))); elseif (t <= -1.05e+32) tmp = y2 * (t * ((a * y5) - (c * y4))); elseif (t <= -1.12e-173) tmp = (a * (y1 * (y3 * z))) + (k * (y2 * ((y1 * y4) - (y0 * y5)))); elseif (t <= 2.8e-137) tmp = y2 * (x * ((c * y0) - (a * y1))); elseif (t <= 2.3e-29) tmp = j * (y0 * ((y3 * y5) - (b * x))); elseif (t <= 4.8e+238) tmp = y2 * (y4 * ((k * y1) - (c * t))); else tmp = b * (j * (x * (((t * y4) / x) - y0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[t, -2.1e+182], N[(j * N[(y5 * N[(N[(-1.0 * N[(i * t), $MachinePrecision]), $MachinePrecision] + N[(y0 * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.05e+32], N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.12e-173], N[(N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(k * N[(y2 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-137], N[(y2 * N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-29], N[(j * N[(y0 * N[(N[(y3 * y5), $MachinePrecision] - N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e+238], N[(y2 * N[(y4 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(j * N[(x * N[(N[(N[(t * y4), $MachinePrecision] / x), $MachinePrecision] - y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+182}:\\
\;\;\;\;j \cdot \left(y5 \cdot \left(-1 \cdot \left(i \cdot t\right) + y0 \cdot y3\right)\right)\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{+32}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-173}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) + k \cdot \left(y2 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-137}:\\
\;\;\;\;y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-29}:\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+238}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(j \cdot \left(x \cdot \left(\frac{t \cdot y4}{x} - y0\right)\right)\right)\\
\end{array}
if t < -2.0999999999999999e182Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -2.0999999999999999e182 < t < -1.05e32Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if -1.05e32 < t < -1.12e-173Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.8%
Applied rewrites34.8%
Taylor expanded in j around 0
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6430.9%
Applied rewrites30.9%
if -1.12e-173 < t < 2.7999999999999999e-137Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 2.7999999999999999e-137 < t < 2.2999999999999999e-29Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
if 2.2999999999999999e-29 < t < 4.8e238Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
if 4.8e238 < t Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6428.6%
Applied rewrites28.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y2 (* c (- (* x y0) (* t y4)))))
(t_2 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
(if (<= c -1.65e+223)
t_1
(if (<= c -3.7e-144)
(+ (* a (* y1 (* y3 z))) t_2)
(if (<= c 6.9e-298)
(* -1.0 (* a (* y2 (- (* x y1) (* t y5)))))
(if (<= c 2e-170)
(+ (* -1.0 (* c (* y0 (* y3 z)))) t_2)
(if (<= c 2.8e+157)
(* b (* j (* x (- (/ (* t y4) x) y0))))
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 = y2 * (c * ((x * y0) - (t * y4)));
double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (c <= -1.65e+223) {
tmp = t_1;
} else if (c <= -3.7e-144) {
tmp = (a * (y1 * (y3 * z))) + t_2;
} else if (c <= 6.9e-298) {
tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5))));
} else if (c <= 2e-170) {
tmp = (-1.0 * (c * (y0 * (y3 * z)))) + t_2;
} else if (c <= 2.8e+157) {
tmp = b * (j * (x * (((t * y4) / x) - y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4)))
t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
if (c <= (-1.65d+223)) then
tmp = t_1
else if (c <= (-3.7d-144)) then
tmp = (a * (y1 * (y3 * z))) + t_2
else if (c <= 6.9d-298) then
tmp = (-1.0d0) * (a * (y2 * ((x * y1) - (t * y5))))
else if (c <= 2d-170) then
tmp = ((-1.0d0) * (c * (y0 * (y3 * z)))) + t_2
else if (c <= 2.8d+157) then
tmp = b * (j * (x * (((t * y4) / x) - y0)))
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 = y2 * (c * ((x * y0) - (t * y4)));
double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (c <= -1.65e+223) {
tmp = t_1;
} else if (c <= -3.7e-144) {
tmp = (a * (y1 * (y3 * z))) + t_2;
} else if (c <= 6.9e-298) {
tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5))));
} else if (c <= 2e-170) {
tmp = (-1.0 * (c * (y0 * (y3 * z)))) + t_2;
} else if (c <= 2.8e+157) {
tmp = b * (j * (x * (((t * y4) / x) - y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4))) t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)) tmp = 0 if c <= -1.65e+223: tmp = t_1 elif c <= -3.7e-144: tmp = (a * (y1 * (y3 * z))) + t_2 elif c <= 6.9e-298: tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5)))) elif c <= 2e-170: tmp = (-1.0 * (c * (y0 * (y3 * z)))) + t_2 elif c <= 2.8e+157: tmp = b * (j * (x * (((t * y4) / x) - y0))) 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(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) t_2 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (c <= -1.65e+223) tmp = t_1; elseif (c <= -3.7e-144) tmp = Float64(Float64(a * Float64(y1 * Float64(y3 * z))) + t_2); elseif (c <= 6.9e-298) tmp = Float64(-1.0 * Float64(a * Float64(y2 * Float64(Float64(x * y1) - Float64(t * y5))))); elseif (c <= 2e-170) tmp = Float64(Float64(-1.0 * Float64(c * Float64(y0 * Float64(y3 * z)))) + t_2); elseif (c <= 2.8e+157) tmp = Float64(b * Float64(j * Float64(x * Float64(Float64(Float64(t * y4) / x) - y0)))); 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 = y2 * (c * ((x * y0) - (t * y4))); t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)); tmp = 0.0; if (c <= -1.65e+223) tmp = t_1; elseif (c <= -3.7e-144) tmp = (a * (y1 * (y3 * z))) + t_2; elseif (c <= 6.9e-298) tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5)))); elseif (c <= 2e-170) tmp = (-1.0 * (c * (y0 * (y3 * z)))) + t_2; elseif (c <= 2.8e+157) tmp = b * (j * (x * (((t * y4) / x) - y0))); 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[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.65e+223], t$95$1, If[LessEqual[c, -3.7e-144], N[(N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[c, 6.9e-298], N[(-1.0 * N[(a * N[(y2 * N[(N[(x * y1), $MachinePrecision] - N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2e-170], N[(N[(-1.0 * N[(c * N[(y0 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[c, 2.8e+157], N[(b * N[(j * N[(x * N[(N[(N[(t * y4), $MachinePrecision] / x), $MachinePrecision] - y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
t_1 := y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\
t_2 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;c \leq -1.65 \cdot 10^{+223}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -3.7 \cdot 10^{-144}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) + t\_2\\
\mathbf{elif}\;c \leq 6.9 \cdot 10^{-298}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(y2 \cdot \left(x \cdot y1 - t \cdot y5\right)\right)\right)\\
\mathbf{elif}\;c \leq 2 \cdot 10^{-170}:\\
\;\;\;\;-1 \cdot \left(c \cdot \left(y0 \cdot \left(y3 \cdot z\right)\right)\right) + t\_2\\
\mathbf{elif}\;c \leq 2.8 \cdot 10^{+157}:\\
\;\;\;\;b \cdot \left(j \cdot \left(x \cdot \left(\frac{t \cdot y4}{x} - y0\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if c < -1.65e223 or 2.8000000000000003e157 < c Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -1.65e223 < c < -3.7000000000000003e-144Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.8%
Applied rewrites34.8%
if -3.7000000000000003e-144 < c < 6.9000000000000002e-298Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
if 6.9000000000000002e-298 < c < 2e-170Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.8%
Applied rewrites34.8%
if 2e-170 < c < 2.8000000000000003e157Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6428.6%
Applied rewrites28.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1
(*
y2
(-
(* k (- (* y1 y4) (* y0 y5)))
(* t (- (* c y4) (* a y5))))))
(t_2 (* (- (* k y2) (* j y3)) (* y1 y4))))
(if (<= t -1.95e+182)
(* j (* y5 (+ (* -1.0 (* i t)) (* y0 y3))))
(if (<= t -7.4e-22)
t_1
(if (<= t -3.3e-222)
(+ (* c (* x (+ (* -1.0 (* i y)) (* y0 y2)))) t_2)
(if (<= t 7.8e-72)
(* b (* y0 (- (* k z) (* j x))))
(if (<= t 1.45e+79)
(+ (* -1.0 (* y3 (* a (* y y5)))) 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 = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * y5))));
double t_2 = ((k * y2) - (j * y3)) * (y1 * y4);
double tmp;
if (t <= -1.95e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -7.4e-22) {
tmp = t_1;
} else if (t <= -3.3e-222) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + t_2;
} else if (t <= 7.8e-72) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 1.45e+79) {
tmp = (-1.0 * (y3 * (a * (y * y5)))) + 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 = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * y5))))
t_2 = ((k * y2) - (j * y3)) * (y1 * y4)
if (t <= (-1.95d+182)) then
tmp = j * (y5 * (((-1.0d0) * (i * t)) + (y0 * y3)))
else if (t <= (-7.4d-22)) then
tmp = t_1
else if (t <= (-3.3d-222)) then
tmp = (c * (x * (((-1.0d0) * (i * y)) + (y0 * y2)))) + t_2
else if (t <= 7.8d-72) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (t <= 1.45d+79) then
tmp = ((-1.0d0) * (y3 * (a * (y * y5)))) + 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 = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * y5))));
double t_2 = ((k * y2) - (j * y3)) * (y1 * y4);
double tmp;
if (t <= -1.95e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -7.4e-22) {
tmp = t_1;
} else if (t <= -3.3e-222) {
tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + t_2;
} else if (t <= 7.8e-72) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 1.45e+79) {
tmp = (-1.0 * (y3 * (a * (y * y5)))) + 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 = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * y5)))) t_2 = ((k * y2) - (j * y3)) * (y1 * y4) tmp = 0 if t <= -1.95e+182: tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))) elif t <= -7.4e-22: tmp = t_1 elif t <= -3.3e-222: tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + t_2 elif t <= 7.8e-72: tmp = b * (y0 * ((k * z) - (j * x))) elif t <= 1.45e+79: tmp = (-1.0 * (y3 * (a * (y * y5)))) + 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(y2 * Float64(Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5))) - Float64(t * Float64(Float64(c * y4) - Float64(a * y5))))) t_2 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(y1 * y4)) tmp = 0.0 if (t <= -1.95e+182) tmp = Float64(j * Float64(y5 * Float64(Float64(-1.0 * Float64(i * t)) + Float64(y0 * y3)))); elseif (t <= -7.4e-22) tmp = t_1; elseif (t <= -3.3e-222) tmp = Float64(Float64(c * Float64(x * Float64(Float64(-1.0 * Float64(i * y)) + Float64(y0 * y2)))) + t_2); elseif (t <= 7.8e-72) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (t <= 1.45e+79) tmp = Float64(Float64(-1.0 * Float64(y3 * Float64(a * Float64(y * y5)))) + 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 = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * y5)))); t_2 = ((k * y2) - (j * y3)) * (y1 * y4); tmp = 0.0; if (t <= -1.95e+182) tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))); elseif (t <= -7.4e-22) tmp = t_1; elseif (t <= -3.3e-222) tmp = (c * (x * ((-1.0 * (i * y)) + (y0 * y2)))) + t_2; elseif (t <= 7.8e-72) tmp = b * (y0 * ((k * z) - (j * x))); elseif (t <= 1.45e+79) tmp = (-1.0 * (y3 * (a * (y * y5)))) + 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[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.95e+182], N[(j * N[(y5 * N[(N[(-1.0 * N[(i * t), $MachinePrecision]), $MachinePrecision] + N[(y0 * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.4e-22], t$95$1, If[LessEqual[t, -3.3e-222], N[(N[(c * N[(x * N[(N[(-1.0 * N[(i * y), $MachinePrecision]), $MachinePrecision] + N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[t, 7.8e-72], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+79], N[(N[(-1.0 * N[(y3 * N[(a * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
t_1 := y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
t_2 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y1 \cdot y4\right)\\
\mathbf{if}\;t \leq -1.95 \cdot 10^{+182}:\\
\;\;\;\;j \cdot \left(y5 \cdot \left(-1 \cdot \left(i \cdot t\right) + y0 \cdot y3\right)\right)\\
\mathbf{elif}\;t \leq -7.4 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{-222}:\\
\;\;\;\;c \cdot \left(x \cdot \left(-1 \cdot \left(i \cdot y\right) + y0 \cdot y2\right)\right) + t\_2\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-72}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+79}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(a \cdot \left(y \cdot y5\right)\right)\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -1.9499999999999999e182Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -1.9499999999999999e182 < t < -7.4e-22 or 1.45e79 < t Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6434.3%
Applied rewrites34.3%
if -7.4e-22 < t < -3.3e-222Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6437.9%
Applied rewrites37.9%
Taylor expanded in y0 around 0
lower-*.f6433.5%
Applied rewrites33.5%
if -3.3e-222 < t < 7.8000000000000004e-72Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 7.8000000000000004e-72 < t < 1.45e79Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f6436.0%
Applied rewrites36.0%
Taylor expanded in y0 around 0
lower-*.f6430.4%
Applied rewrites30.4%
(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 (<= t -7e+126)
(* j (* t (- (* b y4) (* i y5))))
(if (<= t -1.35e-185)
(+ (* a (* y1 (* y3 z))) (* t_1 (- (* y4 y1) (* y5 y0))))
(if (<= t 2.8e-137)
(* y2 (* x (- (* c y0) (* a y1))))
(if (<= t 7.8e-72)
(* b (* y0 (- (* k z) (* j x))))
(if (<= t 1.45e+79)
(+ (* -1.0 (* y3 (* a (* y y5)))) (* t_1 (* y1 y4)))
(*
y2
(-
(* k (- (* y1 y4) (* y0 y5)))
(* t (- (* c y4) (* a y5))))))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (k * y2) - (j * y3);
double tmp;
if (t <= -7e+126) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (t <= -1.35e-185) {
tmp = (a * (y1 * (y3 * z))) + (t_1 * ((y4 * y1) - (y5 * y0)));
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 7.8e-72) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 1.45e+79) {
tmp = (-1.0 * (y3 * (a * (y * y5)))) + (t_1 * (y1 * y4));
} else {
tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * 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) :: t_1
real(8) :: tmp
t_1 = (k * y2) - (j * y3)
if (t <= (-7d+126)) then
tmp = j * (t * ((b * y4) - (i * y5)))
else if (t <= (-1.35d-185)) then
tmp = (a * (y1 * (y3 * z))) + (t_1 * ((y4 * y1) - (y5 * y0)))
else if (t <= 2.8d-137) then
tmp = y2 * (x * ((c * y0) - (a * y1)))
else if (t <= 7.8d-72) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (t <= 1.45d+79) then
tmp = ((-1.0d0) * (y3 * (a * (y * y5)))) + (t_1 * (y1 * y4))
else
tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * 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 t_1 = (k * y2) - (j * y3);
double tmp;
if (t <= -7e+126) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (t <= -1.35e-185) {
tmp = (a * (y1 * (y3 * z))) + (t_1 * ((y4 * y1) - (y5 * y0)));
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 7.8e-72) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 1.45e+79) {
tmp = (-1.0 * (y3 * (a * (y * y5)))) + (t_1 * (y1 * y4));
} else {
tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * y5))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (k * y2) - (j * y3) tmp = 0 if t <= -7e+126: tmp = j * (t * ((b * y4) - (i * y5))) elif t <= -1.35e-185: tmp = (a * (y1 * (y3 * z))) + (t_1 * ((y4 * y1) - (y5 * y0))) elif t <= 2.8e-137: tmp = y2 * (x * ((c * y0) - (a * y1))) elif t <= 7.8e-72: tmp = b * (y0 * ((k * z) - (j * x))) elif t <= 1.45e+79: tmp = (-1.0 * (y3 * (a * (y * y5)))) + (t_1 * (y1 * y4)) else: tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * y5)))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(k * y2) - Float64(j * y3)) tmp = 0.0 if (t <= -7e+126) tmp = Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))); elseif (t <= -1.35e-185) tmp = Float64(Float64(a * Float64(y1 * Float64(y3 * z))) + Float64(t_1 * Float64(Float64(y4 * y1) - Float64(y5 * y0)))); elseif (t <= 2.8e-137) tmp = Float64(y2 * Float64(x * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (t <= 7.8e-72) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (t <= 1.45e+79) tmp = Float64(Float64(-1.0 * Float64(y3 * Float64(a * Float64(y * y5)))) + Float64(t_1 * Float64(y1 * y4))); else tmp = Float64(y2 * Float64(Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5))) - Float64(t * Float64(Float64(c * y4) - Float64(a * 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) t_1 = (k * y2) - (j * y3); tmp = 0.0; if (t <= -7e+126) tmp = j * (t * ((b * y4) - (i * y5))); elseif (t <= -1.35e-185) tmp = (a * (y1 * (y3 * z))) + (t_1 * ((y4 * y1) - (y5 * y0))); elseif (t <= 2.8e-137) tmp = y2 * (x * ((c * y0) - (a * y1))); elseif (t <= 7.8e-72) tmp = b * (y0 * ((k * z) - (j * x))); elseif (t <= 1.45e+79) tmp = (-1.0 * (y3 * (a * (y * y5)))) + (t_1 * (y1 * y4)); else tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) - (t * ((c * y4) - (a * y5)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e+126], N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e-185], N[(N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-137], N[(y2 * N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-72], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+79], N[(N[(-1.0 * N[(y3 * N[(a * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
\mathbf{if}\;t \leq -7 \cdot 10^{+126}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-185}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) + t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-137}:\\
\;\;\;\;y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-72}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+79}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(a \cdot \left(y \cdot y5\right)\right)\right) + t\_1 \cdot \left(y1 \cdot y4\right)\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) - t \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\end{array}
if t < -7.0000000000000005e126Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0%
Applied rewrites27.0%
if -7.0000000000000005e126 < t < -1.3499999999999999e-185Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.8%
Applied rewrites34.8%
if -1.3499999999999999e-185 < t < 2.7999999999999999e-137Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 2.7999999999999999e-137 < t < 7.8000000000000004e-72Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 7.8000000000000004e-72 < t < 1.45e79Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f6436.0%
Applied rewrites36.0%
Taylor expanded in y0 around 0
lower-*.f6430.4%
Applied rewrites30.4%
if 1.45e79 < t Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in x around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6434.3%
Applied rewrites34.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y2 (* c (- (* x y0) (* t y4)))))
(t_2 (* j (* x (- (* i y1) (* b y0))))))
(if (<= c -1.5e+17)
t_1
(if (<= c -1.4e-139)
(* (- (* b t) (* y3 y1)) (* y4 j))
(if (<= c -3.2e-286)
t_2
(if (<= c 2.2e-163)
(* y2 (* k (- (* y1 y4) (* y0 y5))))
(if (<= c 1.35e-34)
t_2
(if (<= c 1.6e+49)
(* y2 (* t (- (* a y5) (* c y4))))
(if (<= c 2.8e+157)
(* b (* j (- (* t y4) (* x y0))))
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 = y2 * (c * ((x * y0) - (t * y4)));
double t_2 = j * (x * ((i * y1) - (b * y0)));
double tmp;
if (c <= -1.5e+17) {
tmp = t_1;
} else if (c <= -1.4e-139) {
tmp = ((b * t) - (y3 * y1)) * (y4 * j);
} else if (c <= -3.2e-286) {
tmp = t_2;
} else if (c <= 2.2e-163) {
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)));
} else if (c <= 1.35e-34) {
tmp = t_2;
} else if (c <= 1.6e+49) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (c <= 2.8e+157) {
tmp = b * (j * ((t * y4) - (x * y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4)))
t_2 = j * (x * ((i * y1) - (b * y0)))
if (c <= (-1.5d+17)) then
tmp = t_1
else if (c <= (-1.4d-139)) then
tmp = ((b * t) - (y3 * y1)) * (y4 * j)
else if (c <= (-3.2d-286)) then
tmp = t_2
else if (c <= 2.2d-163) then
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)))
else if (c <= 1.35d-34) then
tmp = t_2
else if (c <= 1.6d+49) then
tmp = y2 * (t * ((a * y5) - (c * y4)))
else if (c <= 2.8d+157) then
tmp = b * (j * ((t * y4) - (x * y0)))
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 = y2 * (c * ((x * y0) - (t * y4)));
double t_2 = j * (x * ((i * y1) - (b * y0)));
double tmp;
if (c <= -1.5e+17) {
tmp = t_1;
} else if (c <= -1.4e-139) {
tmp = ((b * t) - (y3 * y1)) * (y4 * j);
} else if (c <= -3.2e-286) {
tmp = t_2;
} else if (c <= 2.2e-163) {
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)));
} else if (c <= 1.35e-34) {
tmp = t_2;
} else if (c <= 1.6e+49) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (c <= 2.8e+157) {
tmp = b * (j * ((t * y4) - (x * y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4))) t_2 = j * (x * ((i * y1) - (b * y0))) tmp = 0 if c <= -1.5e+17: tmp = t_1 elif c <= -1.4e-139: tmp = ((b * t) - (y3 * y1)) * (y4 * j) elif c <= -3.2e-286: tmp = t_2 elif c <= 2.2e-163: tmp = y2 * (k * ((y1 * y4) - (y0 * y5))) elif c <= 1.35e-34: tmp = t_2 elif c <= 1.6e+49: tmp = y2 * (t * ((a * y5) - (c * y4))) elif c <= 2.8e+157: tmp = b * (j * ((t * y4) - (x * y0))) 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(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) t_2 = Float64(j * Float64(x * Float64(Float64(i * y1) - Float64(b * y0)))) tmp = 0.0 if (c <= -1.5e+17) tmp = t_1; elseif (c <= -1.4e-139) tmp = Float64(Float64(Float64(b * t) - Float64(y3 * y1)) * Float64(y4 * j)); elseif (c <= -3.2e-286) tmp = t_2; elseif (c <= 2.2e-163) tmp = Float64(y2 * Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5)))); elseif (c <= 1.35e-34) tmp = t_2; elseif (c <= 1.6e+49) tmp = Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))); elseif (c <= 2.8e+157) tmp = Float64(b * Float64(j * Float64(Float64(t * y4) - Float64(x * y0)))); 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 = y2 * (c * ((x * y0) - (t * y4))); t_2 = j * (x * ((i * y1) - (b * y0))); tmp = 0.0; if (c <= -1.5e+17) tmp = t_1; elseif (c <= -1.4e-139) tmp = ((b * t) - (y3 * y1)) * (y4 * j); elseif (c <= -3.2e-286) tmp = t_2; elseif (c <= 2.2e-163) tmp = y2 * (k * ((y1 * y4) - (y0 * y5))); elseif (c <= 1.35e-34) tmp = t_2; elseif (c <= 1.6e+49) tmp = y2 * (t * ((a * y5) - (c * y4))); elseif (c <= 2.8e+157) tmp = b * (j * ((t * y4) - (x * y0))); 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[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(x * N[(N[(i * y1), $MachinePrecision] - N[(b * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.5e+17], t$95$1, If[LessEqual[c, -1.4e-139], N[(N[(N[(b * t), $MachinePrecision] - N[(y3 * y1), $MachinePrecision]), $MachinePrecision] * N[(y4 * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -3.2e-286], t$95$2, If[LessEqual[c, 2.2e-163], N[(y2 * N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.35e-34], t$95$2, If[LessEqual[c, 1.6e+49], N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.8e+157], N[(b * N[(j * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}
t_1 := y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\
t_2 := j \cdot \left(x \cdot \left(i \cdot y1 - b \cdot y0\right)\right)\\
\mathbf{if}\;c \leq -1.5 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.4 \cdot 10^{-139}:\\
\;\;\;\;\left(b \cdot t - y3 \cdot y1\right) \cdot \left(y4 \cdot j\right)\\
\mathbf{elif}\;c \leq -3.2 \cdot 10^{-286}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 2.2 \cdot 10^{-163}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{-34}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 1.6 \cdot 10^{+49}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\mathbf{elif}\;c \leq 2.8 \cdot 10^{+157}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if c < -1.5e17 or 2.8000000000000003e157 < c Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -1.5e17 < c < -1.3999999999999999e-139Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4%
Applied rewrites24.4%
if -1.3999999999999999e-139 < c < -3.2000000000000001e-286 or 2.2000000000000001e-163 < c < 1.3500000000000001e-34Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if -3.2000000000000001e-286 < c < 2.2000000000000001e-163Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in k around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if 1.3500000000000001e-34 < c < 1.6000000000000001e49Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if 1.6000000000000001e49 < c < 2.8000000000000003e157Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y2 (* c (- (* x y0) (* t y4))))))
(if (<= c -8.5e+169)
t_1
(if (<= c -1.15e-147)
(* -1.0 (* k (* y0 (- (* y2 y5) (* b z)))))
(if (<= c -3.4e-307)
(* -1.0 (* a (* y2 (- (* x y1) (* t y5)))))
(if (<= c 2.4e-168)
(* y2 (* k (- (* y1 y4) (* y0 y5))))
(if (<= c 2.8e+157)
(* b (* j (* x (- (/ (* t y4) x) y0))))
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 = y2 * (c * ((x * y0) - (t * y4)));
double tmp;
if (c <= -8.5e+169) {
tmp = t_1;
} else if (c <= -1.15e-147) {
tmp = -1.0 * (k * (y0 * ((y2 * y5) - (b * z))));
} else if (c <= -3.4e-307) {
tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5))));
} else if (c <= 2.4e-168) {
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)));
} else if (c <= 2.8e+157) {
tmp = b * (j * (x * (((t * y4) / x) - y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4)))
if (c <= (-8.5d+169)) then
tmp = t_1
else if (c <= (-1.15d-147)) then
tmp = (-1.0d0) * (k * (y0 * ((y2 * y5) - (b * z))))
else if (c <= (-3.4d-307)) then
tmp = (-1.0d0) * (a * (y2 * ((x * y1) - (t * y5))))
else if (c <= 2.4d-168) then
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)))
else if (c <= 2.8d+157) then
tmp = b * (j * (x * (((t * y4) / x) - y0)))
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 = y2 * (c * ((x * y0) - (t * y4)));
double tmp;
if (c <= -8.5e+169) {
tmp = t_1;
} else if (c <= -1.15e-147) {
tmp = -1.0 * (k * (y0 * ((y2 * y5) - (b * z))));
} else if (c <= -3.4e-307) {
tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5))));
} else if (c <= 2.4e-168) {
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)));
} else if (c <= 2.8e+157) {
tmp = b * (j * (x * (((t * y4) / x) - y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4))) tmp = 0 if c <= -8.5e+169: tmp = t_1 elif c <= -1.15e-147: tmp = -1.0 * (k * (y0 * ((y2 * y5) - (b * z)))) elif c <= -3.4e-307: tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5)))) elif c <= 2.4e-168: tmp = y2 * (k * ((y1 * y4) - (y0 * y5))) elif c <= 2.8e+157: tmp = b * (j * (x * (((t * y4) / x) - y0))) 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(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) tmp = 0.0 if (c <= -8.5e+169) tmp = t_1; elseif (c <= -1.15e-147) tmp = Float64(-1.0 * Float64(k * Float64(y0 * Float64(Float64(y2 * y5) - Float64(b * z))))); elseif (c <= -3.4e-307) tmp = Float64(-1.0 * Float64(a * Float64(y2 * Float64(Float64(x * y1) - Float64(t * y5))))); elseif (c <= 2.4e-168) tmp = Float64(y2 * Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5)))); elseif (c <= 2.8e+157) tmp = Float64(b * Float64(j * Float64(x * Float64(Float64(Float64(t * y4) / x) - y0)))); 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 = y2 * (c * ((x * y0) - (t * y4))); tmp = 0.0; if (c <= -8.5e+169) tmp = t_1; elseif (c <= -1.15e-147) tmp = -1.0 * (k * (y0 * ((y2 * y5) - (b * z)))); elseif (c <= -3.4e-307) tmp = -1.0 * (a * (y2 * ((x * y1) - (t * y5)))); elseif (c <= 2.4e-168) tmp = y2 * (k * ((y1 * y4) - (y0 * y5))); elseif (c <= 2.8e+157) tmp = b * (j * (x * (((t * y4) / x) - y0))); 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[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8.5e+169], t$95$1, If[LessEqual[c, -1.15e-147], N[(-1.0 * N[(k * N[(y0 * N[(N[(y2 * y5), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -3.4e-307], N[(-1.0 * N[(a * N[(y2 * N[(N[(x * y1), $MachinePrecision] - N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.4e-168], N[(y2 * N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.8e+157], N[(b * N[(j * N[(x * N[(N[(N[(t * y4), $MachinePrecision] / x), $MachinePrecision] - y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
t_1 := y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\
\mathbf{if}\;c \leq -8.5 \cdot 10^{+169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.15 \cdot 10^{-147}:\\
\;\;\;\;-1 \cdot \left(k \cdot \left(y0 \cdot \left(y2 \cdot y5 - b \cdot z\right)\right)\right)\\
\mathbf{elif}\;c \leq -3.4 \cdot 10^{-307}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(y2 \cdot \left(x \cdot y1 - t \cdot y5\right)\right)\right)\\
\mathbf{elif}\;c \leq 2.4 \cdot 10^{-168}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\
\mathbf{elif}\;c \leq 2.8 \cdot 10^{+157}:\\
\;\;\;\;b \cdot \left(j \cdot \left(x \cdot \left(\frac{t \cdot y4}{x} - y0\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if c < -8.5000000000000004e169 or 2.8000000000000003e157 < c Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -8.5000000000000004e169 < c < -1.15e-147Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -1.15e-147 < c < -3.3999999999999999e-307Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
if -3.3999999999999999e-307 < c < 2.3999999999999999e-168Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in k around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if 2.3999999999999999e-168 < c < 2.8000000000000003e157Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6428.6%
Applied rewrites28.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y2 (* c (- (* x y0) (* t y4))))))
(if (<= c -8.5e+169)
t_1
(if (<= c 2.05e-163)
(* -1.0 (* k (* y0 (- (* y2 y5) (* b z)))))
(if (<= c 1.35e-34)
(* j (* x (- (* i y1) (* b y0))))
(if (<= c 1.6e+49)
(* y2 (* t (- (* a y5) (* c y4))))
(if (<= c 2.8e+157)
(* b (* j (- (* t y4) (* x y0))))
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 = y2 * (c * ((x * y0) - (t * y4)));
double tmp;
if (c <= -8.5e+169) {
tmp = t_1;
} else if (c <= 2.05e-163) {
tmp = -1.0 * (k * (y0 * ((y2 * y5) - (b * z))));
} else if (c <= 1.35e-34) {
tmp = j * (x * ((i * y1) - (b * y0)));
} else if (c <= 1.6e+49) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (c <= 2.8e+157) {
tmp = b * (j * ((t * y4) - (x * y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4)))
if (c <= (-8.5d+169)) then
tmp = t_1
else if (c <= 2.05d-163) then
tmp = (-1.0d0) * (k * (y0 * ((y2 * y5) - (b * z))))
else if (c <= 1.35d-34) then
tmp = j * (x * ((i * y1) - (b * y0)))
else if (c <= 1.6d+49) then
tmp = y2 * (t * ((a * y5) - (c * y4)))
else if (c <= 2.8d+157) then
tmp = b * (j * ((t * y4) - (x * y0)))
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 = y2 * (c * ((x * y0) - (t * y4)));
double tmp;
if (c <= -8.5e+169) {
tmp = t_1;
} else if (c <= 2.05e-163) {
tmp = -1.0 * (k * (y0 * ((y2 * y5) - (b * z))));
} else if (c <= 1.35e-34) {
tmp = j * (x * ((i * y1) - (b * y0)));
} else if (c <= 1.6e+49) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (c <= 2.8e+157) {
tmp = b * (j * ((t * y4) - (x * y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4))) tmp = 0 if c <= -8.5e+169: tmp = t_1 elif c <= 2.05e-163: tmp = -1.0 * (k * (y0 * ((y2 * y5) - (b * z)))) elif c <= 1.35e-34: tmp = j * (x * ((i * y1) - (b * y0))) elif c <= 1.6e+49: tmp = y2 * (t * ((a * y5) - (c * y4))) elif c <= 2.8e+157: tmp = b * (j * ((t * y4) - (x * y0))) 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(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) tmp = 0.0 if (c <= -8.5e+169) tmp = t_1; elseif (c <= 2.05e-163) tmp = Float64(-1.0 * Float64(k * Float64(y0 * Float64(Float64(y2 * y5) - Float64(b * z))))); elseif (c <= 1.35e-34) tmp = Float64(j * Float64(x * Float64(Float64(i * y1) - Float64(b * y0)))); elseif (c <= 1.6e+49) tmp = Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))); elseif (c <= 2.8e+157) tmp = Float64(b * Float64(j * Float64(Float64(t * y4) - Float64(x * y0)))); 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 = y2 * (c * ((x * y0) - (t * y4))); tmp = 0.0; if (c <= -8.5e+169) tmp = t_1; elseif (c <= 2.05e-163) tmp = -1.0 * (k * (y0 * ((y2 * y5) - (b * z)))); elseif (c <= 1.35e-34) tmp = j * (x * ((i * y1) - (b * y0))); elseif (c <= 1.6e+49) tmp = y2 * (t * ((a * y5) - (c * y4))); elseif (c <= 2.8e+157) tmp = b * (j * ((t * y4) - (x * y0))); 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[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -8.5e+169], t$95$1, If[LessEqual[c, 2.05e-163], N[(-1.0 * N[(k * N[(y0 * N[(N[(y2 * y5), $MachinePrecision] - N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.35e-34], N[(j * N[(x * N[(N[(i * y1), $MachinePrecision] - N[(b * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1.6e+49], N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.8e+157], N[(b * N[(j * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
t_1 := y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\
\mathbf{if}\;c \leq -8.5 \cdot 10^{+169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 2.05 \cdot 10^{-163}:\\
\;\;\;\;-1 \cdot \left(k \cdot \left(y0 \cdot \left(y2 \cdot y5 - b \cdot z\right)\right)\right)\\
\mathbf{elif}\;c \leq 1.35 \cdot 10^{-34}:\\
\;\;\;\;j \cdot \left(x \cdot \left(i \cdot y1 - b \cdot y0\right)\right)\\
\mathbf{elif}\;c \leq 1.6 \cdot 10^{+49}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\mathbf{elif}\;c \leq 2.8 \cdot 10^{+157}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if c < -8.5000000000000004e169 or 2.8000000000000003e157 < c Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -8.5000000000000004e169 < c < 2.0499999999999999e-163Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if 2.0499999999999999e-163 < c < 1.3500000000000001e-34Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 1.3500000000000001e-34 < c < 1.6000000000000001e49Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if 1.6000000000000001e49 < c < 2.8000000000000003e157Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= t -2.1e+182)
(* j (* y5 (+ (* -1.0 (* i t)) (* y0 y3))))
(if (<= t -9.2e+28)
(* y2 (* t (- (* a y5) (* c y4))))
(if (<= t -5.8e-94)
(* y2 (* k (- (* y1 y4) (* y0 y5))))
(if (<= t 2.8e-137)
(* y2 (* x (- (* c y0) (* a y1))))
(if (<= t 2.3e-29)
(* j (* y0 (- (* y3 y5) (* b x))))
(* y2 (* y4 (- (* k y1) (* c t))))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (t <= -2.1e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -9.2e+28) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (t <= -5.8e-94) {
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)));
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 2.3e-29) {
tmp = j * (y0 * ((y3 * y5) - (b * x)));
} else {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (t <= (-2.1d+182)) then
tmp = j * (y5 * (((-1.0d0) * (i * t)) + (y0 * y3)))
else if (t <= (-9.2d+28)) then
tmp = y2 * (t * ((a * y5) - (c * y4)))
else if (t <= (-5.8d-94)) then
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)))
else if (t <= 2.8d-137) then
tmp = y2 * (x * ((c * y0) - (a * y1)))
else if (t <= 2.3d-29) then
tmp = j * (y0 * ((y3 * y5) - (b * x)))
else
tmp = y2 * (y4 * ((k * y1) - (c * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (t <= -2.1e+182) {
tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3)));
} else if (t <= -9.2e+28) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (t <= -5.8e-94) {
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)));
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 2.3e-29) {
tmp = j * (y0 * ((y3 * y5) - (b * x)));
} else {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if t <= -2.1e+182: tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))) elif t <= -9.2e+28: tmp = y2 * (t * ((a * y5) - (c * y4))) elif t <= -5.8e-94: tmp = y2 * (k * ((y1 * y4) - (y0 * y5))) elif t <= 2.8e-137: tmp = y2 * (x * ((c * y0) - (a * y1))) elif t <= 2.3e-29: tmp = j * (y0 * ((y3 * y5) - (b * x))) else: tmp = y2 * (y4 * ((k * y1) - (c * t))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (t <= -2.1e+182) tmp = Float64(j * Float64(y5 * Float64(Float64(-1.0 * Float64(i * t)) + Float64(y0 * y3)))); elseif (t <= -9.2e+28) tmp = Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))); elseif (t <= -5.8e-94) tmp = Float64(y2 * Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5)))); elseif (t <= 2.8e-137) tmp = Float64(y2 * Float64(x * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (t <= 2.3e-29) tmp = Float64(j * Float64(y0 * Float64(Float64(y3 * y5) - Float64(b * x)))); else tmp = Float64(y2 * Float64(y4 * Float64(Float64(k * y1) - Float64(c * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (t <= -2.1e+182) tmp = j * (y5 * ((-1.0 * (i * t)) + (y0 * y3))); elseif (t <= -9.2e+28) tmp = y2 * (t * ((a * y5) - (c * y4))); elseif (t <= -5.8e-94) tmp = y2 * (k * ((y1 * y4) - (y0 * y5))); elseif (t <= 2.8e-137) tmp = y2 * (x * ((c * y0) - (a * y1))); elseif (t <= 2.3e-29) tmp = j * (y0 * ((y3 * y5) - (b * x))); else tmp = y2 * (y4 * ((k * y1) - (c * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[t, -2.1e+182], N[(j * N[(y5 * N[(N[(-1.0 * N[(i * t), $MachinePrecision]), $MachinePrecision] + N[(y0 * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.2e+28], N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.8e-94], N[(y2 * N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-137], N[(y2 * N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-29], N[(j * N[(y0 * N[(N[(y3 * y5), $MachinePrecision] - N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(y4 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+182}:\\
\;\;\;\;j \cdot \left(y5 \cdot \left(-1 \cdot \left(i \cdot t\right) + y0 \cdot y3\right)\right)\\
\mathbf{elif}\;t \leq -9.2 \cdot 10^{+28}:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-94}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-137}:\\
\;\;\;\;y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-29}:\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\end{array}
if t < -2.0999999999999999e182Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -2.0999999999999999e182 < t < -9.1999999999999994e28Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if -9.1999999999999994e28 < t < -5.7999999999999999e-94Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in k around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if -5.7999999999999999e-94 < t < 2.7999999999999999e-137Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 2.7999999999999999e-137 < t < 2.2999999999999999e-29Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
if 2.2999999999999999e-29 < t Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y2 (* c (- (* x y0) (* t y4)))))
(t_2 (* j (* x (- (* i y1) (* b y0))))))
(if (<= c -1.5e+17)
t_1
(if (<= c -1.4e-139)
(* (- (* b t) (* y3 y1)) (* y4 j))
(if (<= c -3.2e-286)
t_2
(if (<= c 2.2e-163)
(* y2 (* k (- (* y1 y4) (* y0 y5))))
(if (<= c 8.1e-7)
t_2
(if (<= c 2.8e+157)
(* b (* j (- (* t y4) (* x y0))))
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 = y2 * (c * ((x * y0) - (t * y4)));
double t_2 = j * (x * ((i * y1) - (b * y0)));
double tmp;
if (c <= -1.5e+17) {
tmp = t_1;
} else if (c <= -1.4e-139) {
tmp = ((b * t) - (y3 * y1)) * (y4 * j);
} else if (c <= -3.2e-286) {
tmp = t_2;
} else if (c <= 2.2e-163) {
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)));
} else if (c <= 8.1e-7) {
tmp = t_2;
} else if (c <= 2.8e+157) {
tmp = b * (j * ((t * y4) - (x * y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4)))
t_2 = j * (x * ((i * y1) - (b * y0)))
if (c <= (-1.5d+17)) then
tmp = t_1
else if (c <= (-1.4d-139)) then
tmp = ((b * t) - (y3 * y1)) * (y4 * j)
else if (c <= (-3.2d-286)) then
tmp = t_2
else if (c <= 2.2d-163) then
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)))
else if (c <= 8.1d-7) then
tmp = t_2
else if (c <= 2.8d+157) then
tmp = b * (j * ((t * y4) - (x * y0)))
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 = y2 * (c * ((x * y0) - (t * y4)));
double t_2 = j * (x * ((i * y1) - (b * y0)));
double tmp;
if (c <= -1.5e+17) {
tmp = t_1;
} else if (c <= -1.4e-139) {
tmp = ((b * t) - (y3 * y1)) * (y4 * j);
} else if (c <= -3.2e-286) {
tmp = t_2;
} else if (c <= 2.2e-163) {
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)));
} else if (c <= 8.1e-7) {
tmp = t_2;
} else if (c <= 2.8e+157) {
tmp = b * (j * ((t * y4) - (x * y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4))) t_2 = j * (x * ((i * y1) - (b * y0))) tmp = 0 if c <= -1.5e+17: tmp = t_1 elif c <= -1.4e-139: tmp = ((b * t) - (y3 * y1)) * (y4 * j) elif c <= -3.2e-286: tmp = t_2 elif c <= 2.2e-163: tmp = y2 * (k * ((y1 * y4) - (y0 * y5))) elif c <= 8.1e-7: tmp = t_2 elif c <= 2.8e+157: tmp = b * (j * ((t * y4) - (x * y0))) 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(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) t_2 = Float64(j * Float64(x * Float64(Float64(i * y1) - Float64(b * y0)))) tmp = 0.0 if (c <= -1.5e+17) tmp = t_1; elseif (c <= -1.4e-139) tmp = Float64(Float64(Float64(b * t) - Float64(y3 * y1)) * Float64(y4 * j)); elseif (c <= -3.2e-286) tmp = t_2; elseif (c <= 2.2e-163) tmp = Float64(y2 * Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5)))); elseif (c <= 8.1e-7) tmp = t_2; elseif (c <= 2.8e+157) tmp = Float64(b * Float64(j * Float64(Float64(t * y4) - Float64(x * y0)))); 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 = y2 * (c * ((x * y0) - (t * y4))); t_2 = j * (x * ((i * y1) - (b * y0))); tmp = 0.0; if (c <= -1.5e+17) tmp = t_1; elseif (c <= -1.4e-139) tmp = ((b * t) - (y3 * y1)) * (y4 * j); elseif (c <= -3.2e-286) tmp = t_2; elseif (c <= 2.2e-163) tmp = y2 * (k * ((y1 * y4) - (y0 * y5))); elseif (c <= 8.1e-7) tmp = t_2; elseif (c <= 2.8e+157) tmp = b * (j * ((t * y4) - (x * y0))); 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[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(x * N[(N[(i * y1), $MachinePrecision] - N[(b * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.5e+17], t$95$1, If[LessEqual[c, -1.4e-139], N[(N[(N[(b * t), $MachinePrecision] - N[(y3 * y1), $MachinePrecision]), $MachinePrecision] * N[(y4 * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -3.2e-286], t$95$2, If[LessEqual[c, 2.2e-163], N[(y2 * N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8.1e-7], t$95$2, If[LessEqual[c, 2.8e+157], N[(b * N[(j * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
t_1 := y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\
t_2 := j \cdot \left(x \cdot \left(i \cdot y1 - b \cdot y0\right)\right)\\
\mathbf{if}\;c \leq -1.5 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.4 \cdot 10^{-139}:\\
\;\;\;\;\left(b \cdot t - y3 \cdot y1\right) \cdot \left(y4 \cdot j\right)\\
\mathbf{elif}\;c \leq -3.2 \cdot 10^{-286}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 2.2 \cdot 10^{-163}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\
\mathbf{elif}\;c \leq 8.1 \cdot 10^{-7}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 2.8 \cdot 10^{+157}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if c < -1.5e17 or 2.8000000000000003e157 < c Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -1.5e17 < c < -1.3999999999999999e-139Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4%
Applied rewrites24.4%
if -1.3999999999999999e-139 < c < -3.2000000000000001e-286 or 2.2000000000000001e-163 < c < 8.0999999999999997e-7Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if -3.2000000000000001e-286 < c < 2.2000000000000001e-163Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in k around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if 8.0999999999999997e-7 < c < 2.8000000000000003e157Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= t -8.2e+66)
(* j (* t (- (* b y4) (* i y5))))
(if (<= t -5.8e-94)
(* y2 (* k (- (* y1 y4) (* y0 y5))))
(if (<= t 2.8e-137)
(* y2 (* x (- (* c y0) (* a y1))))
(if (<= t 2.3e-29)
(* j (* y0 (- (* y3 y5) (* b x))))
(* y2 (* y4 (- (* k y1) (* c t)))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (t <= -8.2e+66) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (t <= -5.8e-94) {
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)));
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 2.3e-29) {
tmp = j * (y0 * ((y3 * y5) - (b * x)));
} else {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (t <= (-8.2d+66)) then
tmp = j * (t * ((b * y4) - (i * y5)))
else if (t <= (-5.8d-94)) then
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)))
else if (t <= 2.8d-137) then
tmp = y2 * (x * ((c * y0) - (a * y1)))
else if (t <= 2.3d-29) then
tmp = j * (y0 * ((y3 * y5) - (b * x)))
else
tmp = y2 * (y4 * ((k * y1) - (c * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (t <= -8.2e+66) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (t <= -5.8e-94) {
tmp = y2 * (k * ((y1 * y4) - (y0 * y5)));
} else if (t <= 2.8e-137) {
tmp = y2 * (x * ((c * y0) - (a * y1)));
} else if (t <= 2.3e-29) {
tmp = j * (y0 * ((y3 * y5) - (b * x)));
} else {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if t <= -8.2e+66: tmp = j * (t * ((b * y4) - (i * y5))) elif t <= -5.8e-94: tmp = y2 * (k * ((y1 * y4) - (y0 * y5))) elif t <= 2.8e-137: tmp = y2 * (x * ((c * y0) - (a * y1))) elif t <= 2.3e-29: tmp = j * (y0 * ((y3 * y5) - (b * x))) else: tmp = y2 * (y4 * ((k * y1) - (c * t))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (t <= -8.2e+66) tmp = Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))); elseif (t <= -5.8e-94) tmp = Float64(y2 * Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5)))); elseif (t <= 2.8e-137) tmp = Float64(y2 * Float64(x * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (t <= 2.3e-29) tmp = Float64(j * Float64(y0 * Float64(Float64(y3 * y5) - Float64(b * x)))); else tmp = Float64(y2 * Float64(y4 * Float64(Float64(k * y1) - Float64(c * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (t <= -8.2e+66) tmp = j * (t * ((b * y4) - (i * y5))); elseif (t <= -5.8e-94) tmp = y2 * (k * ((y1 * y4) - (y0 * y5))); elseif (t <= 2.8e-137) tmp = y2 * (x * ((c * y0) - (a * y1))); elseif (t <= 2.3e-29) tmp = j * (y0 * ((y3 * y5) - (b * x))); else tmp = y2 * (y4 * ((k * y1) - (c * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[t, -8.2e+66], N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.8e-94], N[(y2 * N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-137], N[(y2 * N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-29], N[(j * N[(y0 * N[(N[(y3 * y5), $MachinePrecision] - N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(y4 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+66}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-94}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right)\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-137}:\\
\;\;\;\;y2 \cdot \left(x \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-29}:\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\end{array}
if t < -8.1999999999999999e66Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0%
Applied rewrites27.0%
if -8.1999999999999999e66 < t < -5.7999999999999999e-94Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in k around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if -5.7999999999999999e-94 < t < 2.7999999999999999e-137Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 2.7999999999999999e-137 < t < 2.2999999999999999e-29Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
if 2.2999999999999999e-29 < t Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y2 (* c (- (* x y0) (* t y4))))))
(if (<= c -1.5e+17)
t_1
(if (<= c -1.4e-139)
(* (- (* b t) (* y3 y1)) (* y4 j))
(if (<= c 8.1e-7)
(* j (* x (- (* i y1) (* b y0))))
(if (<= c 2.8e+157) (* b (* j (- (* t y4) (* x y0)))) 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 = y2 * (c * ((x * y0) - (t * y4)));
double tmp;
if (c <= -1.5e+17) {
tmp = t_1;
} else if (c <= -1.4e-139) {
tmp = ((b * t) - (y3 * y1)) * (y4 * j);
} else if (c <= 8.1e-7) {
tmp = j * (x * ((i * y1) - (b * y0)));
} else if (c <= 2.8e+157) {
tmp = b * (j * ((t * y4) - (x * y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4)))
if (c <= (-1.5d+17)) then
tmp = t_1
else if (c <= (-1.4d-139)) then
tmp = ((b * t) - (y3 * y1)) * (y4 * j)
else if (c <= 8.1d-7) then
tmp = j * (x * ((i * y1) - (b * y0)))
else if (c <= 2.8d+157) then
tmp = b * (j * ((t * y4) - (x * y0)))
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 = y2 * (c * ((x * y0) - (t * y4)));
double tmp;
if (c <= -1.5e+17) {
tmp = t_1;
} else if (c <= -1.4e-139) {
tmp = ((b * t) - (y3 * y1)) * (y4 * j);
} else if (c <= 8.1e-7) {
tmp = j * (x * ((i * y1) - (b * y0)));
} else if (c <= 2.8e+157) {
tmp = b * (j * ((t * y4) - (x * y0)));
} 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 = y2 * (c * ((x * y0) - (t * y4))) tmp = 0 if c <= -1.5e+17: tmp = t_1 elif c <= -1.4e-139: tmp = ((b * t) - (y3 * y1)) * (y4 * j) elif c <= 8.1e-7: tmp = j * (x * ((i * y1) - (b * y0))) elif c <= 2.8e+157: tmp = b * (j * ((t * y4) - (x * y0))) 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(y2 * Float64(c * Float64(Float64(x * y0) - Float64(t * y4)))) tmp = 0.0 if (c <= -1.5e+17) tmp = t_1; elseif (c <= -1.4e-139) tmp = Float64(Float64(Float64(b * t) - Float64(y3 * y1)) * Float64(y4 * j)); elseif (c <= 8.1e-7) tmp = Float64(j * Float64(x * Float64(Float64(i * y1) - Float64(b * y0)))); elseif (c <= 2.8e+157) tmp = Float64(b * Float64(j * Float64(Float64(t * y4) - Float64(x * y0)))); 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 = y2 * (c * ((x * y0) - (t * y4))); tmp = 0.0; if (c <= -1.5e+17) tmp = t_1; elseif (c <= -1.4e-139) tmp = ((b * t) - (y3 * y1)) * (y4 * j); elseif (c <= 8.1e-7) tmp = j * (x * ((i * y1) - (b * y0))); elseif (c <= 2.8e+157) tmp = b * (j * ((t * y4) - (x * y0))); 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[(y2 * N[(c * N[(N[(x * y0), $MachinePrecision] - N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -1.5e+17], t$95$1, If[LessEqual[c, -1.4e-139], N[(N[(N[(b * t), $MachinePrecision] - N[(y3 * y1), $MachinePrecision]), $MachinePrecision] * N[(y4 * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 8.1e-7], N[(j * N[(x * N[(N[(i * y1), $MachinePrecision] - N[(b * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.8e+157], N[(b * N[(j * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := y2 \cdot \left(c \cdot \left(x \cdot y0 - t \cdot y4\right)\right)\\
\mathbf{if}\;c \leq -1.5 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.4 \cdot 10^{-139}:\\
\;\;\;\;\left(b \cdot t - y3 \cdot y1\right) \cdot \left(y4 \cdot j\right)\\
\mathbf{elif}\;c \leq 8.1 \cdot 10^{-7}:\\
\;\;\;\;j \cdot \left(x \cdot \left(i \cdot y1 - b \cdot y0\right)\right)\\
\mathbf{elif}\;c \leq 2.8 \cdot 10^{+157}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if c < -1.5e17 or 2.8000000000000003e157 < c Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
if -1.5e17 < c < -1.3999999999999999e-139Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4%
Applied rewrites24.4%
if -1.3999999999999999e-139 < c < 8.0999999999999997e-7Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 8.0999999999999997e-7 < c < 2.8000000000000003e157Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* b (* y0 (- (* k z) (* j x))))))
(if (<= z -1.45e+276)
t_1
(if (<= z -2.5e-87)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= z 5.3e-170)
(* j (* b (- (* t y4) (* x y0))))
(if (<= z 6.4e+126) (* j (* x (- (* i y1) (* b y0)))) 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 * (y0 * ((k * z) - (j * x)));
double tmp;
if (z <= -1.45e+276) {
tmp = t_1;
} else if (z <= -2.5e-87) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (z <= 5.3e-170) {
tmp = j * (b * ((t * y4) - (x * y0)));
} else if (z <= 6.4e+126) {
tmp = j * (x * ((i * y1) - (b * y0)));
} 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 * (y0 * ((k * z) - (j * x)))
if (z <= (-1.45d+276)) then
tmp = t_1
else if (z <= (-2.5d-87)) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else if (z <= 5.3d-170) then
tmp = j * (b * ((t * y4) - (x * y0)))
else if (z <= 6.4d+126) then
tmp = j * (x * ((i * y1) - (b * y0)))
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 * (y0 * ((k * z) - (j * x)));
double tmp;
if (z <= -1.45e+276) {
tmp = t_1;
} else if (z <= -2.5e-87) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (z <= 5.3e-170) {
tmp = j * (b * ((t * y4) - (x * y0)));
} else if (z <= 6.4e+126) {
tmp = j * (x * ((i * y1) - (b * y0)));
} 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 * (y0 * ((k * z) - (j * x))) tmp = 0 if z <= -1.45e+276: tmp = t_1 elif z <= -2.5e-87: tmp = c * (y0 * ((x * y2) - (y3 * z))) elif z <= 5.3e-170: tmp = j * (b * ((t * y4) - (x * y0))) elif z <= 6.4e+126: tmp = j * (x * ((i * y1) - (b * y0))) 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(y0 * Float64(Float64(k * z) - Float64(j * x)))) tmp = 0.0 if (z <= -1.45e+276) tmp = t_1; elseif (z <= -2.5e-87) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (z <= 5.3e-170) tmp = Float64(j * Float64(b * Float64(Float64(t * y4) - Float64(x * y0)))); elseif (z <= 6.4e+126) tmp = Float64(j * Float64(x * Float64(Float64(i * y1) - Float64(b * y0)))); 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 * (y0 * ((k * z) - (j * x))); tmp = 0.0; if (z <= -1.45e+276) tmp = t_1; elseif (z <= -2.5e-87) tmp = c * (y0 * ((x * y2) - (y3 * z))); elseif (z <= 5.3e-170) tmp = j * (b * ((t * y4) - (x * y0))); elseif (z <= 6.4e+126) tmp = j * (x * ((i * y1) - (b * y0))); 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[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+276], t$95$1, If[LessEqual[z, -2.5e-87], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.3e-170], N[(j * N[(b * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e+126], N[(j * N[(x * N[(N[(i * y1), $MachinePrecision] - N[(b * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+276}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-87}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{-170}:\\
\;\;\;\;j \cdot \left(b \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+126}:\\
\;\;\;\;j \cdot \left(x \cdot \left(i \cdot y1 - b \cdot y0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -1.45e276 or 6.3999999999999995e126 < z Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if -1.45e276 < z < -2.5000000000000002e-87Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if -2.5000000000000002e-87 < z < 5.3e-170Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
if 5.3e-170 < z < 6.3999999999999995e126Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= t -5.4e-22)
(* j (* t (- (* b y4) (* i y5))))
(if (<= t 2.8e-137)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<= t 1.6e-67)
(* b (* y0 (- (* k z) (* j x))))
(if (<= t 9.5e+94)
(* c (* y0 (- (* x y2) (* y3 z))))
(* j (* b (- (* t y4) (* x y0)))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (t <= -5.4e-22) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (t <= 2.8e-137) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (t <= 1.6e-67) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 9.5e+94) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else {
tmp = j * (b * ((t * y4) - (x * y0)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (t <= (-5.4d-22)) then
tmp = j * (t * ((b * y4) - (i * y5)))
else if (t <= 2.8d-137) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else if (t <= 1.6d-67) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (t <= 9.5d+94) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else
tmp = j * (b * ((t * y4) - (x * y0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (t <= -5.4e-22) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (t <= 2.8e-137) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (t <= 1.6e-67) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (t <= 9.5e+94) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else {
tmp = j * (b * ((t * y4) - (x * y0)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if t <= -5.4e-22: tmp = j * (t * ((b * y4) - (i * y5))) elif t <= 2.8e-137: tmp = x * (y2 * ((c * y0) - (a * y1))) elif t <= 1.6e-67: tmp = b * (y0 * ((k * z) - (j * x))) elif t <= 9.5e+94: tmp = c * (y0 * ((x * y2) - (y3 * z))) else: tmp = j * (b * ((t * y4) - (x * y0))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (t <= -5.4e-22) tmp = Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))); elseif (t <= 2.8e-137) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (t <= 1.6e-67) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (t <= 9.5e+94) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); else tmp = Float64(j * Float64(b * Float64(Float64(t * y4) - Float64(x * y0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (t <= -5.4e-22) tmp = j * (t * ((b * y4) - (i * y5))); elseif (t <= 2.8e-137) tmp = x * (y2 * ((c * y0) - (a * y1))); elseif (t <= 1.6e-67) tmp = b * (y0 * ((k * z) - (j * x))); elseif (t <= 9.5e+94) tmp = c * (y0 * ((x * y2) - (y3 * z))); else tmp = j * (b * ((t * y4) - (x * y0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[t, -5.4e-22], N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-137], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e-67], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+94], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(b * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{-22}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-137}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-67}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+94}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(b \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\
\end{array}
if t < -5.4000000000000004e-22Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0%
Applied rewrites27.0%
if -5.4000000000000004e-22 < t < 2.7999999999999999e-137Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3%
Applied rewrites26.3%
if 2.7999999999999999e-137 < t < 1.6000000000000001e-67Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
if 1.6000000000000001e-67 < t < 9.4999999999999998e94Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if 9.4999999999999998e94 < t Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* j (* t (- (* b y4) (* i y5))))))
(if (<= t -5.4e-22)
t_1
(if (<= t 2.8e-137)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<= t 3.2e+35) (* j (* y0 (- (* y3 y5) (* b 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 = j * (t * ((b * y4) - (i * y5)));
double tmp;
if (t <= -5.4e-22) {
tmp = t_1;
} else if (t <= 2.8e-137) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (t <= 3.2e+35) {
tmp = j * (y0 * ((y3 * y5) - (b * 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 = j * (t * ((b * y4) - (i * y5)))
if (t <= (-5.4d-22)) then
tmp = t_1
else if (t <= 2.8d-137) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else if (t <= 3.2d+35) then
tmp = j * (y0 * ((y3 * y5) - (b * 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 = j * (t * ((b * y4) - (i * y5)));
double tmp;
if (t <= -5.4e-22) {
tmp = t_1;
} else if (t <= 2.8e-137) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (t <= 3.2e+35) {
tmp = j * (y0 * ((y3 * y5) - (b * 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 = j * (t * ((b * y4) - (i * y5))) tmp = 0 if t <= -5.4e-22: tmp = t_1 elif t <= 2.8e-137: tmp = x * (y2 * ((c * y0) - (a * y1))) elif t <= 3.2e+35: tmp = j * (y0 * ((y3 * y5) - (b * 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(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) tmp = 0.0 if (t <= -5.4e-22) tmp = t_1; elseif (t <= 2.8e-137) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (t <= 3.2e+35) tmp = Float64(j * Float64(y0 * Float64(Float64(y3 * y5) - Float64(b * 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 = j * (t * ((b * y4) - (i * y5))); tmp = 0.0; if (t <= -5.4e-22) tmp = t_1; elseif (t <= 2.8e-137) tmp = x * (y2 * ((c * y0) - (a * y1))); elseif (t <= 3.2e+35) tmp = j * (y0 * ((y3 * y5) - (b * 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[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.4e-22], t$95$1, If[LessEqual[t, 2.8e-137], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e+35], N[(j * N[(y0 * N[(N[(y3 * y5), $MachinePrecision] - N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-137}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+35}:\\
\;\;\;\;j \cdot \left(y0 \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -5.4000000000000004e-22 or 3.1999999999999998e35 < t Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0%
Applied rewrites27.0%
if -5.4000000000000004e-22 < t < 2.7999999999999999e-137Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3%
Applied rewrites26.3%
if 2.7999999999999999e-137 < t < 3.1999999999999998e35Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= j -6.2e+66)
(* (- (* b t) (* y3 y1)) (* y4 j))
(if (<= j -1.25e-100)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= j 1.46e-83)
(* x (* y2 (- (* c y0) (* a y1))))
(* b (* j (- (* t y4) (* x y0))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (j <= -6.2e+66) {
tmp = ((b * t) - (y3 * y1)) * (y4 * j);
} else if (j <= -1.25e-100) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (j <= 1.46e-83) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = b * (j * ((t * y4) - (x * y0)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (j <= (-6.2d+66)) then
tmp = ((b * t) - (y3 * y1)) * (y4 * j)
else if (j <= (-1.25d-100)) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else if (j <= 1.46d-83) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else
tmp = b * (j * ((t * y4) - (x * y0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (j <= -6.2e+66) {
tmp = ((b * t) - (y3 * y1)) * (y4 * j);
} else if (j <= -1.25e-100) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (j <= 1.46e-83) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = b * (j * ((t * y4) - (x * y0)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if j <= -6.2e+66: tmp = ((b * t) - (y3 * y1)) * (y4 * j) elif j <= -1.25e-100: tmp = c * (y0 * ((x * y2) - (y3 * z))) elif j <= 1.46e-83: tmp = x * (y2 * ((c * y0) - (a * y1))) else: tmp = b * (j * ((t * y4) - (x * y0))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (j <= -6.2e+66) tmp = Float64(Float64(Float64(b * t) - Float64(y3 * y1)) * Float64(y4 * j)); elseif (j <= -1.25e-100) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (j <= 1.46e-83) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); else tmp = Float64(b * Float64(j * Float64(Float64(t * y4) - Float64(x * y0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (j <= -6.2e+66) tmp = ((b * t) - (y3 * y1)) * (y4 * j); elseif (j <= -1.25e-100) tmp = c * (y0 * ((x * y2) - (y3 * z))); elseif (j <= 1.46e-83) tmp = x * (y2 * ((c * y0) - (a * y1))); else tmp = b * (j * ((t * y4) - (x * y0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[j, -6.2e+66], N[(N[(N[(b * t), $MachinePrecision] - N[(y3 * y1), $MachinePrecision]), $MachinePrecision] * N[(y4 * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.25e-100], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.46e-83], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(j * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;j \leq -6.2 \cdot 10^{+66}:\\
\;\;\;\;\left(b \cdot t - y3 \cdot y1\right) \cdot \left(y4 \cdot j\right)\\
\mathbf{elif}\;j \leq -1.25 \cdot 10^{-100}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;j \leq 1.46 \cdot 10^{-83}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\
\end{array}
if j < -6.2000000000000004e66Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4%
Applied rewrites24.4%
if -6.2000000000000004e66 < j < -1.25e-100Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if -1.25e-100 < j < 1.4600000000000001e-83Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3%
Applied rewrites26.3%
if 1.4600000000000001e-83 < j Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= j -6.2e+66)
(* (- (* b t) (* y3 y1)) (* y4 j))
(if (<= j 5e-82)
(* c (* y0 (- (* x y2) (* y3 z))))
(* b (* j (- (* t y4) (* x y0)))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (j <= -6.2e+66) {
tmp = ((b * t) - (y3 * y1)) * (y4 * j);
} else if (j <= 5e-82) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else {
tmp = b * (j * ((t * y4) - (x * y0)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (j <= (-6.2d+66)) then
tmp = ((b * t) - (y3 * y1)) * (y4 * j)
else if (j <= 5d-82) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else
tmp = b * (j * ((t * y4) - (x * y0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (j <= -6.2e+66) {
tmp = ((b * t) - (y3 * y1)) * (y4 * j);
} else if (j <= 5e-82) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else {
tmp = b * (j * ((t * y4) - (x * y0)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if j <= -6.2e+66: tmp = ((b * t) - (y3 * y1)) * (y4 * j) elif j <= 5e-82: tmp = c * (y0 * ((x * y2) - (y3 * z))) else: tmp = b * (j * ((t * y4) - (x * y0))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (j <= -6.2e+66) tmp = Float64(Float64(Float64(b * t) - Float64(y3 * y1)) * Float64(y4 * j)); elseif (j <= 5e-82) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); else tmp = Float64(b * Float64(j * Float64(Float64(t * y4) - Float64(x * y0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (j <= -6.2e+66) tmp = ((b * t) - (y3 * y1)) * (y4 * j); elseif (j <= 5e-82) tmp = c * (y0 * ((x * y2) - (y3 * z))); else tmp = b * (j * ((t * y4) - (x * y0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[j, -6.2e+66], N[(N[(N[(b * t), $MachinePrecision] - N[(y3 * y1), $MachinePrecision]), $MachinePrecision] * N[(y4 * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 5e-82], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(j * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;j \leq -6.2 \cdot 10^{+66}:\\
\;\;\;\;\left(b \cdot t - y3 \cdot y1\right) \cdot \left(y4 \cdot j\right)\\
\mathbf{elif}\;j \leq 5 \cdot 10^{-82}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\
\end{array}
if j < -6.2000000000000004e66Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6424.4%
Applied rewrites24.4%
if -6.2000000000000004e66 < j < 4.9999999999999998e-82Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if 4.9999999999999998e-82 < j Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* j (* t (- (* b y4) (* i y5))))))
(if (<= t -3.1e-22)
t_1
(if (<= t 1.35e+16) (* 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 = j * (t * ((b * y4) - (i * y5)));
double tmp;
if (t <= -3.1e-22) {
tmp = t_1;
} else if (t <= 1.35e+16) {
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 = j * (t * ((b * y4) - (i * y5)))
if (t <= (-3.1d-22)) then
tmp = t_1
else if (t <= 1.35d+16) 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 = j * (t * ((b * y4) - (i * y5)));
double tmp;
if (t <= -3.1e-22) {
tmp = t_1;
} else if (t <= 1.35e+16) {
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 = j * (t * ((b * y4) - (i * y5))) tmp = 0 if t <= -3.1e-22: tmp = t_1 elif t <= 1.35e+16: 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(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) tmp = 0.0 if (t <= -3.1e-22) tmp = t_1; elseif (t <= 1.35e+16) 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 = j * (t * ((b * y4) - (i * y5))); tmp = 0.0; if (t <= -3.1e-22) tmp = t_1; elseif (t <= 1.35e+16) 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[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.1e-22], t$95$1, If[LessEqual[t, 1.35e+16], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\
\mathbf{if}\;t \leq -3.1 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+16}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -3.1000000000000001e-22 or 1.35e16 < t Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0%
Applied rewrites27.0%
if -3.1000000000000001e-22 < t < 1.35e16Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6%
Applied rewrites26.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= k -2.25e+136)
(* y2 (* y4 (* k y1)))
(if (<= k -8.5e-301)
(* j (* t (- (* b y4) (* i y5))))
(if (<= k 6.5e+147)
(* b (* j (- (* t y4) (* x y0))))
(* y2 (* k (* y1 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 <= -2.25e+136) {
tmp = y2 * (y4 * (k * y1));
} else if (k <= -8.5e-301) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (k <= 6.5e+147) {
tmp = b * (j * ((t * y4) - (x * y0)));
} else {
tmp = y2 * (k * (y1 * 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 <= (-2.25d+136)) then
tmp = y2 * (y4 * (k * y1))
else if (k <= (-8.5d-301)) then
tmp = j * (t * ((b * y4) - (i * y5)))
else if (k <= 6.5d+147) then
tmp = b * (j * ((t * y4) - (x * y0)))
else
tmp = y2 * (k * (y1 * 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 <= -2.25e+136) {
tmp = y2 * (y4 * (k * y1));
} else if (k <= -8.5e-301) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (k <= 6.5e+147) {
tmp = b * (j * ((t * y4) - (x * y0)));
} else {
tmp = y2 * (k * (y1 * 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 <= -2.25e+136: tmp = y2 * (y4 * (k * y1)) elif k <= -8.5e-301: tmp = j * (t * ((b * y4) - (i * y5))) elif k <= 6.5e+147: tmp = b * (j * ((t * y4) - (x * y0))) else: tmp = y2 * (k * (y1 * 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 <= -2.25e+136) tmp = Float64(y2 * Float64(y4 * Float64(k * y1))); elseif (k <= -8.5e-301) tmp = Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))); elseif (k <= 6.5e+147) tmp = Float64(b * Float64(j * Float64(Float64(t * y4) - Float64(x * y0)))); else tmp = Float64(y2 * Float64(k * Float64(y1 * 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 <= -2.25e+136) tmp = y2 * (y4 * (k * y1)); elseif (k <= -8.5e-301) tmp = j * (t * ((b * y4) - (i * y5))); elseif (k <= 6.5e+147) tmp = b * (j * ((t * y4) - (x * y0))); else tmp = y2 * (k * (y1 * 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, -2.25e+136], N[(y2 * N[(y4 * N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, -8.5e-301], N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.5e+147], N[(b * N[(j * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;k \leq -2.25 \cdot 10^{+136}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\
\mathbf{elif}\;k \leq -8.5 \cdot 10^{-301}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\
\mathbf{elif}\;k \leq 6.5 \cdot 10^{+147}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\
\end{array}
if k < -2.25e136Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around 0
lower-*.f6416.9%
Applied rewrites16.9%
if -2.25e136 < k < -8.5000000000000005e-301Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0%
Applied rewrites27.0%
if -8.5000000000000005e-301 < k < 6.5e147Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
if 6.5e147 < k Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= k -3.3e+140)
(* y2 (* y4 (* k y1)))
(if (<= k 6.5e+147)
(* b (* j (- (* t y4) (* x y0))))
(* y2 (* k (* y1 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.3e+140) {
tmp = y2 * (y4 * (k * y1));
} else if (k <= 6.5e+147) {
tmp = b * (j * ((t * y4) - (x * y0)));
} else {
tmp = y2 * (k * (y1 * 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.3d+140)) then
tmp = y2 * (y4 * (k * y1))
else if (k <= 6.5d+147) then
tmp = b * (j * ((t * y4) - (x * y0)))
else
tmp = y2 * (k * (y1 * 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.3e+140) {
tmp = y2 * (y4 * (k * y1));
} else if (k <= 6.5e+147) {
tmp = b * (j * ((t * y4) - (x * y0)));
} else {
tmp = y2 * (k * (y1 * 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.3e+140: tmp = y2 * (y4 * (k * y1)) elif k <= 6.5e+147: tmp = b * (j * ((t * y4) - (x * y0))) else: tmp = y2 * (k * (y1 * 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.3e+140) tmp = Float64(y2 * Float64(y4 * Float64(k * y1))); elseif (k <= 6.5e+147) tmp = Float64(b * Float64(j * Float64(Float64(t * y4) - Float64(x * y0)))); else tmp = Float64(y2 * Float64(k * Float64(y1 * 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.3e+140) tmp = y2 * (y4 * (k * y1)); elseif (k <= 6.5e+147) tmp = b * (j * ((t * y4) - (x * y0))); else tmp = y2 * (k * (y1 * 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.3e+140], N[(y2 * N[(y4 * N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.5e+147], N[(b * N[(j * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;k \leq -3.3 \cdot 10^{+140}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\
\mathbf{elif}\;k \leq 6.5 \cdot 10^{+147}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\
\end{array}
if k < -3.3000000000000002e140Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around 0
lower-*.f6416.9%
Applied rewrites16.9%
if -3.3000000000000002e140 < k < 6.5e147Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
if 6.5e147 < k Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= t -1.65e+167)
(* j (* b (* t y4)))
(if (<= t -1.1e-59)
(* y2 (* y4 (* -1.0 (* c t))))
(if (<= t 3.2e-75)
(* b (* j (* -1.0 (* x y0))))
(if (<= t 6.5e+83)
(* y2 (* y4 (* k y1)))
(* y2 (* -1.0 (* c (* 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 <= -1.65e+167) {
tmp = j * (b * (t * y4));
} else if (t <= -1.1e-59) {
tmp = y2 * (y4 * (-1.0 * (c * t)));
} else if (t <= 3.2e-75) {
tmp = b * (j * (-1.0 * (x * y0)));
} else if (t <= 6.5e+83) {
tmp = y2 * (y4 * (k * y1));
} else {
tmp = y2 * (-1.0 * (c * (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 <= (-1.65d+167)) then
tmp = j * (b * (t * y4))
else if (t <= (-1.1d-59)) then
tmp = y2 * (y4 * ((-1.0d0) * (c * t)))
else if (t <= 3.2d-75) then
tmp = b * (j * ((-1.0d0) * (x * y0)))
else if (t <= 6.5d+83) then
tmp = y2 * (y4 * (k * y1))
else
tmp = y2 * ((-1.0d0) * (c * (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 <= -1.65e+167) {
tmp = j * (b * (t * y4));
} else if (t <= -1.1e-59) {
tmp = y2 * (y4 * (-1.0 * (c * t)));
} else if (t <= 3.2e-75) {
tmp = b * (j * (-1.0 * (x * y0)));
} else if (t <= 6.5e+83) {
tmp = y2 * (y4 * (k * y1));
} else {
tmp = y2 * (-1.0 * (c * (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 <= -1.65e+167: tmp = j * (b * (t * y4)) elif t <= -1.1e-59: tmp = y2 * (y4 * (-1.0 * (c * t))) elif t <= 3.2e-75: tmp = b * (j * (-1.0 * (x * y0))) elif t <= 6.5e+83: tmp = y2 * (y4 * (k * y1)) else: tmp = y2 * (-1.0 * (c * (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 <= -1.65e+167) tmp = Float64(j * Float64(b * Float64(t * y4))); elseif (t <= -1.1e-59) tmp = Float64(y2 * Float64(y4 * Float64(-1.0 * Float64(c * t)))); elseif (t <= 3.2e-75) tmp = Float64(b * Float64(j * Float64(-1.0 * Float64(x * y0)))); elseif (t <= 6.5e+83) tmp = Float64(y2 * Float64(y4 * Float64(k * y1))); else tmp = Float64(y2 * Float64(-1.0 * Float64(c * 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 <= -1.65e+167) tmp = j * (b * (t * y4)); elseif (t <= -1.1e-59) tmp = y2 * (y4 * (-1.0 * (c * t))); elseif (t <= 3.2e-75) tmp = b * (j * (-1.0 * (x * y0))); elseif (t <= 6.5e+83) tmp = y2 * (y4 * (k * y1)); else tmp = y2 * (-1.0 * (c * (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, -1.65e+167], N[(j * N[(b * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.1e-59], N[(y2 * N[(y4 * N[(-1.0 * N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-75], N[(b * N[(j * N[(-1.0 * N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e+83], N[(y2 * N[(y4 * N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(-1.0 * N[(c * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+167}:\\
\;\;\;\;j \cdot \left(b \cdot \left(t \cdot y4\right)\right)\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-59}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot t\right)\right)\right)\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-75}:\\
\;\;\;\;b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right)\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+83}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right)\\
\end{array}
if t < -1.6500000000000001e167Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6417.0%
Applied rewrites17.0%
if -1.6500000000000001e167 < t < -1.0999999999999999e-59Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6417.8%
Applied rewrites17.8%
if -1.0999999999999999e-59 < t < 3.1999999999999998e-75Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
Taylor expanded in x around 0
lower-*.f6417.1%
Applied rewrites17.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
if 3.1999999999999998e-75 < t < 6.5000000000000003e83Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around 0
lower-*.f6416.9%
Applied rewrites16.9%
if 6.5000000000000003e83 < t Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.8%
Applied rewrites17.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y2 (* -1.0 (* c (* t y4))))))
(if (<= t -1.65e+167)
(* j (* b (* t y4)))
(if (<= t -1.1e-59)
t_1
(if (<= t 3.2e-75)
(* b (* j (* -1.0 (* x y0))))
(if (<= t 6.5e+83) (* y2 (* y4 (* k y1))) t_1))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y2 * (-1.0 * (c * (t * y4)));
double tmp;
if (t <= -1.65e+167) {
tmp = j * (b * (t * y4));
} else if (t <= -1.1e-59) {
tmp = t_1;
} else if (t <= 3.2e-75) {
tmp = b * (j * (-1.0 * (x * y0)));
} else if (t <= 6.5e+83) {
tmp = y2 * (y4 * (k * y1));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = y2 * ((-1.0d0) * (c * (t * y4)))
if (t <= (-1.65d+167)) then
tmp = j * (b * (t * y4))
else if (t <= (-1.1d-59)) then
tmp = t_1
else if (t <= 3.2d-75) then
tmp = b * (j * ((-1.0d0) * (x * y0)))
else if (t <= 6.5d+83) then
tmp = y2 * (y4 * (k * y1))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y2 * (-1.0 * (c * (t * y4)));
double tmp;
if (t <= -1.65e+167) {
tmp = j * (b * (t * y4));
} else if (t <= -1.1e-59) {
tmp = t_1;
} else if (t <= 3.2e-75) {
tmp = b * (j * (-1.0 * (x * y0)));
} else if (t <= 6.5e+83) {
tmp = y2 * (y4 * (k * y1));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = y2 * (-1.0 * (c * (t * y4))) tmp = 0 if t <= -1.65e+167: tmp = j * (b * (t * y4)) elif t <= -1.1e-59: tmp = t_1 elif t <= 3.2e-75: tmp = b * (j * (-1.0 * (x * y0))) elif t <= 6.5e+83: tmp = y2 * (y4 * (k * y1)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(y2 * Float64(-1.0 * Float64(c * Float64(t * y4)))) tmp = 0.0 if (t <= -1.65e+167) tmp = Float64(j * Float64(b * Float64(t * y4))); elseif (t <= -1.1e-59) tmp = t_1; elseif (t <= 3.2e-75) tmp = Float64(b * Float64(j * Float64(-1.0 * Float64(x * y0)))); elseif (t <= 6.5e+83) tmp = Float64(y2 * Float64(y4 * Float64(k * y1))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = y2 * (-1.0 * (c * (t * y4))); tmp = 0.0; if (t <= -1.65e+167) tmp = j * (b * (t * y4)); elseif (t <= -1.1e-59) tmp = t_1; elseif (t <= 3.2e-75) tmp = b * (j * (-1.0 * (x * y0))); elseif (t <= 6.5e+83) tmp = y2 * (y4 * (k * y1)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y2 * N[(-1.0 * N[(c * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.65e+167], N[(j * N[(b * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.1e-59], t$95$1, If[LessEqual[t, 3.2e-75], N[(b * N[(j * N[(-1.0 * N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e+83], N[(y2 * N[(y4 * N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right)\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{+167}:\\
\;\;\;\;j \cdot \left(b \cdot \left(t \cdot y4\right)\right)\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-59}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-75}:\\
\;\;\;\;b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right)\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+83}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -1.6500000000000001e167Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6417.0%
Applied rewrites17.0%
if -1.6500000000000001e167 < t < -1.0999999999999999e-59 or 6.5000000000000003e83 < t Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.8%
Applied rewrites17.8%
if -1.0999999999999999e-59 < t < 3.1999999999999998e-75Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
Taylor expanded in x around 0
lower-*.f6417.1%
Applied rewrites17.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
if 3.1999999999999998e-75 < t < 6.5000000000000003e83Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around 0
lower-*.f6416.9%
Applied rewrites16.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* j (* b (* t y4)))))
(if (<= t -6e+95)
t_1
(if (<= t -2.55e-82)
(* y2 (* k (* y1 y4)))
(if (<= t 1.45e-70)
(* b (* j (* -1.0 (* x y0))))
(if (<= t 4.5e+94) (* j (* y4 (* -1.0 (* y1 y3)))) t_1))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = j * (b * (t * y4));
double tmp;
if (t <= -6e+95) {
tmp = t_1;
} else if (t <= -2.55e-82) {
tmp = y2 * (k * (y1 * y4));
} else if (t <= 1.45e-70) {
tmp = b * (j * (-1.0 * (x * y0)));
} else if (t <= 4.5e+94) {
tmp = j * (y4 * (-1.0 * (y1 * y3)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = j * (b * (t * y4))
if (t <= (-6d+95)) then
tmp = t_1
else if (t <= (-2.55d-82)) then
tmp = y2 * (k * (y1 * y4))
else if (t <= 1.45d-70) then
tmp = b * (j * ((-1.0d0) * (x * y0)))
else if (t <= 4.5d+94) then
tmp = j * (y4 * ((-1.0d0) * (y1 * y3)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = j * (b * (t * y4));
double tmp;
if (t <= -6e+95) {
tmp = t_1;
} else if (t <= -2.55e-82) {
tmp = y2 * (k * (y1 * y4));
} else if (t <= 1.45e-70) {
tmp = b * (j * (-1.0 * (x * y0)));
} else if (t <= 4.5e+94) {
tmp = j * (y4 * (-1.0 * (y1 * y3)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = j * (b * (t * y4)) tmp = 0 if t <= -6e+95: tmp = t_1 elif t <= -2.55e-82: tmp = y2 * (k * (y1 * y4)) elif t <= 1.45e-70: tmp = b * (j * (-1.0 * (x * y0))) elif t <= 4.5e+94: tmp = j * (y4 * (-1.0 * (y1 * y3))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(j * Float64(b * Float64(t * y4))) tmp = 0.0 if (t <= -6e+95) tmp = t_1; elseif (t <= -2.55e-82) tmp = Float64(y2 * Float64(k * Float64(y1 * y4))); elseif (t <= 1.45e-70) tmp = Float64(b * Float64(j * Float64(-1.0 * Float64(x * y0)))); elseif (t <= 4.5e+94) tmp = Float64(j * Float64(y4 * Float64(-1.0 * Float64(y1 * y3)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = j * (b * (t * y4)); tmp = 0.0; if (t <= -6e+95) tmp = t_1; elseif (t <= -2.55e-82) tmp = y2 * (k * (y1 * y4)); elseif (t <= 1.45e-70) tmp = b * (j * (-1.0 * (x * y0))); elseif (t <= 4.5e+94) tmp = j * (y4 * (-1.0 * (y1 * y3))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(j * N[(b * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+95], t$95$1, If[LessEqual[t, -2.55e-82], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e-70], N[(b * N[(j * N[(-1.0 * N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+94], N[(j * N[(y4 * N[(-1.0 * N[(y1 * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := j \cdot \left(b \cdot \left(t \cdot y4\right)\right)\\
\mathbf{if}\;t \leq -6 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.55 \cdot 10^{-82}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{-70}:\\
\;\;\;\;b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right)\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+94}:\\
\;\;\;\;j \cdot \left(y4 \cdot \left(-1 \cdot \left(y1 \cdot y3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -5.9999999999999998e95 or 4.4999999999999997e94 < t Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6417.0%
Applied rewrites17.0%
if -5.9999999999999998e95 < t < -2.55e-82Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
if -2.55e-82 < t < 1.4499999999999999e-70Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
Taylor expanded in x around 0
lower-*.f6417.1%
Applied rewrites17.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
if 1.4499999999999999e-70 < t < 4.4999999999999997e94Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6416.9%
Applied rewrites16.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= k -1.16e+145)
(* y2 (* y4 (* k y1)))
(if (<= k -9e-113)
(* j (* b (* t y4)))
(if (<= k 3.4e-97)
(* b (* j (* -1.0 (* x y0))))
(if (<= k 1.45e+159)
(* j (* -1.0 (* y1 (* y3 y4))))
(* y2 (* k (* y1 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.16e+145) {
tmp = y2 * (y4 * (k * y1));
} else if (k <= -9e-113) {
tmp = j * (b * (t * y4));
} else if (k <= 3.4e-97) {
tmp = b * (j * (-1.0 * (x * y0)));
} else if (k <= 1.45e+159) {
tmp = j * (-1.0 * (y1 * (y3 * y4)));
} else {
tmp = y2 * (k * (y1 * 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.16d+145)) then
tmp = y2 * (y4 * (k * y1))
else if (k <= (-9d-113)) then
tmp = j * (b * (t * y4))
else if (k <= 3.4d-97) then
tmp = b * (j * ((-1.0d0) * (x * y0)))
else if (k <= 1.45d+159) then
tmp = j * ((-1.0d0) * (y1 * (y3 * y4)))
else
tmp = y2 * (k * (y1 * 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.16e+145) {
tmp = y2 * (y4 * (k * y1));
} else if (k <= -9e-113) {
tmp = j * (b * (t * y4));
} else if (k <= 3.4e-97) {
tmp = b * (j * (-1.0 * (x * y0)));
} else if (k <= 1.45e+159) {
tmp = j * (-1.0 * (y1 * (y3 * y4)));
} else {
tmp = y2 * (k * (y1 * 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.16e+145: tmp = y2 * (y4 * (k * y1)) elif k <= -9e-113: tmp = j * (b * (t * y4)) elif k <= 3.4e-97: tmp = b * (j * (-1.0 * (x * y0))) elif k <= 1.45e+159: tmp = j * (-1.0 * (y1 * (y3 * y4))) else: tmp = y2 * (k * (y1 * 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.16e+145) tmp = Float64(y2 * Float64(y4 * Float64(k * y1))); elseif (k <= -9e-113) tmp = Float64(j * Float64(b * Float64(t * y4))); elseif (k <= 3.4e-97) tmp = Float64(b * Float64(j * Float64(-1.0 * Float64(x * y0)))); elseif (k <= 1.45e+159) tmp = Float64(j * Float64(-1.0 * Float64(y1 * Float64(y3 * y4)))); else tmp = Float64(y2 * Float64(k * Float64(y1 * 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.16e+145) tmp = y2 * (y4 * (k * y1)); elseif (k <= -9e-113) tmp = j * (b * (t * y4)); elseif (k <= 3.4e-97) tmp = b * (j * (-1.0 * (x * y0))); elseif (k <= 1.45e+159) tmp = j * (-1.0 * (y1 * (y3 * y4))); else tmp = y2 * (k * (y1 * 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.16e+145], N[(y2 * N[(y4 * N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, -9e-113], N[(j * N[(b * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.4e-97], N[(b * N[(j * N[(-1.0 * N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.45e+159], N[(j * N[(-1.0 * N[(y1 * N[(y3 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\mathbf{if}\;k \leq -1.16 \cdot 10^{+145}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\
\mathbf{elif}\;k \leq -9 \cdot 10^{-113}:\\
\;\;\;\;j \cdot \left(b \cdot \left(t \cdot y4\right)\right)\\
\mathbf{elif}\;k \leq 3.4 \cdot 10^{-97}:\\
\;\;\;\;b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right)\\
\mathbf{elif}\;k \leq 1.45 \cdot 10^{+159}:\\
\;\;\;\;j \cdot \left(-1 \cdot \left(y1 \cdot \left(y3 \cdot y4\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\
\end{array}
if k < -1.16e145Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around 0
lower-*.f6416.9%
Applied rewrites16.9%
if -1.16e145 < k < -9.0000000000000002e-113Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6417.0%
Applied rewrites17.0%
if -9.0000000000000002e-113 < k < 3.3999999999999999e-97Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
Taylor expanded in x around 0
lower-*.f6417.1%
Applied rewrites17.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
if 3.3999999999999999e-97 < k < 1.4500000000000001e159Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6429.0%
Applied rewrites29.0%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6416.9%
Applied rewrites16.9%
if 1.4500000000000001e159 < k Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
(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 (<= t -6e+95)
t_1
(if (<= t -2.55e-82)
(* y2 (* k (* y1 y4)))
(if (<= t 3.2e-75)
(* b (* j (* -1.0 (* x y0))))
(if (<= t 1.16e+84) (* y2 (* y4 (* k y1))) t_1))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = j * (b * (t * y4));
double tmp;
if (t <= -6e+95) {
tmp = t_1;
} else if (t <= -2.55e-82) {
tmp = y2 * (k * (y1 * y4));
} else if (t <= 3.2e-75) {
tmp = b * (j * (-1.0 * (x * y0)));
} else if (t <= 1.16e+84) {
tmp = y2 * (y4 * (k * y1));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = j * (b * (t * y4))
if (t <= (-6d+95)) then
tmp = t_1
else if (t <= (-2.55d-82)) then
tmp = y2 * (k * (y1 * y4))
else if (t <= 3.2d-75) then
tmp = b * (j * ((-1.0d0) * (x * y0)))
else if (t <= 1.16d+84) then
tmp = y2 * (y4 * (k * y1))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = j * (b * (t * y4));
double tmp;
if (t <= -6e+95) {
tmp = t_1;
} else if (t <= -2.55e-82) {
tmp = y2 * (k * (y1 * y4));
} else if (t <= 3.2e-75) {
tmp = b * (j * (-1.0 * (x * y0)));
} else if (t <= 1.16e+84) {
tmp = y2 * (y4 * (k * y1));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = j * (b * (t * y4)) tmp = 0 if t <= -6e+95: tmp = t_1 elif t <= -2.55e-82: tmp = y2 * (k * (y1 * y4)) elif t <= 3.2e-75: tmp = b * (j * (-1.0 * (x * y0))) elif t <= 1.16e+84: tmp = y2 * (y4 * (k * y1)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(j * Float64(b * Float64(t * y4))) tmp = 0.0 if (t <= -6e+95) tmp = t_1; elseif (t <= -2.55e-82) tmp = Float64(y2 * Float64(k * Float64(y1 * y4))); elseif (t <= 3.2e-75) tmp = Float64(b * Float64(j * Float64(-1.0 * Float64(x * y0)))); elseif (t <= 1.16e+84) tmp = Float64(y2 * Float64(y4 * Float64(k * y1))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = j * (b * (t * y4)); tmp = 0.0; if (t <= -6e+95) tmp = t_1; elseif (t <= -2.55e-82) tmp = y2 * (k * (y1 * y4)); elseif (t <= 3.2e-75) tmp = b * (j * (-1.0 * (x * y0))); elseif (t <= 1.16e+84) tmp = y2 * (y4 * (k * y1)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(j * N[(b * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+95], t$95$1, If[LessEqual[t, -2.55e-82], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-75], N[(b * N[(j * N[(-1.0 * N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.16e+84], N[(y2 * N[(y4 * N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := j \cdot \left(b \cdot \left(t \cdot y4\right)\right)\\
\mathbf{if}\;t \leq -6 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.55 \cdot 10^{-82}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-75}:\\
\;\;\;\;b \cdot \left(j \cdot \left(-1 \cdot \left(x \cdot y0\right)\right)\right)\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{+84}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -5.9999999999999998e95 or 1.16e84 < t Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6417.0%
Applied rewrites17.0%
if -5.9999999999999998e95 < t < -2.55e-82Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
if -2.55e-82 < t < 3.1999999999999998e-75Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
Taylor expanded in x around 0
lower-*.f6417.1%
Applied rewrites17.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
if 3.1999999999999998e-75 < t < 1.16e84Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around 0
lower-*.f6416.9%
Applied rewrites16.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* j (* b (* t y4)))))
(if (<= t -1.8e+94)
t_1
(if (<= t 1.16e+84) (* y2 (* y4 (* k y1))) t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = j * (b * (t * y4));
double tmp;
if (t <= -1.8e+94) {
tmp = t_1;
} else if (t <= 1.16e+84) {
tmp = y2 * (y4 * (k * y1));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = j * (b * (t * y4))
if (t <= (-1.8d+94)) then
tmp = t_1
else if (t <= 1.16d+84) then
tmp = y2 * (y4 * (k * y1))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = j * (b * (t * y4));
double tmp;
if (t <= -1.8e+94) {
tmp = t_1;
} else if (t <= 1.16e+84) {
tmp = y2 * (y4 * (k * y1));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = j * (b * (t * y4)) tmp = 0 if t <= -1.8e+94: tmp = t_1 elif t <= 1.16e+84: tmp = y2 * (y4 * (k * y1)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(j * Float64(b * Float64(t * y4))) tmp = 0.0 if (t <= -1.8e+94) tmp = t_1; elseif (t <= 1.16e+84) tmp = Float64(y2 * Float64(y4 * Float64(k * y1))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = j * (b * (t * y4)); tmp = 0.0; if (t <= -1.8e+94) tmp = t_1; elseif (t <= 1.16e+84) tmp = y2 * (y4 * (k * y1)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(j * N[(b * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.8e+94], t$95$1, If[LessEqual[t, 1.16e+84], N[(y2 * N[(y4 * N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := j \cdot \left(b \cdot \left(t \cdot y4\right)\right)\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{+84}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -1.8e94 or 1.16e84 < t Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6417.0%
Applied rewrites17.0%
if -1.8e94 < t < 1.16e84Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around 0
lower-*.f6416.9%
Applied rewrites16.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (let* ((t_1 (* j (* b (* t y4))))) (if (<= t -6e+95) t_1 (if (<= t 6e+82) (* y2 (* k (* y1 y4))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = j * (b * (t * y4));
double tmp;
if (t <= -6e+95) {
tmp = t_1;
} else if (t <= 6e+82) {
tmp = y2 * (k * (y1 * y4));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = j * (b * (t * y4))
if (t <= (-6d+95)) then
tmp = t_1
else if (t <= 6d+82) then
tmp = y2 * (k * (y1 * y4))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = j * (b * (t * y4));
double tmp;
if (t <= -6e+95) {
tmp = t_1;
} else if (t <= 6e+82) {
tmp = y2 * (k * (y1 * y4));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = j * (b * (t * y4)) tmp = 0 if t <= -6e+95: tmp = t_1 elif t <= 6e+82: tmp = y2 * (k * (y1 * y4)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(j * Float64(b * Float64(t * y4))) tmp = 0.0 if (t <= -6e+95) tmp = t_1; elseif (t <= 6e+82) tmp = Float64(y2 * Float64(k * Float64(y1 * y4))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = j * (b * (t * y4)); tmp = 0.0; if (t <= -6e+95) tmp = t_1; elseif (t <= 6e+82) tmp = y2 * (k * (y1 * y4)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(j * N[(b * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6e+95], t$95$1, If[LessEqual[t, 6e+82], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := j \cdot \left(b \cdot \left(t \cdot y4\right)\right)\\
\mathbf{if}\;t \leq -6 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+82}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -5.9999999999999998e95 or 5.9999999999999998e82 < t Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6417.0%
Applied rewrites17.0%
if -5.9999999999999998e95 < t < 5.9999999999999998e82Initial program 29.7%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* j (* b (* 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) {
return j * (b * (t * y4));
}
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 = j * (b * (t * y4))
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 j * (b * (t * y4));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return j * (b * (t * y4))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(j * Float64(b * Float64(t * y4))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = j * (b * (t * y4)); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(j * N[(b * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
j \cdot \left(b \cdot \left(t \cdot y4\right)\right)
Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6417.0%
Applied rewrites17.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* 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) {
return b * (j * (t * y4));
}
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 = b * (j * (t * y4))
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 b * (j * (t * y4));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return b * (j * (t * y4))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(b * Float64(j * Float64(t * y4))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = b * (j * (t * y4)); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
b \cdot \left(j \cdot \left(t \cdot y4\right)\right)
Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4%
Applied rewrites26.4%
Taylor expanded in x around 0
lower-*.f6417.1%
Applied rewrites17.1%
herbie shell --seed 2025258
(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)))))