
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)
\end{array}
Herbie found 36 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)
\end{array}
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* j t) (* k y)))
(t_2
(*
y4
(-
(fma b t_1 (* y1 (- (* k y2) (* j y3))))
(* c (- (* t y2) (* y y3)))))))
(if (<= y4 -1.55e+67)
t_2
(if (<= y4 -0.00128)
(* x (* y2 (* y0 (+ c (* -1.0 (/ (* a y1) y0))))))
(if (<= y4 -1.08e-104)
(* -1.0 (* y5 (* j (* i (+ t (* -1.0 (/ (* y0 y3) i)))))))
(if (<= y4 -3.2e-226)
(*
b
(-
(fma a (- (* x y) (* t z)) (* y4 t_1))
(* y0 (- (* j x) (* k z)))))
(if (<= y4 5e+140)
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i y1)))))
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 = (j * t) - (k * y);
double t_2 = y4 * (fma(b, t_1, (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
double tmp;
if (y4 <= -1.55e+67) {
tmp = t_2;
} else if (y4 <= -0.00128) {
tmp = x * (y2 * (y0 * (c + (-1.0 * ((a * y1) / y0)))));
} else if (y4 <= -1.08e-104) {
tmp = -1.0 * (y5 * (j * (i * (t + (-1.0 * ((y0 * y3) / i))))));
} else if (y4 <= -3.2e-226) {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * t_1)) - (y0 * ((j * x) - (k * z))));
} else if (y4 <= 5e+140) {
tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
} 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(j * t) - Float64(k * y)) t_2 = Float64(y4 * Float64(fma(b, t_1, Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))) tmp = 0.0 if (y4 <= -1.55e+67) tmp = t_2; elseif (y4 <= -0.00128) tmp = Float64(x * Float64(y2 * Float64(y0 * Float64(c + Float64(-1.0 * Float64(Float64(a * y1) / y0)))))); elseif (y4 <= -1.08e-104) tmp = Float64(-1.0 * Float64(y5 * Float64(j * Float64(i * Float64(t + Float64(-1.0 * Float64(Float64(y0 * y3) / i))))))); elseif (y4 <= -3.2e-226) tmp = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * t_1)) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); elseif (y4 <= 5e+140) tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y4 * N[(N[(b * t$95$1 + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -1.55e+67], t$95$2, If[LessEqual[y4, -0.00128], N[(x * N[(y2 * N[(y0 * N[(c + N[(-1.0 * N[(N[(a * y1), $MachinePrecision] / y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -1.08e-104], N[(-1.0 * N[(y5 * N[(j * N[(i * N[(t + N[(-1.0 * N[(N[(y0 * y3), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -3.2e-226], N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 5e+140], N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
t_2 := y4 \cdot \left(\mathsf{fma}\left(b, t\_1, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{if}\;y4 \leq -1.55 \cdot 10^{+67}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y4 \leq -0.00128:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(y0 \cdot \left(c + -1 \cdot \frac{a \cdot y1}{y0}\right)\right)\right)\\
\mathbf{elif}\;y4 \leq -1.08 \cdot 10^{-104}:\\
\;\;\;\;-1 \cdot \left(y5 \cdot \left(j \cdot \left(i \cdot \left(t + -1 \cdot \frac{y0 \cdot y3}{i}\right)\right)\right)\right)\\
\mathbf{elif}\;y4 \leq -3.2 \cdot 10^{-226}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot t\_1\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;y4 \leq 5 \cdot 10^{+140}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y4 < -1.54999999999999998e67 or 5.00000000000000008e140 < y4 Initial program 29.7%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.7%
if -1.54999999999999998e67 < y4 < -0.0012800000000000001Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f6429.0
Applied rewrites29.0%
if -0.0012800000000000001 < y4 < -1.07999999999999997e-104Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in j around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in i around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f6428.7
Applied rewrites28.7%
if -1.07999999999999997e-104 < y4 < -3.19999999999999982e-226Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
if -3.19999999999999982e-226 < y4 < 5.00000000000000008e140Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1
(*
b
(-
(fma 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))))
(t_3 (+ (* y0 (* -1.0 (* z (- (* c y3) (* b k))))) t_2)))
(if (<= b -8.6e+131)
t_1
(if (<= b -4.7e-99)
(+ (* y1 (* z (- (* a y3) (* i k)))) t_2)
(if (<= b -6.2e-285)
t_3
(if (<= b 4.6e-160)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= b 2.0)
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i y1)))))
(if (<= b 4.5e+150) t_3 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 * (fma(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 t_3 = (y0 * (-1.0 * (z * ((c * y3) - (b * k))))) + t_2;
double tmp;
if (b <= -8.6e+131) {
tmp = t_1;
} else if (b <= -4.7e-99) {
tmp = (y1 * (z * ((a * y3) - (i * k)))) + t_2;
} else if (b <= -6.2e-285) {
tmp = t_3;
} else if (b <= 4.6e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 2.0) {
tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
} else if (b <= 4.5e+150) {
tmp = t_3;
} 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(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))) t_2 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) t_3 = Float64(Float64(y0 * Float64(-1.0 * Float64(z * Float64(Float64(c * y3) - Float64(b * k))))) + t_2) tmp = 0.0 if (b <= -8.6e+131) tmp = t_1; elseif (b <= -4.7e-99) tmp = Float64(Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k)))) + t_2); elseif (b <= -6.2e-285) tmp = t_3; elseif (b <= 4.6e-160) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (b <= 2.0) tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); elseif (b <= 4.5e+150) tmp = t_3; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, 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]}, Block[{t$95$3 = N[(N[(y0 * N[(-1.0 * N[(z * N[(N[(c * y3), $MachinePrecision] - N[(b * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[b, -8.6e+131], t$95$1, If[LessEqual[b, -4.7e-99], N[(N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, -6.2e-285], t$95$3, If[LessEqual[b, 4.6e-160], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.0], N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.5e+150], t$95$3, t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
t_2 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
t_3 := y0 \cdot \left(-1 \cdot \left(z \cdot \left(c \cdot y3 - b \cdot k\right)\right)\right) + t\_2\\
\mathbf{if}\;b \leq -8.6 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -4.7 \cdot 10^{-99}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) + t\_2\\
\mathbf{elif}\;b \leq -6.2 \cdot 10^{-285}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq 4.6 \cdot 10^{-160}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq 2:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+150}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.6000000000000003e131 or 4.5e150 < b Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
if -8.6000000000000003e131 < b < -4.69999999999999989e-99Initial program 29.7%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.1
Applied rewrites37.1%
if -4.69999999999999989e-99 < b < -6.2000000000000002e-285 or 2 < b < 4.5e150Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.2
Applied rewrites37.2%
if -6.2000000000000002e-285 < b < 4.5999999999999997e-160Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 4.5999999999999997e-160 < b < 2Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* t y2) (* y y3)))
(t_2
(*
y4
(-
(fma b (- (* j t) (* k y)) (* y1 (- (* k y2) (* j y3))))
(* c t_1))))
(t_3 (- (* b y0) (* i y1))))
(if (<= y4 -4.6e+149)
t_2
(if (<= y4 -6e-93)
(*
j
(-
(fma -1.0 (* y3 (- (* y1 y4) (* y0 y5))) (* t (- (* b y4) (* i y5))))
(* x t_3)))
(if (<= y4 -9.6e-239)
(*
c
(-
(fma -1.0 (* i (- (* x y) (* t z))) (* y0 (- (* x y2) (* y3 z))))
(* y4 t_1)))
(if (<= y4 5e+140)
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 (* a (- (/ (* c y0) a) y1))))
(* j 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 = (t * y2) - (y * y3);
double t_2 = y4 * (fma(b, ((j * t) - (k * y)), (y1 * ((k * y2) - (j * y3)))) - (c * t_1));
double t_3 = (b * y0) - (i * y1);
double tmp;
if (y4 <= -4.6e+149) {
tmp = t_2;
} else if (y4 <= -6e-93) {
tmp = j * (fma(-1.0, (y3 * ((y1 * y4) - (y0 * y5))), (t * ((b * y4) - (i * y5)))) - (x * t_3));
} else if (y4 <= -9.6e-239) {
tmp = c * (fma(-1.0, (i * ((x * y) - (t * z))), (y0 * ((x * y2) - (y3 * z)))) - (y4 * t_1));
} else if (y4 <= 5e+140) {
tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * (a * (((c * y0) / a) - y1)))) - (j * 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(t * y2) - Float64(y * y3)) t_2 = Float64(y4 * Float64(fma(b, Float64(Float64(j * t) - Float64(k * y)), Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * t_1))) t_3 = Float64(Float64(b * y0) - Float64(i * y1)) tmp = 0.0 if (y4 <= -4.6e+149) tmp = t_2; elseif (y4 <= -6e-93) tmp = Float64(j * Float64(fma(-1.0, Float64(y3 * Float64(Float64(y1 * y4) - Float64(y0 * y5))), Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) - Float64(x * t_3))); elseif (y4 <= -9.6e-239) tmp = Float64(c * Float64(fma(-1.0, Float64(i * Float64(Float64(x * y) - Float64(t * z))), Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))) - Float64(y4 * t_1))); elseif (y4 <= 5e+140) tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * Float64(a * Float64(Float64(Float64(c * y0) / a) - y1)))) - Float64(j * t_3))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y4 * N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -4.6e+149], t$95$2, If[LessEqual[y4, -6e-93], N[(j * N[(N[(-1.0 * N[(y3 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -9.6e-239], N[(c * N[(N[(-1.0 * N[(i * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y4 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 5e+140], N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * N[(a * N[(N[(N[(c * y0), $MachinePrecision] / a), $MachinePrecision] - y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot y2 - y \cdot y3\\
t_2 := y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot t\_1\right)\\
t_3 := b \cdot y0 - i \cdot y1\\
\mathbf{if}\;y4 \leq -4.6 \cdot 10^{+149}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y4 \leq -6 \cdot 10^{-93}:\\
\;\;\;\;j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot t\_3\right)\\
\mathbf{elif}\;y4 \leq -9.6 \cdot 10^{-239}:\\
\;\;\;\;c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot t\_1\right)\\
\mathbf{elif}\;y4 \leq 5 \cdot 10^{+140}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(a \cdot \left(\frac{c \cdot y0}{a} - y1\right)\right)\right) - j \cdot t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y4 < -4.5999999999999997e149 or 5.00000000000000008e140 < y4 Initial program 29.7%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.7%
if -4.5999999999999997e149 < y4 < -6.0000000000000003e-93Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
if -6.0000000000000003e-93 < y4 < -9.59999999999999971e-239Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.7%
if -9.59999999999999971e-239 < y4 < 5.00000000000000008e140Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lift-*.f6437.1
Applied rewrites37.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* t y2) (* y y3)))
(t_2
(*
y4
(-
(fma b (- (* j t) (* k y)) (* y1 (- (* k y2) (* j y3))))
(* c t_1))))
(t_3 (- (* b y0) (* i y1))))
(if (<= y4 -4.6e+149)
t_2
(if (<= y4 -6e-93)
(*
j
(-
(fma -1.0 (* y3 (- (* y1 y4) (* y0 y5))) (* t (- (* b y4) (* i y5))))
(* x t_3)))
(if (<= y4 -9.6e-239)
(*
c
(-
(fma -1.0 (* i (- (* x y) (* t z))) (* y0 (- (* x y2) (* y3 z))))
(* y4 t_1)))
(if (<= y4 5e+140)
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
(* j 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 = (t * y2) - (y * y3);
double t_2 = y4 * (fma(b, ((j * t) - (k * y)), (y1 * ((k * y2) - (j * y3)))) - (c * t_1));
double t_3 = (b * y0) - (i * y1);
double tmp;
if (y4 <= -4.6e+149) {
tmp = t_2;
} else if (y4 <= -6e-93) {
tmp = j * (fma(-1.0, (y3 * ((y1 * y4) - (y0 * y5))), (t * ((b * y4) - (i * y5)))) - (x * t_3));
} else if (y4 <= -9.6e-239) {
tmp = c * (fma(-1.0, (i * ((x * y) - (t * z))), (y0 * ((x * y2) - (y3 * z)))) - (y4 * t_1));
} else if (y4 <= 5e+140) {
tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * 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(t * y2) - Float64(y * y3)) t_2 = Float64(y4 * Float64(fma(b, Float64(Float64(j * t) - Float64(k * y)), Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * t_1))) t_3 = Float64(Float64(b * y0) - Float64(i * y1)) tmp = 0.0 if (y4 <= -4.6e+149) tmp = t_2; elseif (y4 <= -6e-93) tmp = Float64(j * Float64(fma(-1.0, Float64(y3 * Float64(Float64(y1 * y4) - Float64(y0 * y5))), Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) - Float64(x * t_3))); elseif (y4 <= -9.6e-239) tmp = Float64(c * Float64(fma(-1.0, Float64(i * Float64(Float64(x * y) - Float64(t * z))), Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))) - Float64(y4 * t_1))); elseif (y4 <= 5e+140) tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * t_3))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y4 * N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -4.6e+149], t$95$2, If[LessEqual[y4, -6e-93], N[(j * N[(N[(-1.0 * N[(y3 * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(x * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -9.6e-239], N[(c * N[(N[(-1.0 * N[(i * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y4 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 5e+140], N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot y2 - y \cdot y3\\
t_2 := y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot t\_1\right)\\
t_3 := b \cdot y0 - i \cdot y1\\
\mathbf{if}\;y4 \leq -4.6 \cdot 10^{+149}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y4 \leq -6 \cdot 10^{-93}:\\
\;\;\;\;j \cdot \left(\mathsf{fma}\left(-1, y3 \cdot \left(y1 \cdot y4 - y0 \cdot y5\right), t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - x \cdot t\_3\right)\\
\mathbf{elif}\;y4 \leq -9.6 \cdot 10^{-239}:\\
\;\;\;\;c \cdot \left(\mathsf{fma}\left(-1, i \cdot \left(x \cdot y - t \cdot z\right), y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot t\_1\right)\\
\mathbf{elif}\;y4 \leq 5 \cdot 10^{+140}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y4 < -4.5999999999999997e149 or 5.00000000000000008e140 < y4 Initial program 29.7%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.7%
if -4.5999999999999997e149 < y4 < -6.0000000000000003e-93Initial program 29.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
if -6.0000000000000003e-93 < y4 < -9.59999999999999971e-239Initial program 29.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.7%
if -9.59999999999999971e-239 < y4 < 5.00000000000000008e140Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))))
(if (<= t_1 INFINITY)
t_1
(*
b
(-
(fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
(* y0 (- (* j x) (* k z))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) < +inf.0Initial program 29.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 b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1
(*
y4
(-
(fma b (- (* j t) (* k y)) (* y1 (- (* k y2) (* j y3))))
(* c (- (* t y2) (* y y3))))))
(t_2 (- (* c y0) (* a y1))))
(if (<= y4 -4.6e+149)
t_1
(if (<= y4 -2.35e-203)
(*
-1.0
(*
y3
(-
(fma j (- (* y1 y4) (* y0 y5)) (* z t_2))
(* y (- (* c y4) (* a y5))))))
(if (<= y4 5e+140)
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 t_2))
(* 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 = y4 * (fma(b, ((j * t) - (k * y)), (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
double t_2 = (c * y0) - (a * y1);
double tmp;
if (y4 <= -4.6e+149) {
tmp = t_1;
} else if (y4 <= -2.35e-203) {
tmp = -1.0 * (y3 * (fma(j, ((y1 * y4) - (y0 * y5)), (z * t_2)) - (y * ((c * y4) - (a * y5)))));
} else if (y4 <= 5e+140) {
tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * t_2)) - (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(y4 * Float64(fma(b, Float64(Float64(j * t) - Float64(k * y)), Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))) t_2 = Float64(Float64(c * y0) - Float64(a * y1)) tmp = 0.0 if (y4 <= -4.6e+149) tmp = t_1; elseif (y4 <= -2.35e-203) tmp = Float64(-1.0 * Float64(y3 * Float64(fma(j, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(z * t_2)) - Float64(y * Float64(Float64(c * y4) - Float64(a * y5)))))); elseif (y4 <= 5e+140) tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * t_2)) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y4 * N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -4.6e+149], t$95$1, If[LessEqual[y4, -2.35e-203], N[(-1.0 * N[(y3 * N[(N[(j * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(z * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 5e+140], N[(x * N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision] + N[(y2 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
t_2 := c \cdot y0 - a \cdot y1\\
\mathbf{if}\;y4 \leq -4.6 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y4 \leq -2.35 \cdot 10^{-203}:\\
\;\;\;\;-1 \cdot \left(y3 \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot t\_2\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)\\
\mathbf{elif}\;y4 \leq 5 \cdot 10^{+140}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot t\_2\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y4 < -4.5999999999999997e149 or 5.00000000000000008e140 < y4 Initial program 29.7%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.7%
if -4.5999999999999997e149 < y4 < -2.35000000000000003e-203Initial program 29.7%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.4%
if -2.35000000000000003e-203 < y4 < 5.00000000000000008e140Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1
(*
b
(-
(fma 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 -8.6e+131)
t_1
(if (<= b -4.7e-99)
(+ (* y1 (* z (- (* a y3) (* i k)))) t_2)
(if (<= b -6.2e-285)
(+ (* y0 (* -1.0 (* z (- (* c y3) (* b k))))) t_2)
(if (<= b 5.5e-160)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= b 4.1e+97)
(+ (* y0 (* c (- (* x y2) (* 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 = b * (fma(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 <= -8.6e+131) {
tmp = t_1;
} else if (b <= -4.7e-99) {
tmp = (y1 * (z * ((a * y3) - (i * k)))) + t_2;
} else if (b <= -6.2e-285) {
tmp = (y0 * (-1.0 * (z * ((c * y3) - (b * k))))) + t_2;
} else if (b <= 5.5e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 4.1e+97) {
tmp = (y0 * (c * ((x * y2) - (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(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))) t_2 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (b <= -8.6e+131) tmp = t_1; elseif (b <= -4.7e-99) tmp = Float64(Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k)))) + t_2); elseif (b <= -6.2e-285) tmp = Float64(Float64(y0 * Float64(-1.0 * Float64(z * Float64(Float64(c * y3) - Float64(b * k))))) + t_2); elseif (b <= 5.5e-160) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (b <= 4.1e+97) tmp = Float64(Float64(y0 * Float64(c * Float64(Float64(x * y2) - Float64(y3 * z)))) + t_2); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, 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, -8.6e+131], t$95$1, If[LessEqual[b, -4.7e-99], N[(N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, -6.2e-285], N[(N[(y0 * N[(-1.0 * N[(z * N[(N[(c * y3), $MachinePrecision] - N[(b * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, 5.5e-160], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.1e+97], N[(N[(y0 * N[(c * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
t_2 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;b \leq -8.6 \cdot 10^{+131}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -4.7 \cdot 10^{-99}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) + t\_2\\
\mathbf{elif}\;b \leq -6.2 \cdot 10^{-285}:\\
\;\;\;\;y0 \cdot \left(-1 \cdot \left(z \cdot \left(c \cdot y3 - b \cdot k\right)\right)\right) + t\_2\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{-160}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq 4.1 \cdot 10^{+97}:\\
\;\;\;\;y0 \cdot \left(c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -8.6000000000000003e131 or 4.09999999999999988e97 < b Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
if -8.6000000000000003e131 < b < -4.69999999999999989e-99Initial program 29.7%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.1
Applied rewrites37.1%
if -4.69999999999999989e-99 < b < -6.2000000000000002e-285Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.2
Applied rewrites37.2%
if -6.2000000000000002e-285 < b < 5.5e-160Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 5.5e-160 < b < 4.09999999999999988e97Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in b around 0
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6437.6
Applied rewrites37.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* x y) (* t z)))
(t_2 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
(if (<= b -1.8e+56)
(* a (* b t_1))
(if (<= b -4.7e-99)
(+ (* y1 (* z (- (* a y3) (* i k)))) t_2)
(if (<= b -6.2e-285)
(+ (* y0 (* -1.0 (* z (- (* c y3) (* b k))))) t_2)
(if (<= b 5.5e-160)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= b 1.22e+150)
(+ (* y0 (* c (- (* x y2) (* y3 z)))) t_2)
(* b (* a t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (b <= -1.8e+56) {
tmp = a * (b * t_1);
} else if (b <= -4.7e-99) {
tmp = (y1 * (z * ((a * y3) - (i * k)))) + t_2;
} else if (b <= -6.2e-285) {
tmp = (y0 * (-1.0 * (z * ((c * y3) - (b * k))))) + t_2;
} else if (b <= 5.5e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.22e+150) {
tmp = (y0 * (c * ((x * y2) - (y3 * z)))) + t_2;
} else {
tmp = b * (a * 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 = (x * y) - (t * z)
t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
if (b <= (-1.8d+56)) then
tmp = a * (b * t_1)
else if (b <= (-4.7d-99)) then
tmp = (y1 * (z * ((a * y3) - (i * k)))) + t_2
else if (b <= (-6.2d-285)) then
tmp = (y0 * ((-1.0d0) * (z * ((c * y3) - (b * k))))) + t_2
else if (b <= 5.5d-160) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (b <= 1.22d+150) then
tmp = (y0 * (c * ((x * y2) - (y3 * z)))) + t_2
else
tmp = b * (a * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (b <= -1.8e+56) {
tmp = a * (b * t_1);
} else if (b <= -4.7e-99) {
tmp = (y1 * (z * ((a * y3) - (i * k)))) + t_2;
} else if (b <= -6.2e-285) {
tmp = (y0 * (-1.0 * (z * ((c * y3) - (b * k))))) + t_2;
} else if (b <= 5.5e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.22e+150) {
tmp = (y0 * (c * ((x * y2) - (y3 * z)))) + t_2;
} else {
tmp = b * (a * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (x * y) - (t * z) t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)) tmp = 0 if b <= -1.8e+56: tmp = a * (b * t_1) elif b <= -4.7e-99: tmp = (y1 * (z * ((a * y3) - (i * k)))) + t_2 elif b <= -6.2e-285: tmp = (y0 * (-1.0 * (z * ((c * y3) - (b * k))))) + t_2 elif b <= 5.5e-160: tmp = a * (y5 * ((t * y2) - (y * y3))) elif b <= 1.22e+150: tmp = (y0 * (c * ((x * y2) - (y3 * z)))) + t_2 else: tmp = b * (a * 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(x * y) - Float64(t * z)) t_2 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (b <= -1.8e+56) tmp = Float64(a * Float64(b * t_1)); elseif (b <= -4.7e-99) tmp = Float64(Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k)))) + t_2); elseif (b <= -6.2e-285) tmp = Float64(Float64(y0 * Float64(-1.0 * Float64(z * Float64(Float64(c * y3) - Float64(b * k))))) + t_2); elseif (b <= 5.5e-160) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (b <= 1.22e+150) tmp = Float64(Float64(y0 * Float64(c * Float64(Float64(x * y2) - Float64(y3 * z)))) + t_2); else tmp = Float64(b * Float64(a * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (x * y) - (t * z); t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)); tmp = 0.0; if (b <= -1.8e+56) tmp = a * (b * t_1); elseif (b <= -4.7e-99) tmp = (y1 * (z * ((a * y3) - (i * k)))) + t_2; elseif (b <= -6.2e-285) tmp = (y0 * (-1.0 * (z * ((c * y3) - (b * k))))) + t_2; elseif (b <= 5.5e-160) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (b <= 1.22e+150) tmp = (y0 * (c * ((x * y2) - (y3 * z)))) + t_2; else tmp = b * (a * 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[(x * y), $MachinePrecision] - N[(t * z), $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, -1.8e+56], N[(a * N[(b * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -4.7e-99], N[(N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, -6.2e-285], N[(N[(y0 * N[(-1.0 * N[(z * N[(N[(c * y3), $MachinePrecision] - N[(b * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, 5.5e-160], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.22e+150], N[(N[(y0 * N[(c * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], N[(b * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y - t \cdot z\\
t_2 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;b \leq -1.8 \cdot 10^{+56}:\\
\;\;\;\;a \cdot \left(b \cdot t\_1\right)\\
\mathbf{elif}\;b \leq -4.7 \cdot 10^{-99}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) + t\_2\\
\mathbf{elif}\;b \leq -6.2 \cdot 10^{-285}:\\
\;\;\;\;y0 \cdot \left(-1 \cdot \left(z \cdot \left(c \cdot y3 - b \cdot k\right)\right)\right) + t\_2\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{-160}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq 1.22 \cdot 10^{+150}:\\
\;\;\;\;y0 \cdot \left(c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot t\_1\right)\\
\end{array}
\end{array}
if b < -1.79999999999999999e56Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.8
Applied rewrites26.8%
if -1.79999999999999999e56 < b < -4.69999999999999989e-99Initial program 29.7%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.1
Applied rewrites37.1%
if -4.69999999999999989e-99 < b < -6.2000000000000002e-285Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.2
Applied rewrites37.2%
if -6.2000000000000002e-285 < b < 5.5e-160Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 5.5e-160 < b < 1.22e150Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in b around 0
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6437.6
Applied rewrites37.6%
if 1.22e150 < b Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* x y) (* t z)))
(t_2 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
(if (<= b -1.8e+56)
(* a (* b t_1))
(if (<= b -3.7e-285)
(+ (* y1 (* z (- (* a y3) (* i k)))) t_2)
(if (<= b 5.5e-160)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= b 1.22e+150)
(+ (* y0 (* c (- (* x y2) (* y3 z)))) t_2)
(* b (* a t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (b <= -1.8e+56) {
tmp = a * (b * t_1);
} else if (b <= -3.7e-285) {
tmp = (y1 * (z * ((a * y3) - (i * k)))) + t_2;
} else if (b <= 5.5e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.22e+150) {
tmp = (y0 * (c * ((x * y2) - (y3 * z)))) + t_2;
} else {
tmp = b * (a * 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 = (x * y) - (t * z)
t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
if (b <= (-1.8d+56)) then
tmp = a * (b * t_1)
else if (b <= (-3.7d-285)) then
tmp = (y1 * (z * ((a * y3) - (i * k)))) + t_2
else if (b <= 5.5d-160) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (b <= 1.22d+150) then
tmp = (y0 * (c * ((x * y2) - (y3 * z)))) + t_2
else
tmp = b * (a * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (b <= -1.8e+56) {
tmp = a * (b * t_1);
} else if (b <= -3.7e-285) {
tmp = (y1 * (z * ((a * y3) - (i * k)))) + t_2;
} else if (b <= 5.5e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.22e+150) {
tmp = (y0 * (c * ((x * y2) - (y3 * z)))) + t_2;
} else {
tmp = b * (a * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (x * y) - (t * z) t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)) tmp = 0 if b <= -1.8e+56: tmp = a * (b * t_1) elif b <= -3.7e-285: tmp = (y1 * (z * ((a * y3) - (i * k)))) + t_2 elif b <= 5.5e-160: tmp = a * (y5 * ((t * y2) - (y * y3))) elif b <= 1.22e+150: tmp = (y0 * (c * ((x * y2) - (y3 * z)))) + t_2 else: tmp = b * (a * 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(x * y) - Float64(t * z)) t_2 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (b <= -1.8e+56) tmp = Float64(a * Float64(b * t_1)); elseif (b <= -3.7e-285) tmp = Float64(Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k)))) + t_2); elseif (b <= 5.5e-160) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (b <= 1.22e+150) tmp = Float64(Float64(y0 * Float64(c * Float64(Float64(x * y2) - Float64(y3 * z)))) + t_2); else tmp = Float64(b * Float64(a * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (x * y) - (t * z); t_2 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)); tmp = 0.0; if (b <= -1.8e+56) tmp = a * (b * t_1); elseif (b <= -3.7e-285) tmp = (y1 * (z * ((a * y3) - (i * k)))) + t_2; elseif (b <= 5.5e-160) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (b <= 1.22e+150) tmp = (y0 * (c * ((x * y2) - (y3 * z)))) + t_2; else tmp = b * (a * 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[(x * y), $MachinePrecision] - N[(t * z), $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, -1.8e+56], N[(a * N[(b * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.7e-285], N[(N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, 5.5e-160], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.22e+150], N[(N[(y0 * N[(c * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], N[(b * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y - t \cdot z\\
t_2 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;b \leq -1.8 \cdot 10^{+56}:\\
\;\;\;\;a \cdot \left(b \cdot t\_1\right)\\
\mathbf{elif}\;b \leq -3.7 \cdot 10^{-285}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) + t\_2\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{-160}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq 1.22 \cdot 10^{+150}:\\
\;\;\;\;y0 \cdot \left(c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot t\_1\right)\\
\end{array}
\end{array}
if b < -1.79999999999999999e56Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.8
Applied rewrites26.8%
if -1.79999999999999999e56 < b < -3.6999999999999997e-285Initial program 29.7%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.1
Applied rewrites37.1%
if -3.6999999999999997e-285 < b < 5.5e-160Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 5.5e-160 < b < 1.22e150Initial program 29.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in b around 0
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6437.6
Applied rewrites37.6%
if 1.22e150 < b Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1
(+
(* y1 (* z (- (* a y3) (* i k))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))))
(if (<= b -1.8e+56)
(* a (* b (- (* x y) (* t z))))
(if (<= b -3.7e-285)
t_1
(if (<= b 5.2e-160)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= b 29000.0)
(* x (* y2 (* y0 (+ c (* -1.0 (/ (* a y1) 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 = (y1 * (z * ((a * y3) - (i * k)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
double tmp;
if (b <= -1.8e+56) {
tmp = a * (b * ((x * y) - (t * z)));
} else if (b <= -3.7e-285) {
tmp = t_1;
} else if (b <= 5.2e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 29000.0) {
tmp = x * (y2 * (y0 * (c + (-1.0 * ((a * y1) / 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 = (y1 * (z * ((a * y3) - (i * k)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
if (b <= (-1.8d+56)) then
tmp = a * (b * ((x * y) - (t * z)))
else if (b <= (-3.7d-285)) then
tmp = t_1
else if (b <= 5.2d-160) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (b <= 29000.0d0) then
tmp = x * (y2 * (y0 * (c + ((-1.0d0) * ((a * y1) / 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 = (y1 * (z * ((a * y3) - (i * k)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
double tmp;
if (b <= -1.8e+56) {
tmp = a * (b * ((x * y) - (t * z)));
} else if (b <= -3.7e-285) {
tmp = t_1;
} else if (b <= 5.2e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 29000.0) {
tmp = x * (y2 * (y0 * (c + (-1.0 * ((a * y1) / 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 = (y1 * (z * ((a * y3) - (i * k)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))) tmp = 0 if b <= -1.8e+56: tmp = a * (b * ((x * y) - (t * z))) elif b <= -3.7e-285: tmp = t_1 elif b <= 5.2e-160: tmp = a * (y5 * ((t * y2) - (y * y3))) elif b <= 29000.0: tmp = x * (y2 * (y0 * (c + (-1.0 * ((a * y1) / 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(Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) tmp = 0.0 if (b <= -1.8e+56) tmp = Float64(a * Float64(b * Float64(Float64(x * y) - Float64(t * z)))); elseif (b <= -3.7e-285) tmp = t_1; elseif (b <= 5.2e-160) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (b <= 29000.0) tmp = Float64(x * Float64(y2 * Float64(y0 * Float64(c + Float64(-1.0 * Float64(Float64(a * y1) / 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 = (y1 * (z * ((a * y3) - (i * k)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); tmp = 0.0; if (b <= -1.8e+56) tmp = a * (b * ((x * y) - (t * z))); elseif (b <= -3.7e-285) tmp = t_1; elseif (b <= 5.2e-160) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (b <= 29000.0) tmp = x * (y2 * (y0 * (c + (-1.0 * ((a * y1) / 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[(N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $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, -1.8e+56], N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.7e-285], t$95$1, If[LessEqual[b, 5.2e-160], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 29000.0], N[(x * N[(y2 * N[(y0 * N[(c + N[(-1.0 * N[(N[(a * y1), $MachinePrecision] / y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;b \leq -1.8 \cdot 10^{+56}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{elif}\;b \leq -3.7 \cdot 10^{-285}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{-160}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq 29000:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(y0 \cdot \left(c + -1 \cdot \frac{a \cdot y1}{y0}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.79999999999999999e56Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.8
Applied rewrites26.8%
if -1.79999999999999999e56 < b < -3.6999999999999997e-285 or 29000 < b Initial program 29.7%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.1
Applied rewrites37.1%
if -3.6999999999999997e-285 < b < 5.20000000000000007e-160Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 5.20000000000000007e-160 < b < 29000Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f6429.0
Applied rewrites29.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* x y) (* t z))))
(if (<= b -1.4e+24)
(* a (* b t_1))
(if (<= b -3.7e-285)
(+
(* a (* y1 (* y3 z)))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
(if (<= b 5.2e-160)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= b 1.5e+164)
(* x (* y2 (* y0 (+ c (* -1.0 (/ (* a y1) y0))))))
(* b (* a t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double tmp;
if (b <= -1.4e+24) {
tmp = a * (b * t_1);
} else if (b <= -3.7e-285) {
tmp = (a * (y1 * (y3 * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
} else if (b <= 5.2e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.5e+164) {
tmp = x * (y2 * (y0 * (c + (-1.0 * ((a * y1) / y0)))));
} else {
tmp = b * (a * t_1);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) - (t * z)
if (b <= (-1.4d+24)) then
tmp = a * (b * t_1)
else if (b <= (-3.7d-285)) then
tmp = (a * (y1 * (y3 * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
else if (b <= 5.2d-160) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (b <= 1.5d+164) then
tmp = x * (y2 * (y0 * (c + ((-1.0d0) * ((a * y1) / y0)))))
else
tmp = b * (a * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double tmp;
if (b <= -1.4e+24) {
tmp = a * (b * t_1);
} else if (b <= -3.7e-285) {
tmp = (a * (y1 * (y3 * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
} else if (b <= 5.2e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.5e+164) {
tmp = x * (y2 * (y0 * (c + (-1.0 * ((a * y1) / y0)))));
} else {
tmp = b * (a * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (x * y) - (t * z) tmp = 0 if b <= -1.4e+24: tmp = a * (b * t_1) elif b <= -3.7e-285: tmp = (a * (y1 * (y3 * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))) elif b <= 5.2e-160: tmp = a * (y5 * ((t * y2) - (y * y3))) elif b <= 1.5e+164: tmp = x * (y2 * (y0 * (c + (-1.0 * ((a * y1) / y0))))) else: tmp = b * (a * 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(x * y) - Float64(t * z)) tmp = 0.0 if (b <= -1.4e+24) tmp = Float64(a * Float64(b * t_1)); elseif (b <= -3.7e-285) tmp = Float64(Float64(a * Float64(y1 * Float64(y3 * z))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))); elseif (b <= 5.2e-160) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (b <= 1.5e+164) tmp = Float64(x * Float64(y2 * Float64(y0 * Float64(c + Float64(-1.0 * Float64(Float64(a * y1) / y0)))))); else tmp = Float64(b * Float64(a * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (x * y) - (t * z); tmp = 0.0; if (b <= -1.4e+24) tmp = a * (b * t_1); elseif (b <= -3.7e-285) tmp = (a * (y1 * (y3 * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); elseif (b <= 5.2e-160) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (b <= 1.5e+164) tmp = x * (y2 * (y0 * (c + (-1.0 * ((a * y1) / y0))))); else tmp = b * (a * 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[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.4e+24], N[(a * N[(b * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.7e-285], N[(N[(a * N[(y1 * N[(y3 * z), $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, 5.2e-160], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e+164], N[(x * N[(y2 * N[(y0 * N[(c + N[(-1.0 * N[(N[(a * y1), $MachinePrecision] / y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y - t \cdot z\\
\mathbf{if}\;b \leq -1.4 \cdot 10^{+24}:\\
\;\;\;\;a \cdot \left(b \cdot t\_1\right)\\
\mathbf{elif}\;b \leq -3.7 \cdot 10^{-285}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{-160}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{+164}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(y0 \cdot \left(c + -1 \cdot \frac{a \cdot y1}{y0}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot t\_1\right)\\
\end{array}
\end{array}
if b < -1.4000000000000001e24Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.8
Applied rewrites26.8%
if -1.4000000000000001e24 < b < -3.6999999999999997e-285Initial program 29.7%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
Applied rewrites36.4%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f6435.3
Applied rewrites35.3%
if -3.6999999999999997e-285 < b < 5.20000000000000007e-160Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 5.20000000000000007e-160 < b < 1.5e164Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f6429.0
Applied rewrites29.0%
if 1.5e164 < b Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* x y) (* t z))))
(if (<= b -3.1e+56)
(* a (* b t_1))
(if (<= b -2.15e-104)
(* y (* y5 (- (* i k) (* a y3))))
(if (<= b -3.7e-285)
(* -1.0 (* y5 (* y0 (- (* k y2) (* j y3)))))
(if (<= b 5.2e-160)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= b 1.5e+164)
(* x (* y2 (* y0 (+ c (* -1.0 (/ (* a y1) y0))))))
(* b (* a t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double tmp;
if (b <= -3.1e+56) {
tmp = a * (b * t_1);
} else if (b <= -2.15e-104) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (b <= -3.7e-285) {
tmp = -1.0 * (y5 * (y0 * ((k * y2) - (j * y3))));
} else if (b <= 5.2e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.5e+164) {
tmp = x * (y2 * (y0 * (c + (-1.0 * ((a * y1) / y0)))));
} else {
tmp = b * (a * t_1);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) - (t * z)
if (b <= (-3.1d+56)) then
tmp = a * (b * t_1)
else if (b <= (-2.15d-104)) then
tmp = y * (y5 * ((i * k) - (a * y3)))
else if (b <= (-3.7d-285)) then
tmp = (-1.0d0) * (y5 * (y0 * ((k * y2) - (j * y3))))
else if (b <= 5.2d-160) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (b <= 1.5d+164) then
tmp = x * (y2 * (y0 * (c + ((-1.0d0) * ((a * y1) / y0)))))
else
tmp = b * (a * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double tmp;
if (b <= -3.1e+56) {
tmp = a * (b * t_1);
} else if (b <= -2.15e-104) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (b <= -3.7e-285) {
tmp = -1.0 * (y5 * (y0 * ((k * y2) - (j * y3))));
} else if (b <= 5.2e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.5e+164) {
tmp = x * (y2 * (y0 * (c + (-1.0 * ((a * y1) / y0)))));
} else {
tmp = b * (a * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (x * y) - (t * z) tmp = 0 if b <= -3.1e+56: tmp = a * (b * t_1) elif b <= -2.15e-104: tmp = y * (y5 * ((i * k) - (a * y3))) elif b <= -3.7e-285: tmp = -1.0 * (y5 * (y0 * ((k * y2) - (j * y3)))) elif b <= 5.2e-160: tmp = a * (y5 * ((t * y2) - (y * y3))) elif b <= 1.5e+164: tmp = x * (y2 * (y0 * (c + (-1.0 * ((a * y1) / y0))))) else: tmp = b * (a * 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(x * y) - Float64(t * z)) tmp = 0.0 if (b <= -3.1e+56) tmp = Float64(a * Float64(b * t_1)); elseif (b <= -2.15e-104) tmp = Float64(y * Float64(y5 * Float64(Float64(i * k) - Float64(a * y3)))); elseif (b <= -3.7e-285) tmp = Float64(-1.0 * Float64(y5 * Float64(y0 * Float64(Float64(k * y2) - Float64(j * y3))))); elseif (b <= 5.2e-160) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (b <= 1.5e+164) tmp = Float64(x * Float64(y2 * Float64(y0 * Float64(c + Float64(-1.0 * Float64(Float64(a * y1) / y0)))))); else tmp = Float64(b * Float64(a * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (x * y) - (t * z); tmp = 0.0; if (b <= -3.1e+56) tmp = a * (b * t_1); elseif (b <= -2.15e-104) tmp = y * (y5 * ((i * k) - (a * y3))); elseif (b <= -3.7e-285) tmp = -1.0 * (y5 * (y0 * ((k * y2) - (j * y3)))); elseif (b <= 5.2e-160) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (b <= 1.5e+164) tmp = x * (y2 * (y0 * (c + (-1.0 * ((a * y1) / y0))))); else tmp = b * (a * 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[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.1e+56], N[(a * N[(b * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.15e-104], N[(y * N[(y5 * N[(N[(i * k), $MachinePrecision] - N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.7e-285], N[(-1.0 * N[(y5 * N[(y0 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.2e-160], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e+164], N[(x * N[(y2 * N[(y0 * N[(c + N[(-1.0 * N[(N[(a * y1), $MachinePrecision] / y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y - t \cdot z\\
\mathbf{if}\;b \leq -3.1 \cdot 10^{+56}:\\
\;\;\;\;a \cdot \left(b \cdot t\_1\right)\\
\mathbf{elif}\;b \leq -2.15 \cdot 10^{-104}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq -3.7 \cdot 10^{-285}:\\
\;\;\;\;-1 \cdot \left(y5 \cdot \left(y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{-160}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{+164}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(y0 \cdot \left(c + -1 \cdot \frac{a \cdot y1}{y0}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot t\_1\right)\\
\end{array}
\end{array}
if b < -3.10000000000000005e56Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.8
Applied rewrites26.8%
if -3.10000000000000005e56 < b < -2.15000000000000005e-104Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
if -2.15000000000000005e-104 < b < -3.6999999999999997e-285Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in j around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in y0 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.5
Applied rewrites26.5%
if -3.6999999999999997e-285 < b < 5.20000000000000007e-160Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 5.20000000000000007e-160 < b < 1.5e164Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift-*.f6429.0
Applied rewrites29.0%
if 1.5e164 < b Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* x y) (* t z))))
(if (<= b -3.1e+56)
(* a (* b t_1))
(if (<= b -2.15e-104)
(* y (* y5 (- (* i k) (* a y3))))
(if (<= b -3.7e-285)
(* -1.0 (* y5 (* y0 (- (* k y2) (* j y3)))))
(if (<= b 5.2e-160)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= b 1.5e+164)
(* x (* y2 (* a (- (/ (* c y0) a) y1))))
(* b (* a t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double tmp;
if (b <= -3.1e+56) {
tmp = a * (b * t_1);
} else if (b <= -2.15e-104) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (b <= -3.7e-285) {
tmp = -1.0 * (y5 * (y0 * ((k * y2) - (j * y3))));
} else if (b <= 5.2e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.5e+164) {
tmp = x * (y2 * (a * (((c * y0) / a) - y1)));
} else {
tmp = b * (a * t_1);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) - (t * z)
if (b <= (-3.1d+56)) then
tmp = a * (b * t_1)
else if (b <= (-2.15d-104)) then
tmp = y * (y5 * ((i * k) - (a * y3)))
else if (b <= (-3.7d-285)) then
tmp = (-1.0d0) * (y5 * (y0 * ((k * y2) - (j * y3))))
else if (b <= 5.2d-160) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (b <= 1.5d+164) then
tmp = x * (y2 * (a * (((c * y0) / a) - y1)))
else
tmp = b * (a * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double tmp;
if (b <= -3.1e+56) {
tmp = a * (b * t_1);
} else if (b <= -2.15e-104) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (b <= -3.7e-285) {
tmp = -1.0 * (y5 * (y0 * ((k * y2) - (j * y3))));
} else if (b <= 5.2e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.5e+164) {
tmp = x * (y2 * (a * (((c * y0) / a) - y1)));
} else {
tmp = b * (a * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (x * y) - (t * z) tmp = 0 if b <= -3.1e+56: tmp = a * (b * t_1) elif b <= -2.15e-104: tmp = y * (y5 * ((i * k) - (a * y3))) elif b <= -3.7e-285: tmp = -1.0 * (y5 * (y0 * ((k * y2) - (j * y3)))) elif b <= 5.2e-160: tmp = a * (y5 * ((t * y2) - (y * y3))) elif b <= 1.5e+164: tmp = x * (y2 * (a * (((c * y0) / a) - y1))) else: tmp = b * (a * 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(x * y) - Float64(t * z)) tmp = 0.0 if (b <= -3.1e+56) tmp = Float64(a * Float64(b * t_1)); elseif (b <= -2.15e-104) tmp = Float64(y * Float64(y5 * Float64(Float64(i * k) - Float64(a * y3)))); elseif (b <= -3.7e-285) tmp = Float64(-1.0 * Float64(y5 * Float64(y0 * Float64(Float64(k * y2) - Float64(j * y3))))); elseif (b <= 5.2e-160) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (b <= 1.5e+164) tmp = Float64(x * Float64(y2 * Float64(a * Float64(Float64(Float64(c * y0) / a) - y1)))); else tmp = Float64(b * Float64(a * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (x * y) - (t * z); tmp = 0.0; if (b <= -3.1e+56) tmp = a * (b * t_1); elseif (b <= -2.15e-104) tmp = y * (y5 * ((i * k) - (a * y3))); elseif (b <= -3.7e-285) tmp = -1.0 * (y5 * (y0 * ((k * y2) - (j * y3)))); elseif (b <= 5.2e-160) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (b <= 1.5e+164) tmp = x * (y2 * (a * (((c * y0) / a) - y1))); else tmp = b * (a * 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[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.1e+56], N[(a * N[(b * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.15e-104], N[(y * N[(y5 * N[(N[(i * k), $MachinePrecision] - N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.7e-285], N[(-1.0 * N[(y5 * N[(y0 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.2e-160], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e+164], N[(x * N[(y2 * N[(a * N[(N[(N[(c * y0), $MachinePrecision] / a), $MachinePrecision] - y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y - t \cdot z\\
\mathbf{if}\;b \leq -3.1 \cdot 10^{+56}:\\
\;\;\;\;a \cdot \left(b \cdot t\_1\right)\\
\mathbf{elif}\;b \leq -2.15 \cdot 10^{-104}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq -3.7 \cdot 10^{-285}:\\
\;\;\;\;-1 \cdot \left(y5 \cdot \left(y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{-160}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{+164}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(a \cdot \left(\frac{c \cdot y0}{a} - y1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot t\_1\right)\\
\end{array}
\end{array}
if b < -3.10000000000000005e56Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.8
Applied rewrites26.8%
if -3.10000000000000005e56 < b < -2.15000000000000005e-104Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
if -2.15000000000000005e-104 < b < -3.6999999999999997e-285Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in j around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in y0 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.5
Applied rewrites26.5%
if -3.6999999999999997e-285 < b < 5.20000000000000007e-160Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 5.20000000000000007e-160 < b < 1.5e164Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lift-*.f6429.0
Applied rewrites29.0%
if 1.5e164 < b Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* x y) (* t z))))
(if (<= b -3.1e+56)
(* a (* b t_1))
(if (<= b -2.15e-104)
(* y (* y5 (- (* i k) (* a y3))))
(if (<= b -3.7e-285)
(* -1.0 (* y5 (* y0 (- (* k y2) (* j y3)))))
(if (<= b 5.2e-160)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= b 1.5e+164)
(* x (* y2 (- (* c y0) (* a y1))))
(* b (* a t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double tmp;
if (b <= -3.1e+56) {
tmp = a * (b * t_1);
} else if (b <= -2.15e-104) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (b <= -3.7e-285) {
tmp = -1.0 * (y5 * (y0 * ((k * y2) - (j * y3))));
} else if (b <= 5.2e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.5e+164) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = b * (a * t_1);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) - (t * z)
if (b <= (-3.1d+56)) then
tmp = a * (b * t_1)
else if (b <= (-2.15d-104)) then
tmp = y * (y5 * ((i * k) - (a * y3)))
else if (b <= (-3.7d-285)) then
tmp = (-1.0d0) * (y5 * (y0 * ((k * y2) - (j * y3))))
else if (b <= 5.2d-160) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (b <= 1.5d+164) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else
tmp = b * (a * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double tmp;
if (b <= -3.1e+56) {
tmp = a * (b * t_1);
} else if (b <= -2.15e-104) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (b <= -3.7e-285) {
tmp = -1.0 * (y5 * (y0 * ((k * y2) - (j * y3))));
} else if (b <= 5.2e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.5e+164) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = b * (a * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (x * y) - (t * z) tmp = 0 if b <= -3.1e+56: tmp = a * (b * t_1) elif b <= -2.15e-104: tmp = y * (y5 * ((i * k) - (a * y3))) elif b <= -3.7e-285: tmp = -1.0 * (y5 * (y0 * ((k * y2) - (j * y3)))) elif b <= 5.2e-160: tmp = a * (y5 * ((t * y2) - (y * y3))) elif b <= 1.5e+164: tmp = x * (y2 * ((c * y0) - (a * y1))) else: tmp = b * (a * 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(x * y) - Float64(t * z)) tmp = 0.0 if (b <= -3.1e+56) tmp = Float64(a * Float64(b * t_1)); elseif (b <= -2.15e-104) tmp = Float64(y * Float64(y5 * Float64(Float64(i * k) - Float64(a * y3)))); elseif (b <= -3.7e-285) tmp = Float64(-1.0 * Float64(y5 * Float64(y0 * Float64(Float64(k * y2) - Float64(j * y3))))); elseif (b <= 5.2e-160) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (b <= 1.5e+164) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); else tmp = Float64(b * Float64(a * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (x * y) - (t * z); tmp = 0.0; if (b <= -3.1e+56) tmp = a * (b * t_1); elseif (b <= -2.15e-104) tmp = y * (y5 * ((i * k) - (a * y3))); elseif (b <= -3.7e-285) tmp = -1.0 * (y5 * (y0 * ((k * y2) - (j * y3)))); elseif (b <= 5.2e-160) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (b <= 1.5e+164) tmp = x * (y2 * ((c * y0) - (a * y1))); else tmp = b * (a * 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[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.1e+56], N[(a * N[(b * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -2.15e-104], N[(y * N[(y5 * N[(N[(i * k), $MachinePrecision] - N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.7e-285], N[(-1.0 * N[(y5 * N[(y0 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.2e-160], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e+164], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y - t \cdot z\\
\mathbf{if}\;b \leq -3.1 \cdot 10^{+56}:\\
\;\;\;\;a \cdot \left(b \cdot t\_1\right)\\
\mathbf{elif}\;b \leq -2.15 \cdot 10^{-104}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq -3.7 \cdot 10^{-285}:\\
\;\;\;\;-1 \cdot \left(y5 \cdot \left(y0 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{-160}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{+164}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot t\_1\right)\\
\end{array}
\end{array}
if b < -3.10000000000000005e56Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.8
Applied rewrites26.8%
if -3.10000000000000005e56 < b < -2.15000000000000005e-104Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
if -2.15000000000000005e-104 < b < -3.6999999999999997e-285Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in j around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in y0 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.5
Applied rewrites26.5%
if -3.6999999999999997e-285 < b < 5.20000000000000007e-160Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 5.20000000000000007e-160 < b < 1.5e164Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 1.5e164 < b Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* x y) (* t z))))
(if (<= b -3.1e+56)
(* a (* b t_1))
(if (<= b -1.15e-104)
(* y (* y5 (- (* i k) (* a y3))))
(if (<= b -3.7e-285)
(* -1.0 (* y0 (* y5 (- (* k y2) (* j y3)))))
(if (<= b 5.2e-160)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= b 1.5e+164)
(* x (* y2 (- (* c y0) (* a y1))))
(* b (* a t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double tmp;
if (b <= -3.1e+56) {
tmp = a * (b * t_1);
} else if (b <= -1.15e-104) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (b <= -3.7e-285) {
tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
} else if (b <= 5.2e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.5e+164) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = b * (a * t_1);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (x * y) - (t * z)
if (b <= (-3.1d+56)) then
tmp = a * (b * t_1)
else if (b <= (-1.15d-104)) then
tmp = y * (y5 * ((i * k) - (a * y3)))
else if (b <= (-3.7d-285)) then
tmp = (-1.0d0) * (y0 * (y5 * ((k * y2) - (j * y3))))
else if (b <= 5.2d-160) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (b <= 1.5d+164) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else
tmp = b * (a * t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double tmp;
if (b <= -3.1e+56) {
tmp = a * (b * t_1);
} else if (b <= -1.15e-104) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (b <= -3.7e-285) {
tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
} else if (b <= 5.2e-160) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= 1.5e+164) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = b * (a * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (x * y) - (t * z) tmp = 0 if b <= -3.1e+56: tmp = a * (b * t_1) elif b <= -1.15e-104: tmp = y * (y5 * ((i * k) - (a * y3))) elif b <= -3.7e-285: tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3)))) elif b <= 5.2e-160: tmp = a * (y5 * ((t * y2) - (y * y3))) elif b <= 1.5e+164: tmp = x * (y2 * ((c * y0) - (a * y1))) else: tmp = b * (a * 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(x * y) - Float64(t * z)) tmp = 0.0 if (b <= -3.1e+56) tmp = Float64(a * Float64(b * t_1)); elseif (b <= -1.15e-104) tmp = Float64(y * Float64(y5 * Float64(Float64(i * k) - Float64(a * y3)))); elseif (b <= -3.7e-285) tmp = Float64(-1.0 * Float64(y0 * Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3))))); elseif (b <= 5.2e-160) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (b <= 1.5e+164) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); else tmp = Float64(b * Float64(a * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (x * y) - (t * z); tmp = 0.0; if (b <= -3.1e+56) tmp = a * (b * t_1); elseif (b <= -1.15e-104) tmp = y * (y5 * ((i * k) - (a * y3))); elseif (b <= -3.7e-285) tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3)))); elseif (b <= 5.2e-160) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (b <= 1.5e+164) tmp = x * (y2 * ((c * y0) - (a * y1))); else tmp = b * (a * 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[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.1e+56], N[(a * N[(b * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -1.15e-104], N[(y * N[(y5 * N[(N[(i * k), $MachinePrecision] - N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -3.7e-285], N[(-1.0 * N[(y0 * N[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.2e-160], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e+164], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y - t \cdot z\\
\mathbf{if}\;b \leq -3.1 \cdot 10^{+56}:\\
\;\;\;\;a \cdot \left(b \cdot t\_1\right)\\
\mathbf{elif}\;b \leq -1.15 \cdot 10^{-104}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq -3.7 \cdot 10^{-285}:\\
\;\;\;\;-1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{-160}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{+164}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot t\_1\right)\\
\end{array}
\end{array}
if b < -3.10000000000000005e56Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.8
Applied rewrites26.8%
if -3.10000000000000005e56 < b < -1.15e-104Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
if -1.15e-104 < b < -3.6999999999999997e-285Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if -3.6999999999999997e-285 < b < 5.20000000000000007e-160Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 5.20000000000000007e-160 < b < 1.5e164Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 1.5e164 < b Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* a (* y5 (- (* t y2) (* y y3))))))
(if (<= y5 -1.35e+89)
t_1
(if (<= y5 -4e-143)
(* b (* a (- (* x y) (* t z))))
(if (<= y5 4e-168)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<= y5 1.4e+88)
t_1
(if (<= y5 2.65e+185)
(* k (* y5 (fma -1.0 (* y0 y2) (* i y))))
(* t (* i (fma -1.0 (* j y5) (* c z)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = a * (y5 * ((t * y2) - (y * y3)));
double tmp;
if (y5 <= -1.35e+89) {
tmp = t_1;
} else if (y5 <= -4e-143) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y5 <= 4e-168) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y5 <= 1.4e+88) {
tmp = t_1;
} else if (y5 <= 2.65e+185) {
tmp = k * (y5 * fma(-1.0, (y0 * y2), (i * y)));
} else {
tmp = t * (i * fma(-1.0, (j * y5), (c * z)));
}
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(y5 * Float64(Float64(t * y2) - Float64(y * y3)))) tmp = 0.0 if (y5 <= -1.35e+89) tmp = t_1; elseif (y5 <= -4e-143) tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z)))); elseif (y5 <= 4e-168) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (y5 <= 1.4e+88) tmp = t_1; elseif (y5 <= 2.65e+185) tmp = Float64(k * Float64(y5 * fma(-1.0, Float64(y0 * y2), Float64(i * y)))); else tmp = Float64(t * Float64(i * fma(-1.0, Float64(j * y5), Float64(c * z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -1.35e+89], t$95$1, If[LessEqual[y5, -4e-143], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 4e-168], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.4e+88], t$95$1, If[LessEqual[y5, 2.65e+185], N[(k * N[(y5 * N[(-1.0 * N[(y0 * y2), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(i * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{if}\;y5 \leq -1.35 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y5 \leq -4 \cdot 10^{-143}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{elif}\;y5 \leq 4 \cdot 10^{-168}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;y5 \leq 1.4 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y5 \leq 2.65 \cdot 10^{+185}:\\
\;\;\;\;k \cdot \left(y5 \cdot \mathsf{fma}\left(-1, y0 \cdot y2, i \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(i \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\
\end{array}
\end{array}
if y5 < -1.35e89 or 4.0000000000000002e-168 < y5 < 1.39999999999999994e88Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if -1.35e89 < y5 < -3.9999999999999998e-143Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if -3.9999999999999998e-143 < y5 < 4.0000000000000002e-168Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 1.39999999999999994e88 < y5 < 2.65000000000000004e185Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
if 2.65000000000000004e185 < y5 Initial program 29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in i around inf
lower-*.f64N/A
lower-fma.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 (* a (* y5 (- (* t y2) (* y y3))))))
(if (<= y5 -1.35e+89)
t_1
(if (<= y5 -4e-143)
(* b (* a (- (* x y) (* t z))))
(if (<= y5 4e-168)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<= y5 1.4e+88)
t_1
(* k (* y5 (fma -1.0 (* y0 y2) (* i y))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = a * (y5 * ((t * y2) - (y * y3)));
double tmp;
if (y5 <= -1.35e+89) {
tmp = t_1;
} else if (y5 <= -4e-143) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y5 <= 4e-168) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y5 <= 1.4e+88) {
tmp = t_1;
} else {
tmp = k * (y5 * fma(-1.0, (y0 * y2), (i * y)));
}
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(y5 * Float64(Float64(t * y2) - Float64(y * y3)))) tmp = 0.0 if (y5 <= -1.35e+89) tmp = t_1; elseif (y5 <= -4e-143) tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z)))); elseif (y5 <= 4e-168) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (y5 <= 1.4e+88) tmp = t_1; else tmp = Float64(k * Float64(y5 * fma(-1.0, Float64(y0 * y2), Float64(i * y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -1.35e+89], t$95$1, If[LessEqual[y5, -4e-143], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 4e-168], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.4e+88], t$95$1, N[(k * N[(y5 * N[(-1.0 * N[(y0 * y2), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{if}\;y5 \leq -1.35 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y5 \leq -4 \cdot 10^{-143}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{elif}\;y5 \leq 4 \cdot 10^{-168}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;y5 \leq 1.4 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(y5 \cdot \mathsf{fma}\left(-1, y0 \cdot y2, i \cdot y\right)\right)\\
\end{array}
\end{array}
if y5 < -1.35e89 or 4.0000000000000002e-168 < y5 < 1.39999999999999994e88Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if -1.35e89 < y5 < -3.9999999999999998e-143Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if -3.9999999999999998e-143 < y5 < 4.0000000000000002e-168Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 1.39999999999999994e88 < y5 Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* a (* y5 (- (* t y2) (* y y3))))))
(if (<= y5 -1.35e+89)
t_1
(if (<= y5 -4e-143)
(* b (* a (- (* x y) (* t z))))
(if (<= y5 4e-168)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<= y5 2.05e+108) t_1 (* y (* y5 (- (* i k) (* a y3))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = a * (y5 * ((t * y2) - (y * y3)));
double tmp;
if (y5 <= -1.35e+89) {
tmp = t_1;
} else if (y5 <= -4e-143) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y5 <= 4e-168) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y5 <= 2.05e+108) {
tmp = t_1;
} else {
tmp = y * (y5 * ((i * k) - (a * y3)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = a * (y5 * ((t * y2) - (y * y3)))
if (y5 <= (-1.35d+89)) then
tmp = t_1
else if (y5 <= (-4d-143)) then
tmp = b * (a * ((x * y) - (t * z)))
else if (y5 <= 4d-168) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else if (y5 <= 2.05d+108) then
tmp = t_1
else
tmp = y * (y5 * ((i * k) - (a * y3)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = a * (y5 * ((t * y2) - (y * y3)));
double tmp;
if (y5 <= -1.35e+89) {
tmp = t_1;
} else if (y5 <= -4e-143) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y5 <= 4e-168) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y5 <= 2.05e+108) {
tmp = t_1;
} else {
tmp = y * (y5 * ((i * k) - (a * y3)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = a * (y5 * ((t * y2) - (y * y3))) tmp = 0 if y5 <= -1.35e+89: tmp = t_1 elif y5 <= -4e-143: tmp = b * (a * ((x * y) - (t * z))) elif y5 <= 4e-168: tmp = x * (y2 * ((c * y0) - (a * y1))) elif y5 <= 2.05e+108: tmp = t_1 else: tmp = y * (y5 * ((i * k) - (a * y3))) 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(y5 * Float64(Float64(t * y2) - Float64(y * y3)))) tmp = 0.0 if (y5 <= -1.35e+89) tmp = t_1; elseif (y5 <= -4e-143) tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z)))); elseif (y5 <= 4e-168) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (y5 <= 2.05e+108) tmp = t_1; else tmp = Float64(y * Float64(y5 * Float64(Float64(i * k) - Float64(a * y3)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = a * (y5 * ((t * y2) - (y * y3))); tmp = 0.0; if (y5 <= -1.35e+89) tmp = t_1; elseif (y5 <= -4e-143) tmp = b * (a * ((x * y) - (t * z))); elseif (y5 <= 4e-168) tmp = x * (y2 * ((c * y0) - (a * y1))); elseif (y5 <= 2.05e+108) tmp = t_1; else tmp = y * (y5 * ((i * k) - (a * y3))); 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[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -1.35e+89], t$95$1, If[LessEqual[y5, -4e-143], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 4e-168], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 2.05e+108], t$95$1, N[(y * N[(y5 * N[(N[(i * k), $MachinePrecision] - N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{if}\;y5 \leq -1.35 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y5 \leq -4 \cdot 10^{-143}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{elif}\;y5 \leq 4 \cdot 10^{-168}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;y5 \leq 2.05 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\
\end{array}
\end{array}
if y5 < -1.35e89 or 4.0000000000000002e-168 < y5 < 2.05e108Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if -1.35e89 < y5 < -3.9999999999999998e-143Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if -3.9999999999999998e-143 < y5 < 4.0000000000000002e-168Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 2.05e108 < y5 Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y around -inf
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
(if (<= x -1.82e+112)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<= x 4.5e-91)
(* a (* y5 (- (* t y2) (* y y3))))
(* a (* b (- (* x y) (* t z)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (x <= -1.82e+112) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (x <= 4.5e-91) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else {
tmp = a * (b * ((x * y) - (t * z)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (x <= (-1.82d+112)) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else if (x <= 4.5d-91) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else
tmp = a * (b * ((x * y) - (t * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (x <= -1.82e+112) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (x <= 4.5e-91) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else {
tmp = a * (b * ((x * y) - (t * z)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if x <= -1.82e+112: tmp = x * (y2 * ((c * y0) - (a * y1))) elif x <= 4.5e-91: tmp = a * (y5 * ((t * y2) - (y * y3))) else: tmp = a * (b * ((x * y) - (t * z))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (x <= -1.82e+112) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (x <= 4.5e-91) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); else tmp = Float64(a * Float64(b * Float64(Float64(x * y) - Float64(t * z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (x <= -1.82e+112) tmp = x * (y2 * ((c * y0) - (a * y1))); elseif (x <= 4.5e-91) tmp = a * (y5 * ((t * y2) - (y * y3))); else tmp = a * (b * ((x * y) - (t * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[x, -1.82e+112], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e-91], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.82 \cdot 10^{+112}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{-91}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\end{array}
\end{array}
if x < -1.82000000000000001e112Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if -1.82000000000000001e112 < x < 4.49999999999999976e-91Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 4.49999999999999976e-91 < x Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.8
Applied rewrites26.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y5 -1.3e+89)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= y5 1.3e-32)
(* a (* b (- (* x y) (* t z))))
(* y (* y5 (- (* i k) (* a y3)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -1.3e+89) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (y5 <= 1.3e-32) {
tmp = a * (b * ((x * y) - (t * z)));
} else {
tmp = y * (y5 * ((i * k) - (a * y3)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y5 <= (-1.3d+89)) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (y5 <= 1.3d-32) then
tmp = a * (b * ((x * y) - (t * z)))
else
tmp = y * (y5 * ((i * k) - (a * y3)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -1.3e+89) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (y5 <= 1.3e-32) {
tmp = a * (b * ((x * y) - (t * z)));
} else {
tmp = y * (y5 * ((i * k) - (a * y3)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y5 <= -1.3e+89: tmp = a * (y5 * ((t * y2) - (y * y3))) elif y5 <= 1.3e-32: tmp = a * (b * ((x * y) - (t * z))) else: tmp = y * (y5 * ((i * k) - (a * y3))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y5 <= -1.3e+89) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (y5 <= 1.3e-32) tmp = Float64(a * Float64(b * Float64(Float64(x * y) - Float64(t * z)))); else tmp = Float64(y * Float64(y5 * Float64(Float64(i * k) - Float64(a * y3)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y5 <= -1.3e+89) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (y5 <= 1.3e-32) tmp = a * (b * ((x * y) - (t * z))); else tmp = y * (y5 * ((i * k) - (a * y3))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -1.3e+89], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.3e-32], N[(a * N[(b * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(y5 * N[(N[(i * k), $MachinePrecision] - N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -1.3 \cdot 10^{+89}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;y5 \leq 1.3 \cdot 10^{-32}:\\
\;\;\;\;a \cdot \left(b \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\
\end{array}
\end{array}
if y5 < -1.3e89Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if -1.3e89 < y5 < 1.2999999999999999e-32Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.8
Applied rewrites26.8%
if 1.2999999999999999e-32 < y5 Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in y around -inf
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 (* -1.0 (* a (* x (* y1 y2))))))
(if (<= x -2.3e+205)
t_1
(if (<= x 5.5e-91)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= x 4.4e+104) (* b (* t (* -1.0 (* a z)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -1.0 * (a * (x * (y1 * y2)));
double tmp;
if (x <= -2.3e+205) {
tmp = t_1;
} else if (x <= 5.5e-91) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (x <= 4.4e+104) {
tmp = b * (t * (-1.0 * (a * z)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (-1.0d0) * (a * (x * (y1 * y2)))
if (x <= (-2.3d+205)) then
tmp = t_1
else if (x <= 5.5d-91) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (x <= 4.4d+104) then
tmp = b * (t * ((-1.0d0) * (a * z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -1.0 * (a * (x * (y1 * y2)));
double tmp;
if (x <= -2.3e+205) {
tmp = t_1;
} else if (x <= 5.5e-91) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (x <= 4.4e+104) {
tmp = b * (t * (-1.0 * (a * z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = -1.0 * (a * (x * (y1 * y2))) tmp = 0 if x <= -2.3e+205: tmp = t_1 elif x <= 5.5e-91: tmp = a * (y5 * ((t * y2) - (y * y3))) elif x <= 4.4e+104: tmp = b * (t * (-1.0 * (a * z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(-1.0 * Float64(a * Float64(x * Float64(y1 * y2)))) tmp = 0.0 if (x <= -2.3e+205) tmp = t_1; elseif (x <= 5.5e-91) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (x <= 4.4e+104) tmp = Float64(b * Float64(t * Float64(-1.0 * Float64(a * z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = -1.0 * (a * (x * (y1 * y2))); tmp = 0.0; if (x <= -2.3e+205) tmp = t_1; elseif (x <= 5.5e-91) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (x <= 4.4e+104) tmp = b * (t * (-1.0 * (a * z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(-1.0 * N[(a * N[(x * N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.3e+205], t$95$1, If[LessEqual[x, 5.5e-91], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.4e+104], N[(b * N[(t * N[(-1.0 * N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(a \cdot \left(x \cdot \left(y1 \cdot y2\right)\right)\right)\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{+205}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{-91}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+104}:\\
\;\;\;\;b \cdot \left(t \cdot \left(-1 \cdot \left(a \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.30000000000000007e205 or 4.40000000000000001e104 < x Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
if -2.30000000000000007e205 < x < 5.49999999999999965e-91Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
if 5.49999999999999965e-91 < x < 4.40000000000000001e104Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in z around inf
lower-*.f64N/A
lift-*.f6417.5
Applied rewrites17.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* -1.0 (* a (* x (* y1 y2))))))
(if (<= x -1.16e+204)
t_1
(if (<= x -6.5e-98)
(* a (* y5 (* t y2)))
(if (<= x -4.2e-186)
(* b (* j (* t y4)))
(if (<= x 1.75e-262)
(* a (* -1.0 (* y (* y3 y5))))
(if (<= x 1.8e-16)
(* t (* y2 (* -1.0 (* c y4))))
(if (<= x 2.6e+104) (* t (* -1.0 (* a (* b z)))) t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -1.0 * (a * (x * (y1 * y2)));
double tmp;
if (x <= -1.16e+204) {
tmp = t_1;
} else if (x <= -6.5e-98) {
tmp = a * (y5 * (t * y2));
} else if (x <= -4.2e-186) {
tmp = b * (j * (t * y4));
} else if (x <= 1.75e-262) {
tmp = a * (-1.0 * (y * (y3 * y5)));
} else if (x <= 1.8e-16) {
tmp = t * (y2 * (-1.0 * (c * y4)));
} else if (x <= 2.6e+104) {
tmp = t * (-1.0 * (a * (b * z)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (-1.0d0) * (a * (x * (y1 * y2)))
if (x <= (-1.16d+204)) then
tmp = t_1
else if (x <= (-6.5d-98)) then
tmp = a * (y5 * (t * y2))
else if (x <= (-4.2d-186)) then
tmp = b * (j * (t * y4))
else if (x <= 1.75d-262) then
tmp = a * ((-1.0d0) * (y * (y3 * y5)))
else if (x <= 1.8d-16) then
tmp = t * (y2 * ((-1.0d0) * (c * y4)))
else if (x <= 2.6d+104) then
tmp = t * ((-1.0d0) * (a * (b * z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -1.0 * (a * (x * (y1 * y2)));
double tmp;
if (x <= -1.16e+204) {
tmp = t_1;
} else if (x <= -6.5e-98) {
tmp = a * (y5 * (t * y2));
} else if (x <= -4.2e-186) {
tmp = b * (j * (t * y4));
} else if (x <= 1.75e-262) {
tmp = a * (-1.0 * (y * (y3 * y5)));
} else if (x <= 1.8e-16) {
tmp = t * (y2 * (-1.0 * (c * y4)));
} else if (x <= 2.6e+104) {
tmp = t * (-1.0 * (a * (b * z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = -1.0 * (a * (x * (y1 * y2))) tmp = 0 if x <= -1.16e+204: tmp = t_1 elif x <= -6.5e-98: tmp = a * (y5 * (t * y2)) elif x <= -4.2e-186: tmp = b * (j * (t * y4)) elif x <= 1.75e-262: tmp = a * (-1.0 * (y * (y3 * y5))) elif x <= 1.8e-16: tmp = t * (y2 * (-1.0 * (c * y4))) elif x <= 2.6e+104: tmp = t * (-1.0 * (a * (b * z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(-1.0 * Float64(a * Float64(x * Float64(y1 * y2)))) tmp = 0.0 if (x <= -1.16e+204) tmp = t_1; elseif (x <= -6.5e-98) tmp = Float64(a * Float64(y5 * Float64(t * y2))); elseif (x <= -4.2e-186) tmp = Float64(b * Float64(j * Float64(t * y4))); elseif (x <= 1.75e-262) tmp = Float64(a * Float64(-1.0 * Float64(y * Float64(y3 * y5)))); elseif (x <= 1.8e-16) tmp = Float64(t * Float64(y2 * Float64(-1.0 * Float64(c * y4)))); elseif (x <= 2.6e+104) tmp = Float64(t * Float64(-1.0 * Float64(a * Float64(b * z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = -1.0 * (a * (x * (y1 * y2))); tmp = 0.0; if (x <= -1.16e+204) tmp = t_1; elseif (x <= -6.5e-98) tmp = a * (y5 * (t * y2)); elseif (x <= -4.2e-186) tmp = b * (j * (t * y4)); elseif (x <= 1.75e-262) tmp = a * (-1.0 * (y * (y3 * y5))); elseif (x <= 1.8e-16) tmp = t * (y2 * (-1.0 * (c * y4))); elseif (x <= 2.6e+104) tmp = t * (-1.0 * (a * (b * z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(-1.0 * N[(a * N[(x * N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.16e+204], t$95$1, If[LessEqual[x, -6.5e-98], N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.2e-186], N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.75e-262], N[(a * N[(-1.0 * N[(y * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.8e-16], N[(t * N[(y2 * N[(-1.0 * N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.6e+104], N[(t * N[(-1.0 * N[(a * N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(a \cdot \left(x \cdot \left(y1 \cdot y2\right)\right)\right)\\
\mathbf{if}\;x \leq -1.16 \cdot 10^{+204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-98}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-186}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{-262}:\\
\;\;\;\;a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-16}:\\
\;\;\;\;t \cdot \left(y2 \cdot \left(-1 \cdot \left(c \cdot y4\right)\right)\right)\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+104}:\\
\;\;\;\;t \cdot \left(-1 \cdot \left(a \cdot \left(b \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.16000000000000004e204 or 2.6e104 < x Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
if -1.16000000000000004e204 < x < -6.50000000000000017e-98Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.f6416.9
Applied rewrites16.9%
if -6.50000000000000017e-98 < x < -4.2000000000000004e-186Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
if -4.2000000000000004e-186 < x < 1.75000000000000006e-262Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.8
Applied rewrites17.8%
if 1.75000000000000006e-262 < x < 1.79999999999999991e-16Initial program 29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6426.6
Applied rewrites26.6%
Taylor expanded in a around 0
lower-*.f64N/A
lift-*.f6417.0
Applied rewrites17.0%
if 1.79999999999999991e-16 < x < 2.6e104Initial program 29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.9
Applied rewrites26.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6417.6
Applied rewrites17.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* -1.0 (* a (* x (* y1 y2))))))
(if (<= x -1.16e+204)
t_1
(if (<= x -6.5e-98)
(* a (* y5 (* t y2)))
(if (<= x -4.2e-186)
(* b (* j (* t y4)))
(if (<= x 1.05e-237)
(* a (* y5 (* -1.0 (* y y3))))
(if (<= x 7.5e-57)
(* x (* y2 (* -1.0 (* a y1))))
(if (<= x 4.4e+104) (* b (* t (* -1.0 (* a z)))) t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -1.0 * (a * (x * (y1 * y2)));
double tmp;
if (x <= -1.16e+204) {
tmp = t_1;
} else if (x <= -6.5e-98) {
tmp = a * (y5 * (t * y2));
} else if (x <= -4.2e-186) {
tmp = b * (j * (t * y4));
} else if (x <= 1.05e-237) {
tmp = a * (y5 * (-1.0 * (y * y3)));
} else if (x <= 7.5e-57) {
tmp = x * (y2 * (-1.0 * (a * y1)));
} else if (x <= 4.4e+104) {
tmp = b * (t * (-1.0 * (a * z)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (-1.0d0) * (a * (x * (y1 * y2)))
if (x <= (-1.16d+204)) then
tmp = t_1
else if (x <= (-6.5d-98)) then
tmp = a * (y5 * (t * y2))
else if (x <= (-4.2d-186)) then
tmp = b * (j * (t * y4))
else if (x <= 1.05d-237) then
tmp = a * (y5 * ((-1.0d0) * (y * y3)))
else if (x <= 7.5d-57) then
tmp = x * (y2 * ((-1.0d0) * (a * y1)))
else if (x <= 4.4d+104) then
tmp = b * (t * ((-1.0d0) * (a * z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -1.0 * (a * (x * (y1 * y2)));
double tmp;
if (x <= -1.16e+204) {
tmp = t_1;
} else if (x <= -6.5e-98) {
tmp = a * (y5 * (t * y2));
} else if (x <= -4.2e-186) {
tmp = b * (j * (t * y4));
} else if (x <= 1.05e-237) {
tmp = a * (y5 * (-1.0 * (y * y3)));
} else if (x <= 7.5e-57) {
tmp = x * (y2 * (-1.0 * (a * y1)));
} else if (x <= 4.4e+104) {
tmp = b * (t * (-1.0 * (a * z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = -1.0 * (a * (x * (y1 * y2))) tmp = 0 if x <= -1.16e+204: tmp = t_1 elif x <= -6.5e-98: tmp = a * (y5 * (t * y2)) elif x <= -4.2e-186: tmp = b * (j * (t * y4)) elif x <= 1.05e-237: tmp = a * (y5 * (-1.0 * (y * y3))) elif x <= 7.5e-57: tmp = x * (y2 * (-1.0 * (a * y1))) elif x <= 4.4e+104: tmp = b * (t * (-1.0 * (a * z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(-1.0 * Float64(a * Float64(x * Float64(y1 * y2)))) tmp = 0.0 if (x <= -1.16e+204) tmp = t_1; elseif (x <= -6.5e-98) tmp = Float64(a * Float64(y5 * Float64(t * y2))); elseif (x <= -4.2e-186) tmp = Float64(b * Float64(j * Float64(t * y4))); elseif (x <= 1.05e-237) tmp = Float64(a * Float64(y5 * Float64(-1.0 * Float64(y * y3)))); elseif (x <= 7.5e-57) tmp = Float64(x * Float64(y2 * Float64(-1.0 * Float64(a * y1)))); elseif (x <= 4.4e+104) tmp = Float64(b * Float64(t * Float64(-1.0 * Float64(a * z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = -1.0 * (a * (x * (y1 * y2))); tmp = 0.0; if (x <= -1.16e+204) tmp = t_1; elseif (x <= -6.5e-98) tmp = a * (y5 * (t * y2)); elseif (x <= -4.2e-186) tmp = b * (j * (t * y4)); elseif (x <= 1.05e-237) tmp = a * (y5 * (-1.0 * (y * y3))); elseif (x <= 7.5e-57) tmp = x * (y2 * (-1.0 * (a * y1))); elseif (x <= 4.4e+104) tmp = b * (t * (-1.0 * (a * z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(-1.0 * N[(a * N[(x * N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.16e+204], t$95$1, If[LessEqual[x, -6.5e-98], N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.2e-186], N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e-237], N[(a * N[(y5 * N[(-1.0 * N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.5e-57], N[(x * N[(y2 * N[(-1.0 * N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.4e+104], N[(b * N[(t * N[(-1.0 * N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(a \cdot \left(x \cdot \left(y1 \cdot y2\right)\right)\right)\\
\mathbf{if}\;x \leq -1.16 \cdot 10^{+204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-98}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-186}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-237}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(-1 \cdot \left(y \cdot y3\right)\right)\right)\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-57}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(-1 \cdot \left(a \cdot y1\right)\right)\right)\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+104}:\\
\;\;\;\;b \cdot \left(t \cdot \left(-1 \cdot \left(a \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.16000000000000004e204 or 4.40000000000000001e104 < x Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
if -1.16000000000000004e204 < x < -6.50000000000000017e-98Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.f6416.9
Applied rewrites16.9%
if -6.50000000000000017e-98 < x < -4.2000000000000004e-186Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
if -4.2000000000000004e-186 < x < 1.0500000000000001e-237Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around inf
lower-*.f64N/A
lift-*.f6417.4
Applied rewrites17.4%
if 1.0500000000000001e-237 < x < 7.49999999999999973e-57Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around inf
lower-*.f64N/A
lift-*.f6417.0
Applied rewrites17.0%
if 7.49999999999999973e-57 < x < 4.40000000000000001e104Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in z around inf
lower-*.f64N/A
lift-*.f6417.5
Applied rewrites17.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= x -1.16e+204)
(* -1.0 (* a (* x (* y1 y2))))
(if (<= x -6.5e-98)
(* a (* y5 (* t y2)))
(if (<= x -4.2e-186)
(* b (* j (* t y4)))
(if (<= x 1.05e-237)
(* a (* y5 (* -1.0 (* y y3))))
(* x (* y2 (* -1.0 (* a y1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (x <= -1.16e+204) {
tmp = -1.0 * (a * (x * (y1 * y2)));
} else if (x <= -6.5e-98) {
tmp = a * (y5 * (t * y2));
} else if (x <= -4.2e-186) {
tmp = b * (j * (t * y4));
} else if (x <= 1.05e-237) {
tmp = a * (y5 * (-1.0 * (y * y3)));
} else {
tmp = x * (y2 * (-1.0 * (a * y1)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (x <= (-1.16d+204)) then
tmp = (-1.0d0) * (a * (x * (y1 * y2)))
else if (x <= (-6.5d-98)) then
tmp = a * (y5 * (t * y2))
else if (x <= (-4.2d-186)) then
tmp = b * (j * (t * y4))
else if (x <= 1.05d-237) then
tmp = a * (y5 * ((-1.0d0) * (y * y3)))
else
tmp = x * (y2 * ((-1.0d0) * (a * y1)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (x <= -1.16e+204) {
tmp = -1.0 * (a * (x * (y1 * y2)));
} else if (x <= -6.5e-98) {
tmp = a * (y5 * (t * y2));
} else if (x <= -4.2e-186) {
tmp = b * (j * (t * y4));
} else if (x <= 1.05e-237) {
tmp = a * (y5 * (-1.0 * (y * y3)));
} else {
tmp = x * (y2 * (-1.0 * (a * y1)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if x <= -1.16e+204: tmp = -1.0 * (a * (x * (y1 * y2))) elif x <= -6.5e-98: tmp = a * (y5 * (t * y2)) elif x <= -4.2e-186: tmp = b * (j * (t * y4)) elif x <= 1.05e-237: tmp = a * (y5 * (-1.0 * (y * y3))) else: tmp = x * (y2 * (-1.0 * (a * y1))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (x <= -1.16e+204) tmp = Float64(-1.0 * Float64(a * Float64(x * Float64(y1 * y2)))); elseif (x <= -6.5e-98) tmp = Float64(a * Float64(y5 * Float64(t * y2))); elseif (x <= -4.2e-186) tmp = Float64(b * Float64(j * Float64(t * y4))); elseif (x <= 1.05e-237) tmp = Float64(a * Float64(y5 * Float64(-1.0 * Float64(y * y3)))); else tmp = Float64(x * Float64(y2 * Float64(-1.0 * Float64(a * y1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (x <= -1.16e+204) tmp = -1.0 * (a * (x * (y1 * y2))); elseif (x <= -6.5e-98) tmp = a * (y5 * (t * y2)); elseif (x <= -4.2e-186) tmp = b * (j * (t * y4)); elseif (x <= 1.05e-237) tmp = a * (y5 * (-1.0 * (y * y3))); else tmp = x * (y2 * (-1.0 * (a * y1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[x, -1.16e+204], N[(-1.0 * N[(a * N[(x * N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.5e-98], N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.2e-186], N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e-237], N[(a * N[(y5 * N[(-1.0 * N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y2 * N[(-1.0 * N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.16 \cdot 10^{+204}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(x \cdot \left(y1 \cdot y2\right)\right)\right)\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-98}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-186}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-237}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(-1 \cdot \left(y \cdot y3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(-1 \cdot \left(a \cdot y1\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.16000000000000004e204Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
if -1.16000000000000004e204 < x < -6.50000000000000017e-98Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.f6416.9
Applied rewrites16.9%
if -6.50000000000000017e-98 < x < -4.2000000000000004e-186Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
if -4.2000000000000004e-186 < x < 1.0500000000000001e-237Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around inf
lower-*.f64N/A
lift-*.f6417.4
Applied rewrites17.4%
if 1.0500000000000001e-237 < x Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around inf
lower-*.f64N/A
lift-*.f6417.0
Applied rewrites17.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= x -1.16e+204)
(* -1.0 (* a (* x (* y1 y2))))
(if (<= x -6.5e-98)
(* a (* y5 (* t y2)))
(if (<= x -4.2e-186)
(* b (* j (* t y4)))
(if (<= x 1.15e-237)
(* a (* y5 (* -1.0 (* y y3))))
(* x (* -1.0 (* a (* y1 y2)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (x <= -1.16e+204) {
tmp = -1.0 * (a * (x * (y1 * y2)));
} else if (x <= -6.5e-98) {
tmp = a * (y5 * (t * y2));
} else if (x <= -4.2e-186) {
tmp = b * (j * (t * y4));
} else if (x <= 1.15e-237) {
tmp = a * (y5 * (-1.0 * (y * y3)));
} else {
tmp = x * (-1.0 * (a * (y1 * y2)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (x <= (-1.16d+204)) then
tmp = (-1.0d0) * (a * (x * (y1 * y2)))
else if (x <= (-6.5d-98)) then
tmp = a * (y5 * (t * y2))
else if (x <= (-4.2d-186)) then
tmp = b * (j * (t * y4))
else if (x <= 1.15d-237) then
tmp = a * (y5 * ((-1.0d0) * (y * y3)))
else
tmp = x * ((-1.0d0) * (a * (y1 * y2)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (x <= -1.16e+204) {
tmp = -1.0 * (a * (x * (y1 * y2)));
} else if (x <= -6.5e-98) {
tmp = a * (y5 * (t * y2));
} else if (x <= -4.2e-186) {
tmp = b * (j * (t * y4));
} else if (x <= 1.15e-237) {
tmp = a * (y5 * (-1.0 * (y * y3)));
} else {
tmp = x * (-1.0 * (a * (y1 * y2)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if x <= -1.16e+204: tmp = -1.0 * (a * (x * (y1 * y2))) elif x <= -6.5e-98: tmp = a * (y5 * (t * y2)) elif x <= -4.2e-186: tmp = b * (j * (t * y4)) elif x <= 1.15e-237: tmp = a * (y5 * (-1.0 * (y * y3))) else: tmp = x * (-1.0 * (a * (y1 * y2))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (x <= -1.16e+204) tmp = Float64(-1.0 * Float64(a * Float64(x * Float64(y1 * y2)))); elseif (x <= -6.5e-98) tmp = Float64(a * Float64(y5 * Float64(t * y2))); elseif (x <= -4.2e-186) tmp = Float64(b * Float64(j * Float64(t * y4))); elseif (x <= 1.15e-237) tmp = Float64(a * Float64(y5 * Float64(-1.0 * Float64(y * y3)))); else tmp = Float64(x * Float64(-1.0 * Float64(a * Float64(y1 * y2)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (x <= -1.16e+204) tmp = -1.0 * (a * (x * (y1 * y2))); elseif (x <= -6.5e-98) tmp = a * (y5 * (t * y2)); elseif (x <= -4.2e-186) tmp = b * (j * (t * y4)); elseif (x <= 1.15e-237) tmp = a * (y5 * (-1.0 * (y * y3))); else tmp = x * (-1.0 * (a * (y1 * y2))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[x, -1.16e+204], N[(-1.0 * N[(a * N[(x * N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.5e-98], N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.2e-186], N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.15e-237], N[(a * N[(y5 * N[(-1.0 * N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-1.0 * N[(a * N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.16 \cdot 10^{+204}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(x \cdot \left(y1 \cdot y2\right)\right)\right)\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-98}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-186}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-237}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(-1 \cdot \left(y \cdot y3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(-1 \cdot \left(a \cdot \left(y1 \cdot y2\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.16000000000000004e204Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
if -1.16000000000000004e204 < x < -6.50000000000000017e-98Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.f6416.9
Applied rewrites16.9%
if -6.50000000000000017e-98 < x < -4.2000000000000004e-186Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
if -4.2000000000000004e-186 < x < 1.15000000000000006e-237Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around inf
lower-*.f64N/A
lift-*.f6417.4
Applied rewrites17.4%
if 1.15000000000000006e-237 < x Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* -1.0 (* a (* x (* y1 y2))))))
(if (<= x -1.16e+204)
t_1
(if (<= x -6.5e-98)
(* a (* y5 (* t y2)))
(if (<= x -4.2e-186)
(* b (* j (* t y4)))
(if (<= x 1.65e+71) (* a (* y5 (* -1.0 (* y y3)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -1.0 * (a * (x * (y1 * y2)));
double tmp;
if (x <= -1.16e+204) {
tmp = t_1;
} else if (x <= -6.5e-98) {
tmp = a * (y5 * (t * y2));
} else if (x <= -4.2e-186) {
tmp = b * (j * (t * y4));
} else if (x <= 1.65e+71) {
tmp = a * (y5 * (-1.0 * (y * y3)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = (-1.0d0) * (a * (x * (y1 * y2)))
if (x <= (-1.16d+204)) then
tmp = t_1
else if (x <= (-6.5d-98)) then
tmp = a * (y5 * (t * y2))
else if (x <= (-4.2d-186)) then
tmp = b * (j * (t * y4))
else if (x <= 1.65d+71) then
tmp = a * (y5 * ((-1.0d0) * (y * y3)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = -1.0 * (a * (x * (y1 * y2)));
double tmp;
if (x <= -1.16e+204) {
tmp = t_1;
} else if (x <= -6.5e-98) {
tmp = a * (y5 * (t * y2));
} else if (x <= -4.2e-186) {
tmp = b * (j * (t * y4));
} else if (x <= 1.65e+71) {
tmp = a * (y5 * (-1.0 * (y * y3)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = -1.0 * (a * (x * (y1 * y2))) tmp = 0 if x <= -1.16e+204: tmp = t_1 elif x <= -6.5e-98: tmp = a * (y5 * (t * y2)) elif x <= -4.2e-186: tmp = b * (j * (t * y4)) elif x <= 1.65e+71: tmp = a * (y5 * (-1.0 * (y * y3))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(-1.0 * Float64(a * Float64(x * Float64(y1 * y2)))) tmp = 0.0 if (x <= -1.16e+204) tmp = t_1; elseif (x <= -6.5e-98) tmp = Float64(a * Float64(y5 * Float64(t * y2))); elseif (x <= -4.2e-186) tmp = Float64(b * Float64(j * Float64(t * y4))); elseif (x <= 1.65e+71) tmp = Float64(a * Float64(y5 * Float64(-1.0 * Float64(y * y3)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = -1.0 * (a * (x * (y1 * y2))); tmp = 0.0; if (x <= -1.16e+204) tmp = t_1; elseif (x <= -6.5e-98) tmp = a * (y5 * (t * y2)); elseif (x <= -4.2e-186) tmp = b * (j * (t * y4)); elseif (x <= 1.65e+71) tmp = a * (y5 * (-1.0 * (y * y3))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(-1.0 * N[(a * N[(x * N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.16e+204], t$95$1, If[LessEqual[x, -6.5e-98], N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.2e-186], N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.65e+71], N[(a * N[(y5 * N[(-1.0 * N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 \cdot \left(a \cdot \left(x \cdot \left(y1 \cdot y2\right)\right)\right)\\
\mathbf{if}\;x \leq -1.16 \cdot 10^{+204}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-98}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-186}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{+71}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(-1 \cdot \left(y \cdot y3\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.16000000000000004e204 or 1.6499999999999999e71 < x Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
if -1.16000000000000004e204 < x < -6.50000000000000017e-98Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.f6416.9
Applied rewrites16.9%
if -6.50000000000000017e-98 < x < -4.2000000000000004e-186Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
if -4.2000000000000004e-186 < x < 1.6499999999999999e71Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around inf
lower-*.f64N/A
lift-*.f6417.4
Applied rewrites17.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* t (* c (* i z)))))
(if (<= y2 -1.65e+103)
(* a (* y5 (* t y2)))
(if (<= y2 -1.45e-20)
(* x (* y2 (* c y0)))
(if (<= y2 -5.2e-104)
t_1
(if (<= y2 1.25e-45)
(* b (* j (* t y4)))
(if (<= y2 3e+115) t_1 (* a (* t (* y2 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 = t * (c * (i * z));
double tmp;
if (y2 <= -1.65e+103) {
tmp = a * (y5 * (t * y2));
} else if (y2 <= -1.45e-20) {
tmp = x * (y2 * (c * y0));
} else if (y2 <= -5.2e-104) {
tmp = t_1;
} else if (y2 <= 1.25e-45) {
tmp = b * (j * (t * y4));
} else if (y2 <= 3e+115) {
tmp = t_1;
} else {
tmp = a * (t * (y2 * 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 = t * (c * (i * z))
if (y2 <= (-1.65d+103)) then
tmp = a * (y5 * (t * y2))
else if (y2 <= (-1.45d-20)) then
tmp = x * (y2 * (c * y0))
else if (y2 <= (-5.2d-104)) then
tmp = t_1
else if (y2 <= 1.25d-45) then
tmp = b * (j * (t * y4))
else if (y2 <= 3d+115) then
tmp = t_1
else
tmp = a * (t * (y2 * 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 = t * (c * (i * z));
double tmp;
if (y2 <= -1.65e+103) {
tmp = a * (y5 * (t * y2));
} else if (y2 <= -1.45e-20) {
tmp = x * (y2 * (c * y0));
} else if (y2 <= -5.2e-104) {
tmp = t_1;
} else if (y2 <= 1.25e-45) {
tmp = b * (j * (t * y4));
} else if (y2 <= 3e+115) {
tmp = t_1;
} else {
tmp = a * (t * (y2 * y5));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = t * (c * (i * z)) tmp = 0 if y2 <= -1.65e+103: tmp = a * (y5 * (t * y2)) elif y2 <= -1.45e-20: tmp = x * (y2 * (c * y0)) elif y2 <= -5.2e-104: tmp = t_1 elif y2 <= 1.25e-45: tmp = b * (j * (t * y4)) elif y2 <= 3e+115: tmp = t_1 else: tmp = a * (t * (y2 * y5)) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(t * Float64(c * Float64(i * z))) tmp = 0.0 if (y2 <= -1.65e+103) tmp = Float64(a * Float64(y5 * Float64(t * y2))); elseif (y2 <= -1.45e-20) tmp = Float64(x * Float64(y2 * Float64(c * y0))); elseif (y2 <= -5.2e-104) tmp = t_1; elseif (y2 <= 1.25e-45) tmp = Float64(b * Float64(j * Float64(t * y4))); elseif (y2 <= 3e+115) tmp = t_1; else tmp = Float64(a * Float64(t * Float64(y2 * 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 = t * (c * (i * z)); tmp = 0.0; if (y2 <= -1.65e+103) tmp = a * (y5 * (t * y2)); elseif (y2 <= -1.45e-20) tmp = x * (y2 * (c * y0)); elseif (y2 <= -5.2e-104) tmp = t_1; elseif (y2 <= 1.25e-45) tmp = b * (j * (t * y4)); elseif (y2 <= 3e+115) tmp = t_1; else tmp = a * (t * (y2 * 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[(t * N[(c * N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -1.65e+103], N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -1.45e-20], N[(x * N[(y2 * N[(c * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -5.2e-104], t$95$1, If[LessEqual[y2, 1.25e-45], N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 3e+115], t$95$1, N[(a * N[(t * N[(y2 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(c \cdot \left(i \cdot z\right)\right)\\
\mathbf{if}\;y2 \leq -1.65 \cdot 10^{+103}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)\\
\mathbf{elif}\;y2 \leq -1.45 \cdot 10^{-20}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0\right)\right)\\
\mathbf{elif}\;y2 \leq -5.2 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y2 \leq 1.25 \cdot 10^{-45}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\
\mathbf{elif}\;y2 \leq 3 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t \cdot \left(y2 \cdot y5\right)\right)\\
\end{array}
\end{array}
if y2 < -1.65000000000000004e103Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.f6416.9
Applied rewrites16.9%
if -1.65000000000000004e103 < y2 < -1.45e-20Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around 0
lift-*.f6417.2
Applied rewrites17.2%
if -1.45e-20 < y2 < -5.20000000000000005e-104 or 1.24999999999999994e-45 < y2 < 3e115Initial program 29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.9
Applied rewrites26.9%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
if -5.20000000000000005e-104 < y2 < 1.24999999999999994e-45Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
if 3e115 < y2 Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y2 -1.65e+103)
(* a (* y5 (* t y2)))
(if (<= y2 -0.002)
(* x (* y2 (* c y0)))
(if (<= y2 6.2e-67)
(* a (* y5 (* -1.0 (* y y3))))
(if (<= y2 3e+115) (* t (* c (* i z))) (* a (* t (* y2 y5))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y2 <= -1.65e+103) {
tmp = a * (y5 * (t * y2));
} else if (y2 <= -0.002) {
tmp = x * (y2 * (c * y0));
} else if (y2 <= 6.2e-67) {
tmp = a * (y5 * (-1.0 * (y * y3)));
} else if (y2 <= 3e+115) {
tmp = t * (c * (i * z));
} else {
tmp = a * (t * (y2 * y5));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y2 <= (-1.65d+103)) then
tmp = a * (y5 * (t * y2))
else if (y2 <= (-0.002d0)) then
tmp = x * (y2 * (c * y0))
else if (y2 <= 6.2d-67) then
tmp = a * (y5 * ((-1.0d0) * (y * y3)))
else if (y2 <= 3d+115) then
tmp = t * (c * (i * z))
else
tmp = a * (t * (y2 * y5))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y2 <= -1.65e+103) {
tmp = a * (y5 * (t * y2));
} else if (y2 <= -0.002) {
tmp = x * (y2 * (c * y0));
} else if (y2 <= 6.2e-67) {
tmp = a * (y5 * (-1.0 * (y * y3)));
} else if (y2 <= 3e+115) {
tmp = t * (c * (i * z));
} else {
tmp = a * (t * (y2 * y5));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y2 <= -1.65e+103: tmp = a * (y5 * (t * y2)) elif y2 <= -0.002: tmp = x * (y2 * (c * y0)) elif y2 <= 6.2e-67: tmp = a * (y5 * (-1.0 * (y * y3))) elif y2 <= 3e+115: tmp = t * (c * (i * z)) else: tmp = a * (t * (y2 * y5)) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y2 <= -1.65e+103) tmp = Float64(a * Float64(y5 * Float64(t * y2))); elseif (y2 <= -0.002) tmp = Float64(x * Float64(y2 * Float64(c * y0))); elseif (y2 <= 6.2e-67) tmp = Float64(a * Float64(y5 * Float64(-1.0 * Float64(y * y3)))); elseif (y2 <= 3e+115) tmp = Float64(t * Float64(c * Float64(i * z))); else tmp = Float64(a * Float64(t * Float64(y2 * y5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y2 <= -1.65e+103) tmp = a * (y5 * (t * y2)); elseif (y2 <= -0.002) tmp = x * (y2 * (c * y0)); elseif (y2 <= 6.2e-67) tmp = a * (y5 * (-1.0 * (y * y3))); elseif (y2 <= 3e+115) tmp = t * (c * (i * z)); else tmp = a * (t * (y2 * y5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y2, -1.65e+103], N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -0.002], N[(x * N[(y2 * N[(c * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 6.2e-67], N[(a * N[(y5 * N[(-1.0 * N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 3e+115], N[(t * N[(c * N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(t * N[(y2 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y2 \leq -1.65 \cdot 10^{+103}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)\\
\mathbf{elif}\;y2 \leq -0.002:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0\right)\right)\\
\mathbf{elif}\;y2 \leq 6.2 \cdot 10^{-67}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(-1 \cdot \left(y \cdot y3\right)\right)\right)\\
\mathbf{elif}\;y2 \leq 3 \cdot 10^{+115}:\\
\;\;\;\;t \cdot \left(c \cdot \left(i \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t \cdot \left(y2 \cdot y5\right)\right)\\
\end{array}
\end{array}
if y2 < -1.65000000000000004e103Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.f6416.9
Applied rewrites16.9%
if -1.65000000000000004e103 < y2 < -2e-3Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around 0
lift-*.f6417.2
Applied rewrites17.2%
if -2e-3 < y2 < 6.2000000000000005e-67Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around inf
lower-*.f64N/A
lift-*.f6417.4
Applied rewrites17.4%
if 6.2000000000000005e-67 < y2 < 3e115Initial program 29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.9
Applied rewrites26.9%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
if 3e115 < y2 Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y2 -1.65e+103)
(* a (* y5 (* t y2)))
(if (<= y2 -0.002)
(* x (* y2 (* c y0)))
(if (<= y2 2.1e-75)
(* a (* -1.0 (* y (* y3 y5))))
(if (<= y2 3e+115) (* t (* c (* i z))) (* a (* t (* y2 y5))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y2 <= -1.65e+103) {
tmp = a * (y5 * (t * y2));
} else if (y2 <= -0.002) {
tmp = x * (y2 * (c * y0));
} else if (y2 <= 2.1e-75) {
tmp = a * (-1.0 * (y * (y3 * y5)));
} else if (y2 <= 3e+115) {
tmp = t * (c * (i * z));
} else {
tmp = a * (t * (y2 * y5));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y2 <= (-1.65d+103)) then
tmp = a * (y5 * (t * y2))
else if (y2 <= (-0.002d0)) then
tmp = x * (y2 * (c * y0))
else if (y2 <= 2.1d-75) then
tmp = a * ((-1.0d0) * (y * (y3 * y5)))
else if (y2 <= 3d+115) then
tmp = t * (c * (i * z))
else
tmp = a * (t * (y2 * y5))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y2 <= -1.65e+103) {
tmp = a * (y5 * (t * y2));
} else if (y2 <= -0.002) {
tmp = x * (y2 * (c * y0));
} else if (y2 <= 2.1e-75) {
tmp = a * (-1.0 * (y * (y3 * y5)));
} else if (y2 <= 3e+115) {
tmp = t * (c * (i * z));
} else {
tmp = a * (t * (y2 * y5));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y2 <= -1.65e+103: tmp = a * (y5 * (t * y2)) elif y2 <= -0.002: tmp = x * (y2 * (c * y0)) elif y2 <= 2.1e-75: tmp = a * (-1.0 * (y * (y3 * y5))) elif y2 <= 3e+115: tmp = t * (c * (i * z)) else: tmp = a * (t * (y2 * y5)) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y2 <= -1.65e+103) tmp = Float64(a * Float64(y5 * Float64(t * y2))); elseif (y2 <= -0.002) tmp = Float64(x * Float64(y2 * Float64(c * y0))); elseif (y2 <= 2.1e-75) tmp = Float64(a * Float64(-1.0 * Float64(y * Float64(y3 * y5)))); elseif (y2 <= 3e+115) tmp = Float64(t * Float64(c * Float64(i * z))); else tmp = Float64(a * Float64(t * Float64(y2 * y5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y2 <= -1.65e+103) tmp = a * (y5 * (t * y2)); elseif (y2 <= -0.002) tmp = x * (y2 * (c * y0)); elseif (y2 <= 2.1e-75) tmp = a * (-1.0 * (y * (y3 * y5))); elseif (y2 <= 3e+115) tmp = t * (c * (i * z)); else tmp = a * (t * (y2 * y5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y2, -1.65e+103], N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, -0.002], N[(x * N[(y2 * N[(c * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 2.1e-75], N[(a * N[(-1.0 * N[(y * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 3e+115], N[(t * N[(c * N[(i * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(t * N[(y2 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y2 \leq -1.65 \cdot 10^{+103}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)\\
\mathbf{elif}\;y2 \leq -0.002:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0\right)\right)\\
\mathbf{elif}\;y2 \leq 2.1 \cdot 10^{-75}:\\
\;\;\;\;a \cdot \left(-1 \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right)\\
\mathbf{elif}\;y2 \leq 3 \cdot 10^{+115}:\\
\;\;\;\;t \cdot \left(c \cdot \left(i \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t \cdot \left(y2 \cdot y5\right)\right)\\
\end{array}
\end{array}
if y2 < -1.65000000000000004e103Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.f6416.9
Applied rewrites16.9%
if -1.65000000000000004e103 < y2 < -2e-3Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around 0
lift-*.f6417.2
Applied rewrites17.2%
if -2e-3 < y2 < 2.1000000000000001e-75Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.8
Applied rewrites17.8%
if 2.1000000000000001e-75 < y2 < 3e115Initial program 29.7%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.9
Applied rewrites26.9%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
if 3e115 < y2 Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* x (* y2 (* c y0)))))
(if (<= y0 -2.8e+38)
t_1
(if (<= y0 1.6e-288)
(* b (* t (* j y4)))
(if (<= y0 1.8e+145) (* a (* y5 (* t 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 = x * (y2 * (c * y0));
double tmp;
if (y0 <= -2.8e+38) {
tmp = t_1;
} else if (y0 <= 1.6e-288) {
tmp = b * (t * (j * y4));
} else if (y0 <= 1.8e+145) {
tmp = a * (y5 * (t * y2));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y2 * (c * y0))
if (y0 <= (-2.8d+38)) then
tmp = t_1
else if (y0 <= 1.6d-288) then
tmp = b * (t * (j * y4))
else if (y0 <= 1.8d+145) then
tmp = a * (y5 * (t * y2))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = x * (y2 * (c * y0));
double tmp;
if (y0 <= -2.8e+38) {
tmp = t_1;
} else if (y0 <= 1.6e-288) {
tmp = b * (t * (j * y4));
} else if (y0 <= 1.8e+145) {
tmp = a * (y5 * (t * y2));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = x * (y2 * (c * y0)) tmp = 0 if y0 <= -2.8e+38: tmp = t_1 elif y0 <= 1.6e-288: tmp = b * (t * (j * y4)) elif y0 <= 1.8e+145: tmp = a * (y5 * (t * y2)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(x * Float64(y2 * Float64(c * y0))) tmp = 0.0 if (y0 <= -2.8e+38) tmp = t_1; elseif (y0 <= 1.6e-288) tmp = Float64(b * Float64(t * Float64(j * y4))); elseif (y0 <= 1.8e+145) tmp = Float64(a * Float64(y5 * Float64(t * y2))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = x * (y2 * (c * y0)); tmp = 0.0; if (y0 <= -2.8e+38) tmp = t_1; elseif (y0 <= 1.6e-288) tmp = b * (t * (j * y4)); elseif (y0 <= 1.8e+145) tmp = a * (y5 * (t * y2)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(x * N[(y2 * N[(c * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y0, -2.8e+38], t$95$1, If[LessEqual[y0, 1.6e-288], N[(b * N[(t * N[(j * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 1.8e+145], N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y2 \cdot \left(c \cdot y0\right)\right)\\
\mathbf{if}\;y0 \leq -2.8 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y0 \leq 1.6 \cdot 10^{-288}:\\
\;\;\;\;b \cdot \left(t \cdot \left(j \cdot y4\right)\right)\\
\mathbf{elif}\;y0 \leq 1.8 \cdot 10^{+145}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y0 < -2.8e38 or 1.79999999999999987e145 < y0 Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around 0
lift-*.f6417.2
Applied rewrites17.2%
if -2.8e38 < y0 < 1.6e-288Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in z around 0
lift-*.f6416.8
Applied rewrites16.8%
if 1.6e-288 < y0 < 1.79999999999999987e145Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.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 (* a (* y5 (* t y2))))) (if (<= y2 -2.45e-104) t_1 (if (<= y2 8.5e+42) (* b (* j (* t y4))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = a * (y5 * (t * y2));
double tmp;
if (y2 <= -2.45e-104) {
tmp = t_1;
} else if (y2 <= 8.5e+42) {
tmp = b * (j * (t * y4));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = a * (y5 * (t * y2))
if (y2 <= (-2.45d-104)) then
tmp = t_1
else if (y2 <= 8.5d+42) then
tmp = b * (j * (t * y4))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = a * (y5 * (t * y2));
double tmp;
if (y2 <= -2.45e-104) {
tmp = t_1;
} else if (y2 <= 8.5e+42) {
tmp = b * (j * (t * y4));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = a * (y5 * (t * y2)) tmp = 0 if y2 <= -2.45e-104: tmp = t_1 elif y2 <= 8.5e+42: tmp = b * (j * (t * y4)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(a * Float64(y5 * Float64(t * y2))) tmp = 0.0 if (y2 <= -2.45e-104) tmp = t_1; elseif (y2 <= 8.5e+42) tmp = Float64(b * Float64(j * Float64(t * y4))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = a * (y5 * (t * y2)); tmp = 0.0; if (y2 <= -2.45e-104) tmp = t_1; elseif (y2 <= 8.5e+42) tmp = b * (j * (t * y4)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -2.45e-104], t$95$1, If[LessEqual[y2, 8.5e+42], N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)\\
\mathbf{if}\;y2 \leq -2.45 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y2 \leq 8.5 \cdot 10^{+42}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y2 < -2.4500000000000001e-104 or 8.5000000000000003e42 < y2 Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.f6416.9
Applied rewrites16.9%
if -2.4500000000000001e-104 < y2 < 8.5000000000000003e42Initial program 29.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in z around 0
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (<= y5 -1.9e+48) (* a (* t (* y2 y5))) (if (<= y5 1.7e-159) (* x (* y2 (* c y0))) (* a (* y5 (* t y2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -1.9e+48) {
tmp = a * (t * (y2 * y5));
} else if (y5 <= 1.7e-159) {
tmp = x * (y2 * (c * y0));
} else {
tmp = a * (y5 * (t * y2));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y5 <= (-1.9d+48)) then
tmp = a * (t * (y2 * y5))
else if (y5 <= 1.7d-159) then
tmp = x * (y2 * (c * y0))
else
tmp = a * (y5 * (t * y2))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -1.9e+48) {
tmp = a * (t * (y2 * y5));
} else if (y5 <= 1.7e-159) {
tmp = x * (y2 * (c * y0));
} else {
tmp = a * (y5 * (t * y2));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y5 <= -1.9e+48: tmp = a * (t * (y2 * y5)) elif y5 <= 1.7e-159: tmp = x * (y2 * (c * y0)) else: tmp = a * (y5 * (t * y2)) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y5 <= -1.9e+48) tmp = Float64(a * Float64(t * Float64(y2 * y5))); elseif (y5 <= 1.7e-159) tmp = Float64(x * Float64(y2 * Float64(c * y0))); else tmp = Float64(a * Float64(y5 * Float64(t * y2))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y5 <= -1.9e+48) tmp = a * (t * (y2 * y5)); elseif (y5 <= 1.7e-159) tmp = x * (y2 * (c * y0)); else tmp = a * (y5 * (t * y2)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -1.9e+48], N[(a * N[(t * N[(y2 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.7e-159], N[(x * N[(y2 * N[(c * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -1.9 \cdot 10^{+48}:\\
\;\;\;\;a \cdot \left(t \cdot \left(y2 \cdot y5\right)\right)\\
\mathbf{elif}\;y5 \leq 1.7 \cdot 10^{-159}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)\\
\end{array}
\end{array}
if y5 < -1.9e48Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
if -1.9e48 < y5 < 1.69999999999999992e-159Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around 0
lift-*.f6417.2
Applied rewrites17.2%
if 1.69999999999999992e-159 < y5 Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.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 (<= y5 -1.05e+48) (* a (* t (* y2 y5))) (if (<= y5 1.7e-159) (* x (* c (* y0 y2))) (* a (* y5 (* t y2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -1.05e+48) {
tmp = a * (t * (y2 * y5));
} else if (y5 <= 1.7e-159) {
tmp = x * (c * (y0 * y2));
} else {
tmp = a * (y5 * (t * y2));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y5 <= (-1.05d+48)) then
tmp = a * (t * (y2 * y5))
else if (y5 <= 1.7d-159) then
tmp = x * (c * (y0 * y2))
else
tmp = a * (y5 * (t * y2))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -1.05e+48) {
tmp = a * (t * (y2 * y5));
} else if (y5 <= 1.7e-159) {
tmp = x * (c * (y0 * y2));
} else {
tmp = a * (y5 * (t * y2));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y5 <= -1.05e+48: tmp = a * (t * (y2 * y5)) elif y5 <= 1.7e-159: tmp = x * (c * (y0 * y2)) else: tmp = a * (y5 * (t * y2)) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y5 <= -1.05e+48) tmp = Float64(a * Float64(t * Float64(y2 * y5))); elseif (y5 <= 1.7e-159) tmp = Float64(x * Float64(c * Float64(y0 * y2))); else tmp = Float64(a * Float64(y5 * Float64(t * y2))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y5 <= -1.05e+48) tmp = a * (t * (y2 * y5)); elseif (y5 <= 1.7e-159) tmp = x * (c * (y0 * y2)); else tmp = a * (y5 * (t * y2)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -1.05e+48], N[(a * N[(t * N[(y2 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.7e-159], N[(x * N[(c * N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -1.05 \cdot 10^{+48}:\\
\;\;\;\;a \cdot \left(t \cdot \left(y2 \cdot y5\right)\right)\\
\mathbf{elif}\;y5 \leq 1.7 \cdot 10^{-159}:\\
\;\;\;\;x \cdot \left(c \cdot \left(y0 \cdot y2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)\\
\end{array}
\end{array}
if y5 < -1.0499999999999999e48Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
if -1.0499999999999999e48 < y5 < 1.69999999999999992e-159Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f6417.5
Applied rewrites17.5%
if 1.69999999999999992e-159 < y5 Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.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 (<= y5 -1.05e+48) (* a (* t (* y2 y5))) (if (<= y5 2.1e-159) (* c (* x (* y0 y2))) (* a (* y5 (* t y2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -1.05e+48) {
tmp = a * (t * (y2 * y5));
} else if (y5 <= 2.1e-159) {
tmp = c * (x * (y0 * y2));
} else {
tmp = a * (y5 * (t * y2));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y5 <= (-1.05d+48)) then
tmp = a * (t * (y2 * y5))
else if (y5 <= 2.1d-159) then
tmp = c * (x * (y0 * y2))
else
tmp = a * (y5 * (t * y2))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -1.05e+48) {
tmp = a * (t * (y2 * y5));
} else if (y5 <= 2.1e-159) {
tmp = c * (x * (y0 * y2));
} else {
tmp = a * (y5 * (t * y2));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y5 <= -1.05e+48: tmp = a * (t * (y2 * y5)) elif y5 <= 2.1e-159: tmp = c * (x * (y0 * y2)) else: tmp = a * (y5 * (t * y2)) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y5 <= -1.05e+48) tmp = Float64(a * Float64(t * Float64(y2 * y5))); elseif (y5 <= 2.1e-159) tmp = Float64(c * Float64(x * Float64(y0 * y2))); else tmp = Float64(a * Float64(y5 * Float64(t * y2))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y5 <= -1.05e+48) tmp = a * (t * (y2 * y5)); elseif (y5 <= 2.1e-159) tmp = c * (x * (y0 * y2)); else tmp = a * (y5 * (t * y2)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -1.05e+48], N[(a * N[(t * N[(y2 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 2.1e-159], N[(c * N[(x * N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -1.05 \cdot 10^{+48}:\\
\;\;\;\;a \cdot \left(t \cdot \left(y2 \cdot y5\right)\right)\\
\mathbf{elif}\;y5 \leq 2.1 \cdot 10^{-159}:\\
\;\;\;\;c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)\\
\end{array}
\end{array}
if y5 < -1.0499999999999999e48Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
if -1.0499999999999999e48 < y5 < 2.0999999999999999e-159Initial program 29.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.3%
Taylor expanded in y2 around inf
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.7
Applied rewrites17.7%
if 2.0999999999999999e-159 < y5 Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.f6416.9
Applied rewrites16.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* a (* y5 (* t y2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return a * (y5 * (t * y2));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = a * (y5 * (t * y2))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return a * (y5 * (t * y2));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return a * (y5 * (t * y2))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(a * Float64(y5 * Float64(t * y2))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = a * (y5 * (t * y2)); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(a * N[(y5 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot \left(y5 \cdot \left(t \cdot y2\right)\right)
\end{array}
Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lift-*.f6416.9
Applied rewrites16.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* a (* t (* y2 y5))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return a * (t * (y2 * y5));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = a * (t * (y2 * y5))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return a * (t * (y2 * y5));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return a * (t * (y2 * y5))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(a * Float64(t * Float64(y2 * y5))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = a * (t * (y2 * y5)); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(a * N[(t * N[(y2 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot \left(t \cdot \left(y2 \cdot y5\right)\right)
\end{array}
Initial program 29.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.9%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
lift-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
herbie shell --seed 2025127
(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)))))