
(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}
Sampling outcomes in binary64 precision:
Herbie found 33 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 (- (* y1 y4) (* y0 y5)))
(t_2 (- (* j t) (* k y)))
(t_3
(*
y4
(-
(fma b t_2 (* y1 (- (* k y2) (* j y3))))
(* c (- (* t y2) (* y y3))))))
(t_4 (- (* c y4) (* a y5)))
(t_5 (- (* c y0) (* a y1))))
(if (<= t -7e+123)
(*
t
(-
(fma -1.0 (* z (- (* a b) (* c i))) (* j (- (* b y4) (* i y5))))
(* y2 t_4)))
(if (<= t -1.25e-151)
(* (- y3) (- (fma j t_1 (* z t_5)) (* y t_4)))
(if (<= t 1.35e-199)
t_3
(if (<= t 2.9e-79)
(* y2 (- (fma k t_1 (* x t_5)) (* t t_4)))
(if (<= t 2.9e+82)
(*
x
(fma
b
(- (* a y) (* j y0))
(/
(* b (+ (fma -1.0 (* a (* t z)) (* y4 t_2)) (* k (* y0 z))))
x)))
(if (<= t 9e+178)
t_3
(* i (* t (fma -1.0 (* j y5) (* c z))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (y1 * y4) - (y0 * y5);
double t_2 = (j * t) - (k * y);
double t_3 = y4 * (fma(b, t_2, (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
double t_4 = (c * y4) - (a * y5);
double t_5 = (c * y0) - (a * y1);
double tmp;
if (t <= -7e+123) {
tmp = t * (fma(-1.0, (z * ((a * b) - (c * i))), (j * ((b * y4) - (i * y5)))) - (y2 * t_4));
} else if (t <= -1.25e-151) {
tmp = -y3 * (fma(j, t_1, (z * t_5)) - (y * t_4));
} else if (t <= 1.35e-199) {
tmp = t_3;
} else if (t <= 2.9e-79) {
tmp = y2 * (fma(k, t_1, (x * t_5)) - (t * t_4));
} else if (t <= 2.9e+82) {
tmp = x * fma(b, ((a * y) - (j * y0)), ((b * (fma(-1.0, (a * (t * z)), (y4 * t_2)) + (k * (y0 * z)))) / x));
} else if (t <= 9e+178) {
tmp = t_3;
} else {
tmp = i * (t * fma(-1.0, (j * y5), (c * z)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(y1 * y4) - Float64(y0 * y5)) t_2 = Float64(Float64(j * t) - Float64(k * y)) t_3 = 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))))) t_4 = Float64(Float64(c * y4) - Float64(a * y5)) t_5 = Float64(Float64(c * y0) - Float64(a * y1)) tmp = 0.0 if (t <= -7e+123) tmp = Float64(t * Float64(fma(-1.0, Float64(z * Float64(Float64(a * b) - Float64(c * i))), Float64(j * Float64(Float64(b * y4) - Float64(i * y5)))) - Float64(y2 * t_4))); elseif (t <= -1.25e-151) tmp = Float64(Float64(-y3) * Float64(fma(j, t_1, Float64(z * t_5)) - Float64(y * t_4))); elseif (t <= 1.35e-199) tmp = t_3; elseif (t <= 2.9e-79) tmp = Float64(y2 * Float64(fma(k, t_1, Float64(x * t_5)) - Float64(t * t_4))); elseif (t <= 2.9e+82) tmp = Float64(x * fma(b, Float64(Float64(a * y) - Float64(j * y0)), Float64(Float64(b * Float64(fma(-1.0, Float64(a * Float64(t * z)), Float64(y4 * t_2)) + Float64(k * Float64(y0 * z)))) / x))); elseif (t <= 9e+178) tmp = t_3; else tmp = Float64(i * Float64(t * fma(-1.0, Float64(j * y5), Float64(c * z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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]}, Block[{t$95$4 = N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e+123], N[(t * N[(N[(-1.0 * N[(z * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y2 * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.25e-151], N[((-y3) * N[(N[(j * t$95$1 + N[(z * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(y * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-199], t$95$3, If[LessEqual[t, 2.9e-79], N[(y2 * N[(N[(k * t$95$1 + N[(x * t$95$5), $MachinePrecision]), $MachinePrecision] - N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+82], N[(x * N[(b * N[(N[(a * y), $MachinePrecision] - N[(j * y0), $MachinePrecision]), $MachinePrecision] + N[(N[(b * N[(N[(-1.0 * N[(a * N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y4 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(k * N[(y0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e+178], t$95$3, N[(i * N[(t * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y1 \cdot y4 - y0 \cdot y5\\
t_2 := j \cdot t - k \cdot y\\
t_3 := 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)\\
t_4 := c \cdot y4 - a \cdot y5\\
t_5 := c \cdot y0 - a \cdot y1\\
\mathbf{if}\;t \leq -7 \cdot 10^{+123}:\\
\;\;\;\;t \cdot \left(\mathsf{fma}\left(-1, z \cdot \left(a \cdot b - c \cdot i\right), j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - y2 \cdot t\_4\right)\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-151}:\\
\;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(j, t\_1, z \cdot t\_5\right) - y \cdot t\_4\right)\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-199}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-79}:\\
\;\;\;\;y2 \cdot \left(\mathsf{fma}\left(k, t\_1, x \cdot t\_5\right) - t \cdot t\_4\right)\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+82}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(b, a \cdot y - j \cdot y0, \frac{b \cdot \left(\mathsf{fma}\left(-1, a \cdot \left(t \cdot z\right), y4 \cdot t\_2\right) + k \cdot \left(y0 \cdot z\right)\right)}{x}\right)\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+178}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -6.99999999999999999e123Initial program 21.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites67.7%
if -6.99999999999999999e123 < t < -1.25000000000000001e-151Initial program 47.4%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites58.2%
if -1.25000000000000001e-151 < t < 1.34999999999999995e-199 or 2.9000000000000001e82 < t < 8.9999999999999994e178Initial program 25.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites61.5%
if 1.34999999999999995e-199 < t < 2.9000000000000001e-79Initial program 36.0%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites52.7%
if 2.9000000000000001e-79 < t < 2.9000000000000001e82Initial program 36.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites51.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites65.1%
if 8.9999999999999994e178 < t Initial program 14.5%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites43.2%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6460.3
Applied rewrites60.3%
Final simplification61.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* t y2) (* y y3)))
(t_2 (- (* k y2) (* j y3)))
(t_3
(+
(-
(+
(+
(-
(* (- (* 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_1 (- (* y4 c) (* y5 a))))
(* t_2 (- (* y4 y1) (* y5 y0))))))
(if (<= t_3 INFINITY)
t_3
(* y4 (- (fma b (- (* j t) (* k y)) (* y1 t_2)) (* c 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 * y2) - (y * y3);
double t_2 = (k * y2) - (j * y3);
double t_3 = (((((((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_1 * ((y4 * c) - (y5 * a)))) + (t_2 * ((y4 * y1) - (y5 * y0)));
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = y4 * (fma(b, ((j * t) - (k * y)), (y1 * t_2)) - (c * t_1));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(t * y2) - Float64(y * y3)) t_2 = Float64(Float64(k * y2) - Float64(j * y3)) t_3 = 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(t_1 * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(t_2 * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(y4 * Float64(fma(b, Float64(Float64(j * t) - Float64(k * y)), Float64(y1 * t_2)) - Float64(c * t_1))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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[(t$95$1 * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(y4 * N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] + N[(y1 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(c * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot y2 - y \cdot y3\\
t_2 := k \cdot y2 - j \cdot y3\\
t_3 := \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) - t\_1 \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + t\_2 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot t\_2\right) - c \cdot t\_1\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 94.3%
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 0.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* c y4) (* a y5)))
(t_2 (- (* j t) (* k y)))
(t_3
(*
(- i)
(-
(fma c (- (* x y) (* t z)) (* y5 t_2))
(* y1 (- (* j x) (* k z)))))))
(if (<= i -1.05e+241)
t_3
(if (<= i -1.8e+91)
(*
t
(-
(fma -1.0 (* z (- (* a b) (* c i))) (* j (- (* b y4) (* i y5))))
(* y2 t_1)))
(if (<= i -6e-24)
(* k (* y4 (fma -1.0 (* b y) (* y1 y2))))
(if (<= i -3.3e-103)
(*
(- y3)
(-
(fma j (- (* y1 y4) (* y0 y5)) (* z (- (* c y0) (* a y1))))
(* y t_1)))
(if (<= i 5.3e+76)
(*
y4
(-
(fma b t_2 (* y1 (- (* k y2) (* j y3))))
(* c (- (* t y2) (* y y3)))))
t_3)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (c * y4) - (a * y5);
double t_2 = (j * t) - (k * y);
double t_3 = -i * (fma(c, ((x * y) - (t * z)), (y5 * t_2)) - (y1 * ((j * x) - (k * z))));
double tmp;
if (i <= -1.05e+241) {
tmp = t_3;
} else if (i <= -1.8e+91) {
tmp = t * (fma(-1.0, (z * ((a * b) - (c * i))), (j * ((b * y4) - (i * y5)))) - (y2 * t_1));
} else if (i <= -6e-24) {
tmp = k * (y4 * fma(-1.0, (b * y), (y1 * y2)));
} else if (i <= -3.3e-103) {
tmp = -y3 * (fma(j, ((y1 * y4) - (y0 * y5)), (z * ((c * y0) - (a * y1)))) - (y * t_1));
} else if (i <= 5.3e+76) {
tmp = y4 * (fma(b, t_2, (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(c * y4) - Float64(a * y5)) t_2 = Float64(Float64(j * t) - Float64(k * y)) t_3 = Float64(Float64(-i) * Float64(fma(c, Float64(Float64(x * y) - Float64(t * z)), Float64(y5 * t_2)) - Float64(y1 * Float64(Float64(j * x) - Float64(k * z))))) tmp = 0.0 if (i <= -1.05e+241) tmp = t_3; elseif (i <= -1.8e+91) tmp = Float64(t * Float64(fma(-1.0, Float64(z * Float64(Float64(a * b) - Float64(c * i))), Float64(j * Float64(Float64(b * y4) - Float64(i * y5)))) - Float64(y2 * t_1))); elseif (i <= -6e-24) tmp = Float64(k * Float64(y4 * fma(-1.0, Float64(b * y), Float64(y1 * y2)))); elseif (i <= -3.3e-103) tmp = Float64(Float64(-y3) * Float64(fma(j, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(z * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(y * t_1))); elseif (i <= 5.3e+76) 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_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[((-i) * N[(N[(c * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y5 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.05e+241], t$95$3, If[LessEqual[i, -1.8e+91], N[(t * N[(N[(-1.0 * N[(z * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y2 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -6e-24], N[(k * N[(y4 * N[(-1.0 * N[(b * y), $MachinePrecision] + N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -3.3e-103], N[((-y3) * N[(N[(j * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 5.3e+76], 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$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot y4 - a \cdot y5\\
t_2 := j \cdot t - k \cdot y\\
t_3 := \left(-i\right) \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot t\_2\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{if}\;i \leq -1.05 \cdot 10^{+241}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;i \leq -1.8 \cdot 10^{+91}:\\
\;\;\;\;t \cdot \left(\mathsf{fma}\left(-1, z \cdot \left(a \cdot b - c \cdot i\right), j \cdot \left(b \cdot y4 - i \cdot y5\right)\right) - y2 \cdot t\_1\right)\\
\mathbf{elif}\;i \leq -6 \cdot 10^{-24}:\\
\;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)\\
\mathbf{elif}\;i \leq -3.3 \cdot 10^{-103}:\\
\;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot t\_1\right)\\
\mathbf{elif}\;i \leq 5.3 \cdot 10^{+76}:\\
\;\;\;\;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\_3\\
\end{array}
\end{array}
if i < -1.05e241 or 5.30000000000000015e76 < i Initial program 29.5%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites66.4%
if -1.05e241 < i < -1.8e91Initial program 15.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites67.0%
if -1.8e91 < i < -5.99999999999999991e-24Initial program 22.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites34.2%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6450.6
Applied rewrites50.6%
if -5.99999999999999991e-24 < i < -3.2999999999999999e-103Initial program 37.9%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites69.1%
if -3.2999999999999999e-103 < i < 5.30000000000000015e76Initial program 35.7%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites52.6%
Final simplification59.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* j t) (* k y)))
(t_2
(*
(- i)
(-
(fma c (- (* x y) (* t z)) (* y5 t_1))
(* y1 (- (* j x) (* k z))))))
(t_3 (- (* k y2) (* j y3)))
(t_4 (- (* t y2) (* y y3))))
(if (<= i -1.5e+207)
t_2
(if (<= i -2.1e-36)
(* (- y5) (- (fma i t_1 (* y0 t_3)) (* a t_4)))
(if (<= i -3.3e-103)
(*
(- y3)
(-
(fma j (- (* y1 y4) (* y0 y5)) (* z (- (* c y0) (* a y1))))
(* y (- (* c y4) (* a y5)))))
(if (<= i 5.3e+76)
(* y4 (- (fma b t_1 (* y1 t_3)) (* c t_4)))
t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (j * t) - (k * y);
double t_2 = -i * (fma(c, ((x * y) - (t * z)), (y5 * t_1)) - (y1 * ((j * x) - (k * z))));
double t_3 = (k * y2) - (j * y3);
double t_4 = (t * y2) - (y * y3);
double tmp;
if (i <= -1.5e+207) {
tmp = t_2;
} else if (i <= -2.1e-36) {
tmp = -y5 * (fma(i, t_1, (y0 * t_3)) - (a * t_4));
} else if (i <= -3.3e-103) {
tmp = -y3 * (fma(j, ((y1 * y4) - (y0 * y5)), (z * ((c * y0) - (a * y1)))) - (y * ((c * y4) - (a * y5))));
} else if (i <= 5.3e+76) {
tmp = y4 * (fma(b, t_1, (y1 * t_3)) - (c * t_4));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(j * t) - Float64(k * y)) t_2 = Float64(Float64(-i) * Float64(fma(c, Float64(Float64(x * y) - Float64(t * z)), Float64(y5 * t_1)) - Float64(y1 * Float64(Float64(j * x) - Float64(k * z))))) t_3 = Float64(Float64(k * y2) - Float64(j * y3)) t_4 = Float64(Float64(t * y2) - Float64(y * y3)) tmp = 0.0 if (i <= -1.5e+207) tmp = t_2; elseif (i <= -2.1e-36) tmp = Float64(Float64(-y5) * Float64(fma(i, t_1, Float64(y0 * t_3)) - Float64(a * t_4))); elseif (i <= -3.3e-103) tmp = Float64(Float64(-y3) * Float64(fma(j, Float64(Float64(y1 * y4) - Float64(y0 * y5)), Float64(z * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(y * Float64(Float64(c * y4) - Float64(a * y5))))); elseif (i <= 5.3e+76) tmp = Float64(y4 * Float64(fma(b, t_1, Float64(y1 * t_3)) - Float64(c * t_4))); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-i) * N[(N[(c * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y5 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.5e+207], t$95$2, If[LessEqual[i, -2.1e-36], N[((-y5) * N[(N[(i * t$95$1 + N[(y0 * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(a * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -3.3e-103], N[((-y3) * N[(N[(j * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(c * y4), $MachinePrecision] - N[(a * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 5.3e+76], N[(y4 * N[(N[(b * t$95$1 + N[(y1 * t$95$3), $MachinePrecision]), $MachinePrecision] - N[(c * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
t_2 := \left(-i\right) \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot t\_1\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
t_3 := k \cdot y2 - j \cdot y3\\
t_4 := t \cdot y2 - y \cdot y3\\
\mathbf{if}\;i \leq -1.5 \cdot 10^{+207}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq -2.1 \cdot 10^{-36}:\\
\;\;\;\;\left(-y5\right) \cdot \left(\mathsf{fma}\left(i, t\_1, y0 \cdot t\_3\right) - a \cdot t\_4\right)\\
\mathbf{elif}\;i \leq -3.3 \cdot 10^{-103}:\\
\;\;\;\;\left(-y3\right) \cdot \left(\mathsf{fma}\left(j, y1 \cdot y4 - y0 \cdot y5, z \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - y \cdot \left(c \cdot y4 - a \cdot y5\right)\right)\\
\mathbf{elif}\;i \leq 5.3 \cdot 10^{+76}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_1, y1 \cdot t\_3\right) - c \cdot t\_4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if i < -1.49999999999999992e207 or 5.30000000000000015e76 < i Initial program 28.3%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites66.9%
if -1.49999999999999992e207 < i < -2.09999999999999991e-36Initial program 18.6%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites48.3%
if -2.09999999999999991e-36 < i < -3.2999999999999999e-103Initial program 36.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites71.9%
if -3.2999999999999999e-103 < i < 5.30000000000000015e76Initial program 35.7%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites52.6%
Final simplification57.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= t -1.5e+177)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= t -3.2e-207)
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i y1)))))
(if (<= t 4.3e+181)
(*
b
(-
(fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
(* y0 (- (* j x) (* k z)))))
(* i (* t (fma -1.0 (* j y5) (* c z))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (t <= -1.5e+177) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (t <= -3.2e-207) {
tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
} else if (t <= 4.3e+181) {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
} else {
tmp = i * (t * fma(-1.0, (j * y5), (c * z)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (t <= -1.5e+177) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (t <= -3.2e-207) tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); elseif (t <= 4.3e+181) 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(i * Float64(t * fma(-1.0, Float64(j * y5), Float64(c * z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[t, -1.5e+177], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.2e-207], 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[t, 4.3e+181], 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[(i * N[(t * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+177}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-207}:\\
\;\;\;\;x \cdot \left(\mathsf{fma}\left(y, a \cdot b - c \cdot i, y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{+181}:\\
\;\;\;\;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}:\\
\;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -1.5e177Initial program 12.5%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6454.6
Applied rewrites54.6%
if -1.5e177 < t < -3.2000000000000003e-207Initial program 42.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites51.3%
if -3.2000000000000003e-207 < t < 4.29999999999999972e181Initial program 30.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.9%
if 4.29999999999999972e181 < t Initial program 14.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.3%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6462.1
Applied rewrites62.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y3 -2.1e+208)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= y3 -5.4e+36)
(* j (* y4 (fma -1.0 (* y1 y3) (* b t))))
(if (<= y3 2.35e+110)
(*
b
(-
(fma a (- (* x y) (* t z)) (* y4 (- (* j t) (* k y))))
(* y0 (- (* j x) (* k z)))))
(* y0 (* y3 (fma -1.0 (* c z) (* j 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.1e+208) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (y3 <= -5.4e+36) {
tmp = j * (y4 * fma(-1.0, (y1 * y3), (b * t)));
} else if (y3 <= 2.35e+110) {
tmp = b * (fma(a, ((x * y) - (t * z)), (y4 * ((j * t) - (k * y)))) - (y0 * ((j * x) - (k * z))));
} else {
tmp = y0 * (y3 * fma(-1.0, (c * z), (j * 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.1e+208) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (y3 <= -5.4e+36) tmp = Float64(j * Float64(y4 * fma(-1.0, Float64(y1 * y3), Float64(b * t)))); elseif (y3 <= 2.35e+110) 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(y0 * Float64(y3 * fma(-1.0, Float64(c * z), Float64(j * y5)))); 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.1e+208], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, -5.4e+36], N[(j * N[(y4 * N[(-1.0 * N[(y1 * y3), $MachinePrecision] + N[(b * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y3, 2.35e+110], 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[(y0 * N[(y3 * N[(-1.0 * N[(c * z), $MachinePrecision] + N[(j * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y3 \leq -2.1 \cdot 10^{+208}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;y3 \leq -5.4 \cdot 10^{+36}:\\
\;\;\;\;j \cdot \left(y4 \cdot \mathsf{fma}\left(-1, y1 \cdot y3, b \cdot t\right)\right)\\
\mathbf{elif}\;y3 \leq 2.35 \cdot 10^{+110}:\\
\;\;\;\;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}:\\
\;\;\;\;y0 \cdot \left(y3 \cdot \mathsf{fma}\left(-1, c \cdot z, j \cdot y5\right)\right)\\
\end{array}
\end{array}
if y3 < -2.0999999999999998e208Initial program 12.5%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6475.0
Applied rewrites75.0%
if -2.0999999999999998e208 < y3 < -5.4000000000000002e36Initial program 37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.8%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6447.2
Applied rewrites47.2%
if -5.4000000000000002e36 < y3 < 2.3499999999999999e110Initial program 33.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites42.8%
if 2.3499999999999999e110 < y3 Initial program 20.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.4%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6456.4
Applied rewrites56.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* j t) (* k y))))
(if (or (<= i -6.5e+55) (not (<= i 5.3e+76)))
(*
(- i)
(- (fma c (- (* x y) (* t z)) (* y5 t_1)) (* y1 (- (* j x) (* k z)))))
(*
y4
(-
(fma b t_1 (* y1 (- (* k y2) (* j y3))))
(* c (- (* t y2) (* y y3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (j * t) - (k * y);
double tmp;
if ((i <= -6.5e+55) || !(i <= 5.3e+76)) {
tmp = -i * (fma(c, ((x * y) - (t * z)), (y5 * t_1)) - (y1 * ((j * x) - (k * z))));
} else {
tmp = y4 * (fma(b, t_1, (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(j * t) - Float64(k * y)) tmp = 0.0 if ((i <= -6.5e+55) || !(i <= 5.3e+76)) tmp = Float64(Float64(-i) * Float64(fma(c, Float64(Float64(x * y) - Float64(t * z)), Float64(y5 * t_1)) - Float64(y1 * Float64(Float64(j * x) - Float64(k * z))))); else tmp = Float64(y4 * Float64(fma(b, t_1, Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[i, -6.5e+55], N[Not[LessEqual[i, 5.3e+76]], $MachinePrecision]], N[((-i) * N[(N[(c * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision] + N[(y5 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y4 * N[(N[(b * t$95$1 + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot t - k \cdot y\\
\mathbf{if}\;i \leq -6.5 \cdot 10^{+55} \lor \neg \left(i \leq 5.3 \cdot 10^{+76}\right):\\
\;\;\;\;\left(-i\right) \cdot \left(\mathsf{fma}\left(c, x \cdot y - t \cdot z, y5 \cdot t\_1\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, t\_1, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\end{array}
\end{array}
if i < -6.50000000000000027e55 or 5.30000000000000015e76 < i Initial program 24.8%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites58.1%
if -6.50000000000000027e55 < i < 5.30000000000000015e76Initial program 34.8%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites49.7%
Final simplification53.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y -8.4e+222)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= y -2.4e+73)
(* k (* y4 (fma -1.0 (* b y) (* y1 y2))))
(if (<= y -3e-73)
(* i (* k (- (* y y5) (* y1 z))))
(if (<= y 1e-285)
(* i (* t (fma -1.0 (* j y5) (* c z))))
(if (<= y 1.75e-192)
(* x (* y0 (- (* c y2) (* b j))))
(if (<= y 7e+61)
(* y4 (* y1 (- (* k y2) (* j y3))))
(if (<= y 3.1e+111)
(* i (* k (* y1 (- (/ (* y y5) y1) z))))
(* 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 tmp;
if (y <= -8.4e+222) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (y <= -2.4e+73) {
tmp = k * (y4 * fma(-1.0, (b * y), (y1 * y2)));
} else if (y <= -3e-73) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (y <= 1e-285) {
tmp = i * (t * fma(-1.0, (j * y5), (c * z)));
} else if (y <= 1.75e-192) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else if (y <= 7e+61) {
tmp = y4 * (y1 * ((k * y2) - (j * y3)));
} else if (y <= 3.1e+111) {
tmp = i * (k * (y1 * (((y * y5) / y1) - z)));
} 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) tmp = 0.0 if (y <= -8.4e+222) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (y <= -2.4e+73) tmp = Float64(k * Float64(y4 * fma(-1.0, Float64(b * y), Float64(y1 * y2)))); elseif (y <= -3e-73) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); elseif (y <= 1e-285) tmp = Float64(i * Float64(t * fma(-1.0, Float64(j * y5), Float64(c * z)))); elseif (y <= 1.75e-192) tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j)))); elseif (y <= 7e+61) tmp = Float64(y4 * Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))); elseif (y <= 3.1e+111) tmp = Float64(i * Float64(k * Float64(y1 * Float64(Float64(Float64(y * y5) / y1) - z)))); else tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y, -8.4e+222], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.4e+73], N[(k * N[(y4 * N[(-1.0 * N[(b * y), $MachinePrecision] + N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3e-73], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-285], N[(i * N[(t * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-192], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+61], N[(y4 * N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e+111], N[(i * N[(k * N[(y1 * N[(N[(N[(y * y5), $MachinePrecision] / y1), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.4 \cdot 10^{+222}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{+73}:\\
\;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-73}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{elif}\;y \leq 10^{-285}:\\
\;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-192}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+61}:\\
\;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+111}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y1 \cdot \left(\frac{y \cdot y5}{y1} - z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\end{array}
\end{array}
if y < -8.40000000000000039e222Initial program 29.4%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites65.0%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6476.9
Applied rewrites76.9%
if -8.40000000000000039e222 < y < -2.40000000000000002e73Initial program 22.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.1%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6444.1
Applied rewrites44.1%
if -2.40000000000000002e73 < y < -3e-73Initial program 25.7%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.8%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6446.4
Applied rewrites46.4%
if -3e-73 < y < 1.00000000000000007e-285Initial program 40.3%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites47.0%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6454.7
Applied rewrites54.7%
if 1.00000000000000007e-285 < y < 1.75000000000000007e-192Initial program 25.3%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6457.7
Applied rewrites57.7%
if 1.75000000000000007e-192 < y < 7.00000000000000036e61Initial program 35.2%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites57.8%
Taylor expanded in y1 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6445.6
Applied rewrites45.6%
if 7.00000000000000036e61 < y < 3.1e111Initial program 30.6%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites39.0%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6455.0
Applied rewrites55.0%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lift-*.f6462.7
Applied rewrites62.7%
if 3.1e111 < y Initial program 25.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.1%
Taylor expanded in y4 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6450.6
Applied rewrites50.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= x -6.2e+246)
(* b (* x (- (* a y) (* j y0))))
(if (<= x 4e+117)
(*
y4
(-
(fma b (- (* j t) (* k y)) (* y1 (- (* k y2) (* j y3))))
(* c (- (* t y2) (* y y3)))))
(*
x
(-
(fma y (- (* a b) (* c i)) (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i y1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (x <= -6.2e+246) {
tmp = b * (x * ((a * y) - (j * y0)));
} else if (x <= 4e+117) {
tmp = y4 * (fma(b, ((j * t) - (k * y)), (y1 * ((k * y2) - (j * y3)))) - (c * ((t * y2) - (y * y3))));
} else {
tmp = x * (fma(y, ((a * b) - (c * i)), (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (x <= -6.2e+246) tmp = Float64(b * Float64(x * Float64(Float64(a * y) - Float64(j * y0)))); elseif (x <= 4e+117) tmp = Float64(y4 * Float64(fma(b, Float64(Float64(j * t) - Float64(k * y)), Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); else tmp = Float64(x * Float64(fma(y, Float64(Float64(a * b) - Float64(c * i)), Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[x, -6.2e+246], N[(b * N[(x * N[(N[(a * y), $MachinePrecision] - N[(j * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4e+117], N[(y4 * N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision] + N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{+246}:\\
\;\;\;\;b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right)\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+117}:\\
\;\;\;\;y4 \cdot \left(\mathsf{fma}\left(b, j \cdot t - k \cdot y, y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;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)\\
\end{array}
\end{array}
if x < -6.19999999999999977e246Initial program 7.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites46.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6476.9
Applied rewrites76.9%
if -6.19999999999999977e246 < x < 4.0000000000000002e117Initial program 32.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites46.4%
if 4.0000000000000002e117 < x Initial program 30.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites70.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y -8.4e+222)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= y -2.4e+73)
(* k (* y4 (fma -1.0 (* b y) (* y1 y2))))
(if (<= y -3e-73)
(* i (* k (- (* y y5) (* y1 z))))
(if (<= y 1e-285)
(* i (* t (fma -1.0 (* j y5) (* c z))))
(if (<= y 1.75e-192)
(* x (* y0 (- (* c y2) (* b j))))
(if (<= y 4.5e+33)
(* y4 (* y1 (- (* k y2) (* j y3))))
(if (<= y 2.8e+86)
(* b (* a (- (* x y) (* t z))))
(* 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 tmp;
if (y <= -8.4e+222) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (y <= -2.4e+73) {
tmp = k * (y4 * fma(-1.0, (b * y), (y1 * y2)));
} else if (y <= -3e-73) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (y <= 1e-285) {
tmp = i * (t * fma(-1.0, (j * y5), (c * z)));
} else if (y <= 1.75e-192) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else if (y <= 4.5e+33) {
tmp = y4 * (y1 * ((k * y2) - (j * y3)));
} else if (y <= 2.8e+86) {
tmp = b * (a * ((x * y) - (t * z)));
} 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) tmp = 0.0 if (y <= -8.4e+222) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (y <= -2.4e+73) tmp = Float64(k * Float64(y4 * fma(-1.0, Float64(b * y), Float64(y1 * y2)))); elseif (y <= -3e-73) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); elseif (y <= 1e-285) tmp = Float64(i * Float64(t * fma(-1.0, Float64(j * y5), Float64(c * z)))); elseif (y <= 1.75e-192) tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j)))); elseif (y <= 4.5e+33) tmp = Float64(y4 * Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))); elseif (y <= 2.8e+86) tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z)))); else tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y, -8.4e+222], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.4e+73], N[(k * N[(y4 * N[(-1.0 * N[(b * y), $MachinePrecision] + N[(y1 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3e-73], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-285], N[(i * N[(t * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-192], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+33], N[(y4 * N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e+86], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.4 \cdot 10^{+222}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;y \leq -2.4 \cdot 10^{+73}:\\
\;\;\;\;k \cdot \left(y4 \cdot \mathsf{fma}\left(-1, b \cdot y, y1 \cdot y2\right)\right)\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-73}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{elif}\;y \leq 10^{-285}:\\
\;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-192}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+33}:\\
\;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+86}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\end{array}
\end{array}
if y < -8.40000000000000039e222Initial program 29.4%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites65.0%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6476.9
Applied rewrites76.9%
if -8.40000000000000039e222 < y < -2.40000000000000002e73Initial program 22.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.1%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6444.1
Applied rewrites44.1%
if -2.40000000000000002e73 < y < -3e-73Initial program 25.7%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.8%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6446.4
Applied rewrites46.4%
if -3e-73 < y < 1.00000000000000007e-285Initial program 40.3%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites47.0%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6454.7
Applied rewrites54.7%
if 1.00000000000000007e-285 < y < 1.75000000000000007e-192Initial program 25.3%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6457.7
Applied rewrites57.7%
if 1.75000000000000007e-192 < y < 4.5e33Initial program 34.7%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites61.6%
Taylor expanded in y1 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6450.0
Applied rewrites50.0%
if 4.5e33 < y < 2.80000000000000004e86Initial program 37.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.1%
Taylor expanded in a around inf
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6444.5
Applied rewrites44.5%
if 2.80000000000000004e86 < y Initial program 23.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.6%
Taylor expanded in y4 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6450.7
Applied rewrites50.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* b (* y4 (- (* j t) (* k y))))))
(if (<= y -4.4e+221)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= y -3.3e+41)
t_1
(if (<= y -1.2e-73)
(* i (* z (- (* c t) (* k y1))))
(if (<= y 1e-285)
(* i (* t (fma -1.0 (* j y5) (* c z))))
(if (<= y 1.75e-192)
(* x (* y0 (- (* c y2) (* b j))))
(if (<= y 4.5e+33)
(* y4 (* y1 (- (* k y2) (* j y3))))
(if (<= y 2.8e+86) (* b (* a (- (* x y) (* t z)))) t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = b * (y4 * ((j * t) - (k * y)));
double tmp;
if (y <= -4.4e+221) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (y <= -3.3e+41) {
tmp = t_1;
} else if (y <= -1.2e-73) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (y <= 1e-285) {
tmp = i * (t * fma(-1.0, (j * y5), (c * z)));
} else if (y <= 1.75e-192) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else if (y <= 4.5e+33) {
tmp = y4 * (y1 * ((k * y2) - (j * y3)));
} else if (y <= 2.8e+86) {
tmp = b * (a * ((x * y) - (t * z)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) tmp = 0.0 if (y <= -4.4e+221) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (y <= -3.3e+41) tmp = t_1; elseif (y <= -1.2e-73) tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); elseif (y <= 1e-285) tmp = Float64(i * Float64(t * fma(-1.0, Float64(j * y5), Float64(c * z)))); elseif (y <= 1.75e-192) tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j)))); elseif (y <= 4.5e+33) tmp = Float64(y4 * Float64(y1 * Float64(Float64(k * y2) - Float64(j * y3)))); elseif (y <= 2.8e+86) tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.4e+221], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.3e+41], t$95$1, If[LessEqual[y, -1.2e-73], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e-285], N[(i * N[(t * N[(-1.0 * N[(j * y5), $MachinePrecision] + N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e-192], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+33], N[(y4 * N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e+86], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{if}\;y \leq -4.4 \cdot 10^{+221}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-73}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{elif}\;y \leq 10^{-285}:\\
\;\;\;\;i \cdot \left(t \cdot \mathsf{fma}\left(-1, j \cdot y5, c \cdot z\right)\right)\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{-192}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+33}:\\
\;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+86}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.3999999999999999e221Initial program 27.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites61.4%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6472.7
Applied rewrites72.7%
if -4.3999999999999999e221 < y < -3.3e41 or 2.80000000000000004e86 < y Initial program 22.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.2%
Taylor expanded in y4 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6446.8
Applied rewrites46.8%
if -3.3e41 < y < -1.20000000000000003e-73Initial program 29.6%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites56.1%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6445.6
Applied rewrites45.6%
if -1.20000000000000003e-73 < y < 1.00000000000000007e-285Initial program 40.3%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites47.0%
Taylor expanded in t around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f6454.7
Applied rewrites54.7%
if 1.00000000000000007e-285 < y < 1.75000000000000007e-192Initial program 25.3%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6457.7
Applied rewrites57.7%
if 1.75000000000000007e-192 < y < 4.5e33Initial program 34.7%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites61.6%
Taylor expanded in y1 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6450.0
Applied rewrites50.0%
if 4.5e33 < y < 2.80000000000000004e86Initial program 37.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.1%
Taylor expanded in a around inf
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6444.5
Applied rewrites44.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* i (* k (- (* y y5) (* y1 z))))))
(if (<= x -6.1e+218)
(* b (* x (- (* a y) (* j y0))))
(if (<= x -4.6e+101)
t_1
(if (<= x -2.1e+50)
(* y (* y5 (- (* i k) (* a y3))))
(if (<= x 6.6e-306)
(* y1 (* y4 (- (* k y2) (* j y3))))
(if (<= x 2.2e-127)
t_1
(if (<= x 7.2e+150)
(* y3 (* y5 (- (* j y0) (* a y))))
(* x (* y0 (- (* c y2) (* b j))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = i * (k * ((y * y5) - (y1 * z)));
double tmp;
if (x <= -6.1e+218) {
tmp = b * (x * ((a * y) - (j * y0)));
} else if (x <= -4.6e+101) {
tmp = t_1;
} else if (x <= -2.1e+50) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (x <= 6.6e-306) {
tmp = y1 * (y4 * ((k * y2) - (j * y3)));
} else if (x <= 2.2e-127) {
tmp = t_1;
} else if (x <= 7.2e+150) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else {
tmp = x * (y0 * ((c * y2) - (b * j)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = i * (k * ((y * y5) - (y1 * z)))
if (x <= (-6.1d+218)) then
tmp = b * (x * ((a * y) - (j * y0)))
else if (x <= (-4.6d+101)) then
tmp = t_1
else if (x <= (-2.1d+50)) then
tmp = y * (y5 * ((i * k) - (a * y3)))
else if (x <= 6.6d-306) then
tmp = y1 * (y4 * ((k * y2) - (j * y3)))
else if (x <= 2.2d-127) then
tmp = t_1
else if (x <= 7.2d+150) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else
tmp = x * (y0 * ((c * y2) - (b * j)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = i * (k * ((y * y5) - (y1 * z)));
double tmp;
if (x <= -6.1e+218) {
tmp = b * (x * ((a * y) - (j * y0)));
} else if (x <= -4.6e+101) {
tmp = t_1;
} else if (x <= -2.1e+50) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (x <= 6.6e-306) {
tmp = y1 * (y4 * ((k * y2) - (j * y3)));
} else if (x <= 2.2e-127) {
tmp = t_1;
} else if (x <= 7.2e+150) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else {
tmp = x * (y0 * ((c * y2) - (b * j)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = i * (k * ((y * y5) - (y1 * z))) tmp = 0 if x <= -6.1e+218: tmp = b * (x * ((a * y) - (j * y0))) elif x <= -4.6e+101: tmp = t_1 elif x <= -2.1e+50: tmp = y * (y5 * ((i * k) - (a * y3))) elif x <= 6.6e-306: tmp = y1 * (y4 * ((k * y2) - (j * y3))) elif x <= 2.2e-127: tmp = t_1 elif x <= 7.2e+150: tmp = y3 * (y5 * ((j * y0) - (a * y))) else: tmp = x * (y0 * ((c * y2) - (b * j))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))) tmp = 0.0 if (x <= -6.1e+218) tmp = Float64(b * Float64(x * Float64(Float64(a * y) - Float64(j * y0)))); elseif (x <= -4.6e+101) tmp = t_1; elseif (x <= -2.1e+50) tmp = Float64(y * Float64(y5 * Float64(Float64(i * k) - Float64(a * y3)))); elseif (x <= 6.6e-306) tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * y3)))); elseif (x <= 2.2e-127) tmp = t_1; elseif (x <= 7.2e+150) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); else tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = i * (k * ((y * y5) - (y1 * z))); tmp = 0.0; if (x <= -6.1e+218) tmp = b * (x * ((a * y) - (j * y0))); elseif (x <= -4.6e+101) tmp = t_1; elseif (x <= -2.1e+50) tmp = y * (y5 * ((i * k) - (a * y3))); elseif (x <= 6.6e-306) tmp = y1 * (y4 * ((k * y2) - (j * y3))); elseif (x <= 2.2e-127) tmp = t_1; elseif (x <= 7.2e+150) tmp = y3 * (y5 * ((j * y0) - (a * y))); else tmp = x * (y0 * ((c * y2) - (b * j))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.1e+218], N[(b * N[(x * N[(N[(a * y), $MachinePrecision] - N[(j * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.6e+101], t$95$1, If[LessEqual[x, -2.1e+50], N[(y * N[(y5 * N[(N[(i * k), $MachinePrecision] - N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.6e-306], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e-127], t$95$1, If[LessEqual[x, 7.2e+150], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{if}\;x \leq -6.1 \cdot 10^{+218}:\\
\;\;\;\;b \cdot \left(x \cdot \left(a \cdot y - j \cdot y0\right)\right)\\
\mathbf{elif}\;x \leq -4.6 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{+50}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\
\mathbf{elif}\;x \leq 6.6 \cdot 10^{-306}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+150}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\end{array}
\end{array}
if x < -6.10000000000000021e218Initial program 12.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites50.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6475.0
Applied rewrites75.0%
if -6.10000000000000021e218 < x < -4.6000000000000003e101 or 6.6000000000000002e-306 < x < 2.2000000000000001e-127Initial program 44.1%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.5%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6444.1
Applied rewrites44.1%
if -4.6000000000000003e101 < x < -2.1e50Initial program 22.2%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites66.7%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6467.2
Applied rewrites67.2%
if -2.1e50 < x < 6.6000000000000002e-306Initial program 26.6%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites49.7%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6445.2
Applied rewrites45.2%
if 2.2000000000000001e-127 < x < 7.19999999999999972e150Initial program 33.4%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites50.3%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.2
Applied rewrites39.2%
if 7.19999999999999972e150 < x Initial program 20.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites31.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6448.9
Applied rewrites48.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* b (* y4 (- (* j t) (* k y))))))
(if (<= y4 -7.2e+216)
(* y2 (* y4 (- (* k y1) (* c t))))
(if (<= y4 -1.8e-23)
t_1
(if (<= y4 4.8e-177)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= y4 1.1e-93)
(* x (* y0 (- (* c y2) (* b j))))
(if (<= y4 5e+42) (* y4 (* y1 (- (* 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 = b * (y4 * ((j * t) - (k * y)));
double tmp;
if (y4 <= -7.2e+216) {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
} else if (y4 <= -1.8e-23) {
tmp = t_1;
} else if (y4 <= 4.8e-177) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y4 <= 1.1e-93) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else if (y4 <= 5e+42) {
tmp = y4 * (y1 * ((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 = b * (y4 * ((j * t) - (k * y)))
if (y4 <= (-7.2d+216)) then
tmp = y2 * (y4 * ((k * y1) - (c * t)))
else if (y4 <= (-1.8d-23)) then
tmp = t_1
else if (y4 <= 4.8d-177) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else if (y4 <= 1.1d-93) then
tmp = x * (y0 * ((c * y2) - (b * j)))
else if (y4 <= 5d+42) then
tmp = y4 * (y1 * ((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 = b * (y4 * ((j * t) - (k * y)));
double tmp;
if (y4 <= -7.2e+216) {
tmp = y2 * (y4 * ((k * y1) - (c * t)));
} else if (y4 <= -1.8e-23) {
tmp = t_1;
} else if (y4 <= 4.8e-177) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y4 <= 1.1e-93) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else if (y4 <= 5e+42) {
tmp = y4 * (y1 * ((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 = b * (y4 * ((j * t) - (k * y))) tmp = 0 if y4 <= -7.2e+216: tmp = y2 * (y4 * ((k * y1) - (c * t))) elif y4 <= -1.8e-23: tmp = t_1 elif y4 <= 4.8e-177: tmp = y3 * (y5 * ((j * y0) - (a * y))) elif y4 <= 1.1e-93: tmp = x * (y0 * ((c * y2) - (b * j))) elif y4 <= 5e+42: tmp = y4 * (y1 * ((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(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))) tmp = 0.0 if (y4 <= -7.2e+216) tmp = Float64(y2 * Float64(y4 * Float64(Float64(k * y1) - Float64(c * t)))); elseif (y4 <= -1.8e-23) tmp = t_1; elseif (y4 <= 4.8e-177) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (y4 <= 1.1e-93) tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j)))); elseif (y4 <= 5e+42) tmp = Float64(y4 * Float64(y1 * 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 = b * (y4 * ((j * t) - (k * y))); tmp = 0.0; if (y4 <= -7.2e+216) tmp = y2 * (y4 * ((k * y1) - (c * t))); elseif (y4 <= -1.8e-23) tmp = t_1; elseif (y4 <= 4.8e-177) tmp = y3 * (y5 * ((j * y0) - (a * y))); elseif (y4 <= 1.1e-93) tmp = x * (y0 * ((c * y2) - (b * j))); elseif (y4 <= 5e+42) tmp = y4 * (y1 * ((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[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -7.2e+216], N[(y2 * N[(y4 * N[(N[(k * y1), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -1.8e-23], t$95$1, If[LessEqual[y4, 4.8e-177], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1.1e-93], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 5e+42], N[(y4 * N[(y1 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{if}\;y4 \leq -7.2 \cdot 10^{+216}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1 - c \cdot t\right)\right)\\
\mathbf{elif}\;y4 \leq -1.8 \cdot 10^{-23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y4 \leq 4.8 \cdot 10^{-177}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;y4 \leq 1.1 \cdot 10^{-93}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\mathbf{elif}\;y4 \leq 5 \cdot 10^{+42}:\\
\;\;\;\;y4 \cdot \left(y1 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y4 < -7.2000000000000004e216Initial program 22.2%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites66.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6456.1
Applied rewrites56.1%
if -7.2000000000000004e216 < y4 < -1.7999999999999999e-23 or 5.00000000000000007e42 < y4 Initial program 27.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites43.2%
Taylor expanded in y4 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6444.4
Applied rewrites44.4%
if -1.7999999999999999e-23 < y4 < 4.7999999999999998e-177Initial program 31.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites48.1%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.3
Applied rewrites41.3%
if 4.7999999999999998e-177 < y4 < 1.09999999999999998e-93Initial program 37.5%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6457.6
Applied rewrites57.6%
if 1.09999999999999998e-93 < y4 < 5.00000000000000007e42Initial program 37.9%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites66.4%
Taylor expanded in y1 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6451.3
Applied rewrites51.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* x (* y0 (- (* c y2) (* b j))))))
(if (<= x -3.4e+81)
t_1
(if (<= x -2.1e+50)
(* y (* y5 (- (* i k) (* a y3))))
(if (<= x 6.6e-306)
(* y1 (* y4 (- (* k y2) (* j y3))))
(if (<= x 2.2e-127)
(* i (* k (- (* y y5) (* y1 z))))
(if (<= x 7.2e+150) (* 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 * (y0 * ((c * y2) - (b * j)));
double tmp;
if (x <= -3.4e+81) {
tmp = t_1;
} else if (x <= -2.1e+50) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (x <= 6.6e-306) {
tmp = y1 * (y4 * ((k * y2) - (j * y3)));
} else if (x <= 2.2e-127) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (x <= 7.2e+150) {
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 = x * (y0 * ((c * y2) - (b * j)))
if (x <= (-3.4d+81)) then
tmp = t_1
else if (x <= (-2.1d+50)) then
tmp = y * (y5 * ((i * k) - (a * y3)))
else if (x <= 6.6d-306) then
tmp = y1 * (y4 * ((k * y2) - (j * y3)))
else if (x <= 2.2d-127) then
tmp = i * (k * ((y * y5) - (y1 * z)))
else if (x <= 7.2d+150) 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 = x * (y0 * ((c * y2) - (b * j)));
double tmp;
if (x <= -3.4e+81) {
tmp = t_1;
} else if (x <= -2.1e+50) {
tmp = y * (y5 * ((i * k) - (a * y3)));
} else if (x <= 6.6e-306) {
tmp = y1 * (y4 * ((k * y2) - (j * y3)));
} else if (x <= 2.2e-127) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (x <= 7.2e+150) {
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 = x * (y0 * ((c * y2) - (b * j))) tmp = 0 if x <= -3.4e+81: tmp = t_1 elif x <= -2.1e+50: tmp = y * (y5 * ((i * k) - (a * y3))) elif x <= 6.6e-306: tmp = y1 * (y4 * ((k * y2) - (j * y3))) elif x <= 2.2e-127: tmp = i * (k * ((y * y5) - (y1 * z))) elif x <= 7.2e+150: 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(y0 * Float64(Float64(c * y2) - Float64(b * j)))) tmp = 0.0 if (x <= -3.4e+81) tmp = t_1; elseif (x <= -2.1e+50) tmp = Float64(y * Float64(y5 * Float64(Float64(i * k) - Float64(a * y3)))); elseif (x <= 6.6e-306) tmp = Float64(y1 * Float64(y4 * Float64(Float64(k * y2) - Float64(j * y3)))); elseif (x <= 2.2e-127) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); elseif (x <= 7.2e+150) 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 = x * (y0 * ((c * y2) - (b * j))); tmp = 0.0; if (x <= -3.4e+81) tmp = t_1; elseif (x <= -2.1e+50) tmp = y * (y5 * ((i * k) - (a * y3))); elseif (x <= 6.6e-306) tmp = y1 * (y4 * ((k * y2) - (j * y3))); elseif (x <= 2.2e-127) tmp = i * (k * ((y * y5) - (y1 * z))); elseif (x <= 7.2e+150) 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[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.4e+81], t$95$1, If[LessEqual[x, -2.1e+50], N[(y * N[(y5 * N[(N[(i * k), $MachinePrecision] - N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.6e-306], N[(y1 * N[(y4 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e-127], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.2e+150], 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(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{+50}:\\
\;\;\;\;y \cdot \left(y5 \cdot \left(i \cdot k - a \cdot y3\right)\right)\\
\mathbf{elif}\;x \leq 6.6 \cdot 10^{-306}:\\
\;\;\;\;y1 \cdot \left(y4 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-127}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+150}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.40000000000000003e81 or 7.19999999999999972e150 < x Initial program 22.7%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6449.4
Applied rewrites49.4%
if -3.40000000000000003e81 < x < -2.1e50Initial program 25.0%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites75.0%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6475.4
Applied rewrites75.4%
if -2.1e50 < x < 6.6000000000000002e-306Initial program 26.6%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites49.7%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6445.2
Applied rewrites45.2%
if 6.6000000000000002e-306 < x < 2.2000000000000001e-127Initial program 49.1%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.5%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6437.8
Applied rewrites37.8%
if 2.2000000000000001e-127 < x < 7.19999999999999972e150Initial program 33.4%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites50.3%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.2
Applied rewrites39.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* x (* b (- (* a y) (* j y0))))))
(if (<= b -2.2e+88)
t_1
(if (<= b -6e-65)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= b -5.8e-217)
(* c (* y0 (- (* x y2) (* y3 z))))
(if (<= b 2.95e-297)
(* y1 (* z (- (* a y3) (* i k))))
(if (<= b 3e-68) (* 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 * (b * ((a * y) - (j * y0)));
double tmp;
if (b <= -2.2e+88) {
tmp = t_1;
} else if (b <= -6e-65) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= -5.8e-217) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (b <= 2.95e-297) {
tmp = y1 * (z * ((a * y3) - (i * k)));
} else if (b <= 3e-68) {
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 = x * (b * ((a * y) - (j * y0)))
if (b <= (-2.2d+88)) then
tmp = t_1
else if (b <= (-6d-65)) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (b <= (-5.8d-217)) then
tmp = c * (y0 * ((x * y2) - (y3 * z)))
else if (b <= 2.95d-297) then
tmp = y1 * (z * ((a * y3) - (i * k)))
else if (b <= 3d-68) 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 = x * (b * ((a * y) - (j * y0)));
double tmp;
if (b <= -2.2e+88) {
tmp = t_1;
} else if (b <= -6e-65) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= -5.8e-217) {
tmp = c * (y0 * ((x * y2) - (y3 * z)));
} else if (b <= 2.95e-297) {
tmp = y1 * (z * ((a * y3) - (i * k)));
} else if (b <= 3e-68) {
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 = x * (b * ((a * y) - (j * y0))) tmp = 0 if b <= -2.2e+88: tmp = t_1 elif b <= -6e-65: tmp = a * (y5 * ((t * y2) - (y * y3))) elif b <= -5.8e-217: tmp = c * (y0 * ((x * y2) - (y3 * z))) elif b <= 2.95e-297: tmp = y1 * (z * ((a * y3) - (i * k))) elif b <= 3e-68: 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(b * Float64(Float64(a * y) - Float64(j * y0)))) tmp = 0.0 if (b <= -2.2e+88) tmp = t_1; elseif (b <= -6e-65) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (b <= -5.8e-217) tmp = Float64(c * Float64(y0 * Float64(Float64(x * y2) - Float64(y3 * z)))); elseif (b <= 2.95e-297) tmp = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k)))); elseif (b <= 3e-68) 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 = x * (b * ((a * y) - (j * y0))); tmp = 0.0; if (b <= -2.2e+88) tmp = t_1; elseif (b <= -6e-65) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (b <= -5.8e-217) tmp = c * (y0 * ((x * y2) - (y3 * z))); elseif (b <= 2.95e-297) tmp = y1 * (z * ((a * y3) - (i * k))); elseif (b <= 3e-68) 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[(x * N[(b * N[(N[(a * y), $MachinePrecision] - N[(j * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.2e+88], t$95$1, If[LessEqual[b, -6e-65], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -5.8e-217], N[(c * N[(y0 * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.95e-297], N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3e-68], 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(b \cdot \left(a \cdot y - j \cdot y0\right)\right)\\
\mathbf{if}\;b \leq -2.2 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -6 \cdot 10^{-65}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq -5.8 \cdot 10^{-217}:\\
\;\;\;\;c \cdot \left(y0 \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;b \leq 2.95 \cdot 10^{-297}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\
\mathbf{elif}\;b \leq 3 \cdot 10^{-68}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.20000000000000009e88 or 3e-68 < b Initial program 22.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites54.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites54.8%
Taylor expanded in x around inf
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6441.2
Applied rewrites41.2%
if -2.20000000000000009e88 < b < -5.99999999999999996e-65Initial program 25.8%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites39.0%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6449.6
Applied rewrites49.6%
if -5.99999999999999996e-65 < b < -5.79999999999999963e-217Initial program 60.6%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6440.9
Applied rewrites40.9%
if -5.79999999999999963e-217 < b < 2.9499999999999999e-297Initial program 36.3%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.2%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6449.9
Applied rewrites49.9%
if 2.9499999999999999e-297 < b < 3e-68Initial program 30.0%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.2%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* x (* b (- (* a y) (* j y0))))))
(if (<= b -2.2e+88)
t_1
(if (<= b -1.35e-62)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= b -4.2e-208)
(* i (* z (- (* c t) (* k y1))))
(if (<= b 2.95e-297)
(* y1 (* z (- (* a y3) (* i k))))
(if (<= b 3e-68) (* 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 * (b * ((a * y) - (j * y0)));
double tmp;
if (b <= -2.2e+88) {
tmp = t_1;
} else if (b <= -1.35e-62) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= -4.2e-208) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (b <= 2.95e-297) {
tmp = y1 * (z * ((a * y3) - (i * k)));
} else if (b <= 3e-68) {
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 = x * (b * ((a * y) - (j * y0)))
if (b <= (-2.2d+88)) then
tmp = t_1
else if (b <= (-1.35d-62)) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (b <= (-4.2d-208)) then
tmp = i * (z * ((c * t) - (k * y1)))
else if (b <= 2.95d-297) then
tmp = y1 * (z * ((a * y3) - (i * k)))
else if (b <= 3d-68) 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 = x * (b * ((a * y) - (j * y0)));
double tmp;
if (b <= -2.2e+88) {
tmp = t_1;
} else if (b <= -1.35e-62) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (b <= -4.2e-208) {
tmp = i * (z * ((c * t) - (k * y1)));
} else if (b <= 2.95e-297) {
tmp = y1 * (z * ((a * y3) - (i * k)));
} else if (b <= 3e-68) {
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 = x * (b * ((a * y) - (j * y0))) tmp = 0 if b <= -2.2e+88: tmp = t_1 elif b <= -1.35e-62: tmp = a * (y5 * ((t * y2) - (y * y3))) elif b <= -4.2e-208: tmp = i * (z * ((c * t) - (k * y1))) elif b <= 2.95e-297: tmp = y1 * (z * ((a * y3) - (i * k))) elif b <= 3e-68: 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(b * Float64(Float64(a * y) - Float64(j * y0)))) tmp = 0.0 if (b <= -2.2e+88) tmp = t_1; elseif (b <= -1.35e-62) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (b <= -4.2e-208) tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); elseif (b <= 2.95e-297) tmp = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k)))); elseif (b <= 3e-68) 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 = x * (b * ((a * y) - (j * y0))); tmp = 0.0; if (b <= -2.2e+88) tmp = t_1; elseif (b <= -1.35e-62) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (b <= -4.2e-208) tmp = i * (z * ((c * t) - (k * y1))); elseif (b <= 2.95e-297) tmp = y1 * (z * ((a * y3) - (i * k))); elseif (b <= 3e-68) 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[(x * N[(b * N[(N[(a * y), $MachinePrecision] - N[(j * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.2e+88], t$95$1, If[LessEqual[b, -1.35e-62], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -4.2e-208], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.95e-297], N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3e-68], 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(b \cdot \left(a \cdot y - j \cdot y0\right)\right)\\
\mathbf{if}\;b \leq -2.2 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.35 \cdot 10^{-62}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;b \leq -4.2 \cdot 10^{-208}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{elif}\;b \leq 2.95 \cdot 10^{-297}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\
\mathbf{elif}\;b \leq 3 \cdot 10^{-68}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.20000000000000009e88 or 3e-68 < b Initial program 22.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites54.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower-fma.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f64N/A
Applied rewrites54.8%
Taylor expanded in x around inf
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6441.2
Applied rewrites41.2%
if -2.20000000000000009e88 < b < -1.3500000000000001e-62Initial program 26.4%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.0%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6448.3
Applied rewrites48.3%
if -1.3500000000000001e-62 < b < -4.20000000000000024e-208Initial program 57.5%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites43.6%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6443.8
Applied rewrites43.8%
if -4.20000000000000024e-208 < b < 2.9499999999999999e-297Initial program 38.2%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites39.0%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6448.4
Applied rewrites48.4%
if 2.9499999999999999e-297 < b < 3e-68Initial program 30.0%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.2%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6439.3
Applied rewrites39.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= y0 -2.25e+93)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= y0 -3.8e-191)
(* b (* a (- (* x y) (* t z))))
(if (<= y0 2.7e-233)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= y0 1.18e+26)
(* b (* y4 (- (* j t) (* k y))))
(* b (* y0 (- (* k z) (* j x)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y0 <= -2.25e+93) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y0 <= -3.8e-191) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y0 <= 2.7e-233) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (y0 <= 1.18e+26) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else {
tmp = b * (y0 * ((k * z) - (j * x)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y0 <= (-2.25d+93)) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else if (y0 <= (-3.8d-191)) then
tmp = b * (a * ((x * y) - (t * z)))
else if (y0 <= 2.7d-233) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (y0 <= 1.18d+26) then
tmp = b * (y4 * ((j * t) - (k * y)))
else
tmp = b * (y0 * ((k * z) - (j * x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y0 <= -2.25e+93) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (y0 <= -3.8e-191) {
tmp = b * (a * ((x * y) - (t * z)));
} else if (y0 <= 2.7e-233) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (y0 <= 1.18e+26) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else {
tmp = b * (y0 * ((k * z) - (j * x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y0 <= -2.25e+93: tmp = y3 * (y5 * ((j * y0) - (a * y))) elif y0 <= -3.8e-191: tmp = b * (a * ((x * y) - (t * z))) elif y0 <= 2.7e-233: tmp = a * (y5 * ((t * y2) - (y * y3))) elif y0 <= 1.18e+26: tmp = b * (y4 * ((j * t) - (k * y))) else: tmp = b * (y0 * ((k * z) - (j * x))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y0 <= -2.25e+93) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (y0 <= -3.8e-191) tmp = Float64(b * Float64(a * Float64(Float64(x * y) - Float64(t * z)))); elseif (y0 <= 2.7e-233) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (y0 <= 1.18e+26) tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))); else tmp = Float64(b * Float64(y0 * Float64(Float64(k * z) - Float64(j * x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y0 <= -2.25e+93) tmp = y3 * (y5 * ((j * y0) - (a * y))); elseif (y0 <= -3.8e-191) tmp = b * (a * ((x * y) - (t * z))); elseif (y0 <= 2.7e-233) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (y0 <= 1.18e+26) tmp = b * (y4 * ((j * t) - (k * y))); else tmp = b * (y0 * ((k * z) - (j * x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y0, -2.25e+93], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, -3.8e-191], N[(b * N[(a * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 2.7e-233], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y0, 1.18e+26], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(y0 * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y0 \leq -2.25 \cdot 10^{+93}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;y0 \leq -3.8 \cdot 10^{-191}:\\
\;\;\;\;b \cdot \left(a \cdot \left(x \cdot y - t \cdot z\right)\right)\\
\mathbf{elif}\;y0 \leq 2.7 \cdot 10^{-233}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;y0 \leq 1.18 \cdot 10^{+26}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(y0 \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\end{array}
\end{array}
if y0 < -2.24999999999999995e93Initial program 37.1%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites49.0%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6443.4
Applied rewrites43.4%
if -2.24999999999999995e93 < y0 < -3.7999999999999998e-191Initial program 27.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites41.9%
Taylor expanded in a around inf
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6438.6
Applied rewrites38.6%
if -3.7999999999999998e-191 < y0 < 2.6999999999999999e-233Initial program 29.2%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites53.1%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6444.9
Applied rewrites44.9%
if 2.6999999999999999e-233 < y0 < 1.18e26Initial program 46.9%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites43.1%
Taylor expanded in y4 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6445.8
Applied rewrites45.8%
if 1.18e26 < y0 Initial program 17.8%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.4%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
lift-*.f64N/A
lift-*.f6449.9
Applied rewrites49.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 (<= j -1.3e+250)
(* (- i) (* j (* t y5)))
(if (<= j -8e+116)
t_1
(if (<= j 1.95e-19)
(* i (* k (- (* y y5) (* y1 z))))
(if (<= j 1.6e+144) t_1 (* b (* y4 (* j 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 t_1 = y3 * (y5 * ((j * y0) - (a * y)));
double tmp;
if (j <= -1.3e+250) {
tmp = -i * (j * (t * y5));
} else if (j <= -8e+116) {
tmp = t_1;
} else if (j <= 1.95e-19) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (j <= 1.6e+144) {
tmp = t_1;
} else {
tmp = b * (y4 * (j * 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) :: t_1
real(8) :: tmp
t_1 = y3 * (y5 * ((j * y0) - (a * y)))
if (j <= (-1.3d+250)) then
tmp = -i * (j * (t * y5))
else if (j <= (-8d+116)) then
tmp = t_1
else if (j <= 1.95d-19) then
tmp = i * (k * ((y * y5) - (y1 * z)))
else if (j <= 1.6d+144) then
tmp = t_1
else
tmp = b * (y4 * (j * 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 t_1 = y3 * (y5 * ((j * y0) - (a * y)));
double tmp;
if (j <= -1.3e+250) {
tmp = -i * (j * (t * y5));
} else if (j <= -8e+116) {
tmp = t_1;
} else if (j <= 1.95e-19) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else if (j <= 1.6e+144) {
tmp = t_1;
} else {
tmp = b * (y4 * (j * t));
}
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 j <= -1.3e+250: tmp = -i * (j * (t * y5)) elif j <= -8e+116: tmp = t_1 elif j <= 1.95e-19: tmp = i * (k * ((y * y5) - (y1 * z))) elif j <= 1.6e+144: tmp = t_1 else: tmp = b * (y4 * (j * t)) 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 (j <= -1.3e+250) tmp = Float64(Float64(-i) * Float64(j * Float64(t * y5))); elseif (j <= -8e+116) tmp = t_1; elseif (j <= 1.95e-19) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); elseif (j <= 1.6e+144) tmp = t_1; else tmp = Float64(b * Float64(y4 * Float64(j * 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) t_1 = y3 * (y5 * ((j * y0) - (a * y))); tmp = 0.0; if (j <= -1.3e+250) tmp = -i * (j * (t * y5)); elseif (j <= -8e+116) tmp = t_1; elseif (j <= 1.95e-19) tmp = i * (k * ((y * y5) - (y1 * z))); elseif (j <= 1.6e+144) tmp = t_1; else tmp = b * (y4 * (j * t)); 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[j, -1.3e+250], N[((-i) * N[(j * N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -8e+116], t$95$1, If[LessEqual[j, 1.95e-19], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.6e+144], t$95$1, N[(b * N[(y4 * N[(j * t), $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}\;j \leq -1.3 \cdot 10^{+250}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot \left(t \cdot y5\right)\right)\\
\mathbf{elif}\;j \leq -8 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.95 \cdot 10^{-19}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{elif}\;j \leq 1.6 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\
\end{array}
\end{array}
if j < -1.30000000000000006e250Initial program 14.3%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites57.2%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6471.5
Applied rewrites71.5%
Taylor expanded in x around 0
lift-*.f6458.2
Applied rewrites58.2%
if -1.30000000000000006e250 < j < -8.00000000000000012e116 or 1.94999999999999998e-19 < j < 1.6e144Initial program 28.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.9%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6444.7
Applied rewrites44.7%
if -8.00000000000000012e116 < j < 1.94999999999999998e-19Initial program 34.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.5%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6433.7
Applied rewrites33.7%
if 1.6e144 < j Initial program 24.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites30.2%
Taylor expanded in y4 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6445.0
Applied rewrites45.0%
Taylor expanded in y around 0
lift-*.f6442.0
Applied rewrites42.0%
Final simplification39.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* b (* (- k) (* y y4)))))
(if (<= y -3.3e+41)
t_1
(if (<= y -9e-83)
(* i (* k (* (- y1) z)))
(if (<= y 5.6e-17)
(* (- i) (* j (* t y5)))
(if (<= y 9.5e+62) (* y2 (* (- c) (* t y4))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = b * (-k * (y * y4));
double tmp;
if (y <= -3.3e+41) {
tmp = t_1;
} else if (y <= -9e-83) {
tmp = i * (k * (-y1 * z));
} else if (y <= 5.6e-17) {
tmp = -i * (j * (t * y5));
} else if (y <= 9.5e+62) {
tmp = y2 * (-c * (t * y4));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = b * (-k * (y * y4))
if (y <= (-3.3d+41)) then
tmp = t_1
else if (y <= (-9d-83)) then
tmp = i * (k * (-y1 * z))
else if (y <= 5.6d-17) then
tmp = -i * (j * (t * y5))
else if (y <= 9.5d+62) then
tmp = y2 * (-c * (t * y4))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = b * (-k * (y * y4));
double tmp;
if (y <= -3.3e+41) {
tmp = t_1;
} else if (y <= -9e-83) {
tmp = i * (k * (-y1 * z));
} else if (y <= 5.6e-17) {
tmp = -i * (j * (t * y5));
} else if (y <= 9.5e+62) {
tmp = y2 * (-c * (t * y4));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = b * (-k * (y * y4)) tmp = 0 if y <= -3.3e+41: tmp = t_1 elif y <= -9e-83: tmp = i * (k * (-y1 * z)) elif y <= 5.6e-17: tmp = -i * (j * (t * y5)) elif y <= 9.5e+62: tmp = y2 * (-c * (t * y4)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(b * Float64(Float64(-k) * Float64(y * y4))) tmp = 0.0 if (y <= -3.3e+41) tmp = t_1; elseif (y <= -9e-83) tmp = Float64(i * Float64(k * Float64(Float64(-y1) * z))); elseif (y <= 5.6e-17) tmp = Float64(Float64(-i) * Float64(j * Float64(t * y5))); elseif (y <= 9.5e+62) tmp = Float64(y2 * Float64(Float64(-c) * Float64(t * y4))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = b * (-k * (y * y4)); tmp = 0.0; if (y <= -3.3e+41) tmp = t_1; elseif (y <= -9e-83) tmp = i * (k * (-y1 * z)); elseif (y <= 5.6e-17) tmp = -i * (j * (t * y5)); elseif (y <= 9.5e+62) tmp = y2 * (-c * (t * y4)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(b * N[((-k) * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.3e+41], t$95$1, If[LessEqual[y, -9e-83], N[(i * N[(k * N[((-y1) * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.6e-17], N[((-i) * N[(j * N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e+62], N[(y2 * N[((-c) * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(-k\right) \cdot \left(y \cdot y4\right)\right)\\
\mathbf{if}\;y \leq -3.3 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -9 \cdot 10^{-83}:\\
\;\;\;\;i \cdot \left(k \cdot \left(\left(-y1\right) \cdot z\right)\right)\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{-17}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot \left(t \cdot y5\right)\right)\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+62}:\\
\;\;\;\;y2 \cdot \left(\left(-c\right) \cdot \left(t \cdot y4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.3e41 or 9.5000000000000003e62 < y Initial program 24.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites41.5%
Taylor expanded in y4 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6441.0
Applied rewrites41.0%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6436.4
Applied rewrites36.4%
if -3.3e41 < y < -8.99999999999999995e-83Initial program 29.6%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.9%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6445.3
Applied rewrites45.3%
Taylor expanded in y around 0
lower-*.f64N/A
lift-*.f6442.1
Applied rewrites42.1%
if -8.99999999999999995e-83 < y < 5.5999999999999998e-17Initial program 36.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.0%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.1
Applied rewrites35.1%
Taylor expanded in x around 0
lift-*.f6428.3
Applied rewrites28.3%
if 5.5999999999999998e-17 < y < 9.5000000000000003e62Initial program 36.4%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites59.8%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6442.2
Applied rewrites42.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6446.1
Applied rewrites46.1%
Final simplification34.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= t -1.5e+109)
(* a (* y5 (- (* t y2) (* y y3))))
(if (<= t -2.1e-258)
(* y3 (* y5 (- (* j y0) (* a y))))
(if (<= t 8.8e+182)
(* x (* y0 (- (* c y2) (* b j))))
(* i (* z (- (* c t) (* k y1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (t <= -1.5e+109) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (t <= -2.1e-258) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (t <= 8.8e+182) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else {
tmp = i * (z * ((c * t) - (k * y1)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (t <= (-1.5d+109)) then
tmp = a * (y5 * ((t * y2) - (y * y3)))
else if (t <= (-2.1d-258)) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else if (t <= 8.8d+182) then
tmp = x * (y0 * ((c * y2) - (b * j)))
else
tmp = i * (z * ((c * t) - (k * y1)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (t <= -1.5e+109) {
tmp = a * (y5 * ((t * y2) - (y * y3)));
} else if (t <= -2.1e-258) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else if (t <= 8.8e+182) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else {
tmp = i * (z * ((c * t) - (k * y1)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if t <= -1.5e+109: tmp = a * (y5 * ((t * y2) - (y * y3))) elif t <= -2.1e-258: tmp = y3 * (y5 * ((j * y0) - (a * y))) elif t <= 8.8e+182: tmp = x * (y0 * ((c * y2) - (b * j))) else: tmp = i * (z * ((c * t) - (k * y1))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (t <= -1.5e+109) tmp = Float64(a * Float64(y5 * Float64(Float64(t * y2) - Float64(y * y3)))); elseif (t <= -2.1e-258) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); elseif (t <= 8.8e+182) tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j)))); else tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (t <= -1.5e+109) tmp = a * (y5 * ((t * y2) - (y * y3))); elseif (t <= -2.1e-258) tmp = y3 * (y5 * ((j * y0) - (a * y))); elseif (t <= 8.8e+182) tmp = x * (y0 * ((c * y2) - (b * j))); else tmp = i * (z * ((c * t) - (k * y1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[t, -1.5e+109], N[(a * N[(y5 * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.1e-258], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e+182], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+109}:\\
\;\;\;\;a \cdot \left(y5 \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{-258}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{+182}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\end{array}
\end{array}
if t < -1.50000000000000008e109Initial program 22.5%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.8%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f6443.2
Applied rewrites43.2%
if -1.50000000000000008e109 < t < -2.0999999999999999e-258Initial program 40.2%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites49.2%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
if -2.0999999999999999e-258 < t < 8.79999999999999986e182Initial program 30.9%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.6
Applied rewrites35.6%
if 8.79999999999999986e182 < t Initial program 15.3%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites51.7%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6455.2
Applied rewrites55.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (or (<= z -3.1e+168) (not (<= z 8.5e+71))) (* i (* z (- (* c t) (* k y1)))) (* 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 tmp;
if ((z <= -3.1e+168) || !(z <= 8.5e+71)) {
tmp = i * (z * ((c * t) - (k * y1)));
} 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) :: tmp
if ((z <= (-3.1d+168)) .or. (.not. (z <= 8.5d+71))) then
tmp = i * (z * ((c * t) - (k * y1)))
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 tmp;
if ((z <= -3.1e+168) || !(z <= 8.5e+71)) {
tmp = i * (z * ((c * t) - (k * y1)));
} 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): tmp = 0 if (z <= -3.1e+168) or not (z <= 8.5e+71): tmp = i * (z * ((c * t) - (k * y1))) 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) tmp = 0.0 if ((z <= -3.1e+168) || !(z <= 8.5e+71)) tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); 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) tmp = 0.0; if ((z <= -3.1e+168) || ~((z <= 8.5e+71))) tmp = i * (z * ((c * t) - (k * y1))); 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_] := If[Or[LessEqual[z, -3.1e+168], N[Not[LessEqual[z, 8.5e+71]], $MachinePrecision]], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+168} \lor \neg \left(z \leq 8.5 \cdot 10^{+71}\right):\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\end{array}
\end{array}
if z < -3.09999999999999996e168 or 8.4999999999999996e71 < z Initial program 23.7%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites54.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6453.1
Applied rewrites53.1%
if -3.09999999999999996e168 < z < 8.4999999999999996e71Initial program 33.7%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites46.6%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6430.3
Applied rewrites30.3%
Final simplification37.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= z -4.4e-47)
(* y1 (* z (- (* a y3) (* i k))))
(if (<= z 8.5e+71)
(* y3 (* y5 (- (* j y0) (* a y))))
(* i (* z (- (* c t) (* k y1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (z <= -4.4e-47) {
tmp = y1 * (z * ((a * y3) - (i * k)));
} else if (z <= 8.5e+71) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else {
tmp = i * (z * ((c * t) - (k * y1)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (z <= (-4.4d-47)) then
tmp = y1 * (z * ((a * y3) - (i * k)))
else if (z <= 8.5d+71) then
tmp = y3 * (y5 * ((j * y0) - (a * y)))
else
tmp = i * (z * ((c * t) - (k * y1)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (z <= -4.4e-47) {
tmp = y1 * (z * ((a * y3) - (i * k)));
} else if (z <= 8.5e+71) {
tmp = y3 * (y5 * ((j * y0) - (a * y)));
} else {
tmp = i * (z * ((c * t) - (k * y1)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if z <= -4.4e-47: tmp = y1 * (z * ((a * y3) - (i * k))) elif z <= 8.5e+71: tmp = y3 * (y5 * ((j * y0) - (a * y))) else: tmp = i * (z * ((c * t) - (k * y1))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (z <= -4.4e-47) tmp = Float64(y1 * Float64(z * Float64(Float64(a * y3) - Float64(i * k)))); elseif (z <= 8.5e+71) tmp = Float64(y3 * Float64(y5 * Float64(Float64(j * y0) - Float64(a * y)))); else tmp = Float64(i * Float64(z * Float64(Float64(c * t) - Float64(k * y1)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (z <= -4.4e-47) tmp = y1 * (z * ((a * y3) - (i * k))); elseif (z <= 8.5e+71) tmp = y3 * (y5 * ((j * y0) - (a * y))); else tmp = i * (z * ((c * t) - (k * y1))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[z, -4.4e-47], N[(y1 * N[(z * N[(N[(a * y3), $MachinePrecision] - N[(i * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+71], N[(y3 * N[(y5 * N[(N[(j * y0), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(z * N[(N[(c * t), $MachinePrecision] - N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{-47}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3 - i \cdot k\right)\right)\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+71}:\\
\;\;\;\;y3 \cdot \left(y5 \cdot \left(j \cdot y0 - a \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(z \cdot \left(c \cdot t - k \cdot y1\right)\right)\\
\end{array}
\end{array}
if z < -4.40000000000000037e-47Initial program 28.6%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites53.5%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6442.7
Applied rewrites42.7%
if -4.40000000000000037e-47 < z < 8.4999999999999996e71Initial program 34.0%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites47.6%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6430.8
Applied rewrites30.8%
if 8.4999999999999996e71 < z Initial program 24.0%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.2%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6448.6
Applied rewrites48.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= j -2.7e-17)
(* i (* y1 (- (* j x) (* k z))))
(if (<= j 3.9e+138)
(* i (* k (- (* y y5) (* y1 z))))
(* b (* y4 (* j 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 (j <= -2.7e-17) {
tmp = i * (y1 * ((j * x) - (k * z)));
} else if (j <= 3.9e+138) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else {
tmp = b * (y4 * (j * 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 (j <= (-2.7d-17)) then
tmp = i * (y1 * ((j * x) - (k * z)))
else if (j <= 3.9d+138) then
tmp = i * (k * ((y * y5) - (y1 * z)))
else
tmp = b * (y4 * (j * 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 (j <= -2.7e-17) {
tmp = i * (y1 * ((j * x) - (k * z)));
} else if (j <= 3.9e+138) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else {
tmp = b * (y4 * (j * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if j <= -2.7e-17: tmp = i * (y1 * ((j * x) - (k * z))) elif j <= 3.9e+138: tmp = i * (k * ((y * y5) - (y1 * z))) else: tmp = b * (y4 * (j * 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 (j <= -2.7e-17) tmp = Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z)))); elseif (j <= 3.9e+138) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); else tmp = Float64(b * Float64(y4 * Float64(j * 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 (j <= -2.7e-17) tmp = i * (y1 * ((j * x) - (k * z))); elseif (j <= 3.9e+138) tmp = i * (k * ((y * y5) - (y1 * z))); else tmp = b * (y4 * (j * 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[j, -2.7e-17], N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.9e+138], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(y4 * N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.7 \cdot 10^{-17}:\\
\;\;\;\;i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;j \leq 3.9 \cdot 10^{+138}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\
\end{array}
\end{array}
if j < -2.7000000000000001e-17Initial program 23.9%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites41.1%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6438.6
Applied rewrites38.6%
if -2.7000000000000001e-17 < j < 3.8999999999999998e138Initial program 35.6%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites39.5%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6432.0
Applied rewrites32.0%
if 3.8999999999999998e138 < j Initial program 22.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites28.7%
Taylor expanded in y4 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6442.7
Applied rewrites42.7%
Taylor expanded in y around 0
lift-*.f6439.9
Applied rewrites39.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<= j -5.5e+110)
(* (- i) (* j (* t y5)))
(if (<= j 3.9e+138)
(* i (* k (- (* y y5) (* y1 z))))
(* b (* y4 (* j 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 (j <= -5.5e+110) {
tmp = -i * (j * (t * y5));
} else if (j <= 3.9e+138) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else {
tmp = b * (y4 * (j * 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 (j <= (-5.5d+110)) then
tmp = -i * (j * (t * y5))
else if (j <= 3.9d+138) then
tmp = i * (k * ((y * y5) - (y1 * z)))
else
tmp = b * (y4 * (j * 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 (j <= -5.5e+110) {
tmp = -i * (j * (t * y5));
} else if (j <= 3.9e+138) {
tmp = i * (k * ((y * y5) - (y1 * z)));
} else {
tmp = b * (y4 * (j * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if j <= -5.5e+110: tmp = -i * (j * (t * y5)) elif j <= 3.9e+138: tmp = i * (k * ((y * y5) - (y1 * z))) else: tmp = b * (y4 * (j * 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 (j <= -5.5e+110) tmp = Float64(Float64(-i) * Float64(j * Float64(t * y5))); elseif (j <= 3.9e+138) tmp = Float64(i * Float64(k * Float64(Float64(y * y5) - Float64(y1 * z)))); else tmp = Float64(b * Float64(y4 * Float64(j * 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 (j <= -5.5e+110) tmp = -i * (j * (t * y5)); elseif (j <= 3.9e+138) tmp = i * (k * ((y * y5) - (y1 * z))); else tmp = b * (y4 * (j * 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[j, -5.5e+110], N[((-i) * N[(j * N[(t * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.9e+138], N[(i * N[(k * N[(N[(y * y5), $MachinePrecision] - N[(y1 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(y4 * N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -5.5 \cdot 10^{+110}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot \left(t \cdot y5\right)\right)\\
\mathbf{elif}\;j \leq 3.9 \cdot 10^{+138}:\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5 - y1 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\
\end{array}
\end{array}
if j < -5.49999999999999996e110Initial program 19.2%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites42.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6443.1
Applied rewrites43.1%
Taylor expanded in x around 0
lift-*.f6435.8
Applied rewrites35.8%
if -5.49999999999999996e110 < j < 3.8999999999999998e138Initial program 35.8%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites39.2%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6432.1
Applied rewrites32.1%
if 3.8999999999999998e138 < j Initial program 22.6%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites28.7%
Taylor expanded in y4 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6442.7
Applied rewrites42.7%
Taylor expanded in y around 0
lift-*.f6439.9
Applied rewrites39.9%
Final simplification33.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y1 (* a (* y3 z)))))
(if (<= z -8e-50)
t_1
(if (<= z 1.05e-132)
(* y2 (* y4 (* (- c) t)))
(if (<= z 1.65e+30) (* b (* y4 (* j t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y1 * (a * (y3 * z));
double tmp;
if (z <= -8e-50) {
tmp = t_1;
} else if (z <= 1.05e-132) {
tmp = y2 * (y4 * (-c * t));
} else if (z <= 1.65e+30) {
tmp = b * (y4 * (j * t));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = y1 * (a * (y3 * z))
if (z <= (-8d-50)) then
tmp = t_1
else if (z <= 1.05d-132) then
tmp = y2 * (y4 * (-c * t))
else if (z <= 1.65d+30) then
tmp = b * (y4 * (j * t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y1 * (a * (y3 * z));
double tmp;
if (z <= -8e-50) {
tmp = t_1;
} else if (z <= 1.05e-132) {
tmp = y2 * (y4 * (-c * t));
} else if (z <= 1.65e+30) {
tmp = b * (y4 * (j * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = y1 * (a * (y3 * z)) tmp = 0 if z <= -8e-50: tmp = t_1 elif z <= 1.05e-132: tmp = y2 * (y4 * (-c * t)) elif z <= 1.65e+30: tmp = b * (y4 * (j * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(y1 * Float64(a * Float64(y3 * z))) tmp = 0.0 if (z <= -8e-50) tmp = t_1; elseif (z <= 1.05e-132) tmp = Float64(y2 * Float64(y4 * Float64(Float64(-c) * t))); elseif (z <= 1.65e+30) tmp = Float64(b * Float64(y4 * Float64(j * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = y1 * (a * (y3 * z)); tmp = 0.0; if (z <= -8e-50) tmp = t_1; elseif (z <= 1.05e-132) tmp = y2 * (y4 * (-c * t)); elseif (z <= 1.65e+30) tmp = b * (y4 * (j * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e-50], t$95$1, If[LessEqual[z, 1.05e-132], N[(y2 * N[(y4 * N[((-c) * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+30], N[(b * N[(y4 * N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{-132}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(\left(-c\right) \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+30}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.00000000000000006e-50 or 1.65000000000000013e30 < z Initial program 27.7%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites49.1%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6432.6
Applied rewrites32.6%
if -8.00000000000000006e-50 < z < 1.05e-132Initial program 33.3%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites50.0%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6430.2
Applied rewrites30.2%
Taylor expanded in t around inf
lower-*.f64N/A
lift-*.f6426.0
Applied rewrites26.0%
if 1.05e-132 < z < 1.65000000000000013e30Initial program 34.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.4%
Taylor expanded in y4 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6438.8
Applied rewrites38.8%
Taylor expanded in y around 0
lift-*.f6435.9
Applied rewrites35.9%
Final simplification30.5%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y1 (* a (* y3 z)))))
(if (<= z -8e-50)
t_1
(if (<= z 4e-133)
(* y2 (* (- c) (* t y4)))
(if (<= z 1.65e+30) (* b (* y4 (* j t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y1 * (a * (y3 * z));
double tmp;
if (z <= -8e-50) {
tmp = t_1;
} else if (z <= 4e-133) {
tmp = y2 * (-c * (t * y4));
} else if (z <= 1.65e+30) {
tmp = b * (y4 * (j * t));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = y1 * (a * (y3 * z))
if (z <= (-8d-50)) then
tmp = t_1
else if (z <= 4d-133) then
tmp = y2 * (-c * (t * y4))
else if (z <= 1.65d+30) then
tmp = b * (y4 * (j * t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y1 * (a * (y3 * z));
double tmp;
if (z <= -8e-50) {
tmp = t_1;
} else if (z <= 4e-133) {
tmp = y2 * (-c * (t * y4));
} else if (z <= 1.65e+30) {
tmp = b * (y4 * (j * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = y1 * (a * (y3 * z)) tmp = 0 if z <= -8e-50: tmp = t_1 elif z <= 4e-133: tmp = y2 * (-c * (t * y4)) elif z <= 1.65e+30: tmp = b * (y4 * (j * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(y1 * Float64(a * Float64(y3 * z))) tmp = 0.0 if (z <= -8e-50) tmp = t_1; elseif (z <= 4e-133) tmp = Float64(y2 * Float64(Float64(-c) * Float64(t * y4))); elseif (z <= 1.65e+30) tmp = Float64(b * Float64(y4 * Float64(j * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = y1 * (a * (y3 * z)); tmp = 0.0; if (z <= -8e-50) tmp = t_1; elseif (z <= 4e-133) tmp = y2 * (-c * (t * y4)); elseif (z <= 1.65e+30) tmp = b * (y4 * (j * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e-50], t$95$1, If[LessEqual[z, 4e-133], N[(y2 * N[((-c) * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+30], N[(b * N[(y4 * N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{-50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-133}:\\
\;\;\;\;y2 \cdot \left(\left(-c\right) \cdot \left(t \cdot y4\right)\right)\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+30}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.00000000000000006e-50 or 1.65000000000000013e30 < z Initial program 27.7%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites49.1%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6440.2
Applied rewrites40.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6432.6
Applied rewrites32.6%
if -8.00000000000000006e-50 < z < 4.0000000000000003e-133Initial program 33.3%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites50.0%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6430.2
Applied rewrites30.2%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6424.0
Applied rewrites24.0%
if 4.0000000000000003e-133 < z < 1.65000000000000013e30Initial program 34.3%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites45.4%
Taylor expanded in y4 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6438.8
Applied rewrites38.8%
Taylor expanded in y around 0
lift-*.f6435.9
Applied rewrites35.9%
Final simplification29.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y1 (* a (* y3 z)))))
(if (<= z -9.2e+41)
t_1
(if (<= z -3e-226)
(* y2 (* k (* y1 y4)))
(if (<= z 1.65e+30) (* b (* y4 (* j t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y1 * (a * (y3 * z));
double tmp;
if (z <= -9.2e+41) {
tmp = t_1;
} else if (z <= -3e-226) {
tmp = y2 * (k * (y1 * y4));
} else if (z <= 1.65e+30) {
tmp = b * (y4 * (j * t));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = y1 * (a * (y3 * z))
if (z <= (-9.2d+41)) then
tmp = t_1
else if (z <= (-3d-226)) then
tmp = y2 * (k * (y1 * y4))
else if (z <= 1.65d+30) then
tmp = b * (y4 * (j * t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y1 * (a * (y3 * z));
double tmp;
if (z <= -9.2e+41) {
tmp = t_1;
} else if (z <= -3e-226) {
tmp = y2 * (k * (y1 * y4));
} else if (z <= 1.65e+30) {
tmp = b * (y4 * (j * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = y1 * (a * (y3 * z)) tmp = 0 if z <= -9.2e+41: tmp = t_1 elif z <= -3e-226: tmp = y2 * (k * (y1 * y4)) elif z <= 1.65e+30: tmp = b * (y4 * (j * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(y1 * Float64(a * Float64(y3 * z))) tmp = 0.0 if (z <= -9.2e+41) tmp = t_1; elseif (z <= -3e-226) tmp = Float64(y2 * Float64(k * Float64(y1 * y4))); elseif (z <= 1.65e+30) tmp = Float64(b * Float64(y4 * Float64(j * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = y1 * (a * (y3 * z)); tmp = 0.0; if (z <= -9.2e+41) tmp = t_1; elseif (z <= -3e-226) tmp = y2 * (k * (y1 * y4)); elseif (z <= 1.65e+30) tmp = b * (y4 * (j * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9.2e+41], t$95$1, If[LessEqual[z, -3e-226], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+30], N[(b * N[(y4 * N[(j * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3 \cdot 10^{-226}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+30}:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -9.1999999999999994e41 or 1.65000000000000013e30 < z Initial program 27.2%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites49.7%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.2
Applied rewrites41.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6434.1
Applied rewrites34.1%
if -9.1999999999999994e41 < z < -2.99999999999999995e-226Initial program 30.6%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites55.9%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6433.5
Applied rewrites33.5%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6426.7
Applied rewrites26.7%
if -2.99999999999999995e-226 < z < 1.65000000000000013e30Initial program 35.0%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites41.4%
Taylor expanded in y4 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6434.7
Applied rewrites34.7%
Taylor expanded in y around 0
lift-*.f6424.8
Applied rewrites24.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (or (<= z -6.8e+92) (not (<= z 3.4e+56))) (* y1 (* a (* y3 z))) (* b (* j (* t y4)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if ((z <= -6.8e+92) || !(z <= 3.4e+56)) {
tmp = y1 * (a * (y3 * z));
} else {
tmp = b * (j * (t * y4));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if ((z <= (-6.8d+92)) .or. (.not. (z <= 3.4d+56))) then
tmp = y1 * (a * (y3 * z))
else
tmp = b * (j * (t * y4))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if ((z <= -6.8e+92) || !(z <= 3.4e+56)) {
tmp = y1 * (a * (y3 * z));
} else {
tmp = b * (j * (t * y4));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if (z <= -6.8e+92) or not (z <= 3.4e+56): tmp = y1 * (a * (y3 * z)) else: tmp = b * (j * (t * y4)) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if ((z <= -6.8e+92) || !(z <= 3.4e+56)) tmp = Float64(y1 * Float64(a * Float64(y3 * z))); else tmp = Float64(b * Float64(j * Float64(t * y4))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if ((z <= -6.8e+92) || ~((z <= 3.4e+56))) tmp = y1 * (a * (y3 * z)); else tmp = b * (j * (t * y4)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[Or[LessEqual[z, -6.8e+92], N[Not[LessEqual[z, 3.4e+56]], $MachinePrecision]], N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(j * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+92} \lor \neg \left(z \leq 3.4 \cdot 10^{+56}\right):\\
\;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(j \cdot \left(t \cdot y4\right)\right)\\
\end{array}
\end{array}
if z < -6.7999999999999996e92 or 3.40000000000000001e56 < z Initial program 25.7%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites52.7%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6443.3
Applied rewrites43.3%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6436.4
Applied rewrites36.4%
if -6.7999999999999996e92 < z < 3.40000000000000001e56Initial program 33.7%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.4%
Taylor expanded in y4 around inf
lift-*.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift-*.f6432.4
Applied rewrites32.4%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6421.2
Applied rewrites21.2%
Final simplification27.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (or (<= z -9.2e+41) (not (<= z 1e+30))) (* y1 (* a (* y3 z))) (* 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 ((z <= -9.2e+41) || !(z <= 1e+30)) {
tmp = y1 * (a * (y3 * z));
} 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 ((z <= (-9.2d+41)) .or. (.not. (z <= 1d+30))) then
tmp = y1 * (a * (y3 * z))
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 ((z <= -9.2e+41) || !(z <= 1e+30)) {
tmp = y1 * (a * (y3 * z));
} 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 (z <= -9.2e+41) or not (z <= 1e+30): tmp = y1 * (a * (y3 * z)) 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 ((z <= -9.2e+41) || !(z <= 1e+30)) tmp = Float64(y1 * Float64(a * Float64(y3 * z))); 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 ((z <= -9.2e+41) || ~((z <= 1e+30))) tmp = y1 * (a * (y3 * z)); 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[Or[LessEqual[z, -9.2e+41], N[Not[LessEqual[z, 1e+30]], $MachinePrecision]], N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y1 * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+41} \lor \neg \left(z \leq 10^{+30}\right):\\
\;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\
\end{array}
\end{array}
if z < -9.1999999999999994e41 or 1e30 < z Initial program 27.2%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites49.7%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.2
Applied rewrites41.2%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6434.1
Applied rewrites34.1%
if -9.1999999999999994e41 < z < 1e30Initial program 33.3%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites48.4%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6429.4
Applied rewrites29.4%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6419.1
Applied rewrites19.1%
Final simplification25.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (or (<= y -2.15e+58) (not (<= y 3.05e+22))) (* i (* k (* y y5))) (* y1 (* z (* 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 ((y <= -2.15e+58) || !(y <= 3.05e+22)) {
tmp = i * (k * (y * y5));
} else {
tmp = y1 * (z * (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 ((y <= (-2.15d+58)) .or. (.not. (y <= 3.05d+22))) then
tmp = i * (k * (y * y5))
else
tmp = y1 * (z * (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 ((y <= -2.15e+58) || !(y <= 3.05e+22)) {
tmp = i * (k * (y * y5));
} else {
tmp = y1 * (z * (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 (y <= -2.15e+58) or not (y <= 3.05e+22): tmp = i * (k * (y * y5)) else: tmp = y1 * (z * (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 ((y <= -2.15e+58) || !(y <= 3.05e+22)) tmp = Float64(i * Float64(k * Float64(y * y5))); else tmp = Float64(y1 * Float64(z * 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 ((y <= -2.15e+58) || ~((y <= 3.05e+22))) tmp = i * (k * (y * y5)); else tmp = y1 * (z * (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[Or[LessEqual[y, -2.15e+58], N[Not[LessEqual[y, 3.05e+22]], $MachinePrecision]], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(z * N[(a * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+58} \lor \neg \left(y \leq 3.05 \cdot 10^{+22}\right):\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(z \cdot \left(a \cdot y3\right)\right)\\
\end{array}
\end{array}
if y < -2.14999999999999996e58 or 3.0499999999999999e22 < y Initial program 25.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.4%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6432.8
Applied rewrites32.8%
Taylor expanded in y around inf
lift-*.f6428.4
Applied rewrites28.4%
if -2.14999999999999996e58 < y < 3.0499999999999999e22Initial program 34.7%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.9%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6431.8
Applied rewrites31.8%
Taylor expanded in a around inf
lift-*.f6422.5
Applied rewrites22.5%
Final simplification25.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (or (<= y -2.15e+58) (not (<= y 3.05e+22))) (* i (* k (* y y5))) (* y1 (* a (* y3 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 ((y <= -2.15e+58) || !(y <= 3.05e+22)) {
tmp = i * (k * (y * y5));
} else {
tmp = y1 * (a * (y3 * z));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if ((y <= (-2.15d+58)) .or. (.not. (y <= 3.05d+22))) then
tmp = i * (k * (y * y5))
else
tmp = y1 * (a * (y3 * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if ((y <= -2.15e+58) || !(y <= 3.05e+22)) {
tmp = i * (k * (y * y5));
} else {
tmp = y1 * (a * (y3 * z));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if (y <= -2.15e+58) or not (y <= 3.05e+22): tmp = i * (k * (y * y5)) else: tmp = y1 * (a * (y3 * 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 ((y <= -2.15e+58) || !(y <= 3.05e+22)) tmp = Float64(i * Float64(k * Float64(y * y5))); else tmp = Float64(y1 * Float64(a * Float64(y3 * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if ((y <= -2.15e+58) || ~((y <= 3.05e+22))) tmp = i * (k * (y * y5)); else tmp = y1 * (a * (y3 * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[Or[LessEqual[y, -2.15e+58], N[Not[LessEqual[y, 3.05e+22]], $MachinePrecision]], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y1 * N[(a * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+58} \lor \neg \left(y \leq 3.05 \cdot 10^{+22}\right):\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y1 \cdot \left(a \cdot \left(y3 \cdot z\right)\right)\\
\end{array}
\end{array}
if y < -2.14999999999999996e58 or 3.0499999999999999e22 < y Initial program 25.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.4%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6432.8
Applied rewrites32.8%
Taylor expanded in y around inf
lift-*.f6428.4
Applied rewrites28.4%
if -2.14999999999999996e58 < y < 3.0499999999999999e22Initial program 34.7%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.9%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6431.8
Applied rewrites31.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6422.4
Applied rewrites22.4%
Final simplification25.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (if (or (<= y -5.5e+57) (not (<= y 3.05e+22))) (* i (* k (* y y5))) (* a (* y1 (* y3 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 ((y <= -5.5e+57) || !(y <= 3.05e+22)) {
tmp = i * (k * (y * y5));
} else {
tmp = a * (y1 * (y3 * z));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if ((y <= (-5.5d+57)) .or. (.not. (y <= 3.05d+22))) then
tmp = i * (k * (y * y5))
else
tmp = a * (y1 * (y3 * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if ((y <= -5.5e+57) || !(y <= 3.05e+22)) {
tmp = i * (k * (y * y5));
} else {
tmp = a * (y1 * (y3 * z));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if (y <= -5.5e+57) or not (y <= 3.05e+22): tmp = i * (k * (y * y5)) else: tmp = a * (y1 * (y3 * 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 ((y <= -5.5e+57) || !(y <= 3.05e+22)) tmp = Float64(i * Float64(k * Float64(y * y5))); else tmp = Float64(a * Float64(y1 * Float64(y3 * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if ((y <= -5.5e+57) || ~((y <= 3.05e+22))) tmp = i * (k * (y * y5)); else tmp = a * (y1 * (y3 * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[Or[LessEqual[y, -5.5e+57], N[Not[LessEqual[y, 3.05e+22]], $MachinePrecision]], N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(y1 * N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+57} \lor \neg \left(y \leq 3.05 \cdot 10^{+22}\right):\\
\;\;\;\;i \cdot \left(k \cdot \left(y \cdot y5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(y1 \cdot \left(y3 \cdot z\right)\right)\\
\end{array}
\end{array}
if y < -5.5000000000000002e57 or 3.0499999999999999e22 < y Initial program 25.0%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.4%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6432.8
Applied rewrites32.8%
Taylor expanded in y around inf
lift-*.f6428.4
Applied rewrites28.4%
if -5.5000000000000002e57 < y < 3.0499999999999999e22Initial program 34.7%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites40.9%
Taylor expanded in y1 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6431.8
Applied rewrites31.8%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6421.2
Applied rewrites21.2%
Final simplification24.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* i (* k (* y y5))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return i * (k * (y * y5));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = i * (k * (y * y5))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return i * (k * (y * y5));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return i * (k * (y * y5))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(i * Float64(k * Float64(y * y5))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = i * (k * (y * y5)); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(i * N[(k * N[(y * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
i \cdot \left(k \cdot \left(y \cdot y5\right)\right)
\end{array}
Initial program 30.6%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in k around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.5
Applied rewrites26.5%
Taylor expanded in y around inf
lift-*.f6416.2
Applied rewrites16.2%
herbie shell --seed 2025085
(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
:alt
(! :herbie-platform default (if (< y4 -7206256231996481000000000000000000000000000000000000000000000) (- (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))))) (- (/ (- (* y2 t) (* y3 y)) (/ 1 (- (* y4 c) (* y5 a)))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (if (< y4 -3364603505246317/1000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* t c) (* i z)) (* (* a t) (* b z))) (* (* y c) (* i x))) (* (- (* b y0) (* i y1)) (- (* j x) (* k z)))) (- (* (- (* y0 c) (* a y1)) (- (* x y2) (* z y3))) (- (* (- (* t y2) (* y y3)) (- (* y4 c) (* a y5))) (* (- (* y1 y4) (* y5 y0)) (- (* k y2) (* j y3)))))) (if (< y4 -3000016263921529/2500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (+ (- (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))) (* (* y3 y) (- (* y5 a) (* y4 c)))) (+ (* (* y5 a) (* t y2)) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* x y2) (* z y3)) (- (* c y0) (* a y1))) (- (* (- (* b y0) (* i y1)) (- (* j x) (* k z))) (* (- (* y x) (* z t)) (- (* b a) (* i c)))))) (if (< y4 1343792624811499/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* k y) (* y5 i)) (* (* y b) (* y4 k))) (* (* y5 t) (* i j))) (- (* (- (* y2 t) (* y3 y)) (- (* y4 c) (* y5 a))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* y2 x) (* y3 z)) (- (* c y0) (* y1 a)))))) (if (< y4 29872667587737/6250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (+ (- (* (- (* j t) (* k y)) (- (* y4 b) (* y5 i))) (* (* y3 y) (- (* y5 a) (* y4 c)))) (+ (* (* y5 a) (* t y2)) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* x y2) (* z y3)) (- (* c y0) (* a y1))) (- (* (- (* b y0) (* i y1)) (- (* j x) (* k z))) (* (- (* y x) (* z t)) (- (* b a) (* i c)))))) (if (< y4 4570448308253367/20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (- (- (* (* k y) (* y5 i)) (* (* y b) (* y4 k))) (* (* y5 t) (* i j))) (- (* (- (* y2 t) (* y3 y)) (- (* y4 c) (* y5 a))) (* (- (* y2 k) (* y3 j)) (- (* y4 y1) (* y5 y0))))) (- (* (- (* b a) (* i c)) (- (* y x) (* t z))) (- (* (- (* j x) (* k z)) (- (* y0 b) (* i y1))) (* (- (* y2 x) (* y3 z)) (- (* c y0) (* y1 a)))))) (+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (- (* k (* i (* z y1))) (+ (* j (* i (* x y1))) (* y0 (* k (* z b)))))) (- (* z (* y3 (* a y1))) (+ (* y2 (* x (* a y1))) (* y0 (* z (* c y3)))))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))))))))
(+ (- (+ (+ (- (* (- (* 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)))))