
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)
\end{array}
Herbie found 32 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)
\end{array}
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* a b) (* c i)))
(t_2
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) t_1)
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))))
(if (<= t_2 INFINITY)
t_2
(*
t
(-
(fma -1.0 (* z t_1) (* j (- (* b y4) (* i y5))))
(* y2 (- (* c y4) (* a y5))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (a * b) - (c * i);
double t_2 = (((((((x * y) - (z * t)) * t_1) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
double tmp;
if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = t * (fma(-1.0, (z * t_1), (j * ((b * y4) - (i * y5)))) - (y2 * ((c * y4) - (a * y5))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(a * b) - Float64(c * i)) t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * t_1) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) tmp = 0.0 if (t_2 <= Inf) tmp = t_2; else tmp = Float64(t * Float64(fma(-1.0, Float64(z * t_1), Float64(j * Float64(Float64(b * y4) - Float64(i * y5)))) - Float64(y2 * Float64(Float64(c * y4) - Float64(a * y5))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, Infinity], t$95$2, N[(t * N[(N[(-1.0 * N[(z * t$95$1), $MachinePrecision] + N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y2 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot b - c \cdot i\\
t_2 := \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot t\_1 - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;t\_2 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\mathsf{fma}\left(-1, z \cdot t\_1, j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - y2 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) < +inf.0Initial program 28.8%
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 28.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
(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 (- (* j x) (* k z)))
(t_3 (- (* a b) (* c i)))
(t_4
(*
x
(-
(fma y t_3 (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i y1))))))
(t_5 (- (* j t) (* k y))))
(if (<= x -1.05e+203)
t_4
(if (<= x -3.6e+45)
(* b (- (fma a t_1 (* y4 t_5)) (* y0 t_2)))
(if (<= x -8e-28)
(* -1.0 (* i (- (fma c t_1 (* y5 t_5)) (* y1 t_2))))
(if (<= x -2.5e-302)
(*
y
(-
(fma -1.0 (* k (- (* b y4) (* i y5))) (* x t_3))
(* -1.0 (* y3 (- (* c y4) (* a y5))))))
(if (<= x 3.6e-19)
(*
c
(-
(fma -1.0 (* i t_1) (* y0 (- (* x y2) (* y3 z))))
(* y4 (- (* t y2) (* y y3)))))
t_4)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (x * y) - (t * z);
double t_2 = (j * x) - (k * z);
double t_3 = (a * b) - (c * i);
double t_4 = x * (fma(y, t_3, (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
double t_5 = (j * t) - (k * y);
double tmp;
if (x <= -1.05e+203) {
tmp = t_4;
} else if (x <= -3.6e+45) {
tmp = b * (fma(a, t_1, (y4 * t_5)) - (y0 * t_2));
} else if (x <= -8e-28) {
tmp = -1.0 * (i * (fma(c, t_1, (y5 * t_5)) - (y1 * t_2)));
} else if (x <= -2.5e-302) {
tmp = y * (fma(-1.0, (k * ((b * y4) - (i * y5))), (x * t_3)) - (-1.0 * (y3 * ((c * y4) - (a * y5)))));
} else if (x <= 3.6e-19) {
tmp = c * (fma(-1.0, (i * t_1), (y0 * ((x * y2) - (y3 * z)))) - (y4 * ((t * y2) - (y * y3))));
} else {
tmp = t_4;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(x * y) - Float64(t * z)) t_2 = Float64(Float64(j * x) - Float64(k * z)) t_3 = Float64(Float64(a * b) - Float64(c * i)) t_4 = Float64(x * Float64(fma(y, t_3, Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))) t_5 = Float64(Float64(j * t) - Float64(k * y)) tmp = 0.0 if (x <= -1.05e+203) tmp = t_4; elseif (x <= -3.6e+45) tmp = Float64(b * Float64(fma(a, t_1, Float64(y4 * t_5)) - Float64(y0 * t_2))); elseif (x <= -8e-28) tmp = Float64(-1.0 * Float64(i * Float64(fma(c, t_1, Float64(y5 * t_5)) - Float64(y1 * t_2)))); elseif (x <= -2.5e-302) tmp = Float64(y * Float64(fma(-1.0, Float64(k * Float64(Float64(b * y4) - Float64(i * y5))), Float64(x * t_3)) - Float64(-1.0 * Float64(y3 * Float64(Float64(c * y4) - Float64(a * y5)))))); elseif (x <= 3.6e-19) tmp = Float64(c * Float64(fma(-1.0, Float64(i * t_1), Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))) - Float64(y4 * Float64(Float64(t * y2) - Float64(y * y3))))); else tmp = t_4; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x * N[(N[(y * t$95$3 + 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]}, Block[{t$95$5 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+203], t$95$4, If[LessEqual[x, -3.6e+45], N[(b * N[(N[(a * t$95$1 + N[(y4 * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(y0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -8e-28], N[(-1.0 * N[(i * N[(N[(c * t$95$1 + N[(y5 * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(y1 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.5e-302], N[(y * N[(N[(-1.0 * N[(k * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(y3 * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e-19], N[(c * N[(N[(-1.0 * N[(i * t$95$1), $MachinePrecision] + N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y4 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y - t \cdot z\\
t_2 := j \cdot x - k \cdot z\\
t_3 := a \cdot b - c \cdot i\\
t_4 := x \cdot \left(\mathsf{fma}\left(y, t\_3, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
t_5 := j \cdot t - k \cdot y\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+203}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;x \leq -3.6 \cdot 10^{+45}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_1, y4 \cdot t\_5\right) - y0 \cdot t\_2\right)\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-28}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, t\_1, y5 \cdot t\_5\right) - y1 \cdot t\_2\right)\right)\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-302}:\\
\;\;\;\;y \cdot \left(\mathsf{fma}\left(-1, k \cdot \left(b \cdot y4 - i \cdot y5\right), x \cdot t\_3\right) - -1 \cdot \left(y3 \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\right)\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{-19}:\\
\;\;\;\;c \cdot \left(\mathsf{fma}\left(-1, i \cdot t\_1, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if x < -1.04999999999999992e203 or 3.6000000000000001e-19 < x Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
if -1.04999999999999992e203 < x < -3.6e45Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
if -3.6e45 < x < -7.99999999999999977e-28Initial program 28.8%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
if -7.99999999999999977e-28 < x < -2.50000000000000017e-302Initial program 28.8%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.8%
if -2.50000000000000017e-302 < x < 3.6000000000000001e-19Initial program 28.8%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* j x) (* k z)))
(t_2 (- (* c y0) (* a y1)))
(t_3 (- (* x y) (* t z)))
(t_4 (- (* a b) (* c i)))
(t_5 (- (* b y0) (* i y1)))
(t_6 (* x (- (fma y t_4 (* y2 t_2)) (* j t_5))))
(t_7 (- (* j t) (* k y))))
(if (<= x -1.05e+203)
t_6
(if (<= x -3.6e+45)
(* b (- (fma a t_3 (* y4 t_7)) (* y0 t_1)))
(if (<= x -3e-27)
(* -1.0 (* i (- (fma c t_3 (* y5 t_7)) (* y1 t_1))))
(if (<= x -3.8e-236)
(* -1.0 (* z (- (fma t t_4 (* y3 t_2)) (* k t_5))))
(if (<= x 3.6e-19)
(*
c
(-
(fma -1.0 (* i t_3) (* y0 (- (* x y2) (* y3 z))))
(* y4 (- (* t y2) (* y y3)))))
t_6)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (j * x) - (k * z);
double t_2 = (c * y0) - (a * y1);
double t_3 = (x * y) - (t * z);
double t_4 = (a * b) - (c * i);
double t_5 = (b * y0) - (i * y1);
double t_6 = x * (fma(y, t_4, (y2 * t_2)) - (j * t_5));
double t_7 = (j * t) - (k * y);
double tmp;
if (x <= -1.05e+203) {
tmp = t_6;
} else if (x <= -3.6e+45) {
tmp = b * (fma(a, t_3, (y4 * t_7)) - (y0 * t_1));
} else if (x <= -3e-27) {
tmp = -1.0 * (i * (fma(c, t_3, (y5 * t_7)) - (y1 * t_1)));
} else if (x <= -3.8e-236) {
tmp = -1.0 * (z * (fma(t, t_4, (y3 * t_2)) - (k * t_5)));
} else if (x <= 3.6e-19) {
tmp = c * (fma(-1.0, (i * t_3), (y0 * ((x * y2) - (y3 * z)))) - (y4 * ((t * y2) - (y * y3))));
} else {
tmp = t_6;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(j * x) - Float64(k * z)) t_2 = Float64(Float64(c * y0) - Float64(a * y1)) t_3 = Float64(Float64(x * y) - Float64(t * z)) t_4 = Float64(Float64(a * b) - Float64(c * i)) t_5 = Float64(Float64(b * y0) - Float64(i * y1)) t_6 = Float64(x * Float64(fma(y, t_4, Float64(y2 * t_2)) - Float64(j * t_5))) t_7 = Float64(Float64(j * t) - Float64(k * y)) tmp = 0.0 if (x <= -1.05e+203) tmp = t_6; elseif (x <= -3.6e+45) tmp = Float64(b * Float64(fma(a, t_3, Float64(y4 * t_7)) - Float64(y0 * t_1))); elseif (x <= -3e-27) tmp = Float64(-1.0 * Float64(i * Float64(fma(c, t_3, Float64(y5 * t_7)) - Float64(y1 * t_1)))); elseif (x <= -3.8e-236) tmp = Float64(-1.0 * Float64(z * Float64(fma(t, t_4, Float64(y3 * t_2)) - Float64(k * t_5)))); elseif (x <= 3.6e-19) tmp = Float64(c * Float64(fma(-1.0, Float64(i * t_3), Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))) - Float64(y4 * Float64(Float64(t * y2) - Float64(y * y3))))); else tmp = t_6; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(x * N[(N[(y * t$95$4 + N[(y2 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(j * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$7 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+203], t$95$6, If[LessEqual[x, -3.6e+45], N[(b * N[(N[(a * t$95$3 + N[(y4 * t$95$7), $MachinePrecision]), $MachinePrecision] - N[(y0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3e-27], N[(-1.0 * N[(i * N[(N[(c * t$95$3 + N[(y5 * t$95$7), $MachinePrecision]), $MachinePrecision] - N[(y1 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.8e-236], N[(-1.0 * N[(z * N[(N[(t * t$95$4 + N[(y3 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(k * t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e-19], N[(c * N[(N[(-1.0 * N[(i * t$95$3), $MachinePrecision] + N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y4 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$6]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot x - k \cdot z\\
t_2 := c \cdot y0 - a \cdot y1\\
t_3 := x \cdot y - t \cdot z\\
t_4 := a \cdot b - c \cdot i\\
t_5 := b \cdot y0 - i \cdot y1\\
t_6 := x \cdot \left(\mathsf{fma}\left(y, t\_4, y2 \cdot t\_2\right) - j \cdot t\_5\right)\\
t_7 := j \cdot t - k \cdot y\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+203}:\\
\;\;\;\;t\_6\\
\mathbf{elif}\;x \leq -3.6 \cdot 10^{+45}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_3, y4 \cdot t\_7\right) - y0 \cdot t\_1\right)\\
\mathbf{elif}\;x \leq -3 \cdot 10^{-27}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, t\_3, y5 \cdot t\_7\right) - y1 \cdot t\_1\right)\right)\\
\mathbf{elif}\;x \leq -3.8 \cdot 10^{-236}:\\
\;\;\;\;-1 \cdot \left(z \cdot \left(\mathsf{fma}\left(t, t\_4, y3 \cdot t\_2\right) - k \cdot t\_5\right)\right)\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{-19}:\\
\;\;\;\;c \cdot \left(\mathsf{fma}\left(-1, i \cdot t\_3, y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right) - y4 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_6\\
\end{array}
\end{array}
if x < -1.04999999999999992e203 or 3.6000000000000001e-19 < x Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
if -1.04999999999999992e203 < x < -3.6e45Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
if -3.6e45 < x < -3.0000000000000001e-27Initial program 28.8%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
if -3.0000000000000001e-27 < x < -3.7999999999999999e-236Initial program 28.8%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
if -3.7999999999999999e-236 < x < 3.6000000000000001e-19Initial program 28.8%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
(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
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i y1))))))
(t_3 (- (* j t) (* k y)))
(t_4 (- (* j x) (* k z))))
(if (<= x -1.05e+203)
t_2
(if (<= x -3.6e+45)
(* b (- (fma a t_1 (* y4 t_3)) (* y0 t_4)))
(if (<= x -1.45e-128)
(* -1.0 (* i (- (fma c t_1 (* y5 t_3)) (* y1 t_4))))
(if (<= x 42000.0)
(*
y4
(-
(fma b t_3 (* y1 (- (* k y2) (* j y3))))
(* c (- (* t y2) (* y y3)))))
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 = (x * y) - (t * z);
double t_2 = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
double t_3 = (j * t) - (k * y);
double t_4 = (j * x) - (k * z);
double tmp;
if (x <= -1.05e+203) {
tmp = t_2;
} else if (x <= -3.6e+45) {
tmp = b * (fma(a, t_1, (y4 * t_3)) - (y0 * t_4));
} else if (x <= -1.45e-128) {
tmp = -1.0 * (i * (fma(c, t_1, (y5 * t_3)) - (y1 * t_4)));
} else if (x <= 42000.0) {
tmp = y4 * (fma(b, t_3, (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
} 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(x * y) - Float64(t * z)) t_2 = 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))))) t_3 = Float64(Float64(j * t) - Float64(k * y)) t_4 = Float64(Float64(j * x) - Float64(k * z)) tmp = 0.0 if (x <= -1.05e+203) tmp = t_2; elseif (x <= -3.6e+45) tmp = Float64(b * Float64(fma(a, t_1, Float64(y4 * t_3)) - Float64(y0 * t_4))); elseif (x <= -1.45e-128) tmp = Float64(-1.0 * Float64(i * Float64(fma(c, t_1, Float64(y5 * t_3)) - Float64(y1 * t_4)))); elseif (x <= 42000.0) tmp = Float64(y4 * Float64(fma(b, t_3, Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); 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[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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]}, Block[{t$95$3 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+203], t$95$2, If[LessEqual[x, -3.6e+45], N[(b * N[(N[(a * t$95$1 + N[(y4 * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(y0 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.45e-128], N[(-1.0 * N[(i * N[(N[(c * t$95$1 + N[(y5 * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(y1 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 42000.0], N[(y4 * N[(N[(b * t$95$3 + 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], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot y - t \cdot z\\
t_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)\\
t_3 := j \cdot t - k \cdot y\\
t_4 := j \cdot x - k \cdot z\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+203}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -3.6 \cdot 10^{+45}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, t\_1, y4 \cdot t\_3\right) - y0 \cdot t\_4\right)\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-128}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(\mathsf{fma}\left(c, t\_1, y5 \cdot t\_3\right) - y1 \cdot t\_4\right)\right)\\
\mathbf{elif}\;x \leq 42000:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_3, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.04999999999999992e203 or 42000 < x Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
if -1.04999999999999992e203 < x < -3.6e45Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
if -3.6e45 < x < -1.45e-128Initial program 28.8%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
if -1.45e-128 < x < 42000Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
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
(-
(fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i y1)))))))
(if (<= x -1.05e+203)
t_1
(if (<= x -4.8e-241)
(*
b
(-
(fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
(* y0 (- (* j x) (* k z)))))
(if (<= x 1.9e-165)
(* y4 (* c (- (* y y3) (* t y2))))
(if (<= x 3.1e-20) (* y3 (* y5 (- (* j y0) (* a y)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
double tmp;
if (x <= -1.05e+203) {
tmp = t_1;
} else if (x <= -4.8e-241) {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
} else if (x <= 1.9e-165) {
tmp = y4 * (c * ((y * y3) - (t * y2)));
} else if (x <= 3.1e-20) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} 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(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))))) tmp = 0.0 if (x <= -1.05e+203) tmp = t_1; elseif (x <= -4.8e-241) 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))))); elseif (x <= 1.9e-165) tmp = Float64(y4 * Float64(c * Float64(Float64(y * y3) - Float64(t * y2)))); elseif (x <= 3.1e-20) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); 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[(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[x, -1.05e+203], t$95$1, If[LessEqual[x, -4.8e-241], 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], If[LessEqual[x, 1.9e-165], N[(y4 * N[(c * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.1e-20], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 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{if}\;x \leq -1.05 \cdot 10^{+203}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-241}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{-165}:\\
\;\;\;\;y4 \cdot \left(c \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{-20}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.04999999999999992e203 or 3.1e-20 < x Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
if -1.04999999999999992e203 < x < -4.8e-241Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
if -4.8e-241 < x < 1.90000000000000009e-165Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3
Applied rewrites27.3%
if 1.90000000000000009e-165 < x < 3.1e-20Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i y1))))))
(t_2 (- (* j t) (* k y))))
(if (<= x -1.05e+203)
t_1
(if (<= x -1.7e-238)
(*
b
(- (fma a (- (* x y) (* t z)) (* y4 t_2)) (* y0 (- (* j x) (* k z)))))
(if (<= x 42000.0)
(*
y4
(-
(fma b t_2 (* y1 (- (* k y2) (* j y3))))
(* c (- (* t y2) (* 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 = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
double t_2 = (j * t) - (k * y);
double tmp;
if (x <= -1.05e+203) {
tmp = t_1;
} else if (x <= -1.7e-238) {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * t_2)) - (y0 * ((j * x) - (k * z))));
} else if (x <= 42000.0) {
tmp = y4 * (fma(b, t_2, (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (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(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))))) t_2 = Float64(Float64(j * t) - Float64(k * y)) tmp = 0.0 if (x <= -1.05e+203) tmp = t_1; elseif (x <= -1.7e-238) tmp = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * t_2)) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); elseif (x <= 42000.0) tmp = Float64(y4 * Float64(fma(b, t_2, Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); 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[(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]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+203], t$95$1, If[LessEqual[x, -1.7e-238], N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 42000.0], N[(y4 * N[(N[(b * t$95$2 + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 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)\\
t_2 := j \cdot t - k \cdot y\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+203}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-238}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot t\_2\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 42000:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_2, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.04999999999999992e203 or 42000 < x Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
if -1.04999999999999992e203 < x < -1.69999999999999992e-238Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
if -1.69999999999999992e-238 < x < 42000Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y3 -2.35e+176)
(* a (* y (- (* b x) (* y3 y5))))
(if (<= y3 -7.8e+114)
(* j (* t (- (* b y4) (* i y5))))
(if (<= y3 -1.25e-23)
(* b (* y0 (- (* k z) (* j x))))
(if (<= y3 -1.35e-212)
(* y4 (* y2 (- (* k y1) (* c t))))
(if (<= y3 4.5e-171)
(* b (* a (- (* x y) (* t z))))
(if (<= y3 1.26e+79)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<= y3 1.85e+235)
(* a (* y3 (- (* y1 z) (* y y5))))
(* y1 (* y3 (fma -1.0 (* j y4) (* a 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 (y3 <= -2.35e+176) {
tmp = a * (y * ((b * x) - (y3 * y5)));
} else if (y3 <= -7.8e+114) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (y3 <= -1.25e-23) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (y3 <= -1.35e-212) {
tmp = y4 * (y2 * ((k * y1) - (c * t)));
} else if (y3 <= 4.5e-171) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y3 <= 1.26e+79) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y3 <= 1.85e+235) {
tmp = a * (y3 * ((y1 * z) - (y * y5)));
} else {
tmp = y1 * (y3 * fma(-1.0, (j * y4), (a * 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 (y3 <= -2.35e+176) tmp = Float64(a * Float64(y * Float64(Float64(b * x) - Float64(y3 * y5)))); elseif (y3 <= -7.8e+114) tmp = Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))); elseif (y3 <= -1.25e-23) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (y3 <= -1.35e-212) tmp = Float64(y4 * Float64(y2 * Float64(Float64(k * y1) - Float64(c * t)))); elseif (y3 <= 4.5e-171) tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z)))); elseif (y3 <= 1.26e+79) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (y3 <= 1.85e+235) tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * y5)))); else tmp = Float64(y1 * Float64(y3 * fma(-1.0, Float64(j * y4), Float64(a * z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y3, -2.35e+176], N[(a * N[(y * N[(N[(b * x), $MachinePrecision] - N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -7.8e+114], N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -1.25e-23], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -1.35e-212], N[(y4 * N[(y2 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 4.5e-171], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 1.26e+79], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 1.85e+235], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(y3 * N[(-1.0 * N[(j * y4), $MachinePrecision] + N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -2.35 \cdot 10^{+176}:\\
\;\;\;\;a \cdot \left(y \cdot \left(b \cdot x - y3 \cdot y5\right)\right)\\
\mathbf{elif}\;y3 \leq -7.8 \cdot 10^{+114}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\
\mathbf{elif}\;y3 \leq -1.25 \cdot 10^{-23}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;y3 \leq -1.35 \cdot 10^{-212}:\\
\;\;\;\;y4 \cdot \left(y2 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\mathbf{elif}\;y3 \leq 4.5 \cdot 10^{-171}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{elif}\;y3 \leq 1.26 \cdot 10^{+79}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;y3 \leq 1.85 \cdot 10^{+235}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, j \cdot y4, a \cdot z\right)\right)\\
\end{array}
\end{array}
if y3 < -2.34999999999999991e176Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9
Applied rewrites26.9%
if -2.34999999999999991e176 < y3 < -7.8000000000000001e114Initial program 28.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.6
Applied rewrites27.6%
if -7.8000000000000001e114 < y3 < -1.2500000000000001e-23Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.1
Applied rewrites26.1%
if -1.2500000000000001e-23 < y3 < -1.34999999999999991e-212Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.1
Applied rewrites26.1%
if -1.34999999999999991e-212 < y3 < 4.5000000000000004e-171Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
if 4.5000000000000004e-171 < y3 < 1.26e79Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
if 1.26e79 < y3 < 1.8499999999999999e235Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
if 1.8499999999999999e235 < y3 Initial program 28.8%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.7%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.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 (<= y5 -50000000000.0)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= y5 -7.6e-138)
(* t (* c (- (* i z) (* y2 y4))))
(if (<= y5 2.5e+142)
(*
b
(-
(fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
(* y0 (- (* j x) (* k z)))))
(* 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 tmp;
if (y5 <= -50000000000.0) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y5 <= -7.6e-138) {
tmp = t * (c * ((i * z) - (y2 * y4)));
} else if (y5 <= 2.5e+142) {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
} 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) tmp = 0.0 if (y5 <= -50000000000.0) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (y5 <= -7.6e-138) tmp = Float64(t * Float64(c * Float64(Float64(i * z) - Float64(y2 * y4)))); elseif (y5 <= 2.5e+142) tmp = Float64(b * Float64(fma(a, Float64(Float64(x * y) - Float64(t * z)), Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); else tmp = Float64(k * Float64(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_] := If[LessEqual[y5, -50000000000.0], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -7.6e-138], N[(t * N[(c * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 2.5e+142], N[(b * N[(N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y5 * N[(-1.0 * N[(y0 * y2), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -50000000000:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;y5 \leq -7.6 \cdot 10^{-138}:\\
\;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right)\\
\mathbf{elif}\;y5 \leq 2.5 \cdot 10^{+142}:\\
\;\;\;\;b \cdot \left(\mathsf{fma}\left(a, x \cdot y - t \cdot z, y4 \cdot \left(j \cdot t - k \cdot y\right)\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(y5 \cdot \mathsf{fma}\left(-1, y0 \cdot y2, i \cdot y\right)\right)\\
\end{array}
\end{array}
if y5 < -5e10Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if -5e10 < y5 < -7.6000000000000005e-138Initial program 28.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
if -7.6000000000000005e-138 < y5 < 2.5000000000000001e142Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
if 2.5000000000000001e142 < y5 Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y3 -2.35e+176)
(* a (* y (- (* b x) (* y3 y5))))
(if (<= y3 -7.8e+114)
(* j (* t (- (* b y4) (* i y5))))
(if (<= y3 -1.25e-23)
(* b (* y0 (- (* k z) (* j x))))
(if (<= y3 -1.35e-212)
(* y4 (* y2 (- (* k y1) (* c t))))
(if (<= y3 4.5e-171)
(* b (* a (- (* x y) (* t z))))
(if (<= y3 1.26e+79)
(* x (* y2 (- (* c y0) (* a y1))))
(* a (* y3 (- (* y1 z) (* y y5)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y3 <= -2.35e+176) {
tmp = a * (y * ((b * x) - (y3 * y5)));
} else if (y3 <= -7.8e+114) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (y3 <= -1.25e-23) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (y3 <= -1.35e-212) {
tmp = y4 * (y2 * ((k * y1) - (c * t)));
} else if (y3 <= 4.5e-171) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y3 <= 1.26e+79) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = a * (y3 * ((y1 * z) - (y * 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 (y3 <= (-2.35d+176)) then
tmp = a * (y * ((b * x) - (y3 * y5)))
else if (y3 <= (-7.8d+114)) then
tmp = j * (t * ((b * y4) - (i * y5)))
else if (y3 <= (-1.25d-23)) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (y3 <= (-1.35d-212)) then
tmp = y4 * (y2 * ((k * y1) - (c * t)))
else if (y3 <= 4.5d-171) then
tmp = b * (a * ((x * y) - (t * z)))
else if (y3 <= 1.26d+79) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else
tmp = a * (y3 * ((y1 * z) - (y * 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 (y3 <= -2.35e+176) {
tmp = a * (y * ((b * x) - (y3 * y5)));
} else if (y3 <= -7.8e+114) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (y3 <= -1.25e-23) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (y3 <= -1.35e-212) {
tmp = y4 * (y2 * ((k * y1) - (c * t)));
} else if (y3 <= 4.5e-171) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y3 <= 1.26e+79) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = a * (y3 * ((y1 * z) - (y * y5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y3 <= -2.35e+176: tmp = a * (y * ((b * x) - (y3 * y5))) elif y3 <= -7.8e+114: tmp = j * (t * ((b * y4) - (i * y5))) elif y3 <= -1.25e-23: tmp = b * (y0 * ((k * z) - (j * x))) elif y3 <= -1.35e-212: tmp = y4 * (y2 * ((k * y1) - (c * t))) elif y3 <= 4.5e-171: tmp = b * (a * ((x * y) - (t * z))) elif y3 <= 1.26e+79: tmp = x * (y2 * ((c * y0) - (a * y1))) else: tmp = a * (y3 * ((y1 * z) - (y * 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 (y3 <= -2.35e+176) tmp = Float64(a * Float64(y * Float64(Float64(b * x) - Float64(y3 * y5)))); elseif (y3 <= -7.8e+114) tmp = Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))); elseif (y3 <= -1.25e-23) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (y3 <= -1.35e-212) tmp = Float64(y4 * Float64(y2 * Float64(Float64(k * y1) - Float64(c * t)))); elseif (y3 <= 4.5e-171) tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z)))); elseif (y3 <= 1.26e+79) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); else tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * 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 (y3 <= -2.35e+176) tmp = a * (y * ((b * x) - (y3 * y5))); elseif (y3 <= -7.8e+114) tmp = j * (t * ((b * y4) - (i * y5))); elseif (y3 <= -1.25e-23) tmp = b * (y0 * ((k * z) - (j * x))); elseif (y3 <= -1.35e-212) tmp = y4 * (y2 * ((k * y1) - (c * t))); elseif (y3 <= 4.5e-171) tmp = b * (a * ((x * y) - (t * z))); elseif (y3 <= 1.26e+79) tmp = x * (y2 * ((c * y0) - (a * y1))); else tmp = a * (y3 * ((y1 * z) - (y * 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[y3, -2.35e+176], N[(a * N[(y * N[(N[(b * x), $MachinePrecision] - N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -7.8e+114], N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -1.25e-23], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -1.35e-212], N[(y4 * N[(y2 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 4.5e-171], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 1.26e+79], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -2.35 \cdot 10^{+176}:\\
\;\;\;\;a \cdot \left(y \cdot \left(b \cdot x - y3 \cdot y5\right)\right)\\
\mathbf{elif}\;y3 \leq -7.8 \cdot 10^{+114}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\
\mathbf{elif}\;y3 \leq -1.25 \cdot 10^{-23}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;y3 \leq -1.35 \cdot 10^{-212}:\\
\;\;\;\;y4 \cdot \left(y2 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\mathbf{elif}\;y3 \leq 4.5 \cdot 10^{-171}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{elif}\;y3 \leq 1.26 \cdot 10^{+79}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\
\end{array}
\end{array}
if y3 < -2.34999999999999991e176Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9
Applied rewrites26.9%
if -2.34999999999999991e176 < y3 < -7.8000000000000001e114Initial program 28.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.6
Applied rewrites27.6%
if -7.8000000000000001e114 < y3 < -1.2500000000000001e-23Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.1
Applied rewrites26.1%
if -1.2500000000000001e-23 < y3 < -1.34999999999999991e-212Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.1
Applied rewrites26.1%
if -1.34999999999999991e-212 < y3 < 4.5000000000000004e-171Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
if 4.5000000000000004e-171 < y3 < 1.26e79Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
if 1.26e79 < y3 Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y1 -1.78e+109)
(* x (* j (- (* i y1) (* b y0))))
(if (<= y1 -2.5e-235)
(* b (* j (- (* t y4) (* x y0))))
(if (<= y1 -6.5e-291)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= y1 1.85e-96)
(* y4 (- (* -1.0 (* b (* k y))) (* c (- (* t y2) (* y y3)))))
(if (<= y1 102000000.0)
(* x (* y2 (- (* c y0) (* a y1))))
(* y4 (* y2 (- (* k y1) (* c t))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y1 <= -1.78e+109) {
tmp = x * (j * ((i * y1) - (b * y0)));
} else if (y1 <= -2.5e-235) {
tmp = b * (j * ((t * y4) - (x * y0)));
} else if (y1 <= -6.5e-291) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y1 <= 1.85e-96) {
tmp = y4 * ((-1.0 * (b * (k * y))) - (c * ((t * y2) - (y * y3))));
} else if (y1 <= 102000000.0) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = y4 * (y2 * ((k * y1) - (c * t)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y1 <= (-1.78d+109)) then
tmp = x * (j * ((i * y1) - (b * y0)))
else if (y1 <= (-2.5d-235)) then
tmp = b * (j * ((t * y4) - (x * y0)))
else if (y1 <= (-6.5d-291)) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else if (y1 <= 1.85d-96) then
tmp = y4 * (((-1.0d0) * (b * (k * y))) - (c * ((t * y2) - (y * y3))))
else if (y1 <= 102000000.0d0) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else
tmp = y4 * (y2 * ((k * y1) - (c * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y1 <= -1.78e+109) {
tmp = x * (j * ((i * y1) - (b * y0)));
} else if (y1 <= -2.5e-235) {
tmp = b * (j * ((t * y4) - (x * y0)));
} else if (y1 <= -6.5e-291) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y1 <= 1.85e-96) {
tmp = y4 * ((-1.0 * (b * (k * y))) - (c * ((t * y2) - (y * y3))));
} else if (y1 <= 102000000.0) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = y4 * (y2 * ((k * y1) - (c * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y1 <= -1.78e+109: tmp = x * (j * ((i * y1) - (b * y0))) elif y1 <= -2.5e-235: tmp = b * (j * ((t * y4) - (x * y0))) elif y1 <= -6.5e-291: tmp = y3 * (y5 * ((j * y0) - (a * y))) elif y1 <= 1.85e-96: tmp = y4 * ((-1.0 * (b * (k * y))) - (c * ((t * y2) - (y * y3)))) elif y1 <= 102000000.0: tmp = x * (y2 * ((c * y0) - (a * y1))) else: tmp = y4 * (y2 * ((k * y1) - (c * t))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y1 <= -1.78e+109) tmp = Float64(x * Float64(j * Float64(Float64(i * y1) - Float64(b * y0)))); elseif (y1 <= -2.5e-235) tmp = Float64(b * Float64(j * Float64(Float64(t * y4) - Float64(x * y0)))); elseif (y1 <= -6.5e-291) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (y1 <= 1.85e-96) tmp = Float64(y4 * Float64(Float64(-1.0 * Float64(b * Float64(k * y))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); elseif (y1 <= 102000000.0) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); else tmp = Float64(y4 * Float64(y2 * Float64(Float64(k * y1) - Float64(c * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y1 <= -1.78e+109) tmp = x * (j * ((i * y1) - (b * y0))); elseif (y1 <= -2.5e-235) tmp = b * (j * ((t * y4) - (x * y0))); elseif (y1 <= -6.5e-291) tmp = y3 * (y5 * ((j * y0) - (a * y))); elseif (y1 <= 1.85e-96) tmp = y4 * ((-1.0 * (b * (k * y))) - (c * ((t * y2) - (y * y3)))); elseif (y1 <= 102000000.0) tmp = x * (y2 * ((c * y0) - (a * y1))); else tmp = y4 * (y2 * ((k * y1) - (c * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y1, -1.78e+109], N[(x * N[(j * N[(N[(i * y1), $MachinePrecision] - N[(b * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, -2.5e-235], N[(b * N[(j * N[(N[(t * y4), $MachinePrecision] - N[(x * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, -6.5e-291], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 1.85e-96], N[(y4 * N[(N[(-1.0 * N[(b * N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y1, 102000000.0], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y4 * N[(y2 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y1 \leq -1.78 \cdot 10^{+109}:\\
\;\;\;\;x \cdot \left(j \cdot \left(i \cdot y1 - b \cdot y0\right)\right)\\
\mathbf{elif}\;y1 \leq -2.5 \cdot 10^{-235}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4 - x \cdot y0\right)\right)\\
\mathbf{elif}\;y1 \leq -6.5 \cdot 10^{-291}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;y1 \leq 1.85 \cdot 10^{-96}:\\
\;\;\;\;y4 \cdot \left(-1 \cdot \left(b \cdot \left(k \cdot y\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;y1 \leq 102000000:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y4 \cdot \left(y2 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\end{array}
\end{array}
if y1 < -1.7800000000000001e109Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if -1.7800000000000001e109 < y1 < -2.4999999999999999e-235Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
if -2.4999999999999999e-235 < y1 < -6.50000000000000002e-291Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if -6.50000000000000002e-291 < y1 < 1.84999999999999993e-96Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6432.0
Applied rewrites32.0%
if 1.84999999999999993e-96 < y1 < 1.02e8Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
if 1.02e8 < y1 Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.1
Applied rewrites26.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y3 -2.35e+176)
(* a (* y (- (* b x) (* y3 y5))))
(if (<= y3 -7.8e+114)
(* j (* t (- (* b y4) (* i y5))))
(if (<= y3 -1.2e-23)
(* b (* y0 (- (* k z) (* j x))))
(if (<= y3 -1.35e-212)
(* y2 (* y4 (- (* k y1) (* c t))))
(if (<= y3 4.5e-171)
(* b (* a (- (* x y) (* t z))))
(if (<= y3 1.26e+79)
(* x (* y2 (- (* c y0) (* a y1))))
(* a (* y3 (- (* y1 z) (* y y5)))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y3 <= -2.35e+176) {
tmp = a * (y * ((b * x) - (y3 * y5)));
} else if (y3 <= -7.8e+114) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (y3 <= -1.2e-23) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (y3 <= -1.35e-212) {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
} else if (y3 <= 4.5e-171) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y3 <= 1.26e+79) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = a * (y3 * ((y1 * z) - (y * 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 (y3 <= (-2.35d+176)) then
tmp = a * (y * ((b * x) - (y3 * y5)))
else if (y3 <= (-7.8d+114)) then
tmp = j * (t * ((b * y4) - (i * y5)))
else if (y3 <= (-1.2d-23)) then
tmp = b * (y0 * ((k * z) - (j * x)))
else if (y3 <= (-1.35d-212)) then
tmp = y2 * (y4 * ((k * y1) - (c * t)))
else if (y3 <= 4.5d-171) then
tmp = b * (a * ((x * y) - (t * z)))
else if (y3 <= 1.26d+79) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else
tmp = a * (y3 * ((y1 * z) - (y * 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 (y3 <= -2.35e+176) {
tmp = a * (y * ((b * x) - (y3 * y5)));
} else if (y3 <= -7.8e+114) {
tmp = j * (t * ((b * y4) - (i * y5)));
} else if (y3 <= -1.2e-23) {
tmp = b * (y0 * ((k * z) - (j * x)));
} else if (y3 <= -1.35e-212) {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
} else if (y3 <= 4.5e-171) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y3 <= 1.26e+79) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = a * (y3 * ((y1 * z) - (y * y5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y3 <= -2.35e+176: tmp = a * (y * ((b * x) - (y3 * y5))) elif y3 <= -7.8e+114: tmp = j * (t * ((b * y4) - (i * y5))) elif y3 <= -1.2e-23: tmp = b * (y0 * ((k * z) - (j * x))) elif y3 <= -1.35e-212: tmp = y2 * (y4 * ((k * y1) - (c * t))) elif y3 <= 4.5e-171: tmp = b * (a * ((x * y) - (t * z))) elif y3 <= 1.26e+79: tmp = x * (y2 * ((c * y0) - (a * y1))) else: tmp = a * (y3 * ((y1 * z) - (y * 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 (y3 <= -2.35e+176) tmp = Float64(a * Float64(y * Float64(Float64(b * x) - Float64(y3 * y5)))); elseif (y3 <= -7.8e+114) tmp = Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))); elseif (y3 <= -1.2e-23) tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); elseif (y3 <= -1.35e-212) tmp = Float64(y2 * Float64(y4 * Float64(Float64(k * y1) - Float64(c * t)))); elseif (y3 <= 4.5e-171) tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z)))); elseif (y3 <= 1.26e+79) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); else tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * 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 (y3 <= -2.35e+176) tmp = a * (y * ((b * x) - (y3 * y5))); elseif (y3 <= -7.8e+114) tmp = j * (t * ((b * y4) - (i * y5))); elseif (y3 <= -1.2e-23) tmp = b * (y0 * ((k * z) - (j * x))); elseif (y3 <= -1.35e-212) tmp = y2 * (y4 * ((k * y1) - (c * t))); elseif (y3 <= 4.5e-171) tmp = b * (a * ((x * y) - (t * z))); elseif (y3 <= 1.26e+79) tmp = x * (y2 * ((c * y0) - (a * y1))); else tmp = a * (y3 * ((y1 * z) - (y * 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[y3, -2.35e+176], N[(a * N[(y * N[(N[(b * x), $MachinePrecision] - N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -7.8e+114], N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -1.2e-23], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -1.35e-212], N[(y2 * N[(y4 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 4.5e-171], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 1.26e+79], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -2.35 \cdot 10^{+176}:\\
\;\;\;\;a \cdot \left(y \cdot \left(b \cdot x - y3 \cdot y5\right)\right)\\
\mathbf{elif}\;y3 \leq -7.8 \cdot 10^{+114}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\
\mathbf{elif}\;y3 \leq -1.2 \cdot 10^{-23}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;y3 \leq -1.35 \cdot 10^{-212}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\mathbf{elif}\;y3 \leq 4.5 \cdot 10^{-171}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{elif}\;y3 \leq 1.26 \cdot 10^{+79}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\
\end{array}
\end{array}
if y3 < -2.34999999999999991e176Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9
Applied rewrites26.9%
if -2.34999999999999991e176 < y3 < -7.8000000000000001e114Initial program 28.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.6
Applied rewrites27.6%
if -7.8000000000000001e114 < y3 < -1.19999999999999998e-23Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.1
Applied rewrites26.1%
if -1.19999999999999998e-23 < y3 < -1.34999999999999991e-212Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
if -1.34999999999999991e-212 < y3 < 4.5000000000000004e-171Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
if 4.5000000000000004e-171 < y3 < 1.26e79Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
if 1.26e79 < y3 Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y5 -50000000000.0)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= y5 -1.25e-141)
(* t (* c (- (* i z) (* y2 y4))))
(if (<= y5 -5.6e-195)
(* b (* a (- (* x y) (* t z))))
(if (<= y5 2.7e+94)
(* b (- (* y4 (- (* j t) (* k y))) (* y0 (- (* j x) (* k z)))))
(* -1.0 (* y2 (* y5 (- (* k y0) (* a t))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -50000000000.0) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y5 <= -1.25e-141) {
tmp = t * (c * ((i * z) - (y2 * y4)));
} else if (y5 <= -5.6e-195) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y5 <= 2.7e+94) {
tmp = b * ((y4 * ((j * t) - (k * y))) - (y0 * ((j * x) - (k * z))));
} else {
tmp = -1.0 * (y2 * (y5 * ((k * y0) - (a * t))));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y5 <= (-50000000000.0d0)) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else if (y5 <= (-1.25d-141)) then
tmp = t * (c * ((i * z) - (y2 * y4)))
else if (y5 <= (-5.6d-195)) then
tmp = b * (a * ((x * y) - (t * z)))
else if (y5 <= 2.7d+94) then
tmp = b * ((y4 * ((j * t) - (k * y))) - (y0 * ((j * x) - (k * z))))
else
tmp = (-1.0d0) * (y2 * (y5 * ((k * y0) - (a * t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -50000000000.0) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y5 <= -1.25e-141) {
tmp = t * (c * ((i * z) - (y2 * y4)));
} else if (y5 <= -5.6e-195) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y5 <= 2.7e+94) {
tmp = b * ((y4 * ((j * t) - (k * y))) - (y0 * ((j * x) - (k * z))));
} else {
tmp = -1.0 * (y2 * (y5 * ((k * y0) - (a * t))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y5 <= -50000000000.0: tmp = y3 * (y5 * ((j * y0) - (a * y))) elif y5 <= -1.25e-141: tmp = t * (c * ((i * z) - (y2 * y4))) elif y5 <= -5.6e-195: tmp = b * (a * ((x * y) - (t * z))) elif y5 <= 2.7e+94: tmp = b * ((y4 * ((j * t) - (k * y))) - (y0 * ((j * x) - (k * z)))) else: tmp = -1.0 * (y2 * (y5 * ((k * y0) - (a * t)))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y5 <= -50000000000.0) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (y5 <= -1.25e-141) tmp = Float64(t * Float64(c * Float64(Float64(i * z) - Float64(y2 * y4)))); elseif (y5 <= -5.6e-195) tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z)))); elseif (y5 <= 2.7e+94) tmp = Float64(b * Float64(Float64(y4 * Float64(Float64(j * t) - Float64(k * y))) - Float64(y0 * Float64(Float64(j * x) - Float64(k * z))))); else tmp = Float64(-1.0 * Float64(y2 * Float64(y5 * Float64(Float64(k * y0) - Float64(a * t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y5 <= -50000000000.0) tmp = y3 * (y5 * ((j * y0) - (a * y))); elseif (y5 <= -1.25e-141) tmp = t * (c * ((i * z) - (y2 * y4))); elseif (y5 <= -5.6e-195) tmp = b * (a * ((x * y) - (t * z))); elseif (y5 <= 2.7e+94) tmp = b * ((y4 * ((j * t) - (k * y))) - (y0 * ((j * x) - (k * z)))); else tmp = -1.0 * (y2 * (y5 * ((k * y0) - (a * t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -50000000000.0], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -1.25e-141], N[(t * N[(c * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -5.6e-195], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 2.7e+94], N[(b * N[(N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y0 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1.0 * N[(y2 * N[(y5 * N[(N[(k * y0), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y5 \leq -50000000000:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;y5 \leq -1.25 \cdot 10^{-141}:\\
\;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right)\\
\mathbf{elif}\;y5 \leq -5.6 \cdot 10^{-195}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{elif}\;y5 \leq 2.7 \cdot 10^{+94}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right) - y0 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(y2 \cdot \left(y5 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if y5 < -5e10Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if -5e10 < y5 < -1.25e-141Initial program 28.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
if -1.25e-141 < y5 < -5.60000000000000007e-195Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
if -5.60000000000000007e-195 < y5 < 2.7000000000000001e94Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
Taylor expanded in a around 0
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6434.0
Applied rewrites34.0%
if 2.7000000000000001e94 < y5 Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* t (* c (- (* i z) (* y2 y4))))))
(if (<= c -2.4e+149)
t_1
(if (<= c -1.05e-15)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<= c -3.5e-233)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= c 7e-297)
(* a (* y (- (* b x) (* y3 y5))))
(if (<= c 2.8e-37) (* y1 (* y4 (- (* k y2) (* j 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 = t * (c * ((i * z) - (y2 * y4)));
double tmp;
if (c <= -2.4e+149) {
tmp = t_1;
} else if (c <= -1.05e-15) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (c <= -3.5e-233) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (c <= 7e-297) {
tmp = a * (y * ((b * x) - (y3 * y5)));
} else if (c <= 2.8e-37) {
tmp = y1 * (y4 * ((k * y2) - (j * 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 = t * (c * ((i * z) - (y2 * y4)))
if (c <= (-2.4d+149)) then
tmp = t_1
else if (c <= (-1.05d-15)) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else if (c <= (-3.5d-233)) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else if (c <= 7d-297) then
tmp = a * (y * ((b * x) - (y3 * y5)))
else if (c <= 2.8d-37) then
tmp = y1 * (y4 * ((k * y2) - (j * 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 = t * (c * ((i * z) - (y2 * y4)));
double tmp;
if (c <= -2.4e+149) {
tmp = t_1;
} else if (c <= -1.05e-15) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (c <= -3.5e-233) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (c <= 7e-297) {
tmp = a * (y * ((b * x) - (y3 * y5)));
} else if (c <= 2.8e-37) {
tmp = y1 * (y4 * ((k * y2) - (j * 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 = t * (c * ((i * z) - (y2 * y4))) tmp = 0 if c <= -2.4e+149: tmp = t_1 elif c <= -1.05e-15: tmp = x * (y2 * ((c * y0) - (a * y1))) elif c <= -3.5e-233: tmp = y3 * (y5 * ((j * y0) - (a * y))) elif c <= 7e-297: tmp = a * (y * ((b * x) - (y3 * y5))) elif c <= 2.8e-37: tmp = y1 * (y4 * ((k * y2) - (j * 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(t * Float64(c * Float64(Float64(i * z) - Float64(y2 * y4)))) tmp = 0.0 if (c <= -2.4e+149) tmp = t_1; elseif (c <= -1.05e-15) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (c <= -3.5e-233) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (c <= 7e-297) tmp = Float64(a * Float64(y * Float64(Float64(b * x) - Float64(y3 * y5)))); elseif (c <= 2.8e-37) tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * 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 = t * (c * ((i * z) - (y2 * y4))); tmp = 0.0; if (c <= -2.4e+149) tmp = t_1; elseif (c <= -1.05e-15) tmp = x * (y2 * ((c * y0) - (a * y1))); elseif (c <= -3.5e-233) tmp = y3 * (y5 * ((j * y0) - (a * y))); elseif (c <= 7e-297) tmp = a * (y * ((b * x) - (y3 * y5))); elseif (c <= 2.8e-37) tmp = y1 * (y4 * ((k * y2) - (j * 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[(t * N[(c * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.4e+149], t$95$1, If[LessEqual[c, -1.05e-15], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -3.5e-233], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 7e-297], N[(a * N[(y * N[(N[(b * x), $MachinePrecision] - N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.8e-37], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right)\\
\mathbf{if}\;c \leq -2.4 \cdot 10^{+149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.05 \cdot 10^{-15}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;c \leq -3.5 \cdot 10^{-233}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;c \leq 7 \cdot 10^{-297}:\\
\;\;\;\;a \cdot \left(y \cdot \left(b \cdot x - y3 \cdot y5\right)\right)\\
\mathbf{elif}\;c \leq 2.8 \cdot 10^{-37}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -2.40000000000000012e149 or 2.8000000000000001e-37 < c Initial program 28.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0
Applied rewrites27.0%
if -2.40000000000000012e149 < c < -1.0499999999999999e-15Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
if -1.0499999999999999e-15 < c < -3.49999999999999991e-233Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if -3.49999999999999991e-233 < c < 6.9999999999999998e-297Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9
Applied rewrites26.9%
if 6.9999999999999998e-297 < c < 2.8000000000000001e-37Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y3 -2.3e+149)
(* a (* y (- (* b x) (* y3 y5))))
(if (<= y3 -1.35e-212)
(* y2 (* y4 (- (* k y1) (* c t))))
(if (<= y3 4.5e-171)
(* b (* a (- (* x y) (* t z))))
(if (<= y3 1.26e+79)
(* x (* y2 (- (* c y0) (* a y1))))
(* a (* y3 (- (* y1 z) (* y y5)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y3 <= -2.3e+149) {
tmp = a * (y * ((b * x) - (y3 * y5)));
} else if (y3 <= -1.35e-212) {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
} else if (y3 <= 4.5e-171) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y3 <= 1.26e+79) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = a * (y3 * ((y1 * z) - (y * 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 (y3 <= (-2.3d+149)) then
tmp = a * (y * ((b * x) - (y3 * y5)))
else if (y3 <= (-1.35d-212)) then
tmp = y2 * (y4 * ((k * y1) - (c * t)))
else if (y3 <= 4.5d-171) then
tmp = b * (a * ((x * y) - (t * z)))
else if (y3 <= 1.26d+79) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else
tmp = a * (y3 * ((y1 * z) - (y * 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 (y3 <= -2.3e+149) {
tmp = a * (y * ((b * x) - (y3 * y5)));
} else if (y3 <= -1.35e-212) {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
} else if (y3 <= 4.5e-171) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y3 <= 1.26e+79) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else {
tmp = a * (y3 * ((y1 * z) - (y * y5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y3 <= -2.3e+149: tmp = a * (y * ((b * x) - (y3 * y5))) elif y3 <= -1.35e-212: tmp = y2 * (y4 * ((k * y1) - (c * t))) elif y3 <= 4.5e-171: tmp = b * (a * ((x * y) - (t * z))) elif y3 <= 1.26e+79: tmp = x * (y2 * ((c * y0) - (a * y1))) else: tmp = a * (y3 * ((y1 * z) - (y * 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 (y3 <= -2.3e+149) tmp = Float64(a * Float64(y * Float64(Float64(b * x) - Float64(y3 * y5)))); elseif (y3 <= -1.35e-212) tmp = Float64(y2 * Float64(y4 * Float64(Float64(k * y1) - Float64(c * t)))); elseif (y3 <= 4.5e-171) tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z)))); elseif (y3 <= 1.26e+79) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); else tmp = Float64(a * Float64(y3 * Float64(Float64(y1 * z) - Float64(y * 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 (y3 <= -2.3e+149) tmp = a * (y * ((b * x) - (y3 * y5))); elseif (y3 <= -1.35e-212) tmp = y2 * (y4 * ((k * y1) - (c * t))); elseif (y3 <= 4.5e-171) tmp = b * (a * ((x * y) - (t * z))); elseif (y3 <= 1.26e+79) tmp = x * (y2 * ((c * y0) - (a * y1))); else tmp = a * (y3 * ((y1 * z) - (y * 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[y3, -2.3e+149], N[(a * N[(y * N[(N[(b * x), $MachinePrecision] - N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -1.35e-212], N[(y2 * N[(y4 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 4.5e-171], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 1.26e+79], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y3 * N[(N[(y1 * z), $MachinePrecision] - N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -2.3 \cdot 10^{+149}:\\
\;\;\;\;a \cdot \left(y \cdot \left(b \cdot x - y3 \cdot y5\right)\right)\\
\mathbf{elif}\;y3 \leq -1.35 \cdot 10^{-212}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\mathbf{elif}\;y3 \leq 4.5 \cdot 10^{-171}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{elif}\;y3 \leq 1.26 \cdot 10^{+79}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z - y \cdot y5\right)\right)\\
\end{array}
\end{array}
if y3 < -2.2999999999999998e149Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9
Applied rewrites26.9%
if -2.2999999999999998e149 < y3 < -1.34999999999999991e-212Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
if -1.34999999999999991e-212 < y3 < 4.5000000000000004e-171Initial program 28.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.5%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.4
Applied rewrites26.4%
if 4.5000000000000004e-171 < y3 < 1.26e79Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
if 1.26e79 < y3 Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* j (* t (- (* b y4) (* i y5))))))
(if (<= x -6.8e+97)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<= x -1.85e-202)
t_1
(if (<= x 5e-170)
(* c (* y4 (- (* y y3) (* t y2))))
(if (<= x 3.5e-14)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= x 1.7e+278) (* a (* y (- (* b x) (* y3 y5)))) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = j * (t * ((b * y4) - (i * y5)));
double tmp;
if (x <= -6.8e+97) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (x <= -1.85e-202) {
tmp = t_1;
} else if (x <= 5e-170) {
tmp = c * (y4 * ((y * y3) - (t * y2)));
} else if (x <= 3.5e-14) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (x <= 1.7e+278) {
tmp = a * (y * ((b * x) - (y3 * y5)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = j * (t * ((b * y4) - (i * y5)))
if (x <= (-6.8d+97)) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else if (x <= (-1.85d-202)) then
tmp = t_1
else if (x <= 5d-170) then
tmp = c * (y4 * ((y * y3) - (t * y2)))
else if (x <= 3.5d-14) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else if (x <= 1.7d+278) then
tmp = a * (y * ((b * x) - (y3 * y5)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = j * (t * ((b * y4) - (i * y5)));
double tmp;
if (x <= -6.8e+97) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (x <= -1.85e-202) {
tmp = t_1;
} else if (x <= 5e-170) {
tmp = c * (y4 * ((y * y3) - (t * y2)));
} else if (x <= 3.5e-14) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (x <= 1.7e+278) {
tmp = a * (y * ((b * x) - (y3 * y5)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = j * (t * ((b * y4) - (i * y5))) tmp = 0 if x <= -6.8e+97: tmp = x * (y2 * ((c * y0) - (a * y1))) elif x <= -1.85e-202: tmp = t_1 elif x <= 5e-170: tmp = c * (y4 * ((y * y3) - (t * y2))) elif x <= 3.5e-14: tmp = y3 * (y5 * ((j * y0) - (a * y))) elif x <= 1.7e+278: tmp = a * (y * ((b * x) - (y3 * y5))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) tmp = 0.0 if (x <= -6.8e+97) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (x <= -1.85e-202) tmp = t_1; elseif (x <= 5e-170) tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2)))); elseif (x <= 3.5e-14) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (x <= 1.7e+278) tmp = Float64(a * Float64(y * Float64(Float64(b * x) - Float64(y3 * y5)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = j * (t * ((b * y4) - (i * y5))); tmp = 0.0; if (x <= -6.8e+97) tmp = x * (y2 * ((c * y0) - (a * y1))); elseif (x <= -1.85e-202) tmp = t_1; elseif (x <= 5e-170) tmp = c * (y4 * ((y * y3) - (t * y2))); elseif (x <= 3.5e-14) tmp = y3 * (y5 * ((j * y0) - (a * y))); elseif (x <= 1.7e+278) tmp = a * (y * ((b * x) - (y3 * y5))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.8e+97], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.85e-202], t$95$1, If[LessEqual[x, 5e-170], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e-14], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e+278], N[(a * N[(y * N[(N[(b * x), $MachinePrecision] - N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{+97}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{-202}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-170}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-14}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+278}:\\
\;\;\;\;a \cdot \left(y \cdot \left(b \cdot x - y3 \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.8000000000000002e97Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
if -6.8000000000000002e97 < x < -1.84999999999999995e-202 or 1.7e278 < x Initial program 28.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.6
Applied rewrites27.6%
if -1.84999999999999995e-202 < x < 5.0000000000000001e-170Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.4
Applied rewrites27.4%
if 5.0000000000000001e-170 < x < 3.5000000000000002e-14Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if 3.5000000000000002e-14 < x < 1.7e278Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y3 (* y5 (- (* j y0) (* a y))))))
(if (<= y4 -4e+19)
(* c (* y4 (- (* y y3) (* t y2))))
(if (<= y4 -7.3e-90)
t_1
(if (<= y4 -5.5e-203)
(* y (* y5 (- (* i k) (* a y3))))
(if (<= y4 1.9e-257)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<= y4 2.4e+187) t_1 (* b (* y4 (- (* j t) (* k 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 = y3 * (y5 * ((j * y0) - (a * y)));
double tmp;
if (y4 <= -4e+19) {
tmp = c * (y4 * ((y * y3) - (t * y2)));
} else if (y4 <= -7.3e-90) {
tmp = t_1;
} else if (y4 <= -5.5e-203) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (y4 <= 1.9e-257) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y4 <= 2.4e+187) {
tmp = t_1;
} else {
tmp = b * (y4 * ((j * t) - (k * y)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = y3 * (y5 * ((j * y0) - (a * y)))
if (y4 <= (-4d+19)) then
tmp = c * (y4 * ((y * y3) - (t * y2)))
else if (y4 <= (-7.3d-90)) then
tmp = t_1
else if (y4 <= (-5.5d-203)) then
tmp = y * (y5 * ((i * k) - (a * y3)))
else if (y4 <= 1.9d-257) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else if (y4 <= 2.4d+187) then
tmp = t_1
else
tmp = b * (y4 * ((j * t) - (k * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y3 * (y5 * ((j * y0) - (a * y)));
double tmp;
if (y4 <= -4e+19) {
tmp = c * (y4 * ((y * y3) - (t * y2)));
} else if (y4 <= -7.3e-90) {
tmp = t_1;
} else if (y4 <= -5.5e-203) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (y4 <= 1.9e-257) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y4 <= 2.4e+187) {
tmp = t_1;
} else {
tmp = b * (y4 * ((j * t) - (k * y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = y3 * (y5 * ((j * y0) - (a * y))) tmp = 0 if y4 <= -4e+19: tmp = c * (y4 * ((y * y3) - (t * y2))) elif y4 <= -7.3e-90: tmp = t_1 elif y4 <= -5.5e-203: tmp = y * (y5 * ((i * k) - (a * y3))) elif y4 <= 1.9e-257: tmp = x * (y2 * ((c * y0) - (a * y1))) elif y4 <= 2.4e+187: tmp = t_1 else: tmp = b * (y4 * ((j * t) - (k * y))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))) tmp = 0.0 if (y4 <= -4e+19) tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2)))); elseif (y4 <= -7.3e-90) tmp = t_1; elseif (y4 <= -5.5e-203) tmp = Float64(y * Float64(y5 * Float64(Float64(i * k) - Float64(a * y3)))); elseif (y4 <= 1.9e-257) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (y4 <= 2.4e+187) tmp = t_1; else tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = y3 * (y5 * ((j * y0) - (a * y))); tmp = 0.0; if (y4 <= -4e+19) tmp = c * (y4 * ((y * y3) - (t * y2))); elseif (y4 <= -7.3e-90) tmp = t_1; elseif (y4 <= -5.5e-203) tmp = y * (y5 * ((i * k) - (a * y3))); elseif (y4 <= 1.9e-257) tmp = x * (y2 * ((c * y0) - (a * y1))); elseif (y4 <= 2.4e+187) tmp = t_1; else tmp = b * (y4 * ((j * t) - (k * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -4e+19], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -7.3e-90], t$95$1, If[LessEqual[y4, -5.5e-203], N[(y * N[(y5 * N[(N[(i * k), $MachinePrecision] - N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1.9e-257], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 2.4e+187], t$95$1, N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{if}\;y4 \leq -4 \cdot 10^{+19}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\mathbf{elif}\;y4 \leq -7.3 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y4 \leq -5.5 \cdot 10^{-203}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\
\mathbf{elif}\;y4 \leq 1.9 \cdot 10^{-257}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;y4 \leq 2.4 \cdot 10^{+187}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\end{array}
\end{array}
if y4 < -4e19Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.4
Applied rewrites27.4%
if -4e19 < y4 < -7.29999999999999998e-90 or 1.9000000000000002e-257 < y4 < 2.39999999999999985e187Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if -7.29999999999999998e-90 < y4 < -5.5000000000000002e-203Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
if -5.5000000000000002e-203 < y4 < 1.9000000000000002e-257Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
if 2.39999999999999985e187 < y4 Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.4
Applied rewrites27.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y5 -5.6e+63)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= y5 -1e-274)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<= y5 1.2e+92)
(* b (* y4 (- (* j t) (* k y))))
(if (<= y5 3.6e+158)
(* k (* -1.0 (* y0 (* y2 y5))))
(* 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 <= -5.6e+63) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y5 <= -1e-274) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y5 <= 1.2e+92) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y5 <= 3.6e+158) {
tmp = k * (-1.0 * (y0 * (y2 * y5)));
} 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 <= (-5.6d+63)) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else if (y5 <= (-1d-274)) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else if (y5 <= 1.2d+92) then
tmp = b * (y4 * ((j * t) - (k * y)))
else if (y5 <= 3.6d+158) then
tmp = k * ((-1.0d0) * (y0 * (y2 * y5)))
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 <= -5.6e+63) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y5 <= -1e-274) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y5 <= 1.2e+92) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y5 <= 3.6e+158) {
tmp = k * (-1.0 * (y0 * (y2 * y5)));
} 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 <= -5.6e+63: tmp = y3 * (y5 * ((j * y0) - (a * y))) elif y5 <= -1e-274: tmp = x * (y2 * ((c * y0) - (a * y1))) elif y5 <= 1.2e+92: tmp = b * (y4 * ((j * t) - (k * y))) elif y5 <= 3.6e+158: tmp = k * (-1.0 * (y0 * (y2 * y5))) 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 <= -5.6e+63) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (y5 <= -1e-274) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (y5 <= 1.2e+92) tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))); elseif (y5 <= 3.6e+158) tmp = Float64(k * Float64(-1.0 * Float64(y0 * Float64(y2 * y5)))); 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 <= -5.6e+63) tmp = y3 * (y5 * ((j * y0) - (a * y))); elseif (y5 <= -1e-274) tmp = x * (y2 * ((c * y0) - (a * y1))); elseif (y5 <= 1.2e+92) tmp = b * (y4 * ((j * t) - (k * y))); elseif (y5 <= 3.6e+158) tmp = k * (-1.0 * (y0 * (y2 * y5))); 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, -5.6e+63], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, -1e-274], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 1.2e+92], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 3.6e+158], N[(k * N[(-1.0 * N[(y0 * N[(y2 * y5), $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 -5.6 \cdot 10^{+63}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;y5 \leq -1 \cdot 10^{-274}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;y5 \leq 1.2 \cdot 10^{+92}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{elif}\;y5 \leq 3.6 \cdot 10^{+158}:\\
\;\;\;\;k \cdot \left(-1 \cdot \left(y0 \cdot \left(y2 \cdot y5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\
\end{array}
\end{array}
if y5 < -5.59999999999999974e63Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if -5.59999999999999974e63 < y5 < -9.99999999999999966e-275Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
if -9.99999999999999966e-275 < y5 < 1.20000000000000002e92Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.4
Applied rewrites27.4%
if 1.20000000000000002e92 < y5 < 3.59999999999999988e158Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.2
Applied rewrites17.2%
if 3.59999999999999988e158 < y5 Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* j (* t (- (* b y4) (* i y5))))))
(if (<= y0 -7.5e-77)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<= y0 -5e-298)
t_1
(if (<= y0 4.6e-232)
(* y (* y5 (- (* i k) (* a y3))))
(if (<= y0 1.5e-100) t_1 (* y3 (* y5 (- (* j y0) (* a y))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = j * (t * ((b * y4) - (i * y5)));
double tmp;
if (y0 <= -7.5e-77) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y0 <= -5e-298) {
tmp = t_1;
} else if (y0 <= 4.6e-232) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (y0 <= 1.5e-100) {
tmp = t_1;
} else {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = j * (t * ((b * y4) - (i * y5)))
if (y0 <= (-7.5d-77)) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else if (y0 <= (-5d-298)) then
tmp = t_1
else if (y0 <= 4.6d-232) then
tmp = y * (y5 * ((i * k) - (a * y3)))
else if (y0 <= 1.5d-100) then
tmp = t_1
else
tmp = y3 * (y5 * ((j * y0) - (a * y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = j * (t * ((b * y4) - (i * y5)));
double tmp;
if (y0 <= -7.5e-77) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y0 <= -5e-298) {
tmp = t_1;
} else if (y0 <= 4.6e-232) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (y0 <= 1.5e-100) {
tmp = t_1;
} else {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = j * (t * ((b * y4) - (i * y5))) tmp = 0 if y0 <= -7.5e-77: tmp = x * (y2 * ((c * y0) - (a * y1))) elif y0 <= -5e-298: tmp = t_1 elif y0 <= 4.6e-232: tmp = y * (y5 * ((i * k) - (a * y3))) elif y0 <= 1.5e-100: tmp = t_1 else: tmp = y3 * (y5 * ((j * y0) - (a * y))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) tmp = 0.0 if (y0 <= -7.5e-77) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (y0 <= -5e-298) tmp = t_1; elseif (y0 <= 4.6e-232) tmp = Float64(y * Float64(y5 * Float64(Float64(i * k) - Float64(a * y3)))); elseif (y0 <= 1.5e-100) tmp = t_1; else tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = j * (t * ((b * y4) - (i * y5))); tmp = 0.0; if (y0 <= -7.5e-77) tmp = x * (y2 * ((c * y0) - (a * y1))); elseif (y0 <= -5e-298) tmp = t_1; elseif (y0 <= 4.6e-232) tmp = y * (y5 * ((i * k) - (a * y3))); elseif (y0 <= 1.5e-100) tmp = t_1; else tmp = y3 * (y5 * ((j * y0) - (a * y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y0, -7.5e-77], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, -5e-298], t$95$1, If[LessEqual[y0, 4.6e-232], N[(y * N[(y5 * N[(N[(i * k), $MachinePrecision] - N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 1.5e-100], t$95$1, N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\
\mathbf{if}\;y0 \leq -7.5 \cdot 10^{-77}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;y0 \leq -5 \cdot 10^{-298}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y0 \leq 4.6 \cdot 10^{-232}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\
\mathbf{elif}\;y0 \leq 1.5 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\end{array}
\end{array}
if y0 < -7.5000000000000006e-77Initial program 28.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.2
Applied rewrites27.2%
if -7.5000000000000006e-77 < y0 < -5.0000000000000002e-298 or 4.6e-232 < y0 < 1.5e-100Initial program 28.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.6
Applied rewrites27.6%
if -5.0000000000000002e-298 < y0 < 4.6e-232Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
if 1.5e-100 < y0 Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= t -2.6e+108)
(* y4 (* c (* -1.0 (* t y2))))
(if (<= t 2.3e+66)
(* y3 (* y5 (- (* j y0) (* a y))))
(* j (* t (- (* b y4) (* i 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 (t <= -2.6e+108) {
tmp = y4 * (c * (-1.0 * (t * y2)));
} else if (t <= 2.3e+66) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else {
tmp = j * (t * ((b * y4) - (i * 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 (t <= (-2.6d+108)) then
tmp = y4 * (c * ((-1.0d0) * (t * y2)))
else if (t <= 2.3d+66) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else
tmp = j * (t * ((b * y4) - (i * 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 (t <= -2.6e+108) {
tmp = y4 * (c * (-1.0 * (t * y2)));
} else if (t <= 2.3e+66) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else {
tmp = j * (t * ((b * y4) - (i * y5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if t <= -2.6e+108: tmp = y4 * (c * (-1.0 * (t * y2))) elif t <= 2.3e+66: tmp = y3 * (y5 * ((j * y0) - (a * y))) else: tmp = j * (t * ((b * y4) - (i * 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 (t <= -2.6e+108) tmp = Float64(y4 * Float64(c * Float64(-1.0 * Float64(t * y2)))); elseif (t <= 2.3e+66) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); else tmp = Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * 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 (t <= -2.6e+108) tmp = y4 * (c * (-1.0 * (t * y2))); elseif (t <= 2.3e+66) tmp = y3 * (y5 * ((j * y0) - (a * y))); else tmp = j * (t * ((b * y4) - (i * 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[t, -2.6e+108], N[(y4 * N[(c * N[(-1.0 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e+66], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+108}:\\
\;\;\;\;y4 \cdot \left(c \cdot \left(-1 \cdot \left(t \cdot y2\right)\right)\right)\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+66}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right)\\
\end{array}
\end{array}
if t < -2.6000000000000002e108Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3
Applied rewrites27.3%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.6
Applied rewrites17.6%
if -2.6000000000000002e108 < t < 2.3e66Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
if 2.3e66 < t Initial program 28.8%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.4%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.6
Applied rewrites27.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y4 (* c (* -1.0 (* t y2))))))
(if (<= t -2.6e+108)
t_1
(if (<= t 8.5e+194) (* y3 (* y5 (- (* j y0) (* a y)))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y4 * (c * (-1.0 * (t * y2)));
double tmp;
if (t <= -2.6e+108) {
tmp = t_1;
} else if (t <= 8.5e+194) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} 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 = y4 * (c * ((-1.0d0) * (t * y2)))
if (t <= (-2.6d+108)) then
tmp = t_1
else if (t <= 8.5d+194) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
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 = y4 * (c * (-1.0 * (t * y2)));
double tmp;
if (t <= -2.6e+108) {
tmp = t_1;
} else if (t <= 8.5e+194) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} 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 = y4 * (c * (-1.0 * (t * y2))) tmp = 0 if t <= -2.6e+108: tmp = t_1 elif t <= 8.5e+194: tmp = y3 * (y5 * ((j * y0) - (a * y))) 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(c * Float64(-1.0 * Float64(t * y2)))) tmp = 0.0 if (t <= -2.6e+108) tmp = t_1; elseif (t <= 8.5e+194) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); 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 = y4 * (c * (-1.0 * (t * y2))); tmp = 0.0; if (t <= -2.6e+108) tmp = t_1; elseif (t <= 8.5e+194) tmp = y3 * (y5 * ((j * y0) - (a * y))); 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[(y4 * N[(c * N[(-1.0 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.6e+108], t$95$1, If[LessEqual[t, 8.5e+194], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y4 \cdot \left(c \cdot \left(-1 \cdot \left(t \cdot y2\right)\right)\right)\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+194}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.6000000000000002e108 or 8.50000000000000026e194 < t Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3
Applied rewrites27.3%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.6
Applied rewrites17.6%
if -2.6000000000000002e108 < t < 8.50000000000000026e194Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y4 (* c (* -1.0 (* t y2))))))
(if (<= y2 -2.2e+261)
t_1
(if (<= y2 -1.05e-32)
(* k (* -1.0 (* y0 (* y2 y5))))
(if (<= y2 2.7e+17) (* a (* y3 (* y1 z))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y4 * (c * (-1.0 * (t * y2)));
double tmp;
if (y2 <= -2.2e+261) {
tmp = t_1;
} else if (y2 <= -1.05e-32) {
tmp = k * (-1.0 * (y0 * (y2 * y5)));
} else if (y2 <= 2.7e+17) {
tmp = a * (y3 * (y1 * z));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = y4 * (c * ((-1.0d0) * (t * y2)))
if (y2 <= (-2.2d+261)) then
tmp = t_1
else if (y2 <= (-1.05d-32)) then
tmp = k * ((-1.0d0) * (y0 * (y2 * y5)))
else if (y2 <= 2.7d+17) then
tmp = a * (y3 * (y1 * z))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y4 * (c * (-1.0 * (t * y2)));
double tmp;
if (y2 <= -2.2e+261) {
tmp = t_1;
} else if (y2 <= -1.05e-32) {
tmp = k * (-1.0 * (y0 * (y2 * y5)));
} else if (y2 <= 2.7e+17) {
tmp = a * (y3 * (y1 * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = y4 * (c * (-1.0 * (t * y2))) tmp = 0 if y2 <= -2.2e+261: tmp = t_1 elif y2 <= -1.05e-32: tmp = k * (-1.0 * (y0 * (y2 * y5))) elif y2 <= 2.7e+17: tmp = a * (y3 * (y1 * z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(y4 * Float64(c * Float64(-1.0 * Float64(t * y2)))) tmp = 0.0 if (y2 <= -2.2e+261) tmp = t_1; elseif (y2 <= -1.05e-32) tmp = Float64(k * Float64(-1.0 * Float64(y0 * Float64(y2 * y5)))); elseif (y2 <= 2.7e+17) tmp = Float64(a * Float64(y3 * Float64(y1 * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = y4 * (c * (-1.0 * (t * y2))); tmp = 0.0; if (y2 <= -2.2e+261) tmp = t_1; elseif (y2 <= -1.05e-32) tmp = k * (-1.0 * (y0 * (y2 * y5))); elseif (y2 <= 2.7e+17) tmp = a * (y3 * (y1 * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y4 * N[(c * N[(-1.0 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -2.2e+261], t$95$1, If[LessEqual[y2, -1.05e-32], N[(k * N[(-1.0 * N[(y0 * N[(y2 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 2.7e+17], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y4 \cdot \left(c \cdot \left(-1 \cdot \left(t \cdot y2\right)\right)\right)\\
\mathbf{if}\;y2 \leq -2.2 \cdot 10^{+261}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y2 \leq -1.05 \cdot 10^{-32}:\\
\;\;\;\;k \cdot \left(-1 \cdot \left(y0 \cdot \left(y2 \cdot y5\right)\right)\right)\\
\mathbf{elif}\;y2 \leq 2.7 \cdot 10^{+17}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y2 < -2.19999999999999984e261 or 2.7e17 < y2 Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3
Applied rewrites27.3%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.6
Applied rewrites17.6%
if -2.19999999999999984e261 < y2 < -1.05e-32Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.2
Applied rewrites17.2%
if -1.05e-32 < y2 < 2.7e17Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
Taylor expanded in y around 0
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 (* y4 (* c (* -1.0 (* t y2))))))
(if (<= t -3.2e+118)
t_1
(if (<= t 4.2e+190) (* y (* y5 (- (* i k) (* a 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 = y4 * (c * (-1.0 * (t * y2)));
double tmp;
if (t <= -3.2e+118) {
tmp = t_1;
} else if (t <= 4.2e+190) {
tmp = y * (y5 * ((i * k) - (a * 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 = y4 * (c * ((-1.0d0) * (t * y2)))
if (t <= (-3.2d+118)) then
tmp = t_1
else if (t <= 4.2d+190) then
tmp = y * (y5 * ((i * k) - (a * 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 = y4 * (c * (-1.0 * (t * y2)));
double tmp;
if (t <= -3.2e+118) {
tmp = t_1;
} else if (t <= 4.2e+190) {
tmp = y * (y5 * ((i * k) - (a * 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 = y4 * (c * (-1.0 * (t * y2))) tmp = 0 if t <= -3.2e+118: tmp = t_1 elif t <= 4.2e+190: tmp = y * (y5 * ((i * k) - (a * 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(y4 * Float64(c * Float64(-1.0 * Float64(t * y2)))) tmp = 0.0 if (t <= -3.2e+118) tmp = t_1; elseif (t <= 4.2e+190) tmp = Float64(y * Float64(y5 * Float64(Float64(i * k) - Float64(a * 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 = y4 * (c * (-1.0 * (t * y2))); tmp = 0.0; if (t <= -3.2e+118) tmp = t_1; elseif (t <= 4.2e+190) tmp = y * (y5 * ((i * k) - (a * 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[(y4 * N[(c * N[(-1.0 * N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.2e+118], t$95$1, If[LessEqual[t, 4.2e+190], N[(y * N[(y5 * N[(N[(i * k), $MachinePrecision] - N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y4 \cdot \left(c \cdot \left(-1 \cdot \left(t \cdot y2\right)\right)\right)\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+190}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.20000000000000016e118 or 4.2000000000000001e190 < t Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3
Applied rewrites27.3%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.6
Applied rewrites17.6%
if -3.20000000000000016e118 < t < 4.2000000000000001e190Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y2 -1.05e-32)
(* k (* -1.0 (* y0 (* y2 y5))))
(if (<= y2 9.6e+17)
(* a (* y3 (* y1 z)))
(if (<= y2 4.8e+183)
(* -1.0 (* a (* y (* y3 y5))))
(* k (* y5 (* -1.0 (* y0 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 (y2 <= -1.05e-32) {
tmp = k * (-1.0 * (y0 * (y2 * y5)));
} else if (y2 <= 9.6e+17) {
tmp = a * (y3 * (y1 * z));
} else if (y2 <= 4.8e+183) {
tmp = -1.0 * (a * (y * (y3 * y5)));
} else {
tmp = k * (y5 * (-1.0 * (y0 * 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 (y2 <= (-1.05d-32)) then
tmp = k * ((-1.0d0) * (y0 * (y2 * y5)))
else if (y2 <= 9.6d+17) then
tmp = a * (y3 * (y1 * z))
else if (y2 <= 4.8d+183) then
tmp = (-1.0d0) * (a * (y * (y3 * y5)))
else
tmp = k * (y5 * ((-1.0d0) * (y0 * 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 (y2 <= -1.05e-32) {
tmp = k * (-1.0 * (y0 * (y2 * y5)));
} else if (y2 <= 9.6e+17) {
tmp = a * (y3 * (y1 * z));
} else if (y2 <= 4.8e+183) {
tmp = -1.0 * (a * (y * (y3 * y5)));
} else {
tmp = k * (y5 * (-1.0 * (y0 * y2)));
}
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.05e-32: tmp = k * (-1.0 * (y0 * (y2 * y5))) elif y2 <= 9.6e+17: tmp = a * (y3 * (y1 * z)) elif y2 <= 4.8e+183: tmp = -1.0 * (a * (y * (y3 * y5))) else: tmp = k * (y5 * (-1.0 * (y0 * 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 (y2 <= -1.05e-32) tmp = Float64(k * Float64(-1.0 * Float64(y0 * Float64(y2 * y5)))); elseif (y2 <= 9.6e+17) tmp = Float64(a * Float64(y3 * Float64(y1 * z))); elseif (y2 <= 4.8e+183) tmp = Float64(-1.0 * Float64(a * Float64(y * Float64(y3 * y5)))); else tmp = Float64(k * Float64(y5 * Float64(-1.0 * Float64(y0 * 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 (y2 <= -1.05e-32) tmp = k * (-1.0 * (y0 * (y2 * y5))); elseif (y2 <= 9.6e+17) tmp = a * (y3 * (y1 * z)); elseif (y2 <= 4.8e+183) tmp = -1.0 * (a * (y * (y3 * y5))); else tmp = k * (y5 * (-1.0 * (y0 * 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[y2, -1.05e-32], N[(k * N[(-1.0 * N[(y0 * N[(y2 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 9.6e+17], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 4.8e+183], N[(-1.0 * N[(a * N[(y * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y5 * N[(-1.0 * N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y2 \leq -1.05 \cdot 10^{-32}:\\
\;\;\;\;k \cdot \left(-1 \cdot \left(y0 \cdot \left(y2 \cdot y5\right)\right)\right)\\
\mathbf{elif}\;y2 \leq 9.6 \cdot 10^{+17}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\
\mathbf{elif}\;y2 \leq 4.8 \cdot 10^{+183}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(y5 \cdot \left(-1 \cdot \left(y0 \cdot y2\right)\right)\right)\\
\end{array}
\end{array}
if y2 < -1.05e-32Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.2
Applied rewrites17.2%
if -1.05e-32 < y2 < 9.6e17Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
Taylor expanded in y around 0
lower-*.f6417.1
Applied rewrites17.1%
if 9.6e17 < y2 < 4.8000000000000003e183Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
if 4.8000000000000003e183 < y2 Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y2 -1.05e-32)
(* k (* -1.0 (* y0 (* y2 y5))))
(if (<= y2 9.6e+17)
(* a (* y3 (* y1 z)))
(if (<= y2 4.9e+191)
(* -1.0 (* a (* y (* y3 y5))))
(* y1 (* y4 (* k 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 (y2 <= -1.05e-32) {
tmp = k * (-1.0 * (y0 * (y2 * y5)));
} else if (y2 <= 9.6e+17) {
tmp = a * (y3 * (y1 * z));
} else if (y2 <= 4.9e+191) {
tmp = -1.0 * (a * (y * (y3 * y5)));
} else {
tmp = y1 * (y4 * (k * 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 (y2 <= (-1.05d-32)) then
tmp = k * ((-1.0d0) * (y0 * (y2 * y5)))
else if (y2 <= 9.6d+17) then
tmp = a * (y3 * (y1 * z))
else if (y2 <= 4.9d+191) then
tmp = (-1.0d0) * (a * (y * (y3 * y5)))
else
tmp = y1 * (y4 * (k * 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 (y2 <= -1.05e-32) {
tmp = k * (-1.0 * (y0 * (y2 * y5)));
} else if (y2 <= 9.6e+17) {
tmp = a * (y3 * (y1 * z));
} else if (y2 <= 4.9e+191) {
tmp = -1.0 * (a * (y * (y3 * y5)));
} else {
tmp = y1 * (y4 * (k * y2));
}
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.05e-32: tmp = k * (-1.0 * (y0 * (y2 * y5))) elif y2 <= 9.6e+17: tmp = a * (y3 * (y1 * z)) elif y2 <= 4.9e+191: tmp = -1.0 * (a * (y * (y3 * y5))) else: tmp = y1 * (y4 * (k * 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 (y2 <= -1.05e-32) tmp = Float64(k * Float64(-1.0 * Float64(y0 * Float64(y2 * y5)))); elseif (y2 <= 9.6e+17) tmp = Float64(a * Float64(y3 * Float64(y1 * z))); elseif (y2 <= 4.9e+191) tmp = Float64(-1.0 * Float64(a * Float64(y * Float64(y3 * y5)))); else tmp = Float64(y1 * Float64(y4 * Float64(k * 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 (y2 <= -1.05e-32) tmp = k * (-1.0 * (y0 * (y2 * y5))); elseif (y2 <= 9.6e+17) tmp = a * (y3 * (y1 * z)); elseif (y2 <= 4.9e+191) tmp = -1.0 * (a * (y * (y3 * y5))); else tmp = y1 * (y4 * (k * 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[y2, -1.05e-32], N[(k * N[(-1.0 * N[(y0 * N[(y2 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 9.6e+17], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 4.9e+191], N[(-1.0 * N[(a * N[(y * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(y4 * N[(k * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y2 \leq -1.05 \cdot 10^{-32}:\\
\;\;\;\;k \cdot \left(-1 \cdot \left(y0 \cdot \left(y2 \cdot y5\right)\right)\right)\\
\mathbf{elif}\;y2 \leq 9.6 \cdot 10^{+17}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\
\mathbf{elif}\;y2 \leq 4.9 \cdot 10^{+191}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2\right)\right)\\
\end{array}
\end{array}
if y2 < -1.05e-32Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.2
Applied rewrites17.2%
if -1.05e-32 < y2 < 9.6e17Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
Taylor expanded in y around 0
lower-*.f6417.1
Applied rewrites17.1%
if 9.6e17 < y2 < 4.9e191Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
if 4.9e191 < y2 Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in j around 0
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.15e+119)
(* y1 (* k (* y2 y4)))
(if (<= y2 9.6e+17)
(* a (* y3 (* y1 z)))
(if (<= y2 4.9e+191)
(* -1.0 (* a (* y (* y3 y5))))
(* y1 (* y4 (* k 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 (y2 <= -1.15e+119) {
tmp = y1 * (k * (y2 * y4));
} else if (y2 <= 9.6e+17) {
tmp = a * (y3 * (y1 * z));
} else if (y2 <= 4.9e+191) {
tmp = -1.0 * (a * (y * (y3 * y5)));
} else {
tmp = y1 * (y4 * (k * 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 (y2 <= (-1.15d+119)) then
tmp = y1 * (k * (y2 * y4))
else if (y2 <= 9.6d+17) then
tmp = a * (y3 * (y1 * z))
else if (y2 <= 4.9d+191) then
tmp = (-1.0d0) * (a * (y * (y3 * y5)))
else
tmp = y1 * (y4 * (k * 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 (y2 <= -1.15e+119) {
tmp = y1 * (k * (y2 * y4));
} else if (y2 <= 9.6e+17) {
tmp = a * (y3 * (y1 * z));
} else if (y2 <= 4.9e+191) {
tmp = -1.0 * (a * (y * (y3 * y5)));
} else {
tmp = y1 * (y4 * (k * y2));
}
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.15e+119: tmp = y1 * (k * (y2 * y4)) elif y2 <= 9.6e+17: tmp = a * (y3 * (y1 * z)) elif y2 <= 4.9e+191: tmp = -1.0 * (a * (y * (y3 * y5))) else: tmp = y1 * (y4 * (k * 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 (y2 <= -1.15e+119) tmp = Float64(y1 * Float64(k * Float64(y2 * y4))); elseif (y2 <= 9.6e+17) tmp = Float64(a * Float64(y3 * Float64(y1 * z))); elseif (y2 <= 4.9e+191) tmp = Float64(-1.0 * Float64(a * Float64(y * Float64(y3 * y5)))); else tmp = Float64(y1 * Float64(y4 * Float64(k * 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 (y2 <= -1.15e+119) tmp = y1 * (k * (y2 * y4)); elseif (y2 <= 9.6e+17) tmp = a * (y3 * (y1 * z)); elseif (y2 <= 4.9e+191) tmp = -1.0 * (a * (y * (y3 * y5))); else tmp = y1 * (y4 * (k * 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[y2, -1.15e+119], N[(y1 * N[(k * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 9.6e+17], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 4.9e+191], N[(-1.0 * N[(a * N[(y * N[(y3 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(y4 * N[(k * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y2 \leq -1.15 \cdot 10^{+119}:\\
\;\;\;\;y1 \cdot \left(k \cdot \left(y2 \cdot y4\right)\right)\\
\mathbf{elif}\;y2 \leq 9.6 \cdot 10^{+17}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\
\mathbf{elif}\;y2 \leq 4.9 \cdot 10^{+191}:\\
\;\;\;\;-1 \cdot \left(a \cdot \left(y \cdot \left(y3 \cdot y5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2\right)\right)\\
\end{array}
\end{array}
if y2 < -1.15e119Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in j around 0
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if -1.15e119 < y2 < 9.6e17Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
Taylor expanded in y around 0
lower-*.f6417.1
Applied rewrites17.1%
if 9.6e17 < y2 < 4.9e191Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6417.0
Applied rewrites17.0%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1
Applied rewrites17.1%
if 4.9e191 < y2 Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in j around 0
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.15e+119) (* y1 (* k (* y2 y4))) (if (<= y2 2.85e-7) (* a (* y3 (* y1 z))) (* y1 (* y4 (* k 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 (y2 <= -1.15e+119) {
tmp = y1 * (k * (y2 * y4));
} else if (y2 <= 2.85e-7) {
tmp = a * (y3 * (y1 * z));
} else {
tmp = y1 * (y4 * (k * 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 (y2 <= (-1.15d+119)) then
tmp = y1 * (k * (y2 * y4))
else if (y2 <= 2.85d-7) then
tmp = a * (y3 * (y1 * z))
else
tmp = y1 * (y4 * (k * 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 (y2 <= -1.15e+119) {
tmp = y1 * (k * (y2 * y4));
} else if (y2 <= 2.85e-7) {
tmp = a * (y3 * (y1 * z));
} else {
tmp = y1 * (y4 * (k * y2));
}
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.15e+119: tmp = y1 * (k * (y2 * y4)) elif y2 <= 2.85e-7: tmp = a * (y3 * (y1 * z)) else: tmp = y1 * (y4 * (k * 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 (y2 <= -1.15e+119) tmp = Float64(y1 * Float64(k * Float64(y2 * y4))); elseif (y2 <= 2.85e-7) tmp = Float64(a * Float64(y3 * Float64(y1 * z))); else tmp = Float64(y1 * Float64(y4 * Float64(k * 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 (y2 <= -1.15e+119) tmp = y1 * (k * (y2 * y4)); elseif (y2 <= 2.85e-7) tmp = a * (y3 * (y1 * z)); else tmp = y1 * (y4 * (k * 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[y2, -1.15e+119], N[(y1 * N[(k * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 2.85e-7], N[(a * N[(y3 * N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(y4 * N[(k * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y2 \leq -1.15 \cdot 10^{+119}:\\
\;\;\;\;y1 \cdot \left(k \cdot \left(y2 \cdot y4\right)\right)\\
\mathbf{elif}\;y2 \leq 2.85 \cdot 10^{-7}:\\
\;\;\;\;a \cdot \left(y3 \cdot \left(y1 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2\right)\right)\\
\end{array}
\end{array}
if y2 < -1.15e119Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in j around 0
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if -1.15e119 < y2 < 2.8500000000000002e-7Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
Taylor expanded in y around 0
lower-*.f6417.1
Applied rewrites17.1%
if 2.8500000000000002e-7 < y2 Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in j around 0
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.15e+119) (* y1 (* k (* y2 y4))) (if (<= y2 2.85e-7) (* a (* y1 (* y3 z))) (* y1 (* y4 (* k 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 (y2 <= -1.15e+119) {
tmp = y1 * (k * (y2 * y4));
} else if (y2 <= 2.85e-7) {
tmp = a * (y1 * (y3 * z));
} else {
tmp = y1 * (y4 * (k * 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 (y2 <= (-1.15d+119)) then
tmp = y1 * (k * (y2 * y4))
else if (y2 <= 2.85d-7) then
tmp = a * (y1 * (y3 * z))
else
tmp = y1 * (y4 * (k * 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 (y2 <= -1.15e+119) {
tmp = y1 * (k * (y2 * y4));
} else if (y2 <= 2.85e-7) {
tmp = a * (y1 * (y3 * z));
} else {
tmp = y1 * (y4 * (k * y2));
}
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.15e+119: tmp = y1 * (k * (y2 * y4)) elif y2 <= 2.85e-7: tmp = a * (y1 * (y3 * z)) else: tmp = y1 * (y4 * (k * 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 (y2 <= -1.15e+119) tmp = Float64(y1 * Float64(k * Float64(y2 * y4))); elseif (y2 <= 2.85e-7) tmp = Float64(a * Float64(y1 * Float64(y3 * z))); else tmp = Float64(y1 * Float64(y4 * Float64(k * 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 (y2 <= -1.15e+119) tmp = y1 * (k * (y2 * y4)); elseif (y2 <= 2.85e-7) tmp = a * (y1 * (y3 * z)); else tmp = y1 * (y4 * (k * 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[y2, -1.15e+119], N[(y1 * N[(k * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 2.85e-7], N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(y4 * N[(k * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y2 \leq -1.15 \cdot 10^{+119}:\\
\;\;\;\;y1 \cdot \left(k \cdot \left(y2 \cdot y4\right)\right)\\
\mathbf{elif}\;y2 \leq 2.85 \cdot 10^{-7}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2\right)\right)\\
\end{array}
\end{array}
if y2 < -1.15e119Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in j around 0
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if -1.15e119 < y2 < 2.8500000000000002e-7Initial program 28.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites35.9%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.6
Applied rewrites26.6%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
if 2.8500000000000002e-7 < y2 Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in j around 0
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 (<= b 1.35e-112) (* i (* k (* y y5))) (* y1 (* k (* y2 y4)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (b <= 1.35e-112) {
tmp = i * (k * (y * y5));
} else {
tmp = y1 * (k * (y2 * y4));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (b <= 1.35d-112) then
tmp = i * (k * (y * y5))
else
tmp = y1 * (k * (y2 * y4))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (b <= 1.35e-112) {
tmp = i * (k * (y * y5));
} else {
tmp = y1 * (k * (y2 * y4));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if b <= 1.35e-112: tmp = i * (k * (y * y5)) else: tmp = y1 * (k * (y2 * y4)) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (b <= 1.35e-112) tmp = Float64(i * Float64(k * Float64(y * y5))); else tmp = Float64(y1 * Float64(k * Float64(y2 * y4))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (b <= 1.35e-112) tmp = i * (k * (y * y5)); else tmp = y1 * (k * (y2 * y4)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[b, 1.35e-112], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(k * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.35 \cdot 10^{-112}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(k \cdot \left(y2 \cdot y4\right)\right)\\
\end{array}
\end{array}
if b < 1.35e-112Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6416.8
Applied rewrites16.8%
if 1.35e-112 < b Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in j around 0
lower-*.f64N/A
lower-*.f6417.3
Applied rewrites17.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (<= b 1.35e-112) (* i (* k (* y y5))) (* k (* y1 (* y2 y4)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (b <= 1.35e-112) {
tmp = i * (k * (y * y5));
} else {
tmp = k * (y1 * (y2 * y4));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (b <= 1.35d-112) then
tmp = i * (k * (y * y5))
else
tmp = k * (y1 * (y2 * y4))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (b <= 1.35e-112) {
tmp = i * (k * (y * y5));
} else {
tmp = k * (y1 * (y2 * y4));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if b <= 1.35e-112: tmp = i * (k * (y * y5)) else: tmp = k * (y1 * (y2 * y4)) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (b <= 1.35e-112) tmp = Float64(i * Float64(k * Float64(y * y5))); else tmp = Float64(k * Float64(y1 * Float64(y2 * y4))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (b <= 1.35e-112) tmp = i * (k * (y * y5)); else tmp = k * (y1 * (y2 * y4)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[b, 1.35e-112], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y1 * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 1.35 \cdot 10^{-112}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\
\end{array}
\end{array}
if b < 1.35e-112Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6416.8
Applied rewrites16.8%
if 1.35e-112 < b Initial program 28.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.6%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in j around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.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 (<= k -2.4e+140) (* y (* i (* k y5))) (* k (* i (* y y5)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (k <= -2.4e+140) {
tmp = y * (i * (k * y5));
} else {
tmp = k * (i * (y * 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 (k <= (-2.4d+140)) then
tmp = y * (i * (k * y5))
else
tmp = k * (i * (y * 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 (k <= -2.4e+140) {
tmp = y * (i * (k * y5));
} else {
tmp = k * (i * (y * y5));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if k <= -2.4e+140: tmp = y * (i * (k * y5)) else: tmp = k * (i * (y * 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 (k <= -2.4e+140) tmp = Float64(y * Float64(i * Float64(k * y5))); else tmp = Float64(k * Float64(i * Float64(y * 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 (k <= -2.4e+140) tmp = y * (i * (k * y5)); else tmp = k * (i * (y * 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[k, -2.4e+140], N[(y * N[(i * N[(k * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(i * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -2.4 \cdot 10^{+140}:\\
\;\;\;\;y \cdot \left(i \cdot \left(k \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(i \cdot \left(y \cdot y5\right)\right)\\
\end{array}
\end{array}
if k < -2.4e140Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f6416.8
Applied rewrites16.8%
if -2.4e140 < k Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6417.2
Applied rewrites17.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (<= y2 -7.8e-19) (* i (* (* k y) y5)) (* k (* i (* y y5)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y2 <= -7.8e-19) {
tmp = i * ((k * y) * y5);
} else {
tmp = k * (i * (y * 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 <= (-7.8d-19)) then
tmp = i * ((k * y) * y5)
else
tmp = k * (i * (y * 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 <= -7.8e-19) {
tmp = i * ((k * y) * y5);
} else {
tmp = k * (i * (y * 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 <= -7.8e-19: tmp = i * ((k * y) * y5) else: tmp = k * (i * (y * 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 <= -7.8e-19) tmp = Float64(i * Float64(Float64(k * y) * y5)); else tmp = Float64(k * Float64(i * Float64(y * 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 <= -7.8e-19) tmp = i * ((k * y) * y5); else tmp = k * (i * (y * 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, -7.8e-19], N[(i * N[(N[(k * y), $MachinePrecision] * y5), $MachinePrecision]), $MachinePrecision], N[(k * N[(i * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y2 \leq -7.8 \cdot 10^{-19}:\\
\;\;\;\;i \cdot \left(\left(k \cdot y\right) \cdot y5\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(i \cdot \left(y \cdot y5\right)\right)\\
\end{array}
\end{array}
if y2 < -7.7999999999999999e-19Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6416.8
Applied rewrites16.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6416.7
Applied rewrites16.7%
if -7.7999999999999999e-19 < y2 Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f6417.2
Applied rewrites17.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* i (* k (* y y5))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return i * (k * (y * y5));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = i * (k * (y * y5))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return i * (k * (y * y5));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return i * (k * (y * y5))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(i * Float64(k * Float64(y * y5))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = i * (k * (y * y5)); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
i \cdot \left(k \cdot \left(y \cdot y5\right)\right)
\end{array}
Initial program 28.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.1%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6416.8
Applied rewrites16.8%
herbie shell --seed 2025155
(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)))))