
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)
Herbie found 42 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) (- (* a b) (* c i)))
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * Float64(Float64(a * b) - Float64(c * i))) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a)))) + Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i)))) - Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a)))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = (((((((x * y) - (z * t)) * ((a * b) - (c * i))) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot \left(a \cdot b - c \cdot i\right) - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
(t_2 (- (* a b) (* c i)))
(t_3
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) t_2)
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
(* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
t_1)))
(if (<= t_3 INFINITY) t_3 (+ (* -1 (* t (* z t_2))) t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double t_2 = (a * b) - (c * i);
double t_3 = (((((((x * y) - (z * t)) * t_2) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + t_1;
double tmp;
if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = (-1.0 * (t * (z * t_2))) + t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double t_2 = (a * b) - (c * i);
double t_3 = (((((((x * y) - (z * t)) * t_2) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + t_1;
double tmp;
if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = (-1.0 * (t * (z * t_2))) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)) t_2 = (a * b) - (c * i) t_3 = (((((((x * y) - (z * t)) * t_2) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + t_1 tmp = 0 if t_3 <= math.inf: tmp = t_3 else: tmp = (-1.0 * (t * (z * t_2))) + t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) t_2 = Float64(Float64(a * b) - Float64(c * i)) t_3 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * t_2) - 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)))) + t_1) tmp = 0.0 if (t_3 <= Inf) tmp = t_3; else tmp = Float64(Float64(-1.0 * Float64(t * Float64(z * t_2))) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)); t_2 = (a * b) - (c * i); t_3 = (((((((x * y) - (z * t)) * t_2) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + (((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)))) + (((t * j) - (y * k)) * ((y4 * b) - (y5 * i)))) - (((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)))) + t_1; tmp = 0.0; if (t_3 <= Inf) tmp = t_3; else tmp = (-1.0 * (t * (z * t_2))) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * t$95$2), $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] + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, Infinity], t$95$3, N[(N[(-1 * N[(t * N[(z * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
t_2 := a \cdot b - c \cdot i\\
t_3 := \left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot t\_2 - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\right) + \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\right) - \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\right) + t\_1\\
\mathbf{if}\;t\_3 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot t\_2\right)\right) + t\_1\\
\end{array}
if (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) < +inf.0Initial program 30.1%
if +inf.0 < (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.6%
Applied rewrites41.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* k y2) (* j y3))) (t_2 (- (* j t) (* k y))))
(if (<=
y4
-8500000000000000757884889654178177794047522530015745844116099963310943954472769886842428117937801507512764288944792928375747102317752152278551394192736733102080)
(* y4 (- (+ (* b t_2) (* y1 t_1)) (* c (- (* t y2) (* y y3)))))
(if (<=
y4
-6428395225932623/24258095192198577111702804507226602425888844017448384549047688094157046135724638848919975137947601217976370792142673018846430938189293974866316988672518455300069609000325779774222895087993725700394734362401819824232700732090875904)
(*
x
(-
(+ (* y (- (* a b) (* c i))) (* y2 (- (* c y0) (* a y1))))
(* j (- (* b y0) (* i y1)))))
(if (<= y4 4381000474388761/81129638414606681695789005144064)
(*
-1
(*
i
(-
(+ (* c (- (* x y) (* t z))) (* y5 t_2))
(* y1 (- (* j x) (* k z))))))
(if (<=
y4
12000000000000000877342586199058230853393914428450460840506851493293349066853514222504360921726288952011328255996371575040188334992629165360465628990341692685271669126513310168027495389342559053777346181820579840)
(+
(* j (* t (- (* b y4) (* i y5))))
(* t_1 (- (* y4 y1) (* y5 y0))))
(* k (* y4 (* y2 (+ y1 (* -1 (/ (* b y) y2))))))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (k * y2) - (j * y3);
double t_2 = (j * t) - (k * y);
double tmp;
if (y4 <= -8.5e+159) {
tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))));
} else if (y4 <= -2.65e-214) {
tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
} else if (y4 <= 5.4e-17) {
tmp = -1.0 * (i * (((c * ((x * y) - (t * z))) + (y5 * t_2)) - (y1 * ((j * x) - (k * z)))));
} else if (y4 <= 1.2e+211) {
tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
} else {
tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2)))));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (k * y2) - (j * y3)
t_2 = (j * t) - (k * y)
if (y4 <= (-8.5d+159)) then
tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))))
else if (y4 <= (-2.65d-214)) then
tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))))
else if (y4 <= 5.4d-17) then
tmp = (-1.0d0) * (i * (((c * ((x * y) - (t * z))) + (y5 * t_2)) - (y1 * ((j * x) - (k * z)))))
else if (y4 <= 1.2d+211) then
tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)))
else
tmp = k * (y4 * (y2 * (y1 + ((-1.0d0) * ((b * y) / y2)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (k * y2) - (j * y3);
double t_2 = (j * t) - (k * y);
double tmp;
if (y4 <= -8.5e+159) {
tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))));
} else if (y4 <= -2.65e-214) {
tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
} else if (y4 <= 5.4e-17) {
tmp = -1.0 * (i * (((c * ((x * y) - (t * z))) + (y5 * t_2)) - (y1 * ((j * x) - (k * z)))));
} else if (y4 <= 1.2e+211) {
tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
} else {
tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2)))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (k * y2) - (j * y3) t_2 = (j * t) - (k * y) tmp = 0 if y4 <= -8.5e+159: tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * ((t * y2) - (y * y3)))) elif y4 <= -2.65e-214: tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1)))) elif y4 <= 5.4e-17: tmp = -1.0 * (i * (((c * ((x * y) - (t * z))) + (y5 * t_2)) - (y1 * ((j * x) - (k * z))))) elif y4 <= 1.2e+211: tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0))) else: tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2))))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(k * y2) - Float64(j * y3)) t_2 = Float64(Float64(j * t) - Float64(k * y)) tmp = 0.0 if (y4 <= -8.5e+159) tmp = Float64(y4 * Float64(Float64(Float64(b * t_2) + Float64(y1 * t_1)) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); elseif (y4 <= -2.65e-214) tmp = Float64(x * Float64(Float64(Float64(y * Float64(Float64(a * b) - Float64(c * i))) + Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); elseif (y4 <= 5.4e-17) tmp = Float64(-1.0 * Float64(i * Float64(Float64(Float64(c * Float64(Float64(x * y) - Float64(t * z))) + Float64(y5 * t_2)) - Float64(y1 * Float64(Float64(j * x) - Float64(k * z)))))); elseif (y4 <= 1.2e+211) tmp = Float64(Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) + Float64(t_1 * Float64(Float64(y4 * y1) - Float64(y5 * y0)))); else tmp = Float64(k * Float64(y4 * Float64(y2 * Float64(y1 + Float64(-1.0 * Float64(Float64(b * y) / y2)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (k * y2) - (j * y3); t_2 = (j * t) - (k * y); tmp = 0.0; if (y4 <= -8.5e+159) tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * ((t * y2) - (y * y3)))); elseif (y4 <= -2.65e-214) tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1)))); elseif (y4 <= 5.4e-17) tmp = -1.0 * (i * (((c * ((x * y) - (t * z))) + (y5 * t_2)) - (y1 * ((j * x) - (k * z))))); elseif (y4 <= 1.2e+211) tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0))); else tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -8500000000000000757884889654178177794047522530015745844116099963310943954472769886842428117937801507512764288944792928375747102317752152278551394192736733102080], N[(y4 * N[(N[(N[(b * t$95$2), $MachinePrecision] + N[(y1 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -6428395225932623/24258095192198577111702804507226602425888844017448384549047688094157046135724638848919975137947601217976370792142673018846430938189293974866316988672518455300069609000325779774222895087993725700394734362401819824232700732090875904], N[(x * N[(N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 4381000474388761/81129638414606681695789005144064], N[(-1 * N[(i * N[(N[(N[(c * N[(N[(x * y), $MachinePrecision] - N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y5 * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 12000000000000000877342586199058230853393914428450460840506851493293349066853514222504360921726288952011328255996371575040188334992629165360465628990341692685271669126513310168027495389342559053777346181820579840], N[(N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(k * N[(y4 * N[(y2 * N[(y1 + N[(-1 * N[(N[(b * y), $MachinePrecision] / y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
t_2 := j \cdot t - k \cdot y\\
\mathbf{if}\;y4 \leq -8500000000000000757884889654178177794047522530015745844116099963310943954472769886842428117937801507512764288944792928375747102317752152278551394192736733102080:\\
\;\;\;\;y4 \cdot \left(\left(b \cdot t\_2 + y1 \cdot t\_1\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{elif}\;y4 \leq \frac{-6428395225932623}{24258095192198577111702804507226602425888844017448384549047688094157046135724638848919975137947601217976370792142673018846430938189293974866316988672518455300069609000325779774222895087993725700394734362401819824232700732090875904}:\\
\;\;\;\;x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\mathbf{elif}\;y4 \leq \frac{4381000474388761}{81129638414606681695789005144064}:\\
\;\;\;\;-1 \cdot \left(i \cdot \left(\left(c \cdot \left(x \cdot y - t \cdot z\right) + y5 \cdot t\_2\right) - y1 \cdot \left(j \cdot x - k \cdot z\right)\right)\right)\\
\mathbf{elif}\;y4 \leq 12000000000000000877342586199058230853393914428450460840506851493293349066853514222504360921726288952011328255996371575040188334992629165360465628990341692685271669126513310168027495389342559053777346181820579840:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(y4 \cdot \left(y2 \cdot \left(y1 + -1 \cdot \frac{b \cdot y}{y2}\right)\right)\right)\\
\end{array}
if y4 < -8.5000000000000008e159Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
if -8.5000000000000008e159 < y4 < -2.65e-214Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
if -2.65e-214 < y4 < 5.4000000000000002e-17Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in i around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.7%
if 5.4000000000000002e-17 < y4 < 1.2000000000000001e211Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.6%
Applied rewrites41.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6436.9%
Applied rewrites36.9%
if 1.2000000000000001e211 < y4 Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6428.7%
Applied rewrites28.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a))))
(t_2 (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a))))
(t_3 (- (* a b) (* c i)))
(t_4 (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i))))
(t_5 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))
(if (<=
(+
(-
(+
(+
(-
(* (- (* x y) (* z t)) t_3)
(* (- (* x j) (* z k)) (- (* y0 b) (* y1 i))))
t_1)
t_4)
t_2)
t_5)
INFINITY)
(+ (- (+ (+ (* i (* y1 (- (* j x) (* k z)))) t_1) t_4) t_2) t_5)
(+ (* -1 (* t (* z t_3))) t_5))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = ((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a));
double t_2 = ((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a));
double t_3 = (a * b) - (c * i);
double t_4 = ((t * j) - (y * k)) * ((y4 * b) - (y5 * i));
double t_5 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (((((((((x * y) - (z * t)) * t_3) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + t_1) + t_4) - t_2) + t_5) <= ((double) INFINITY)) {
tmp = ((((i * (y1 * ((j * x) - (k * z)))) + t_1) + t_4) - t_2) + t_5;
} else {
tmp = (-1.0 * (t * (z * t_3))) + t_5;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = ((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a));
double t_2 = ((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a));
double t_3 = (a * b) - (c * i);
double t_4 = ((t * j) - (y * k)) * ((y4 * b) - (y5 * i));
double t_5 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double tmp;
if (((((((((x * y) - (z * t)) * t_3) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + t_1) + t_4) - t_2) + t_5) <= Double.POSITIVE_INFINITY) {
tmp = ((((i * (y1 * ((j * x) - (k * z)))) + t_1) + t_4) - t_2) + t_5;
} else {
tmp = (-1.0 * (t * (z * t_3))) + t_5;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = ((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)) t_2 = ((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)) t_3 = (a * b) - (c * i) t_4 = ((t * j) - (y * k)) * ((y4 * b) - (y5 * i)) t_5 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)) tmp = 0 if ((((((((x * y) - (z * t)) * t_3) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + t_1) + t_4) - t_2) + t_5) <= math.inf: tmp = ((((i * (y1 * ((j * x) - (k * z)))) + t_1) + t_4) - t_2) + t_5 else: tmp = (-1.0 * (t * (z * t_3))) + t_5 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(Float64(x * y2) - Float64(z * y3)) * Float64(Float64(y0 * c) - Float64(y1 * a))) t_2 = Float64(Float64(Float64(t * y2) - Float64(y * y3)) * Float64(Float64(y4 * c) - Float64(y5 * a))) t_3 = Float64(Float64(a * b) - Float64(c * i)) t_4 = Float64(Float64(Float64(t * j) - Float64(y * k)) * Float64(Float64(y4 * b) - Float64(y5 * i))) t_5 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) - Float64(z * t)) * t_3) - Float64(Float64(Float64(x * j) - Float64(z * k)) * Float64(Float64(y0 * b) - Float64(y1 * i)))) + t_1) + t_4) - t_2) + t_5) <= Inf) tmp = Float64(Float64(Float64(Float64(Float64(i * Float64(y1 * Float64(Float64(j * x) - Float64(k * z)))) + t_1) + t_4) - t_2) + t_5); else tmp = Float64(Float64(-1.0 * Float64(t * Float64(z * t_3))) + t_5); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = ((x * y2) - (z * y3)) * ((y0 * c) - (y1 * a)); t_2 = ((t * y2) - (y * y3)) * ((y4 * c) - (y5 * a)); t_3 = (a * b) - (c * i); t_4 = ((t * j) - (y * k)) * ((y4 * b) - (y5 * i)); t_5 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)); tmp = 0.0; if (((((((((x * y) - (z * t)) * t_3) - (((x * j) - (z * k)) * ((y0 * b) - (y1 * i)))) + t_1) + t_4) - t_2) + t_5) <= Inf) tmp = ((((i * (y1 * ((j * x) - (k * z)))) + t_1) + t_4) - t_2) + t_5; else tmp = (-1.0 * (t * (z * t_3))) + t_5; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[(x * y2), $MachinePrecision] - N[(z * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * c), $MachinePrecision] - N[(y1 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * c), $MachinePrecision] - N[(y5 * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t * j), $MachinePrecision] - N[(y * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * b), $MachinePrecision] - N[(y5 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] - N[(z * t), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision] - N[(N[(N[(x * j), $MachinePrecision] - N[(z * k), $MachinePrecision]), $MachinePrecision] * N[(N[(y0 * b), $MachinePrecision] - N[(y1 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$4), $MachinePrecision] - t$95$2), $MachinePrecision] + t$95$5), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(i * N[(y1 * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$4), $MachinePrecision] - t$95$2), $MachinePrecision] + t$95$5), $MachinePrecision], N[(N[(-1 * N[(t * N[(z * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$5), $MachinePrecision]]]]]]]
\begin{array}{l}
t_1 := \left(x \cdot y2 - z \cdot y3\right) \cdot \left(y0 \cdot c - y1 \cdot a\right)\\
t_2 := \left(t \cdot y2 - y \cdot y3\right) \cdot \left(y4 \cdot c - y5 \cdot a\right)\\
t_3 := a \cdot b - c \cdot i\\
t_4 := \left(t \cdot j - y \cdot k\right) \cdot \left(y4 \cdot b - y5 \cdot i\right)\\
t_5 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;\left(\left(\left(\left(\left(x \cdot y - z \cdot t\right) \cdot t\_3 - \left(x \cdot j - z \cdot k\right) \cdot \left(y0 \cdot b - y1 \cdot i\right)\right) + t\_1\right) + t\_4\right) - t\_2\right) + t\_5 \leq \infty:\\
\;\;\;\;\left(\left(\left(i \cdot \left(y1 \cdot \left(j \cdot x - k \cdot z\right)\right) + t\_1\right) + t\_4\right) - t\_2\right) + t\_5\\
\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot t\_3\right)\right) + t\_5\\
\end{array}
if (+.f64 (-.f64 (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 (*.f64 x y) (*.f64 z t)) (-.f64 (*.f64 a b) (*.f64 c i))) (*.f64 (-.f64 (*.f64 x j) (*.f64 z k)) (-.f64 (*.f64 y0 b) (*.f64 y1 i)))) (*.f64 (-.f64 (*.f64 x y2) (*.f64 z y3)) (-.f64 (*.f64 y0 c) (*.f64 y1 a)))) (*.f64 (-.f64 (*.f64 t j) (*.f64 y k)) (-.f64 (*.f64 y4 b) (*.f64 y5 i)))) (*.f64 (-.f64 (*.f64 t y2) (*.f64 y y3)) (-.f64 (*.f64 y4 c) (*.f64 y5 a)))) (*.f64 (-.f64 (*.f64 k y2) (*.f64 j y3)) (-.f64 (*.f64 y4 y1) (*.f64 y5 y0)))) < +inf.0Initial program 30.1%
Taylor expanded in y1 around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6432.3%
Applied rewrites32.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 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.6%
Applied rewrites41.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* k y2) (* j y3)))
(t_2 (- (* j t) (* k y)))
(t_3 (- (* t y2) (* y y3)))
(t_4 (* -1 (* y5 (- (+ (* i t_2) (* y0 t_1)) (* a t_3))))))
(if (<=
y5
-38000000000000000617485884169594647498980675873906489559217761156694042813260640633937655810704639545783262256753138021172900109288301203236382351306160846345871453940582900357319558396532141902448820224)
t_4
(if (<=
y5
-5265614583427859/3291009114642412084309938365114701009965471731267159726697218048)
(+
(* j (* t (- (* b y4) (* i y5))))
(* t_1 (- (* y4 y1) (* y5 y0))))
(if (<=
y5
48000000000000002317473887049059322983701406565752475984875843518901243107867756883028084096279511040)
(* y4 (- (+ (* b t_2) (* y1 t_1)) (* c t_3)))
t_4)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (k * y2) - (j * y3);
double t_2 = (j * t) - (k * y);
double t_3 = (t * y2) - (y * y3);
double t_4 = -1.0 * (y5 * (((i * t_2) + (y0 * t_1)) - (a * t_3)));
double tmp;
if (y5 <= -3.8e+202) {
tmp = t_4;
} else if (y5 <= -1.6e-48) {
tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
} else if (y5 <= 4.8e+100) {
tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * t_3));
} else {
tmp = t_4;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (k * y2) - (j * y3)
t_2 = (j * t) - (k * y)
t_3 = (t * y2) - (y * y3)
t_4 = (-1.0d0) * (y5 * (((i * t_2) + (y0 * t_1)) - (a * t_3)))
if (y5 <= (-3.8d+202)) then
tmp = t_4
else if (y5 <= (-1.6d-48)) then
tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)))
else if (y5 <= 4.8d+100) then
tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * t_3))
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = (k * y2) - (j * y3);
double t_2 = (j * t) - (k * y);
double t_3 = (t * y2) - (y * y3);
double t_4 = -1.0 * (y5 * (((i * t_2) + (y0 * t_1)) - (a * t_3)));
double tmp;
if (y5 <= -3.8e+202) {
tmp = t_4;
} else if (y5 <= -1.6e-48) {
tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
} else if (y5 <= 4.8e+100) {
tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * t_3));
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (k * y2) - (j * y3) t_2 = (j * t) - (k * y) t_3 = (t * y2) - (y * y3) t_4 = -1.0 * (y5 * (((i * t_2) + (y0 * t_1)) - (a * t_3))) tmp = 0 if y5 <= -3.8e+202: tmp = t_4 elif y5 <= -1.6e-48: tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0))) elif y5 <= 4.8e+100: tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * t_3)) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(k * y2) - Float64(j * y3)) t_2 = Float64(Float64(j * t) - Float64(k * y)) t_3 = Float64(Float64(t * y2) - Float64(y * y3)) t_4 = Float64(-1.0 * Float64(y5 * Float64(Float64(Float64(i * t_2) + Float64(y0 * t_1)) - Float64(a * t_3)))) tmp = 0.0 if (y5 <= -3.8e+202) tmp = t_4; elseif (y5 <= -1.6e-48) tmp = Float64(Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) + Float64(t_1 * Float64(Float64(y4 * y1) - Float64(y5 * y0)))); elseif (y5 <= 4.8e+100) tmp = Float64(y4 * Float64(Float64(Float64(b * t_2) + Float64(y1 * t_1)) - Float64(c * t_3))); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (k * y2) - (j * y3); t_2 = (j * t) - (k * y); t_3 = (t * y2) - (y * y3); t_4 = -1.0 * (y5 * (((i * t_2) + (y0 * t_1)) - (a * t_3))); tmp = 0.0; if (y5 <= -3.8e+202) tmp = t_4; elseif (y5 <= -1.6e-48) tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0))); elseif (y5 <= 4.8e+100) tmp = y4 * (((b * t_2) + (y1 * t_1)) - (c * t_3)); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(-1 * N[(y5 * N[(N[(N[(i * t$95$2), $MachinePrecision] + N[(y0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(a * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -38000000000000000617485884169594647498980675873906489559217761156694042813260640633937655810704639545783262256753138021172900109288301203236382351306160846345871453940582900357319558396532141902448820224], t$95$4, If[LessEqual[y5, -5265614583427859/3291009114642412084309938365114701009965471731267159726697218048], N[(N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 48000000000000002317473887049059322983701406565752475984875843518901243107867756883028084096279511040], N[(y4 * N[(N[(N[(b * t$95$2), $MachinePrecision] + N[(y1 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(c * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
t_2 := j \cdot t - k \cdot y\\
t_3 := t \cdot y2 - y \cdot y3\\
t_4 := -1 \cdot \left(y5 \cdot \left(\left(i \cdot t\_2 + y0 \cdot t\_1\right) - a \cdot t\_3\right)\right)\\
\mathbf{if}\;y5 \leq -38000000000000000617485884169594647498980675873906489559217761156694042813260640633937655810704639545783262256753138021172900109288301203236382351306160846345871453940582900357319558396532141902448820224:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y5 \leq \frac{-5265614583427859}{3291009114642412084309938365114701009965471731267159726697218048}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{elif}\;y5 \leq 48000000000000002317473887049059322983701406565752475984875843518901243107867756883028084096279511040:\\
\;\;\;\;y4 \cdot \left(\left(b \cdot t\_2 + y1 \cdot t\_1\right) - c \cdot t\_3\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
if y5 < -3.8000000000000001e202 or 4.8000000000000002e100 < y5 Initial program 30.1%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.2%
if -3.8000000000000001e202 < y5 < -1.5999999999999999e-48Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.6%
Applied rewrites41.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6436.9%
Applied rewrites36.9%
if -1.5999999999999999e-48 < y5 < 4.8000000000000002e100Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
(t_2 (- (* a b) (* c i))))
(if (<=
x
-6499999999999999823809460945688469666925113212764529240120263062846011604992)
(+ (* t (* c (- (* i z) (* y2 y4)))) t_1)
(if (<=
x
2087487115172669/9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824)
(+ (* t (* -1 (* y5 (- (* i j) (* a y2))))) t_1)
(if (<=
x
8631010391913655/6393341031047152089869511126616404594173128996177860916959553453312761321102879990006386899074031556935325554936640763689877454191182408307282280448)
(*
y0
(-
(* y3 (+ (* -1 (* c z)) (* j y5)))
(* b (* x (+ j (* -1 (/ (* k z) x)))))))
(if (<=
x
185000000000000009379699471036228158875872544002408448)
(+ (* -1 (* t (* z t_2))) t_1)
(*
x
(-
(+ (* y t_2) (* 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 t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double t_2 = (a * b) - (c * i);
double tmp;
if (x <= -6.5e+75) {
tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1;
} else if (x <= 2.3e-265) {
tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1;
} else if (x <= 1.35e-132) {
tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * (x * (j + (-1.0 * ((k * z) / x))))));
} else if (x <= 1.85e+53) {
tmp = (-1.0 * (t * (z * t_2))) + t_1;
} else {
tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
t_2 = (a * b) - (c * i)
if (x <= (-6.5d+75)) then
tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1
else if (x <= 2.3d-265) then
tmp = (t * ((-1.0d0) * (y5 * ((i * j) - (a * y2))))) + t_1
else if (x <= 1.35d-132) then
tmp = y0 * ((y3 * (((-1.0d0) * (c * z)) + (j * y5))) - (b * (x * (j + ((-1.0d0) * ((k * z) / x))))))
else if (x <= 1.85d+53) then
tmp = ((-1.0d0) * (t * (z * t_2))) + t_1
else
tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * 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 t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double t_2 = (a * b) - (c * i);
double tmp;
if (x <= -6.5e+75) {
tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1;
} else if (x <= 2.3e-265) {
tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1;
} else if (x <= 1.35e-132) {
tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * (x * (j + (-1.0 * ((k * z) / x))))));
} else if (x <= 1.85e+53) {
tmp = (-1.0 * (t * (z * t_2))) + t_1;
} else {
tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)) t_2 = (a * b) - (c * i) tmp = 0 if x <= -6.5e+75: tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1 elif x <= 2.3e-265: tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1 elif x <= 1.35e-132: tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * (x * (j + (-1.0 * ((k * z) / x)))))) elif x <= 1.85e+53: tmp = (-1.0 * (t * (z * t_2))) + t_1 else: tmp = x * (((y * t_2) + (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) t_1 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) t_2 = Float64(Float64(a * b) - Float64(c * i)) tmp = 0.0 if (x <= -6.5e+75) tmp = Float64(Float64(t * Float64(c * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_1); elseif (x <= 2.3e-265) tmp = Float64(Float64(t * Float64(-1.0 * Float64(y5 * Float64(Float64(i * j) - Float64(a * y2))))) + t_1); elseif (x <= 1.35e-132) tmp = Float64(y0 * Float64(Float64(y3 * Float64(Float64(-1.0 * Float64(c * z)) + Float64(j * y5))) - Float64(b * Float64(x * Float64(j + Float64(-1.0 * Float64(Float64(k * z) / x))))))); elseif (x <= 1.85e+53) tmp = Float64(Float64(-1.0 * Float64(t * Float64(z * t_2))) + t_1); else tmp = Float64(x * Float64(Float64(Float64(y * t_2) + Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)); t_2 = (a * b) - (c * i); tmp = 0.0; if (x <= -6.5e+75) tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1; elseif (x <= 2.3e-265) tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1; elseif (x <= 1.35e-132) tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * (x * (j + (-1.0 * ((k * z) / x)))))); elseif (x <= 1.85e+53) tmp = (-1.0 * (t * (z * t_2))) + t_1; else tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6499999999999999823809460945688469666925113212764529240120263062846011604992], N[(N[(t * N[(c * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 2087487115172669/9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824], N[(N[(t * N[(-1 * N[(y5 * N[(N[(i * j), $MachinePrecision] - N[(a * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 8631010391913655/6393341031047152089869511126616404594173128996177860916959553453312761321102879990006386899074031556935325554936640763689877454191182408307282280448], N[(y0 * N[(N[(y3 * N[(N[(-1 * N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(j * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(x * N[(j + N[(-1 * N[(N[(k * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 185000000000000009379699471036228158875872544002408448], N[(N[(-1 * N[(t * N[(z * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(x * N[(N[(N[(y * t$95$2), $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}
t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
t_2 := a \cdot b - c \cdot i\\
\mathbf{if}\;x \leq -6499999999999999823809460945688469666925113212764529240120263062846011604992:\\
\;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_1\\
\mathbf{elif}\;x \leq \frac{2087487115172669}{9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824}:\\
\;\;\;\;t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + t\_1\\
\mathbf{elif}\;x \leq \frac{8631010391913655}{6393341031047152089869511126616404594173128996177860916959553453312761321102879990006386899074031556935325554936640763689877454191182408307282280448}:\\
\;\;\;\;y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(x \cdot \left(j + -1 \cdot \frac{k \cdot z}{x}\right)\right)\right)\\
\mathbf{elif}\;x \leq 185000000000000009379699471036228158875872544002408448:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot t\_2\right)\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(y \cdot t\_2 + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\end{array}
if x < -6.4999999999999998e75Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.3%
Applied rewrites38.3%
if -6.4999999999999998e75 < x < 2.2999999999999999e-265Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.7%
Applied rewrites35.7%
if 2.2999999999999999e-265 < x < 1.3499999999999999e-132Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.7%
Applied rewrites34.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6435.0%
Applied rewrites35.0%
if 1.3499999999999999e-132 < x < 1.8500000000000001e53Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.6%
Applied rewrites41.6%
if 1.8500000000000001e53 < x Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
(t_2 (- (* a b) (* c i))))
(if (<=
x
-6499999999999999823809460945688469666925113212764529240120263062846011604992)
(+ (* t (* c (- (* i z) (* y2 y4)))) t_1)
(if (<=
x
2087487115172669/9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824)
(+ (* t (* -1 (* y5 (- (* i j) (* a y2))))) t_1)
(if (<=
x
8950677443466013/12786682062094304179739022253232809188346257992355721833919106906625522642205759980012773798148063113870651109873281527379754908382364816614564560896)
(*
y0
(-
(* y3 (* j (+ y5 (* -1 (/ (* c z) j)))))
(* b (- (* j x) (* k z)))))
(if (<=
x
185000000000000009379699471036228158875872544002408448)
(+ (* -1 (* t (* z t_2))) t_1)
(*
x
(-
(+ (* y t_2) (* 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 t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double t_2 = (a * b) - (c * i);
double tmp;
if (x <= -6.5e+75) {
tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1;
} else if (x <= 2.3e-265) {
tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1;
} else if (x <= 7e-133) {
tmp = y0 * ((y3 * (j * (y5 + (-1.0 * ((c * z) / j))))) - (b * ((j * x) - (k * z))));
} else if (x <= 1.85e+53) {
tmp = (-1.0 * (t * (z * t_2))) + t_1;
} else {
tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))
t_2 = (a * b) - (c * i)
if (x <= (-6.5d+75)) then
tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1
else if (x <= 2.3d-265) then
tmp = (t * ((-1.0d0) * (y5 * ((i * j) - (a * y2))))) + t_1
else if (x <= 7d-133) then
tmp = y0 * ((y3 * (j * (y5 + ((-1.0d0) * ((c * z) / j))))) - (b * ((j * x) - (k * z))))
else if (x <= 1.85d+53) then
tmp = ((-1.0d0) * (t * (z * t_2))) + t_1
else
tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * 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 t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0));
double t_2 = (a * b) - (c * i);
double tmp;
if (x <= -6.5e+75) {
tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1;
} else if (x <= 2.3e-265) {
tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1;
} else if (x <= 7e-133) {
tmp = y0 * ((y3 * (j * (y5 + (-1.0 * ((c * z) / j))))) - (b * ((j * x) - (k * z))));
} else if (x <= 1.85e+53) {
tmp = (-1.0 * (t * (z * t_2))) + t_1;
} else {
tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)) t_2 = (a * b) - (c * i) tmp = 0 if x <= -6.5e+75: tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1 elif x <= 2.3e-265: tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1 elif x <= 7e-133: tmp = y0 * ((y3 * (j * (y5 + (-1.0 * ((c * z) / j))))) - (b * ((j * x) - (k * z)))) elif x <= 1.85e+53: tmp = (-1.0 * (t * (z * t_2))) + t_1 else: tmp = x * (((y * t_2) + (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) t_1 = Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0))) t_2 = Float64(Float64(a * b) - Float64(c * i)) tmp = 0.0 if (x <= -6.5e+75) tmp = Float64(Float64(t * Float64(c * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_1); elseif (x <= 2.3e-265) tmp = Float64(Float64(t * Float64(-1.0 * Float64(y5 * Float64(Float64(i * j) - Float64(a * y2))))) + t_1); elseif (x <= 7e-133) tmp = Float64(y0 * Float64(Float64(y3 * Float64(j * Float64(y5 + Float64(-1.0 * Float64(Float64(c * z) / j))))) - Float64(b * Float64(Float64(j * x) - Float64(k * z))))); elseif (x <= 1.85e+53) tmp = Float64(Float64(-1.0 * Float64(t * Float64(z * t_2))) + t_1); else tmp = Float64(x * Float64(Float64(Float64(y * t_2) + Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = ((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)); t_2 = (a * b) - (c * i); tmp = 0.0; if (x <= -6.5e+75) tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_1; elseif (x <= 2.3e-265) tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_1; elseif (x <= 7e-133) tmp = y0 * ((y3 * (j * (y5 + (-1.0 * ((c * z) / j))))) - (b * ((j * x) - (k * z)))); elseif (x <= 1.85e+53) tmp = (-1.0 * (t * (z * t_2))) + t_1; else tmp = x * (((y * t_2) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6499999999999999823809460945688469666925113212764529240120263062846011604992], N[(N[(t * N[(c * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 2087487115172669/9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824], N[(N[(t * N[(-1 * N[(y5 * N[(N[(i * j), $MachinePrecision] - N[(a * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 8950677443466013/12786682062094304179739022253232809188346257992355721833919106906625522642205759980012773798148063113870651109873281527379754908382364816614564560896], N[(y0 * N[(N[(y3 * N[(j * N[(y5 + N[(-1 * N[(N[(c * z), $MachinePrecision] / j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 185000000000000009379699471036228158875872544002408448], N[(N[(-1 * N[(t * N[(z * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(x * N[(N[(N[(y * t$95$2), $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}
t_1 := \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
t_2 := a \cdot b - c \cdot i\\
\mathbf{if}\;x \leq -6499999999999999823809460945688469666925113212764529240120263062846011604992:\\
\;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_1\\
\mathbf{elif}\;x \leq \frac{2087487115172669}{9076030935533343889148330677184451660957398691768765008885326289770145612551296225251271450782204288267814476258502032778653474399077793626653018683486295323382390383590453332169716856898789897889643528945016096228440849041002686084943230837088977557446564364344140092918489677824}:\\
\;\;\;\;t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + t\_1\\
\mathbf{elif}\;x \leq \frac{8950677443466013}{12786682062094304179739022253232809188346257992355721833919106906625522642205759980012773798148063113870651109873281527379754908382364816614564560896}:\\
\;\;\;\;y0 \cdot \left(y3 \cdot \left(j \cdot \left(y5 + -1 \cdot \frac{c \cdot z}{j}\right)\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 185000000000000009379699471036228158875872544002408448:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot t\_2\right)\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(y \cdot t\_2 + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\end{array}
if x < -6.4999999999999998e75Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.3%
Applied rewrites38.3%
if -6.4999999999999998e75 < x < 2.2999999999999999e-265Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.7%
Applied rewrites35.7%
if 2.2999999999999999e-265 < x < 7.0000000000000001e-133Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.7%
Applied rewrites34.7%
Taylor expanded in j around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6435.4%
Applied rewrites35.4%
if 7.0000000000000001e-133 < x < 1.8500000000000001e53Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.6%
Applied rewrites41.6%
if 1.8500000000000001e53 < x Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* k y2) (* j y3)))
(t_2 (* t_1 (- (* y4 y1) (* y5 y0)))))
(if (<=
b
-1400000000000000066339319380481226426591264940964336348472312222499638886264973300670146220755724521177088)
(* y0 (* b (- (* k z) (* j x))))
(if (<=
b
6699903382837499/1218164251424999885044172798484398538859528357199375940858488307151618586345803262808201883235251282403163114528926083522932396233150386755822248412039081677441409712494559128733848706936256706044099949184902297359210699740674359368218295451933620701603467350388034693385228573748989263872)
(+ (* t (* c (- (* i z) (* y2 y4)))) t_2)
(if (<=
b
32108980623861/4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248)
(+ (* j (* t (- (* b y4) (* i y5)))) t_2)
(if (<=
b
27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480)
(+ (* -1 (* t (* z (- (* a b) (* c i))))) (* t_1 (* y1 y4)))
(if (<=
b
299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008)
(* t (* y4 (- (* b j) (* c y2))))
(* (* k (- (* y2 y1) (* b y))) 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 t_1 = (k * y2) - (j * y3);
double t_2 = t_1 * ((y4 * y1) - (y5 * y0));
double tmp;
if (b <= -1.4e+105) {
tmp = y0 * (b * ((k * z) - (j * x)));
} else if (b <= 5.5e-273) {
tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2;
} else if (b <= 7e-93) {
tmp = (j * (t * ((b * y4) - (i * y5)))) + t_2;
} else if (b <= 2.8e+100) {
tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4));
} else if (b <= 3e+263) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else {
tmp = (k * ((y2 * y1) - (b * y))) * 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (k * y2) - (j * y3)
t_2 = t_1 * ((y4 * y1) - (y5 * y0))
if (b <= (-1.4d+105)) then
tmp = y0 * (b * ((k * z) - (j * x)))
else if (b <= 5.5d-273) then
tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2
else if (b <= 7d-93) then
tmp = (j * (t * ((b * y4) - (i * y5)))) + t_2
else if (b <= 2.8d+100) then
tmp = ((-1.0d0) * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4))
else if (b <= 3d+263) then
tmp = t * (y4 * ((b * j) - (c * y2)))
else
tmp = (k * ((y2 * y1) - (b * y))) * 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 t_1 = (k * y2) - (j * y3);
double t_2 = t_1 * ((y4 * y1) - (y5 * y0));
double tmp;
if (b <= -1.4e+105) {
tmp = y0 * (b * ((k * z) - (j * x)));
} else if (b <= 5.5e-273) {
tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2;
} else if (b <= 7e-93) {
tmp = (j * (t * ((b * y4) - (i * y5)))) + t_2;
} else if (b <= 2.8e+100) {
tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4));
} else if (b <= 3e+263) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else {
tmp = (k * ((y2 * y1) - (b * y))) * y4;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (k * y2) - (j * y3) t_2 = t_1 * ((y4 * y1) - (y5 * y0)) tmp = 0 if b <= -1.4e+105: tmp = y0 * (b * ((k * z) - (j * x))) elif b <= 5.5e-273: tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2 elif b <= 7e-93: tmp = (j * (t * ((b * y4) - (i * y5)))) + t_2 elif b <= 2.8e+100: tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4)) elif b <= 3e+263: tmp = t * (y4 * ((b * j) - (c * y2))) else: tmp = (k * ((y2 * y1) - (b * y))) * y4 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(k * y2) - Float64(j * y3)) t_2 = Float64(t_1 * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (b <= -1.4e+105) tmp = Float64(y0 * Float64(b * Float64(Float64(k * z) - Float64(j * x)))); elseif (b <= 5.5e-273) tmp = Float64(Float64(t * Float64(c * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_2); elseif (b <= 7e-93) tmp = Float64(Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) + t_2); elseif (b <= 2.8e+100) tmp = Float64(Float64(-1.0 * Float64(t * Float64(z * Float64(Float64(a * b) - Float64(c * i))))) + Float64(t_1 * Float64(y1 * y4))); elseif (b <= 3e+263) tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2)))); else tmp = Float64(Float64(k * Float64(Float64(y2 * y1) - Float64(b * y))) * 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) t_1 = (k * y2) - (j * y3); t_2 = t_1 * ((y4 * y1) - (y5 * y0)); tmp = 0.0; if (b <= -1.4e+105) tmp = y0 * (b * ((k * z) - (j * x))); elseif (b <= 5.5e-273) tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2; elseif (b <= 7e-93) tmp = (j * (t * ((b * y4) - (i * y5)))) + t_2; elseif (b <= 2.8e+100) tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4)); elseif (b <= 3e+263) tmp = t * (y4 * ((b * j) - (c * y2))); else tmp = (k * ((y2 * y1) - (b * y))) * y4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1400000000000000066339319380481226426591264940964336348472312222499638886264973300670146220755724521177088], N[(y0 * N[(b * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6699903382837499/1218164251424999885044172798484398538859528357199375940858488307151618586345803262808201883235251282403163114528926083522932396233150386755822248412039081677441409712494559128733848706936256706044099949184902297359210699740674359368218295451933620701603467350388034693385228573748989263872], N[(N[(t * N[(c * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, 32108980623861/4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248], N[(N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480], N[(N[(-1 * N[(t * N[(z * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * N[(N[(y2 * y1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
t_2 := t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;b \leq -1400000000000000066339319380481226426591264940964336348472312222499638886264973300670146220755724521177088:\\
\;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;b \leq \frac{6699903382837499}{1218164251424999885044172798484398538859528357199375940858488307151618586345803262808201883235251282403163114528926083522932396233150386755822248412039081677441409712494559128733848706936256706044099949184902297359210699740674359368218295451933620701603467350388034693385228573748989263872}:\\
\;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_2\\
\mathbf{elif}\;b \leq \frac{32108980623861}{4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + t\_2\\
\mathbf{elif}\;b \leq 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + t\_1 \cdot \left(y1 \cdot y4\right)\\
\mathbf{elif}\;b \leq 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\
\end{array}
if b < -1.4000000000000001e105Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f6417.4%
Applied rewrites17.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
if -1.4000000000000001e105 < b < 5.4999999999999997e-273Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.3%
Applied rewrites38.3%
if 5.4999999999999997e-273 < b < 6.9999999999999997e-93Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.6%
Applied rewrites41.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6436.9%
Applied rewrites36.9%
if 6.9999999999999997e-93 < b < 2.7999999999999998e100Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.6%
Applied rewrites41.6%
Taylor expanded in y0 around 0
lower-*.f6434.9%
Applied rewrites34.9%
if 2.7999999999999998e100 < b < 2.9999999999999999e263Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if 2.9999999999999999e263 < b Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6426.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f6426.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6426.8%
Applied rewrites26.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* k y2) (* j y3)))
(t_2 (* t_1 (- (* y4 y1) (* y5 y0)))))
(if (<=
x
-6499999999999999823809460945688469666925113212764529240120263062846011604992)
(+ (* t (* c (- (* i z) (* y2 y4)))) t_2)
(if (<=
x
4632619933486419/386051661123868214325895970762095083331216144111904370034983364157543830047598546775742309000849007597326427200921653578548066591998660043462778854257084865420374725869305346230443778499781067545394454342790117394565596548890481374012190543459242928201313126587598361115137891035519604744312911050121319319358268243968)
(+ (* t (* -1 (* y5 (- (* i j) (* a y2))))) t_2)
(if (<=
x
270000000000000009569115433929078079667710628289132363776)
(*
y4
(-
(+ (* b (- (* j t) (* k y))) (* y1 t_1))
(* c (- (* t y2) (* y y3)))))
(*
x
(-
(+ (* 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 t_1 = (k * y2) - (j * y3);
double t_2 = t_1 * ((y4 * y1) - (y5 * y0));
double tmp;
if (x <= -6.5e+75) {
tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2;
} else if (x <= 1.2e-302) {
tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_2;
} else if (x <= 2.7e+56) {
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))));
} else {
tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (k * y2) - (j * y3)
t_2 = t_1 * ((y4 * y1) - (y5 * y0))
if (x <= (-6.5d+75)) then
tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2
else if (x <= 1.2d-302) then
tmp = (t * ((-1.0d0) * (y5 * ((i * j) - (a * y2))))) + t_2
else if (x <= 2.7d+56) then
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))))
else
tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * 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 t_1 = (k * y2) - (j * y3);
double t_2 = t_1 * ((y4 * y1) - (y5 * y0));
double tmp;
if (x <= -6.5e+75) {
tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2;
} else if (x <= 1.2e-302) {
tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_2;
} else if (x <= 2.7e+56) {
tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_1)) - (c * ((t * y2) - (y * y3))));
} else {
tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (k * y2) - (j * y3) t_2 = t_1 * ((y4 * y1) - (y5 * y0)) tmp = 0 if x <= -6.5e+75: tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2 elif x <= 1.2e-302: tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_2 elif x <= 2.7e+56: tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_1)) - (c * ((t * y2) - (y * y3)))) else: tmp = x * (((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) t_1 = Float64(Float64(k * y2) - Float64(j * y3)) t_2 = Float64(t_1 * Float64(Float64(y4 * y1) - Float64(y5 * y0))) tmp = 0.0 if (x <= -6.5e+75) tmp = Float64(Float64(t * Float64(c * Float64(Float64(i * z) - Float64(y2 * y4)))) + t_2); elseif (x <= 1.2e-302) tmp = Float64(Float64(t * Float64(-1.0 * Float64(y5 * Float64(Float64(i * j) - Float64(a * y2))))) + t_2); elseif (x <= 2.7e+56) tmp = Float64(y4 * Float64(Float64(Float64(b * Float64(Float64(j * t) - Float64(k * y))) + Float64(y1 * t_1)) - Float64(c * Float64(Float64(t * y2) - Float64(y * y3))))); else tmp = Float64(x * Float64(Float64(Float64(y * Float64(Float64(a * b) - Float64(c * i))) + Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))) - Float64(j * Float64(Float64(b * y0) - Float64(i * y1))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = (k * y2) - (j * y3); t_2 = t_1 * ((y4 * y1) - (y5 * y0)); tmp = 0.0; if (x <= -6.5e+75) tmp = (t * (c * ((i * z) - (y2 * y4)))) + t_2; elseif (x <= 1.2e-302) tmp = (t * (-1.0 * (y5 * ((i * j) - (a * y2))))) + t_2; elseif (x <= 2.7e+56) tmp = y4 * (((b * ((j * t) - (k * y))) + (y1 * t_1)) - (c * ((t * y2) - (y * y3)))); else tmp = x * (((y * ((a * b) - (c * i))) + (y2 * ((c * y0) - (a * y1)))) - (j * ((b * y0) - (i * y1)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6499999999999999823809460945688469666925113212764529240120263062846011604992], N[(N[(t * N[(c * N[(N[(i * z), $MachinePrecision] - N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[x, 4632619933486419/386051661123868214325895970762095083331216144111904370034983364157543830047598546775742309000849007597326427200921653578548066591998660043462778854257084865420374725869305346230443778499781067545394454342790117394565596548890481374012190543459242928201313126587598361115137891035519604744312911050121319319358268243968], N[(N[(t * N[(-1 * N[(y5 * N[(N[(i * j), $MachinePrecision] - N[(a * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[x, 270000000000000009569115433929078079667710628289132363776], N[(y4 * N[(N[(N[(b * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y1 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(c * N[(N[(t * y2), $MachinePrecision] - N[(y * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(y * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(N[(b * y0), $MachinePrecision] - N[(i * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
t_2 := t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{if}\;x \leq -6499999999999999823809460945688469666925113212764529240120263062846011604992:\\
\;\;\;\;t \cdot \left(c \cdot \left(i \cdot z - y2 \cdot y4\right)\right) + t\_2\\
\mathbf{elif}\;x \leq \frac{4632619933486419}{386051661123868214325895970762095083331216144111904370034983364157543830047598546775742309000849007597326427200921653578548066591998660043462778854257084865420374725869305346230443778499781067545394454342790117394565596548890481374012190543459242928201313126587598361115137891035519604744312911050121319319358268243968}:\\
\;\;\;\;t \cdot \left(-1 \cdot \left(y5 \cdot \left(i \cdot j - a \cdot y2\right)\right)\right) + t\_2\\
\mathbf{elif}\;x \leq 270000000000000009569115433929078079667710628289132363776:\\
\;\;\;\;y4 \cdot \left(\left(b \cdot \left(j \cdot t - k \cdot y\right) + y1 \cdot t\_1\right) - c \cdot \left(t \cdot y2 - y \cdot y3\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(y \cdot \left(a \cdot b - c \cdot i\right) + y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right) - j \cdot \left(b \cdot y0 - i \cdot y1\right)\right)\\
\end{array}
if x < -6.4999999999999998e75Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6438.3%
Applied rewrites38.3%
if -6.4999999999999998e75 < x < 1.2000000000000001e-302Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.7%
Applied rewrites35.7%
if 1.2000000000000001e-302 < x < 2.7000000000000001e56Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
if 2.7000000000000001e56 < x Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
b
-360000000000000000689643030864480745037743845815469124015009265255776556713435952146045012238944916471808)
(* y0 (* b (- (* k z) (* j x))))
(if (<=
b
27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480)
(+
(* -1 (* t (* z (- (* a b) (* c i)))))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
(if (<=
b
299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008)
(* t (* y4 (- (* b j) (* c y2))))
(* (* k (- (* y2 y1) (* b y))) y4)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (b <= -3.6e+104) {
tmp = y0 * (b * ((k * z) - (j * x)));
} else if (b <= 2.8e+100) {
tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
} else if (b <= 3e+263) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else {
tmp = (k * ((y2 * y1) - (b * y))) * y4;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (b <= (-3.6d+104)) then
tmp = y0 * (b * ((k * z) - (j * x)))
else if (b <= 2.8d+100) then
tmp = ((-1.0d0) * (t * (z * ((a * b) - (c * i))))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
else if (b <= 3d+263) then
tmp = t * (y4 * ((b * j) - (c * y2)))
else
tmp = (k * ((y2 * y1) - (b * y))) * y4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (b <= -3.6e+104) {
tmp = y0 * (b * ((k * z) - (j * x)));
} else if (b <= 2.8e+100) {
tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
} else if (b <= 3e+263) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else {
tmp = (k * ((y2 * y1) - (b * y))) * y4;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if b <= -3.6e+104: tmp = y0 * (b * ((k * z) - (j * x))) elif b <= 2.8e+100: tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))) elif b <= 3e+263: tmp = t * (y4 * ((b * j) - (c * y2))) else: tmp = (k * ((y2 * y1) - (b * y))) * y4 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (b <= -3.6e+104) tmp = Float64(y0 * Float64(b * Float64(Float64(k * z) - Float64(j * x)))); elseif (b <= 2.8e+100) tmp = Float64(Float64(-1.0 * Float64(t * Float64(z * Float64(Float64(a * b) - Float64(c * i))))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))); elseif (b <= 3e+263) tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2)))); else tmp = Float64(Float64(k * Float64(Float64(y2 * y1) - Float64(b * y))) * y4); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (b <= -3.6e+104) tmp = y0 * (b * ((k * z) - (j * x))); elseif (b <= 2.8e+100) tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); elseif (b <= 3e+263) tmp = t * (y4 * ((b * j) - (c * y2))); else tmp = (k * ((y2 * y1) - (b * y))) * y4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[b, -360000000000000000689643030864480745037743845815469124015009265255776556713435952146045012238944916471808], N[(y0 * N[(b * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480], N[(N[(-1 * N[(t * N[(z * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * N[(N[(y2 * y1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;b \leq -360000000000000000689643030864480745037743845815469124015009265255776556713435952146045012238944916471808:\\
\;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;b \leq 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{elif}\;b \leq 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\
\end{array}
if b < -3.6e104Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f6417.4%
Applied rewrites17.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
if -3.6e104 < b < 2.7999999999999998e100Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.6%
Applied rewrites41.6%
if 2.7999999999999998e100 < b < 2.9999999999999999e263Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if 2.9999999999999999e263 < b Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6426.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f6426.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6426.8%
Applied rewrites26.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (- (* k y2) (* j y3))))
(if (<=
b
-3899999999999999945461141794519936127493000930527525343470307404393285846037704029382996182171648000)
(* y0 (* b (- (* k z) (* j x))))
(if (<=
b
32108980623861/4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248)
(+
(* j (* t (- (* b y4) (* i y5))))
(* t_1 (- (* y4 y1) (* y5 y0))))
(if (<=
b
27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480)
(+ (* -1 (* t (* z (- (* a b) (* c i))))) (* t_1 (* y1 y4)))
(if (<=
b
299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008)
(* t (* y4 (- (* b j) (* c y2))))
(* (* k (- (* y2 y1) (* b y))) 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 t_1 = (k * y2) - (j * y3);
double tmp;
if (b <= -3.9e+99) {
tmp = y0 * (b * ((k * z) - (j * x)));
} else if (b <= 7e-93) {
tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
} else if (b <= 2.8e+100) {
tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4));
} else if (b <= 3e+263) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else {
tmp = (k * ((y2 * y1) - (b * y))) * 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) :: t_1
real(8) :: tmp
t_1 = (k * y2) - (j * y3)
if (b <= (-3.9d+99)) then
tmp = y0 * (b * ((k * z) - (j * x)))
else if (b <= 7d-93) then
tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)))
else if (b <= 2.8d+100) then
tmp = ((-1.0d0) * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4))
else if (b <= 3d+263) then
tmp = t * (y4 * ((b * j) - (c * y2)))
else
tmp = (k * ((y2 * y1) - (b * y))) * 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 t_1 = (k * y2) - (j * y3);
double tmp;
if (b <= -3.9e+99) {
tmp = y0 * (b * ((k * z) - (j * x)));
} else if (b <= 7e-93) {
tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0)));
} else if (b <= 2.8e+100) {
tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4));
} else if (b <= 3e+263) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else {
tmp = (k * ((y2 * y1) - (b * y))) * y4;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = (k * y2) - (j * y3) tmp = 0 if b <= -3.9e+99: tmp = y0 * (b * ((k * z) - (j * x))) elif b <= 7e-93: tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0))) elif b <= 2.8e+100: tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4)) elif b <= 3e+263: tmp = t * (y4 * ((b * j) - (c * y2))) else: tmp = (k * ((y2 * y1) - (b * y))) * y4 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(k * y2) - Float64(j * y3)) tmp = 0.0 if (b <= -3.9e+99) tmp = Float64(y0 * Float64(b * Float64(Float64(k * z) - Float64(j * x)))); elseif (b <= 7e-93) tmp = Float64(Float64(j * Float64(t * Float64(Float64(b * y4) - Float64(i * y5)))) + Float64(t_1 * Float64(Float64(y4 * y1) - Float64(y5 * y0)))); elseif (b <= 2.8e+100) tmp = Float64(Float64(-1.0 * Float64(t * Float64(z * Float64(Float64(a * b) - Float64(c * i))))) + Float64(t_1 * Float64(y1 * y4))); elseif (b <= 3e+263) tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2)))); else tmp = Float64(Float64(k * Float64(Float64(y2 * y1) - Float64(b * y))) * 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) t_1 = (k * y2) - (j * y3); tmp = 0.0; if (b <= -3.9e+99) tmp = y0 * (b * ((k * z) - (j * x))); elseif (b <= 7e-93) tmp = (j * (t * ((b * y4) - (i * y5)))) + (t_1 * ((y4 * y1) - (y5 * y0))); elseif (b <= 2.8e+100) tmp = (-1.0 * (t * (z * ((a * b) - (c * i))))) + (t_1 * (y1 * y4)); elseif (b <= 3e+263) tmp = t * (y4 * ((b * j) - (c * y2))); else tmp = (k * ((y2 * y1) - (b * y))) * y4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3899999999999999945461141794519936127493000930527525343470307404393285846037704029382996182171648000], N[(y0 * N[(b * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 32108980623861/4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248], N[(N[(j * N[(t * N[(N[(b * y4), $MachinePrecision] - N[(i * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480], N[(N[(-1 * N[(t * N[(z * N[(N[(a * b), $MachinePrecision] - N[(c * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * N[(N[(y2 * y1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision]]]]]]
\begin{array}{l}
t_1 := k \cdot y2 - j \cdot y3\\
\mathbf{if}\;b \leq -3899999999999999945461141794519936127493000930527525343470307404393285846037704029382996182171648000:\\
\;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;b \leq \frac{32108980623861}{4586997231980143023221641790604173881593129978336562247475177678773845752176969616140037106220251373109248}:\\
\;\;\;\;j \cdot \left(t \cdot \left(b \cdot y4 - i \cdot y5\right)\right) + t\_1 \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{elif}\;b \leq 27999999999999998114078280402402820208055975790824099920499510299126523059902175283592573714148884480:\\
\;\;\;\;-1 \cdot \left(t \cdot \left(z \cdot \left(a \cdot b - c \cdot i\right)\right)\right) + t\_1 \cdot \left(y1 \cdot y4\right)\\
\mathbf{elif}\;b \leq 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\
\end{array}
if b < -3.8999999999999999e99Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f6417.4%
Applied rewrites17.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
if -3.8999999999999999e99 < b < 6.9999999999999997e-93Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.6%
Applied rewrites41.6%
Taylor expanded in j around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6436.9%
Applied rewrites36.9%
if 6.9999999999999997e-93 < b < 2.7999999999999998e100Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.6%
Applied rewrites41.6%
Taylor expanded in y0 around 0
lower-*.f6434.9%
Applied rewrites34.9%
if 2.7999999999999998e100 < b < 2.9999999999999999e263Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if 2.9999999999999999e263 < b Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6426.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f6426.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6426.8%
Applied rewrites26.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
b
-360000000000000000689643030864480745037743845815469124015009265255776556713435952146045012238944916471808)
(* y0 (* b (- (* k z) (* j x))))
(if (<=
b
11000000000000000429907094311986039073376264690926666025575357939115934813687797945126004417626112)
(-
(* (* t z) (- (* i c) (* b a)))
(* (- (* y5 y0) (* y4 y1)) (- (* y2 k) (* y3 j))))
(if (<=
b
299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008)
(* t (* y4 (- (* b j) (* c y2))))
(* (* k (- (* y2 y1) (* b y))) y4)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (b <= -3.6e+104) {
tmp = y0 * (b * ((k * z) - (j * x)));
} else if (b <= 1.1e+97) {
tmp = ((t * z) * ((i * c) - (b * a))) - (((y5 * y0) - (y4 * y1)) * ((y2 * k) - (y3 * j)));
} else if (b <= 3e+263) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else {
tmp = (k * ((y2 * y1) - (b * y))) * y4;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (b <= (-3.6d+104)) then
tmp = y0 * (b * ((k * z) - (j * x)))
else if (b <= 1.1d+97) then
tmp = ((t * z) * ((i * c) - (b * a))) - (((y5 * y0) - (y4 * y1)) * ((y2 * k) - (y3 * j)))
else if (b <= 3d+263) then
tmp = t * (y4 * ((b * j) - (c * y2)))
else
tmp = (k * ((y2 * y1) - (b * y))) * y4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (b <= -3.6e+104) {
tmp = y0 * (b * ((k * z) - (j * x)));
} else if (b <= 1.1e+97) {
tmp = ((t * z) * ((i * c) - (b * a))) - (((y5 * y0) - (y4 * y1)) * ((y2 * k) - (y3 * j)));
} else if (b <= 3e+263) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else {
tmp = (k * ((y2 * y1) - (b * y))) * y4;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if b <= -3.6e+104: tmp = y0 * (b * ((k * z) - (j * x))) elif b <= 1.1e+97: tmp = ((t * z) * ((i * c) - (b * a))) - (((y5 * y0) - (y4 * y1)) * ((y2 * k) - (y3 * j))) elif b <= 3e+263: tmp = t * (y4 * ((b * j) - (c * y2))) else: tmp = (k * ((y2 * y1) - (b * y))) * y4 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (b <= -3.6e+104) tmp = Float64(y0 * Float64(b * Float64(Float64(k * z) - Float64(j * x)))); elseif (b <= 1.1e+97) tmp = Float64(Float64(Float64(t * z) * Float64(Float64(i * c) - Float64(b * a))) - Float64(Float64(Float64(y5 * y0) - Float64(y4 * y1)) * Float64(Float64(y2 * k) - Float64(y3 * j)))); elseif (b <= 3e+263) tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2)))); else tmp = Float64(Float64(k * Float64(Float64(y2 * y1) - Float64(b * y))) * y4); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (b <= -3.6e+104) tmp = y0 * (b * ((k * z) - (j * x))); elseif (b <= 1.1e+97) tmp = ((t * z) * ((i * c) - (b * a))) - (((y5 * y0) - (y4 * y1)) * ((y2 * k) - (y3 * j))); elseif (b <= 3e+263) tmp = t * (y4 * ((b * j) - (c * y2))); else tmp = (k * ((y2 * y1) - (b * y))) * y4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[b, -360000000000000000689643030864480745037743845815469124015009265255776556713435952146045012238944916471808], N[(y0 * N[(b * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 11000000000000000429907094311986039073376264690926666025575357939115934813687797945126004417626112], N[(N[(N[(t * z), $MachinePrecision] * N[(N[(i * c), $MachinePrecision] - N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(y5 * y0), $MachinePrecision] - N[(y4 * y1), $MachinePrecision]), $MachinePrecision] * N[(N[(y2 * k), $MachinePrecision] - N[(y3 * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(k * N[(N[(y2 * y1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;b \leq -360000000000000000689643030864480745037743845815469124015009265255776556713435952146045012238944916471808:\\
\;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;b \leq 11000000000000000429907094311986039073376264690926666025575357939115934813687797945126004417626112:\\
\;\;\;\;\left(t \cdot z\right) \cdot \left(i \cdot c - b \cdot a\right) - \left(y5 \cdot y0 - y4 \cdot y1\right) \cdot \left(y2 \cdot k - y3 \cdot j\right)\\
\mathbf{elif}\;b \leq 299999999999999990868011984560022892833742471031306811492543123726711030198774502851826346125598875231142576987773365005232017313185080454283132453536634710518857601099233185038876268781815307111305853424679388474412403321923690290201447497786234713653091141419008:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\
\end{array}
if b < -3.6e104Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f6417.4%
Applied rewrites17.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
if -3.6e104 < b < 1.1e97Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.6%
Applied rewrites41.6%
Applied rewrites40.3%
if 1.1e97 < b < 2.9999999999999999e263Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if 2.9999999999999999e263 < b Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6426.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f6426.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6426.8%
Applied rewrites26.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
b
-92000000000000007560497522100101586454983492192393498837630850382161806382776094458065936992048149679833088)
(* y0 (* b (- (* k z) (* j x))))
(if (<= b 5800000000000000491381392949641216)
(+
(* c (* i (* t z)))
(* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0))))
(if (<=
b
1800000000000000058357033097399808317966072120241339071222870621616153142099836813228748647020474988352389939997833686437574213632)
(* y4 (* -1 (* y3 (- (* j y1) (* c y)))))
(*
y0
(-
(* y3 (+ (* -1 (* c z)) (* j y5)))
(* b (- (* j x) (* k z)))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (b <= -9.2e+106) {
tmp = y0 * (b * ((k * z) - (j * x)));
} else if (b <= 5.8e+33) {
tmp = (c * (i * (t * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
} else if (b <= 1.8e+129) {
tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y))));
} else {
tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * 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 (b <= (-9.2d+106)) then
tmp = y0 * (b * ((k * z) - (j * x)))
else if (b <= 5.8d+33) then
tmp = (c * (i * (t * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)))
else if (b <= 1.8d+129) then
tmp = y4 * ((-1.0d0) * (y3 * ((j * y1) - (c * y))))
else
tmp = y0 * ((y3 * (((-1.0d0) * (c * z)) + (j * y5))) - (b * ((j * x) - (k * 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 (b <= -9.2e+106) {
tmp = y0 * (b * ((k * z) - (j * x)));
} else if (b <= 5.8e+33) {
tmp = (c * (i * (t * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0)));
} else if (b <= 1.8e+129) {
tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y))));
} else {
tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if b <= -9.2e+106: tmp = y0 * (b * ((k * z) - (j * x))) elif b <= 5.8e+33: tmp = (c * (i * (t * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))) elif b <= 1.8e+129: tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y)))) else: tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * 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 (b <= -9.2e+106) tmp = Float64(y0 * Float64(b * Float64(Float64(k * z) - Float64(j * x)))); elseif (b <= 5.8e+33) tmp = Float64(Float64(c * Float64(i * Float64(t * z))) + Float64(Float64(Float64(k * y2) - Float64(j * y3)) * Float64(Float64(y4 * y1) - Float64(y5 * y0)))); elseif (b <= 1.8e+129) tmp = Float64(y4 * Float64(-1.0 * Float64(y3 * Float64(Float64(j * y1) - Float64(c * y))))); else tmp = Float64(y0 * Float64(Float64(y3 * Float64(Float64(-1.0 * Float64(c * z)) + Float64(j * y5))) - Float64(b * Float64(Float64(j * x) - Float64(k * 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 (b <= -9.2e+106) tmp = y0 * (b * ((k * z) - (j * x))); elseif (b <= 5.8e+33) tmp = (c * (i * (t * z))) + (((k * y2) - (j * y3)) * ((y4 * y1) - (y5 * y0))); elseif (b <= 1.8e+129) tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y)))); else tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[b, -92000000000000007560497522100101586454983492192393498837630850382161806382776094458065936992048149679833088], N[(y0 * N[(b * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5800000000000000491381392949641216], N[(N[(c * N[(i * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision] * N[(N[(y4 * y1), $MachinePrecision] - N[(y5 * y0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1800000000000000058357033097399808317966072120241339071222870621616153142099836813228748647020474988352389939997833686437574213632], N[(y4 * N[(-1 * N[(y3 * N[(N[(j * y1), $MachinePrecision] - N[(c * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y0 * N[(N[(y3 * N[(N[(-1 * N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(j * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;b \leq -92000000000000007560497522100101586454983492192393498837630850382161806382776094458065936992048149679833088:\\
\;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{elif}\;b \leq 5800000000000000491381392949641216:\\
\;\;\;\;c \cdot \left(i \cdot \left(t \cdot z\right)\right) + \left(k \cdot y2 - j \cdot y3\right) \cdot \left(y4 \cdot y1 - y5 \cdot y0\right)\\
\mathbf{elif}\;b \leq 1800000000000000058357033097399808317966072120241339071222870621616153142099836813228748647020474988352389939997833686437574213632:\\
\;\;\;\;y4 \cdot \left(-1 \cdot \left(y3 \cdot \left(j \cdot y1 - c \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\end{array}
if b < -9.2000000000000008e106Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f6417.4%
Applied rewrites17.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
if -9.2000000000000008e106 < b < 5.8000000000000005e33Initial program 30.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.3%
Taylor expanded in z around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6441.6%
Applied rewrites41.6%
Taylor expanded in a around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6439.1%
Applied rewrites39.1%
if 5.8000000000000005e33 < b < 1.8000000000000001e129Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if 1.8000000000000001e129 < b Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.7%
Applied rewrites34.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y4
-235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968)
(* k (+ (* (* y4 (- b)) y) (* (* y2 y1) y4)))
(if (<= y4 -1299999999999999950031673044027917767540736)
(* t (* y4 (- (* b j) (* c y2))))
(if (<=
y4
-3949107279145325/1081947199765842424529591879509026010150599323721976877318063532086628152436172512203606540057921920808293160946190599534351047801861499980289103827892100253508375928829962412377562148201321351276593628996016513851695161943555198441141036848674890703850575013678567420592128)
(*
y0
(-
(* y3 (+ (* -1 (* c z)) (* j y5)))
(* b (- (* j x) (* k z)))))
(if (<=
y4
86858970270951/2554675596204441358920157072687153364566337613357385653123260470319631221592274004204746195830573697394358331960566393912284720625143799885746139901804584218009607261377389665942448283448784623593796296633016222711463437382554714097777734743613496521609114760800967733302218873894840332707692544)
(* x (* y2 (- (* c y0) (* a y1))))
(if (<=
y4
999999999999999959416724456350362731491996089648451439669739009806703922950954425516032)
(*
y0
(+
(* -1 (* y5 (- (* k y2) (* j y3))))
(* c (- (* x y2) (* y3 z)))))
(* y2 (* y4 (* t (- (/ (* k y1) t) c))))))))))double code(double x, double y, double z, double t, double 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 (y4 <= -2.35e+221) {
tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4));
} else if (y4 <= -1.3e+42) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else if (y4 <= -3.65e-258) {
tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))));
} else if (y4 <= 3.4e-281) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y4 <= 1e+87) {
tmp = y0 * ((-1.0 * (y5 * ((k * y2) - (j * y3)))) + (c * ((x * y2) - (y3 * z))));
} else {
tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
}
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 (y4 <= (-2.35d+221)) then
tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4))
else if (y4 <= (-1.3d+42)) then
tmp = t * (y4 * ((b * j) - (c * y2)))
else if (y4 <= (-3.65d-258)) then
tmp = y0 * ((y3 * (((-1.0d0) * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))))
else if (y4 <= 3.4d-281) then
tmp = x * (y2 * ((c * y0) - (a * y1)))
else if (y4 <= 1d+87) then
tmp = y0 * (((-1.0d0) * (y5 * ((k * y2) - (j * y3)))) + (c * ((x * y2) - (y3 * z))))
else
tmp = y2 * (y4 * (t * (((k * y1) / t) - c)))
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 (y4 <= -2.35e+221) {
tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4));
} else if (y4 <= -1.3e+42) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else if (y4 <= -3.65e-258) {
tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z))));
} else if (y4 <= 3.4e-281) {
tmp = x * (y2 * ((c * y0) - (a * y1)));
} else if (y4 <= 1e+87) {
tmp = y0 * ((-1.0 * (y5 * ((k * y2) - (j * y3)))) + (c * ((x * y2) - (y3 * z))));
} else {
tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y4 <= -2.35e+221: tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4)) elif y4 <= -1.3e+42: tmp = t * (y4 * ((b * j) - (c * y2))) elif y4 <= -3.65e-258: tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z)))) elif y4 <= 3.4e-281: tmp = x * (y2 * ((c * y0) - (a * y1))) elif y4 <= 1e+87: tmp = y0 * ((-1.0 * (y5 * ((k * y2) - (j * y3)))) + (c * ((x * y2) - (y3 * z)))) else: tmp = y2 * (y4 * (t * (((k * y1) / t) - c))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y4 <= -2.35e+221) tmp = Float64(k * Float64(Float64(Float64(y4 * Float64(-b)) * y) + Float64(Float64(y2 * y1) * y4))); elseif (y4 <= -1.3e+42) tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2)))); elseif (y4 <= -3.65e-258) tmp = Float64(y0 * Float64(Float64(y3 * Float64(Float64(-1.0 * Float64(c * z)) + Float64(j * y5))) - Float64(b * Float64(Float64(j * x) - Float64(k * z))))); elseif (y4 <= 3.4e-281) tmp = Float64(x * Float64(y2 * Float64(Float64(c * y0) - Float64(a * y1)))); elseif (y4 <= 1e+87) tmp = Float64(y0 * Float64(Float64(-1.0 * Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3)))) + Float64(c * Float64(Float64(x * y2) - Float64(y3 * z))))); else tmp = Float64(y2 * Float64(y4 * Float64(t * Float64(Float64(Float64(k * y1) / t) - c)))); 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 (y4 <= -2.35e+221) tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4)); elseif (y4 <= -1.3e+42) tmp = t * (y4 * ((b * j) - (c * y2))); elseif (y4 <= -3.65e-258) tmp = y0 * ((y3 * ((-1.0 * (c * z)) + (j * y5))) - (b * ((j * x) - (k * z)))); elseif (y4 <= 3.4e-281) tmp = x * (y2 * ((c * y0) - (a * y1))); elseif (y4 <= 1e+87) tmp = y0 * ((-1.0 * (y5 * ((k * y2) - (j * y3)))) + (c * ((x * y2) - (y3 * z)))); else tmp = y2 * (y4 * (t * (((k * y1) / t) - c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968], N[(k * N[(N[(N[(y4 * (-b)), $MachinePrecision] * y), $MachinePrecision] + N[(N[(y2 * y1), $MachinePrecision] * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -1299999999999999950031673044027917767540736], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -3949107279145325/1081947199765842424529591879509026010150599323721976877318063532086628152436172512203606540057921920808293160946190599534351047801861499980289103827892100253508375928829962412377562148201321351276593628996016513851695161943555198441141036848674890703850575013678567420592128], N[(y0 * N[(N[(y3 * N[(N[(-1 * N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(j * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(j * x), $MachinePrecision] - N[(k * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 86858970270951/2554675596204441358920157072687153364566337613357385653123260470319631221592274004204746195830573697394358331960566393912284720625143799885746139901804584218009607261377389665942448283448784623593796296633016222711463437382554714097777734743613496521609114760800967733302218873894840332707692544], N[(x * N[(y2 * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 999999999999999959416724456350362731491996089648451439669739009806703922950954425516032], N[(y0 * N[(N[(-1 * N[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(c * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(y4 * N[(t * N[(N[(N[(k * y1), $MachinePrecision] / t), $MachinePrecision] - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968:\\
\;\;\;\;k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y2 \cdot y1\right) \cdot y4\right)\\
\mathbf{elif}\;y4 \leq -1299999999999999950031673044027917767540736:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\
\mathbf{elif}\;y4 \leq \frac{-3949107279145325}{1081947199765842424529591879509026010150599323721976877318063532086628152436172512203606540057921920808293160946190599534351047801861499980289103827892100253508375928829962412377562148201321351276593628996016513851695161943555198441141036848674890703850575013678567420592128}:\\
\;\;\;\;y0 \cdot \left(y3 \cdot \left(-1 \cdot \left(c \cdot z\right) + j \cdot y5\right) - b \cdot \left(j \cdot x - k \cdot z\right)\right)\\
\mathbf{elif}\;y4 \leq \frac{86858970270951}{2554675596204441358920157072687153364566337613357385653123260470319631221592274004204746195830573697394358331960566393912284720625143799885746139901804584218009607261377389665942448283448784623593796296633016222711463437382554714097777734743613496521609114760800967733302218873894840332707692544}:\\
\;\;\;\;x \cdot \left(y2 \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;y4 \leq 999999999999999959416724456350362731491996089648451439669739009806703922950954425516032:\\
\;\;\;\;y0 \cdot \left(-1 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right) + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(t \cdot \left(\frac{k \cdot y1}{t} - c\right)\right)\right)\\
\end{array}
if y4 < -2.35e221Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
lift-*.f64N/A
lift-+.f64N/A
distribute-rgt-inN/A
lower-+.f64N/A
*-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6424.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6424.5%
Applied rewrites24.5%
if -2.35e221 < y4 < -1.3e42Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if -1.3e42 < y4 < -3.6500000000000001e-258Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.7%
Applied rewrites34.7%
if -3.6500000000000001e-258 < y4 < 3.3999999999999998e-281Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.7%
Applied rewrites27.7%
if 3.3999999999999998e-281 < y4 < 9.9999999999999996e86Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in b around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.9%
Applied rewrites35.9%
if 9.9999999999999996e86 < y4 Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6429.2%
Applied rewrites29.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y5 (- (* k y2) (* j y3)))))
(if (<=
j
-3099999999999999823412385594704568514241442104585215148436057313951308986708446003484408380942569811609113025348650524748073790938900088122559221825969634660461245147043218254488528067251441368715360270960030278553543114752)
(* -1 (* y0 t_1))
(if (<=
j
-17500000000000000519396039778088108581907286668586516480)
(* y4 (* -1 (* y3 (- (* j y1) (* c y)))))
(if (<=
j
3036760475089333/1167984798111281975972139931059274579172666497855631342228273284582214442805421410945513679697247078343332431250840168271536308408672112127552681297848886832192510636636227827221215793215130566656)
(* y0 (+ (* -1 t_1) (* c (- (* x y2) (* y3 z)))))
(if (<=
j
4253529586511731/42535295865117307932921825928971026432)
(* k (* y4 (* y2 (+ y1 (* -1 (/ (* b y) y2))))))
(* (- (* (- (* y5 j) (* c z)) y3) (* (* j x) b)) y0)))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y5 * ((k * y2) - (j * y3));
double tmp;
if (j <= -3.1e+222) {
tmp = -1.0 * (y0 * t_1);
} else if (j <= -1.75e+55) {
tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y))));
} else if (j <= 2.6e-180) {
tmp = y0 * ((-1.0 * t_1) + (c * ((x * y2) - (y3 * z))));
} else if (j <= 1e-22) {
tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2)))));
} else {
tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = y5 * ((k * y2) - (j * y3))
if (j <= (-3.1d+222)) then
tmp = (-1.0d0) * (y0 * t_1)
else if (j <= (-1.75d+55)) then
tmp = y4 * ((-1.0d0) * (y3 * ((j * y1) - (c * y))))
else if (j <= 2.6d-180) then
tmp = y0 * (((-1.0d0) * t_1) + (c * ((x * y2) - (y3 * z))))
else if (j <= 1d-22) then
tmp = k * (y4 * (y2 * (y1 + ((-1.0d0) * ((b * y) / y2)))))
else
tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y5 * ((k * y2) - (j * y3));
double tmp;
if (j <= -3.1e+222) {
tmp = -1.0 * (y0 * t_1);
} else if (j <= -1.75e+55) {
tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y))));
} else if (j <= 2.6e-180) {
tmp = y0 * ((-1.0 * t_1) + (c * ((x * y2) - (y3 * z))));
} else if (j <= 1e-22) {
tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2)))));
} else {
tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = y5 * ((k * y2) - (j * y3)) tmp = 0 if j <= -3.1e+222: tmp = -1.0 * (y0 * t_1) elif j <= -1.75e+55: tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y)))) elif j <= 2.6e-180: tmp = y0 * ((-1.0 * t_1) + (c * ((x * y2) - (y3 * z)))) elif j <= 1e-22: tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2))))) else: tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3))) tmp = 0.0 if (j <= -3.1e+222) tmp = Float64(-1.0 * Float64(y0 * t_1)); elseif (j <= -1.75e+55) tmp = Float64(y4 * Float64(-1.0 * Float64(y3 * Float64(Float64(j * y1) - Float64(c * y))))); elseif (j <= 2.6e-180) tmp = Float64(y0 * Float64(Float64(-1.0 * t_1) + Float64(c * Float64(Float64(x * y2) - Float64(y3 * z))))); elseif (j <= 1e-22) tmp = Float64(k * Float64(y4 * Float64(y2 * Float64(y1 + Float64(-1.0 * Float64(Float64(b * y) / y2)))))); else tmp = Float64(Float64(Float64(Float64(Float64(y5 * j) - Float64(c * z)) * y3) - Float64(Float64(j * x) * b)) * y0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = y5 * ((k * y2) - (j * y3)); tmp = 0.0; if (j <= -3.1e+222) tmp = -1.0 * (y0 * t_1); elseif (j <= -1.75e+55) tmp = y4 * (-1.0 * (y3 * ((j * y1) - (c * y)))); elseif (j <= 2.6e-180) tmp = y0 * ((-1.0 * t_1) + (c * ((x * y2) - (y3 * z)))); elseif (j <= 1e-22) tmp = k * (y4 * (y2 * (y1 + (-1.0 * ((b * y) / y2))))); else tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -3099999999999999823412385594704568514241442104585215148436057313951308986708446003484408380942569811609113025348650524748073790938900088122559221825969634660461245147043218254488528067251441368715360270960030278553543114752], N[(-1 * N[(y0 * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -17500000000000000519396039778088108581907286668586516480], N[(y4 * N[(-1 * N[(y3 * N[(N[(j * y1), $MachinePrecision] - N[(c * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3036760475089333/1167984798111281975972139931059274579172666497855631342228273284582214442805421410945513679697247078343332431250840168271536308408672112127552681297848886832192510636636227827221215793215130566656], N[(y0 * N[(N[(-1 * t$95$1), $MachinePrecision] + N[(c * N[(N[(x * y2), $MachinePrecision] - N[(y3 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 4253529586511731/42535295865117307932921825928971026432], N[(k * N[(y4 * N[(y2 * N[(y1 + N[(-1 * N[(N[(b * y), $MachinePrecision] / y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(y5 * j), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * y3), $MachinePrecision] - N[(N[(j * x), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] * y0), $MachinePrecision]]]]]]
\begin{array}{l}
t_1 := y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\\
\mathbf{if}\;j \leq -3099999999999999823412385594704568514241442104585215148436057313951308986708446003484408380942569811609113025348650524748073790938900088122559221825969634660461245147043218254488528067251441368715360270960030278553543114752:\\
\;\;\;\;-1 \cdot \left(y0 \cdot t\_1\right)\\
\mathbf{elif}\;j \leq -17500000000000000519396039778088108581907286668586516480:\\
\;\;\;\;y4 \cdot \left(-1 \cdot \left(y3 \cdot \left(j \cdot y1 - c \cdot y\right)\right)\right)\\
\mathbf{elif}\;j \leq \frac{3036760475089333}{1167984798111281975972139931059274579172666497855631342228273284582214442805421410945513679697247078343332431250840168271536308408672112127552681297848886832192510636636227827221215793215130566656}:\\
\;\;\;\;y0 \cdot \left(-1 \cdot t\_1 + c \cdot \left(x \cdot y2 - y3 \cdot z\right)\right)\\
\mathbf{elif}\;j \leq \frac{4253529586511731}{42535295865117307932921825928971026432}:\\
\;\;\;\;k \cdot \left(y4 \cdot \left(y2 \cdot \left(y1 + -1 \cdot \frac{b \cdot y}{y2}\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(y5 \cdot j - c \cdot z\right) \cdot y3 - \left(j \cdot x\right) \cdot b\right) \cdot y0\\
\end{array}
if j < -3.0999999999999998e222Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.7%
Applied rewrites27.7%
if -3.0999999999999998e222 < j < -1.7500000000000001e55Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in y3 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.7%
Applied rewrites26.7%
if -1.7500000000000001e55 < j < 2.5999999999999999e-180Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in b around 0
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.9%
Applied rewrites35.9%
if 2.5999999999999999e-180 < j < 1e-22Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-*.f6428.7%
Applied rewrites28.7%
if 1e-22 < j Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.7%
Applied rewrites34.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6431.3%
Applied rewrites31.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6431.3%
Applied rewrites31.3%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
c
-65000000000000001102319847813809242209613085260540269638162639789824362982102521052478487892408822618664445666083226208553839155667882130484891713264000436776425818657509079475219860537393568141661271354245120)
(* y2 (* t (- (* a y5) (* c y4))))
(if (<=
c
4479198687200445/54624374234151766213262145869588543874209860176411919649966143993970993052202041929903572589539772749766081827581405105732721063150545838738336612780694159737611530891378807262929537318189580490579681412185183043434010607923007170897214483464192)
(*
y2
(+ (* k (- (* y1 y4) (* y0 y5))) (* x (- (* c y0) (* a y1)))))
(if (<=
c
1892136358191809/1146749307995035755805410447651043470398282494584140561868794419693461438044242404035009276555062843277312)
(* -1 (* y0 (* y5 (- (* k y2) (* j y3)))))
(if (<=
c
2599999999999999996988882896693688366983777636187134357388627186633339674055586880534312124416)
(* (- (* (- (* y5 j) (* c z)) y3) (* (* j x) b)) y0)
(* y2 (* y4 (* t (- (/ (* k y1) t) c)))))))))double code(double x, double y, double z, double t, double 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 (c <= -6.5e+208) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (c <= 8.2e-230) {
tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) + (x * ((c * y0) - (a * y1))));
} else if (c <= 1.65e-90) {
tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
} else if (c <= 2.6e+93) {
tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
} else {
tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
}
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 (c <= (-6.5d+208)) then
tmp = y2 * (t * ((a * y5) - (c * y4)))
else if (c <= 8.2d-230) then
tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) + (x * ((c * y0) - (a * y1))))
else if (c <= 1.65d-90) then
tmp = (-1.0d0) * (y0 * (y5 * ((k * y2) - (j * y3))))
else if (c <= 2.6d+93) then
tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0
else
tmp = y2 * (y4 * (t * (((k * y1) / t) - c)))
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 (c <= -6.5e+208) {
tmp = y2 * (t * ((a * y5) - (c * y4)));
} else if (c <= 8.2e-230) {
tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) + (x * ((c * y0) - (a * y1))));
} else if (c <= 1.65e-90) {
tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
} else if (c <= 2.6e+93) {
tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
} else {
tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if c <= -6.5e+208: tmp = y2 * (t * ((a * y5) - (c * y4))) elif c <= 8.2e-230: tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) + (x * ((c * y0) - (a * y1)))) elif c <= 1.65e-90: tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3)))) elif c <= 2.6e+93: tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0 else: tmp = y2 * (y4 * (t * (((k * y1) / t) - c))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (c <= -6.5e+208) tmp = Float64(y2 * Float64(t * Float64(Float64(a * y5) - Float64(c * y4)))); elseif (c <= 8.2e-230) tmp = Float64(y2 * Float64(Float64(k * Float64(Float64(y1 * y4) - Float64(y0 * y5))) + Float64(x * Float64(Float64(c * y0) - Float64(a * y1))))); elseif (c <= 1.65e-90) tmp = Float64(-1.0 * Float64(y0 * Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3))))); elseif (c <= 2.6e+93) tmp = Float64(Float64(Float64(Float64(Float64(y5 * j) - Float64(c * z)) * y3) - Float64(Float64(j * x) * b)) * y0); else tmp = Float64(y2 * Float64(y4 * Float64(t * Float64(Float64(Float64(k * y1) / t) - c)))); 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 (c <= -6.5e+208) tmp = y2 * (t * ((a * y5) - (c * y4))); elseif (c <= 8.2e-230) tmp = y2 * ((k * ((y1 * y4) - (y0 * y5))) + (x * ((c * y0) - (a * y1)))); elseif (c <= 1.65e-90) tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3)))); elseif (c <= 2.6e+93) tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0; else tmp = y2 * (y4 * (t * (((k * y1) / t) - c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[c, -65000000000000001102319847813809242209613085260540269638162639789824362982102521052478487892408822618664445666083226208553839155667882130484891713264000436776425818657509079475219860537393568141661271354245120], N[(y2 * N[(t * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4479198687200445/54624374234151766213262145869588543874209860176411919649966143993970993052202041929903572589539772749766081827581405105732721063150545838738336612780694159737611530891378807262929537318189580490579681412185183043434010607923007170897214483464192], N[(y2 * N[(N[(k * N[(N[(y1 * y4), $MachinePrecision] - N[(y0 * y5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(c * y0), $MachinePrecision] - N[(a * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1892136358191809/1146749307995035755805410447651043470398282494584140561868794419693461438044242404035009276555062843277312], N[(-1 * N[(y0 * N[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2599999999999999996988882896693688366983777636187134357388627186633339674055586880534312124416], N[(N[(N[(N[(N[(y5 * j), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * y3), $MachinePrecision] - N[(N[(j * x), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] * y0), $MachinePrecision], N[(y2 * N[(y4 * N[(t * N[(N[(N[(k * y1), $MachinePrecision] / t), $MachinePrecision] - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\mathbf{if}\;c \leq -65000000000000001102319847813809242209613085260540269638162639789824362982102521052478487892408822618664445666083226208553839155667882130484891713264000436776425818657509079475219860537393568141661271354245120:\\
\;\;\;\;y2 \cdot \left(t \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\mathbf{elif}\;c \leq \frac{4479198687200445}{54624374234151766213262145869588543874209860176411919649966143993970993052202041929903572589539772749766081827581405105732721063150545838738336612780694159737611530891378807262929537318189580490579681412185183043434010607923007170897214483464192}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4 - y0 \cdot y5\right) + x \cdot \left(c \cdot y0 - a \cdot y1\right)\right)\\
\mathbf{elif}\;c \leq \frac{1892136358191809}{1146749307995035755805410447651043470398282494584140561868794419693461438044242404035009276555062843277312}:\\
\;\;\;\;-1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\
\mathbf{elif}\;c \leq 2599999999999999996988882896693688366983777636187134357388627186633339674055586880534312124416:\\
\;\;\;\;\left(\left(y5 \cdot j - c \cdot z\right) \cdot y3 - \left(j \cdot x\right) \cdot b\right) \cdot y0\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(t \cdot \left(\frac{k \cdot y1}{t} - c\right)\right)\right)\\
\end{array}
if c < -6.5000000000000001e208Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
if -6.5000000000000001e208 < c < 8.2000000000000003e-230Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in t around 0
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6435.1%
Applied rewrites35.1%
if 8.2000000000000003e-230 < c < 1.65e-90Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.7%
Applied rewrites27.7%
if 1.65e-90 < c < 2.6e93Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.7%
Applied rewrites34.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6431.3%
Applied rewrites31.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6431.3%
Applied rewrites31.3%
if 2.6e93 < c Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6429.2%
Applied rewrites29.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y4
-235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968)
(* k (+ (* (* y4 (- b)) y) (* (* y2 y1) y4)))
(if (<= y4 -1299999999999999950031673044027917767540736)
(* t (* y4 (- (* b j) (* c y2))))
(if (<=
y4
3807566061702267/1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888)
(* (- (* (- (* y5 j) (* c z)) y3) (* (* j x) b)) y0)
(* y2 (* y4 (* t (- (/ (* k y1) t) c))))))))double code(double x, double y, double z, double t, double 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 (y4 <= -2.35e+221) {
tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4));
} else if (y4 <= -1.3e+42) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else if (y4 <= 3.4e-87) {
tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
} else {
tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
}
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 (y4 <= (-2.35d+221)) then
tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4))
else if (y4 <= (-1.3d+42)) then
tmp = t * (y4 * ((b * j) - (c * y2)))
else if (y4 <= 3.4d-87) then
tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0
else
tmp = y2 * (y4 * (t * (((k * y1) / t) - c)))
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 (y4 <= -2.35e+221) {
tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4));
} else if (y4 <= -1.3e+42) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else if (y4 <= 3.4e-87) {
tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0;
} else {
tmp = y2 * (y4 * (t * (((k * y1) / t) - c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y4 <= -2.35e+221: tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4)) elif y4 <= -1.3e+42: tmp = t * (y4 * ((b * j) - (c * y2))) elif y4 <= 3.4e-87: tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0 else: tmp = y2 * (y4 * (t * (((k * y1) / t) - c))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y4 <= -2.35e+221) tmp = Float64(k * Float64(Float64(Float64(y4 * Float64(-b)) * y) + Float64(Float64(y2 * y1) * y4))); elseif (y4 <= -1.3e+42) tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2)))); elseif (y4 <= 3.4e-87) tmp = Float64(Float64(Float64(Float64(Float64(y5 * j) - Float64(c * z)) * y3) - Float64(Float64(j * x) * b)) * y0); else tmp = Float64(y2 * Float64(y4 * Float64(t * Float64(Float64(Float64(k * y1) / t) - c)))); 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 (y4 <= -2.35e+221) tmp = k * (((y4 * -b) * y) + ((y2 * y1) * y4)); elseif (y4 <= -1.3e+42) tmp = t * (y4 * ((b * j) - (c * y2))); elseif (y4 <= 3.4e-87) tmp = ((((y5 * j) - (c * z)) * y3) - ((j * x) * b)) * y0; else tmp = y2 * (y4 * (t * (((k * y1) / t) - c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968], N[(k * N[(N[(N[(y4 * (-b)), $MachinePrecision] * y), $MachinePrecision] + N[(N[(y2 * y1), $MachinePrecision] * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -1299999999999999950031673044027917767540736], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 3807566061702267/1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888], N[(N[(N[(N[(N[(y5 * j), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * y3), $MachinePrecision] - N[(N[(j * x), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] * y0), $MachinePrecision], N[(y2 * N[(y4 * N[(t * N[(N[(N[(k * y1), $MachinePrecision] / t), $MachinePrecision] - c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -235000000000000002925094269901874079879837067681657234384705854986725262726097242269821124197300069980790676947583977772489313485868588652453278526004332208404051373736432761311382436609757234254301415158021495202374483968:\\
\;\;\;\;k \cdot \left(\left(y4 \cdot \left(-b\right)\right) \cdot y + \left(y2 \cdot y1\right) \cdot y4\right)\\
\mathbf{elif}\;y4 \leq -1299999999999999950031673044027917767540736:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\
\mathbf{elif}\;y4 \leq \frac{3807566061702267}{1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888}:\\
\;\;\;\;\left(\left(y5 \cdot j - c \cdot z\right) \cdot y3 - \left(j \cdot x\right) \cdot b\right) \cdot y0\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(t \cdot \left(\frac{k \cdot y1}{t} - c\right)\right)\right)\\
\end{array}
if y4 < -2.35e221Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
lift-*.f64N/A
lift-+.f64N/A
distribute-rgt-inN/A
lower-+.f64N/A
*-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-neg.f64N/A
lower-*.f6424.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6424.5%
Applied rewrites24.5%
if -2.35e221 < y4 < -1.3e42Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if -1.3e42 < y4 < 3.3999999999999999e-87Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in y3 around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6434.7%
Applied rewrites34.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f6431.3%
Applied rewrites31.3%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6431.3%
Applied rewrites31.3%
if 3.3999999999999999e-87 < y4 Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6429.2%
Applied rewrites29.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y5
-39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760)
(* -1 (* y0 (* y5 (- (* k y2) (* j y3)))))
(if (<=
y5
912488123524439/2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888)
(* y4 (* t (- (* b j) (* c y2))))
(if (<=
y5
280000000000000004096594664588964448671612036602103416598011020407542981990321500454912)
(* (* k (- (* y2 y1) (* b y))) y4)
(* y2 (* -1 (* y5 (- (* k y0) (* a t)))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -3.9e+115) {
tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
} else if (y5 <= 4e-178) {
tmp = y4 * (t * ((b * j) - (c * y2)));
} else if (y5 <= 2.8e+86) {
tmp = (k * ((y2 * y1) - (b * y))) * y4;
} else {
tmp = y2 * (-1.0 * (y5 * ((k * y0) - (a * t))));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y5 <= (-3.9d+115)) then
tmp = (-1.0d0) * (y0 * (y5 * ((k * y2) - (j * y3))))
else if (y5 <= 4d-178) then
tmp = y4 * (t * ((b * j) - (c * y2)))
else if (y5 <= 2.8d+86) then
tmp = (k * ((y2 * y1) - (b * y))) * y4
else
tmp = y2 * ((-1.0d0) * (y5 * ((k * y0) - (a * t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -3.9e+115) {
tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
} else if (y5 <= 4e-178) {
tmp = y4 * (t * ((b * j) - (c * y2)));
} else if (y5 <= 2.8e+86) {
tmp = (k * ((y2 * y1) - (b * y))) * y4;
} else {
tmp = y2 * (-1.0 * (y5 * ((k * y0) - (a * t))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y5 <= -3.9e+115: tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3)))) elif y5 <= 4e-178: tmp = y4 * (t * ((b * j) - (c * y2))) elif y5 <= 2.8e+86: tmp = (k * ((y2 * y1) - (b * y))) * y4 else: tmp = y2 * (-1.0 * (y5 * ((k * y0) - (a * t)))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y5 <= -3.9e+115) tmp = Float64(-1.0 * Float64(y0 * Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3))))); elseif (y5 <= 4e-178) tmp = Float64(y4 * Float64(t * Float64(Float64(b * j) - Float64(c * y2)))); elseif (y5 <= 2.8e+86) tmp = Float64(Float64(k * Float64(Float64(y2 * y1) - Float64(b * y))) * y4); else tmp = Float64(y2 * Float64(-1.0 * Float64(y5 * Float64(Float64(k * y0) - Float64(a * t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y5 <= -3.9e+115) tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3)))); elseif (y5 <= 4e-178) tmp = y4 * (t * ((b * j) - (c * y2))); elseif (y5 <= 2.8e+86) tmp = (k * ((y2 * y1) - (b * y))) * y4; else tmp = y2 * (-1.0 * (y5 * ((k * y0) - (a * t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760], N[(-1 * N[(y0 * N[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 912488123524439/2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888], N[(y4 * N[(t * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 280000000000000004096594664588964448671612036602103416598011020407542981990321500454912], N[(N[(k * N[(N[(y2 * y1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision], N[(y2 * N[(-1 * N[(y5 * N[(N[(k * y0), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y5 \leq -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760:\\
\;\;\;\;-1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\
\mathbf{elif}\;y5 \leq \frac{912488123524439}{2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888}:\\
\;\;\;\;y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right)\\
\mathbf{elif}\;y5 \leq 280000000000000004096594664588964448671612036602103416598011020407542981990321500454912:\\
\;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(-1 \cdot \left(y5 \cdot \left(k \cdot y0 - a \cdot t\right)\right)\right)\\
\end{array}
if y5 < -3.9000000000000001e115Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.7%
Applied rewrites27.7%
if -3.9000000000000001e115 < y5 < 3.9999999999999998e-178Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.4%
Applied rewrites27.4%
if 3.9999999999999998e-178 < y5 < 2.8e86Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6426.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f6426.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6426.8%
Applied rewrites26.8%
if 2.8e86 < y5 Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y5 around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0%
Applied rewrites27.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y5
-39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760)
(* -1 (* y0 (* y5 (- (* k y2) (* j y3)))))
(if (<=
y5
912488123524439/2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888)
(* y4 (* t (- (* b j) (* c y2))))
(if (<= y5 260)
(* (* k (- (* y2 y1) (* b y))) y4)
(* y0 (* y2 (+ (* -1 (* k y5)) (* c x))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -3.9e+115) {
tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
} else if (y5 <= 4e-178) {
tmp = y4 * (t * ((b * j) - (c * y2)));
} else if (y5 <= 260.0) {
tmp = (k * ((y2 * y1) - (b * y))) * y4;
} else {
tmp = y0 * (y2 * ((-1.0 * (k * y5)) + (c * x)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y5 <= (-3.9d+115)) then
tmp = (-1.0d0) * (y0 * (y5 * ((k * y2) - (j * y3))))
else if (y5 <= 4d-178) then
tmp = y4 * (t * ((b * j) - (c * y2)))
else if (y5 <= 260.0d0) then
tmp = (k * ((y2 * y1) - (b * y))) * y4
else
tmp = y0 * (y2 * (((-1.0d0) * (k * y5)) + (c * x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y5 <= -3.9e+115) {
tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
} else if (y5 <= 4e-178) {
tmp = y4 * (t * ((b * j) - (c * y2)));
} else if (y5 <= 260.0) {
tmp = (k * ((y2 * y1) - (b * y))) * y4;
} else {
tmp = y0 * (y2 * ((-1.0 * (k * y5)) + (c * x)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y5 <= -3.9e+115: tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3)))) elif y5 <= 4e-178: tmp = y4 * (t * ((b * j) - (c * y2))) elif y5 <= 260.0: tmp = (k * ((y2 * y1) - (b * y))) * y4 else: tmp = y0 * (y2 * ((-1.0 * (k * y5)) + (c * x))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y5 <= -3.9e+115) tmp = Float64(-1.0 * Float64(y0 * Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3))))); elseif (y5 <= 4e-178) tmp = Float64(y4 * Float64(t * Float64(Float64(b * j) - Float64(c * y2)))); elseif (y5 <= 260.0) tmp = Float64(Float64(k * Float64(Float64(y2 * y1) - Float64(b * y))) * y4); else tmp = Float64(y0 * Float64(y2 * Float64(Float64(-1.0 * Float64(k * y5)) + Float64(c * x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y5 <= -3.9e+115) tmp = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3)))); elseif (y5 <= 4e-178) tmp = y4 * (t * ((b * j) - (c * y2))); elseif (y5 <= 260.0) tmp = (k * ((y2 * y1) - (b * y))) * y4; else tmp = y0 * (y2 * ((-1.0 * (k * y5)) + (c * x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y5, -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760], N[(-1 * N[(y0 * N[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 912488123524439/2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888], N[(y4 * N[(t * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 260], N[(N[(k * N[(N[(y2 * y1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision], N[(y0 * N[(y2 * N[(N[(-1 * N[(k * y5), $MachinePrecision]), $MachinePrecision] + N[(c * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y5 \leq -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760:\\
\;\;\;\;-1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\
\mathbf{elif}\;y5 \leq \frac{912488123524439}{2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888}:\\
\;\;\;\;y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right)\\
\mathbf{elif}\;y5 \leq 260:\\
\;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\
\mathbf{else}:\\
\;\;\;\;y0 \cdot \left(y2 \cdot \left(-1 \cdot \left(k \cdot y5\right) + c \cdot x\right)\right)\\
\end{array}
if y5 < -3.9000000000000001e115Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.7%
Applied rewrites27.7%
if -3.9000000000000001e115 < y5 < 3.9999999999999998e-178Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.4%
Applied rewrites27.4%
if 3.9999999999999998e-178 < y5 < 260Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6426.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f6426.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6426.8%
Applied rewrites26.8%
if 260 < y5 Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6427.7%
Applied rewrites27.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* -1 (* y0 (* y5 (- (* k y2) (* j y3)))))))
(if (<=
y5
-39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760)
t_1
(if (<=
y5
912488123524439/2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888)
(* y4 (* t (- (* b j) (* c y2))))
(if (<= y5 19500000000)
(* (* k (- (* y2 y1) (* b y))) 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 = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
double tmp;
if (y5 <= -3.9e+115) {
tmp = t_1;
} else if (y5 <= 4e-178) {
tmp = y4 * (t * ((b * j) - (c * y2)));
} else if (y5 <= 19500000000.0) {
tmp = (k * ((y2 * y1) - (b * y))) * 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 = (-1.0d0) * (y0 * (y5 * ((k * y2) - (j * y3))))
if (y5 <= (-3.9d+115)) then
tmp = t_1
else if (y5 <= 4d-178) then
tmp = y4 * (t * ((b * j) - (c * y2)))
else if (y5 <= 19500000000.0d0) then
tmp = (k * ((y2 * y1) - (b * y))) * 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 = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3))));
double tmp;
if (y5 <= -3.9e+115) {
tmp = t_1;
} else if (y5 <= 4e-178) {
tmp = y4 * (t * ((b * j) - (c * y2)));
} else if (y5 <= 19500000000.0) {
tmp = (k * ((y2 * y1) - (b * y))) * 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 = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3)))) tmp = 0 if y5 <= -3.9e+115: tmp = t_1 elif y5 <= 4e-178: tmp = y4 * (t * ((b * j) - (c * y2))) elif y5 <= 19500000000.0: tmp = (k * ((y2 * y1) - (b * y))) * 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(-1.0 * Float64(y0 * Float64(y5 * Float64(Float64(k * y2) - Float64(j * y3))))) tmp = 0.0 if (y5 <= -3.9e+115) tmp = t_1; elseif (y5 <= 4e-178) tmp = Float64(y4 * Float64(t * Float64(Float64(b * j) - Float64(c * y2)))); elseif (y5 <= 19500000000.0) tmp = Float64(Float64(k * Float64(Float64(y2 * y1) - Float64(b * y))) * 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 = -1.0 * (y0 * (y5 * ((k * y2) - (j * y3)))); tmp = 0.0; if (y5 <= -3.9e+115) tmp = t_1; elseif (y5 <= 4e-178) tmp = y4 * (t * ((b * j) - (c * y2))); elseif (y5 <= 19500000000.0) tmp = (k * ((y2 * y1) - (b * y))) * 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[(-1 * N[(y0 * N[(y5 * N[(N[(k * y2), $MachinePrecision] - N[(j * y3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y5, -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760], t$95$1, If[LessEqual[y5, 912488123524439/2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888], N[(y4 * N[(t * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y5, 19500000000], N[(N[(k * N[(N[(y2 * y1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y4), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := -1 \cdot \left(y0 \cdot \left(y5 \cdot \left(k \cdot y2 - j \cdot y3\right)\right)\right)\\
\mathbf{if}\;y5 \leq -39000000000000000606817229049206877946459854479921395901421052636802517465425472427334430206686850459372044953845760:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y5 \leq \frac{912488123524439}{2281220308811097609320585802850145662446614253624279965289596258949637583604338693252956405658685699889321154786797203655344352360687718999126330659861107094125997337180132475041437096123301888}:\\
\;\;\;\;y4 \cdot \left(t \cdot \left(b \cdot j - c \cdot y2\right)\right)\\
\mathbf{elif}\;y5 \leq 19500000000:\\
\;\;\;\;\left(k \cdot \left(y2 \cdot y1 - b \cdot y\right)\right) \cdot y4\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y5 < -3.9000000000000001e115 or 1.95e10 < y5 Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
Taylor expanded in y5 around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.7%
Applied rewrites27.7%
if -3.9000000000000001e115 < y5 < 3.9999999999999998e-178Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.4%
Applied rewrites27.4%
if 3.9999999999999998e-178 < y5 < 1.95e10Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6426.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
mul-1-negN/A
sub-flip-reverseN/A
lower--.f6426.8%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6426.8%
Applied rewrites26.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y4
-20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440)
(* -1 (* b (* k (* y y4))))
(if (<= y4 -1179999999999999962102276357894053036032)
(* t (* y4 (- (* b j) (* c y2))))
(if (<=
y4
6332379880165729/904625697166532776746648320380374280103671755200316906558262375061821325312)
(* y0 (* x (- (* c y2) (* b j))))
(* c (* y4 (- (* y y3) (* t y2))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -2.05e+220) {
tmp = -1.0 * (b * (k * (y * y4)));
} else if (y4 <= -1.18e+39) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else if (y4 <= 7e-60) {
tmp = y0 * (x * ((c * y2) - (b * j)));
} else {
tmp = c * (y4 * ((y * y3) - (t * y2)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y4 <= (-2.05d+220)) then
tmp = (-1.0d0) * (b * (k * (y * y4)))
else if (y4 <= (-1.18d+39)) then
tmp = t * (y4 * ((b * j) - (c * y2)))
else if (y4 <= 7d-60) then
tmp = y0 * (x * ((c * y2) - (b * j)))
else
tmp = c * (y4 * ((y * y3) - (t * y2)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -2.05e+220) {
tmp = -1.0 * (b * (k * (y * y4)));
} else if (y4 <= -1.18e+39) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else if (y4 <= 7e-60) {
tmp = y0 * (x * ((c * y2) - (b * j)));
} else {
tmp = c * (y4 * ((y * y3) - (t * y2)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y4 <= -2.05e+220: tmp = -1.0 * (b * (k * (y * y4))) elif y4 <= -1.18e+39: tmp = t * (y4 * ((b * j) - (c * y2))) elif y4 <= 7e-60: tmp = y0 * (x * ((c * y2) - (b * j))) else: tmp = c * (y4 * ((y * y3) - (t * y2))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y4 <= -2.05e+220) tmp = Float64(-1.0 * Float64(b * Float64(k * Float64(y * y4)))); elseif (y4 <= -1.18e+39) tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2)))); elseif (y4 <= 7e-60) tmp = Float64(y0 * Float64(x * Float64(Float64(c * y2) - Float64(b * j)))); else tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y4 <= -2.05e+220) tmp = -1.0 * (b * (k * (y * y4))); elseif (y4 <= -1.18e+39) tmp = t * (y4 * ((b * j) - (c * y2))); elseif (y4 <= 7e-60) tmp = y0 * (x * ((c * y2) - (b * j))); else tmp = c * (y4 * ((y * y3) - (t * y2))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440], N[(-1 * N[(b * N[(k * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -1179999999999999962102276357894053036032], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 6332379880165729/904625697166532776746648320380374280103671755200316906558262375061821325312], N[(y0 * N[(x * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\
\mathbf{elif}\;y4 \leq -1179999999999999962102276357894053036032:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\
\mathbf{elif}\;y4 \leq \frac{6332379880165729}{904625697166532776746648320380374280103671755200316906558262375061821325312}:\\
\;\;\;\;y0 \cdot \left(x \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\end{array}
if y4 < -2.0499999999999999e220Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1%
Applied rewrites17.1%
if -2.0499999999999999e220 < y4 < -1.18e39Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if -1.18e39 < y4 < 6.9999999999999995e-60Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
if 6.9999999999999995e-60 < y4 Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y4
-20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440)
(* -1 (* b (* k (* y y4))))
(if (<= y4 -30000000000000001826021443431825408)
(* t (* y4 (- (* b j) (* c y2))))
(if (<=
y4
4742843975160471/3794275180128377091639574036764685364535950857523710002444946112771297432041422848)
(* y0 (* b (- (* k z) (* j x))))
(* c (* y4 (- (* y y3) (* t y2))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -2.05e+220) {
tmp = -1.0 * (b * (k * (y * y4)));
} else if (y4 <= -3e+34) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else if (y4 <= 1.25e-66) {
tmp = y0 * (b * ((k * z) - (j * x)));
} else {
tmp = c * (y4 * ((y * y3) - (t * y2)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y4 <= (-2.05d+220)) then
tmp = (-1.0d0) * (b * (k * (y * y4)))
else if (y4 <= (-3d+34)) then
tmp = t * (y4 * ((b * j) - (c * y2)))
else if (y4 <= 1.25d-66) then
tmp = y0 * (b * ((k * z) - (j * x)))
else
tmp = c * (y4 * ((y * y3) - (t * y2)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -2.05e+220) {
tmp = -1.0 * (b * (k * (y * y4)));
} else if (y4 <= -3e+34) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else if (y4 <= 1.25e-66) {
tmp = y0 * (b * ((k * z) - (j * x)));
} else {
tmp = c * (y4 * ((y * y3) - (t * y2)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y4 <= -2.05e+220: tmp = -1.0 * (b * (k * (y * y4))) elif y4 <= -3e+34: tmp = t * (y4 * ((b * j) - (c * y2))) elif y4 <= 1.25e-66: tmp = y0 * (b * ((k * z) - (j * x))) else: tmp = c * (y4 * ((y * y3) - (t * y2))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y4 <= -2.05e+220) tmp = Float64(-1.0 * Float64(b * Float64(k * Float64(y * y4)))); elseif (y4 <= -3e+34) tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2)))); elseif (y4 <= 1.25e-66) tmp = Float64(y0 * Float64(b * Float64(Float64(k * z) - Float64(j * x)))); else tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y4 <= -2.05e+220) tmp = -1.0 * (b * (k * (y * y4))); elseif (y4 <= -3e+34) tmp = t * (y4 * ((b * j) - (c * y2))); elseif (y4 <= 1.25e-66) tmp = y0 * (b * ((k * z) - (j * x))); else tmp = c * (y4 * ((y * y3) - (t * y2))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440], N[(-1 * N[(b * N[(k * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -30000000000000001826021443431825408], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 4742843975160471/3794275180128377091639574036764685364535950857523710002444946112771297432041422848], N[(y0 * N[(b * N[(N[(k * z), $MachinePrecision] - N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\
\mathbf{elif}\;y4 \leq -30000000000000001826021443431825408:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\
\mathbf{elif}\;y4 \leq \frac{4742843975160471}{3794275180128377091639574036764685364535950857523710002444946112771297432041422848}:\\
\;\;\;\;y0 \cdot \left(b \cdot \left(k \cdot z - j \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\end{array}
if y4 < -2.0499999999999999e220Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1%
Applied rewrites17.1%
if -2.0499999999999999e220 < y4 < -3.0000000000000002e34Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if -3.0000000000000002e34 < y4 < 1.2499999999999999e-66Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f6417.4%
Applied rewrites17.4%
Taylor expanded in b around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
if 1.2499999999999999e-66 < y4 Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y4
-20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440)
(* -1 (* b (* k (* y y4))))
(if (<= y4 -1179999999999999962102276357894053036032)
(* t (* y4 (- (* b j) (* c y2))))
(if (<=
y4
4553130216154053/3794275180128377091639574036764685364535950857523710002444946112771297432041422848)
(* x (* y0 (- (* c y2) (* b j))))
(* c (* y4 (- (* y y3) (* t y2))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -2.05e+220) {
tmp = -1.0 * (b * (k * (y * y4)));
} else if (y4 <= -1.18e+39) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else if (y4 <= 1.2e-66) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else {
tmp = c * (y4 * ((y * y3) - (t * y2)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y4 <= (-2.05d+220)) then
tmp = (-1.0d0) * (b * (k * (y * y4)))
else if (y4 <= (-1.18d+39)) then
tmp = t * (y4 * ((b * j) - (c * y2)))
else if (y4 <= 1.2d-66) then
tmp = x * (y0 * ((c * y2) - (b * j)))
else
tmp = c * (y4 * ((y * y3) - (t * y2)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -2.05e+220) {
tmp = -1.0 * (b * (k * (y * y4)));
} else if (y4 <= -1.18e+39) {
tmp = t * (y4 * ((b * j) - (c * y2)));
} else if (y4 <= 1.2e-66) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else {
tmp = c * (y4 * ((y * y3) - (t * y2)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y4 <= -2.05e+220: tmp = -1.0 * (b * (k * (y * y4))) elif y4 <= -1.18e+39: tmp = t * (y4 * ((b * j) - (c * y2))) elif y4 <= 1.2e-66: tmp = x * (y0 * ((c * y2) - (b * j))) else: tmp = c * (y4 * ((y * y3) - (t * y2))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y4 <= -2.05e+220) tmp = Float64(-1.0 * Float64(b * Float64(k * Float64(y * y4)))); elseif (y4 <= -1.18e+39) tmp = Float64(t * Float64(y4 * Float64(Float64(b * j) - Float64(c * y2)))); elseif (y4 <= 1.2e-66) tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j)))); else tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y4 <= -2.05e+220) tmp = -1.0 * (b * (k * (y * y4))); elseif (y4 <= -1.18e+39) tmp = t * (y4 * ((b * j) - (c * y2))); elseif (y4 <= 1.2e-66) tmp = x * (y0 * ((c * y2) - (b * j))); else tmp = c * (y4 * ((y * y3) - (t * y2))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440], N[(-1 * N[(b * N[(k * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -1179999999999999962102276357894053036032], N[(t * N[(y4 * N[(N[(b * j), $MachinePrecision] - N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 4553130216154053/3794275180128377091639574036764685364535950857523710002444946112771297432041422848], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -20499999999999999049083573240839211087156710910556222747439268135562514181976610085419157159294980529101273476505457110097196150312921216106481682108319928000218574889744426725627686736648205031993476680596884037241405440:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\
\mathbf{elif}\;y4 \leq -1179999999999999962102276357894053036032:\\
\;\;\;\;t \cdot \left(y4 \cdot \left(b \cdot j - c \cdot y2\right)\right)\\
\mathbf{elif}\;y4 \leq \frac{4553130216154053}{3794275180128377091639574036764685364535950857523710002444946112771297432041422848}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\end{array}
if y4 < -2.0499999999999999e220Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1%
Applied rewrites17.1%
if -2.0499999999999999e220 < y4 < -1.18e39Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if -1.18e39 < y4 < 1.2000000000000001e-66Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if 1.2000000000000001e-66 < y4 Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y4
-1149999999999999951775834087413247301497768081717526947674205383112736148189884013821227930090315158760150484918503898612399865856)
(* b (* y4 (- (* j t) (* k y))))
(if (<=
y4
3695578824593377/1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888)
(* y0 (* j (- (* y3 y5) (* b x))))
(* c (* y4 (- (* y y3) (* t y2)))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -1.15e+129) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y4 <= 3.3e-87) {
tmp = y0 * (j * ((y3 * y5) - (b * x)));
} else {
tmp = c * (y4 * ((y * y3) - (t * y2)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y4 <= (-1.15d+129)) then
tmp = b * (y4 * ((j * t) - (k * y)))
else if (y4 <= 3.3d-87) then
tmp = y0 * (j * ((y3 * y5) - (b * x)))
else
tmp = c * (y4 * ((y * y3) - (t * y2)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -1.15e+129) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y4 <= 3.3e-87) {
tmp = y0 * (j * ((y3 * y5) - (b * x)));
} else {
tmp = c * (y4 * ((y * y3) - (t * y2)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y4 <= -1.15e+129: tmp = b * (y4 * ((j * t) - (k * y))) elif y4 <= 3.3e-87: tmp = y0 * (j * ((y3 * y5) - (b * x))) else: tmp = c * (y4 * ((y * y3) - (t * y2))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y4 <= -1.15e+129) tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))); elseif (y4 <= 3.3e-87) tmp = Float64(y0 * Float64(j * Float64(Float64(y3 * y5) - Float64(b * x)))); else tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y4 <= -1.15e+129) tmp = b * (y4 * ((j * t) - (k * y))); elseif (y4 <= 3.3e-87) tmp = y0 * (j * ((y3 * y5) - (b * x))); else tmp = c * (y4 * ((y * y3) - (t * y2))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -1149999999999999951775834087413247301497768081717526947674205383112736148189884013821227930090315158760150484918503898612399865856], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 3695578824593377/1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888], N[(y0 * N[(j * N[(N[(y3 * y5), $MachinePrecision] - N[(b * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -1149999999999999951775834087413247301497768081717526947674205383112736148189884013821227930090315158760150484918503898612399865856:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{elif}\;y4 \leq \frac{3695578824593377}{1119872371088902105278721140284222139060822748617324767449994550481895935590080472690438746635803557888}:\\
\;\;\;\;y0 \cdot \left(j \cdot \left(y3 \cdot y5 - b \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\end{array}
if y4 < -1.15e129Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
if -1.15e129 < y4 < 3.3e-87Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f6417.4%
Applied rewrites17.4%
Taylor expanded in j around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if 3.3e-87 < y4 Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y4
-580000000000000009442839750821744349527359899902853629817248546816)
(* b (* y4 (- (* j t) (* k y))))
(if (<=
y4
4553130216154053/3794275180128377091639574036764685364535950857523710002444946112771297432041422848)
(* x (* y0 (- (* c y2) (* b j))))
(* c (* y4 (- (* y y3) (* t y2)))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -5.8e+65) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y4 <= 1.2e-66) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else {
tmp = c * (y4 * ((y * y3) - (t * y2)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y4 <= (-5.8d+65)) then
tmp = b * (y4 * ((j * t) - (k * y)))
else if (y4 <= 1.2d-66) then
tmp = x * (y0 * ((c * y2) - (b * j)))
else
tmp = c * (y4 * ((y * y3) - (t * y2)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -5.8e+65) {
tmp = b * (y4 * ((j * t) - (k * y)));
} else if (y4 <= 1.2e-66) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else {
tmp = c * (y4 * ((y * y3) - (t * y2)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y4 <= -5.8e+65: tmp = b * (y4 * ((j * t) - (k * y))) elif y4 <= 1.2e-66: tmp = x * (y0 * ((c * y2) - (b * j))) else: tmp = c * (y4 * ((y * y3) - (t * y2))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y4 <= -5.8e+65) tmp = Float64(b * Float64(y4 * Float64(Float64(j * t) - Float64(k * y)))); elseif (y4 <= 1.2e-66) tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j)))); else tmp = Float64(c * Float64(y4 * Float64(Float64(y * y3) - Float64(t * y2)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y4 <= -5.8e+65) tmp = b * (y4 * ((j * t) - (k * y))); elseif (y4 <= 1.2e-66) tmp = x * (y0 * ((c * y2) - (b * j))); else tmp = c * (y4 * ((y * y3) - (t * y2))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -580000000000000009442839750821744349527359899902853629817248546816], N[(b * N[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 4553130216154053/3794275180128377091639574036764685364535950857523710002444946112771297432041422848], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(y4 * N[(N[(y * y3), $MachinePrecision] - N[(t * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -580000000000000009442839750821744349527359899902853629817248546816:\\
\;\;\;\;b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{elif}\;y4 \leq \frac{4553130216154053}{3794275180128377091639574036764685364535950857523710002444946112771297432041422848}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(y4 \cdot \left(y \cdot y3 - t \cdot y2\right)\right)\\
\end{array}
if y4 < -5.8000000000000001e65Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
if -5.8000000000000001e65 < y4 < 1.2000000000000001e-66Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if 1.2000000000000001e-66 < y4 Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* b (* y4 (- (* j t) (* k y))))))
(if (<=
y4
-580000000000000009442839750821744349527359899902853629817248546816)
t_1
(if (<=
y4
2630067950774187/82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584)
(* x (* y0 (- (* c y2) (* b j))))
(if (<=
y4
30000000000000000315349264840128417763036739601763302338988677653385608694709996861626870991629844457228044594473943904450756031504225012157388756575915313486815642971355216063894773098182757559232483502331158201806157277864180842496)
(* t (* y2 (- (* a y5) (* c 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 * (y4 * ((j * t) - (k * y)));
double tmp;
if (y4 <= -5.8e+65) {
tmp = t_1;
} else if (y4 <= 3.2e-194) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else if (y4 <= 3e+232) {
tmp = t * (y2 * ((a * y5) - (c * 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 * (y4 * ((j * t) - (k * y)))
if (y4 <= (-5.8d+65)) then
tmp = t_1
else if (y4 <= 3.2d-194) then
tmp = x * (y0 * ((c * y2) - (b * j)))
else if (y4 <= 3d+232) then
tmp = t * (y2 * ((a * y5) - (c * 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 * (y4 * ((j * t) - (k * y)));
double tmp;
if (y4 <= -5.8e+65) {
tmp = t_1;
} else if (y4 <= 3.2e-194) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else if (y4 <= 3e+232) {
tmp = t * (y2 * ((a * y5) - (c * 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 * (y4 * ((j * t) - (k * y))) tmp = 0 if y4 <= -5.8e+65: tmp = t_1 elif y4 <= 3.2e-194: tmp = x * (y0 * ((c * y2) - (b * j))) elif y4 <= 3e+232: tmp = t * (y2 * ((a * y5) - (c * 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(y4 * Float64(Float64(j * t) - Float64(k * y)))) tmp = 0.0 if (y4 <= -5.8e+65) tmp = t_1; elseif (y4 <= 3.2e-194) tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j)))); elseif (y4 <= 3e+232) tmp = Float64(t * Float64(y2 * Float64(Float64(a * y5) - Float64(c * 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 * (y4 * ((j * t) - (k * y))); tmp = 0.0; if (y4 <= -5.8e+65) tmp = t_1; elseif (y4 <= 3.2e-194) tmp = x * (y0 * ((c * y2) - (b * j))); elseif (y4 <= 3e+232) tmp = t * (y2 * ((a * y5) - (c * 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[(y4 * N[(N[(j * t), $MachinePrecision] - N[(k * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -580000000000000009442839750821744349527359899902853629817248546816], t$95$1, If[LessEqual[y4, 2630067950774187/82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 30000000000000000315349264840128417763036739601763302338988677653385608694709996861626870991629844457228044594473943904450756031504225012157388756575915313486815642971355216063894773098182757559232483502331158201806157277864180842496], N[(t * N[(y2 * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := b \cdot \left(y4 \cdot \left(j \cdot t - k \cdot y\right)\right)\\
\mathbf{if}\;y4 \leq -580000000000000009442839750821744349527359899902853629817248546816:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y4 \leq \frac{2630067950774187}{82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\mathbf{elif}\;y4 \leq 30000000000000000315349264840128417763036739601763302338988677653385608694709996861626870991629844457228044594473943904450756031504225012157388756575915313486815642971355216063894773098182757559232483502331158201806157277864180842496:\\
\;\;\;\;t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y4 < -5.8000000000000001e65 or 3e232 < y4 Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.3%
Applied rewrites27.3%
if -5.8000000000000001e65 < y4 < 3.2000000000000003e-194Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if 3.2000000000000003e-194 < y4 < 3e232Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0%
Applied rewrites27.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y4
-95000000000000001526752063214666332730830973890337443108643037127901184)
(* k (* -1 (* b (* y y4))))
(if (<=
y4
2630067950774187/82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584)
(* x (* y0 (- (* c y2) (* b j))))
(* t (* y2 (- (* a y5) (* c 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 (y4 <= -9.5e+70) {
tmp = k * (-1.0 * (b * (y * y4)));
} else if (y4 <= 3.2e-194) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else {
tmp = t * (y2 * ((a * y5) - (c * 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 (y4 <= (-9.5d+70)) then
tmp = k * ((-1.0d0) * (b * (y * y4)))
else if (y4 <= 3.2d-194) then
tmp = x * (y0 * ((c * y2) - (b * j)))
else
tmp = t * (y2 * ((a * y5) - (c * 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 (y4 <= -9.5e+70) {
tmp = k * (-1.0 * (b * (y * y4)));
} else if (y4 <= 3.2e-194) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else {
tmp = t * (y2 * ((a * y5) - (c * y4)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y4 <= -9.5e+70: tmp = k * (-1.0 * (b * (y * y4))) elif y4 <= 3.2e-194: tmp = x * (y0 * ((c * y2) - (b * j))) else: tmp = t * (y2 * ((a * y5) - (c * 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 (y4 <= -9.5e+70) tmp = Float64(k * Float64(-1.0 * Float64(b * Float64(y * y4)))); elseif (y4 <= 3.2e-194) tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j)))); else tmp = Float64(t * Float64(y2 * Float64(Float64(a * y5) - Float64(c * 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 (y4 <= -9.5e+70) tmp = k * (-1.0 * (b * (y * y4))); elseif (y4 <= 3.2e-194) tmp = x * (y0 * ((c * y2) - (b * j))); else tmp = t * (y2 * ((a * y5) - (c * y4))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -95000000000000001526752063214666332730830973890337443108643037127901184], N[(k * N[(-1 * N[(b * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 2630067950774187/82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y2 * N[(N[(a * y5), $MachinePrecision] - N[(c * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -95000000000000001526752063214666332730830973890337443108643037127901184:\\
\;\;\;\;k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right)\\
\mathbf{elif}\;y4 \leq \frac{2630067950774187}{82189623461693336050640466920002010399224059419112091554660639110448939910891887845526039629337319550421608888377784651765928628909121935361372105791435638280550369861381946846744746216942542457363957058371584}:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y2 \cdot \left(a \cdot y5 - c \cdot y4\right)\right)\\
\end{array}
if y4 < -9.5000000000000002e70Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.0%
Applied rewrites17.0%
if -9.5000000000000002e70 < y4 < 3.2000000000000003e-194Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if 3.2000000000000003e-194 < y4 Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.0%
Applied rewrites27.0%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y4
-95000000000000001526752063214666332730830973890337443108643037127901184)
(* k (* -1 (* b (* y y4))))
(if (<=
y4
4399999999999999812191971297156271594590950482519112105257629592585322063275105077772926140689872180106556195504042161244909692138580105756647936653603739411261668424494602659154624512)
(* x (* y0 (- (* c y2) (* b j))))
(* y2 (* y4 (* -1 (* c t)))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -9.5e+70) {
tmp = k * (-1.0 * (b * (y * y4)));
} else if (y4 <= 4.4e+183) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else {
tmp = y2 * (y4 * (-1.0 * (c * t)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y4 <= (-9.5d+70)) then
tmp = k * ((-1.0d0) * (b * (y * y4)))
else if (y4 <= 4.4d+183) then
tmp = x * (y0 * ((c * y2) - (b * j)))
else
tmp = y2 * (y4 * ((-1.0d0) * (c * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -9.5e+70) {
tmp = k * (-1.0 * (b * (y * y4)));
} else if (y4 <= 4.4e+183) {
tmp = x * (y0 * ((c * y2) - (b * j)));
} else {
tmp = y2 * (y4 * (-1.0 * (c * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y4 <= -9.5e+70: tmp = k * (-1.0 * (b * (y * y4))) elif y4 <= 4.4e+183: tmp = x * (y0 * ((c * y2) - (b * j))) else: tmp = y2 * (y4 * (-1.0 * (c * t))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y4 <= -9.5e+70) tmp = Float64(k * Float64(-1.0 * Float64(b * Float64(y * y4)))); elseif (y4 <= 4.4e+183) tmp = Float64(x * Float64(y0 * Float64(Float64(c * y2) - Float64(b * j)))); else tmp = Float64(y2 * Float64(y4 * Float64(-1.0 * Float64(c * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y4 <= -9.5e+70) tmp = k * (-1.0 * (b * (y * y4))); elseif (y4 <= 4.4e+183) tmp = x * (y0 * ((c * y2) - (b * j))); else tmp = y2 * (y4 * (-1.0 * (c * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -95000000000000001526752063214666332730830973890337443108643037127901184], N[(k * N[(-1 * N[(b * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 4399999999999999812191971297156271594590950482519112105257629592585322063275105077772926140689872180106556195504042161244909692138580105756647936653603739411261668424494602659154624512], N[(x * N[(y0 * N[(N[(c * y2), $MachinePrecision] - N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(y4 * N[(-1 * N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -95000000000000001526752063214666332730830973890337443108643037127901184:\\
\;\;\;\;k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right)\\
\mathbf{elif}\;y4 \leq 4399999999999999812191971297156271594590950482519112105257629592585322063275105077772926140689872180106556195504042161244909692138580105756647936653603739411261668424494602659154624512:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2 - b \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot t\right)\right)\right)\\
\end{array}
if y4 < -9.5000000000000002e70Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.0%
Applied rewrites17.0%
if -9.5000000000000002e70 < y4 < 4.3999999999999998e183Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
if 4.3999999999999998e183 < y4 Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6417.6%
Applied rewrites17.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y4
-10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040)
(* -1 (* b (* k (* y y4))))
(if (<= y4 -359999999999999983222784)
(* y2 (* -1 (* c (* t y4))))
(if (<=
y4
105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224)
(* y0 (* -1 (* b (* j x))))
(* y2 (* y4 (* -1 (* c t))))))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -1.05e+205) {
tmp = -1.0 * (b * (k * (y * y4)));
} else if (y4 <= -3.6e+23) {
tmp = y2 * (-1.0 * (c * (t * y4)));
} else if (y4 <= 1.06e+182) {
tmp = y0 * (-1.0 * (b * (j * x)));
} else {
tmp = y2 * (y4 * (-1.0 * (c * t)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (y4 <= (-1.05d+205)) then
tmp = (-1.0d0) * (b * (k * (y * y4)))
else if (y4 <= (-3.6d+23)) then
tmp = y2 * ((-1.0d0) * (c * (t * y4)))
else if (y4 <= 1.06d+182) then
tmp = y0 * ((-1.0d0) * (b * (j * x)))
else
tmp = y2 * (y4 * ((-1.0d0) * (c * t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (y4 <= -1.05e+205) {
tmp = -1.0 * (b * (k * (y * y4)));
} else if (y4 <= -3.6e+23) {
tmp = y2 * (-1.0 * (c * (t * y4)));
} else if (y4 <= 1.06e+182) {
tmp = y0 * (-1.0 * (b * (j * x)));
} else {
tmp = y2 * (y4 * (-1.0 * (c * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y4 <= -1.05e+205: tmp = -1.0 * (b * (k * (y * y4))) elif y4 <= -3.6e+23: tmp = y2 * (-1.0 * (c * (t * y4))) elif y4 <= 1.06e+182: tmp = y0 * (-1.0 * (b * (j * x))) else: tmp = y2 * (y4 * (-1.0 * (c * t))) return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (y4 <= -1.05e+205) tmp = Float64(-1.0 * Float64(b * Float64(k * Float64(y * y4)))); elseif (y4 <= -3.6e+23) tmp = Float64(y2 * Float64(-1.0 * Float64(c * Float64(t * y4)))); elseif (y4 <= 1.06e+182) tmp = Float64(y0 * Float64(-1.0 * Float64(b * Float64(j * x)))); else tmp = Float64(y2 * Float64(y4 * Float64(-1.0 * Float64(c * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (y4 <= -1.05e+205) tmp = -1.0 * (b * (k * (y * y4))); elseif (y4 <= -3.6e+23) tmp = y2 * (-1.0 * (c * (t * y4))); elseif (y4 <= 1.06e+182) tmp = y0 * (-1.0 * (b * (j * x))); else tmp = y2 * (y4 * (-1.0 * (c * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y4, -10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040], N[(-1 * N[(b * N[(k * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -359999999999999983222784], N[(y2 * N[(-1 * N[(c * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224], N[(y0 * N[(-1 * N[(b * N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(y4 * N[(-1 * N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\
\mathbf{elif}\;y4 \leq -359999999999999983222784:\\
\;\;\;\;y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right)\\
\mathbf{elif}\;y4 \leq 105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224:\\
\;\;\;\;y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(-1 \cdot \left(c \cdot t\right)\right)\right)\\
\end{array}
if y4 < -1.05e205Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1%
Applied rewrites17.1%
if -1.05e205 < y4 < -3.5999999999999998e23Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.6%
Applied rewrites17.6%
if -3.5999999999999998e23 < y4 < 1.0599999999999999e182Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.2%
Applied rewrites17.2%
if 1.0599999999999999e182 < y4 Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f6417.6%
Applied rewrites17.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* y2 (* -1 (* c (* t y4))))))
(if (<=
y4
-10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040)
(* -1 (* b (* k (* y y4))))
(if (<= y4 -359999999999999983222784)
t_1
(if (<=
y4
105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224)
(* y0 (* -1 (* b (* j x))))
t_1)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y2 * (-1.0 * (c * (t * y4)));
double tmp;
if (y4 <= -1.05e+205) {
tmp = -1.0 * (b * (k * (y * y4)));
} else if (y4 <= -3.6e+23) {
tmp = t_1;
} else if (y4 <= 1.06e+182) {
tmp = y0 * (-1.0 * (b * (j * x)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = y2 * ((-1.0d0) * (c * (t * y4)))
if (y4 <= (-1.05d+205)) then
tmp = (-1.0d0) * (b * (k * (y * y4)))
else if (y4 <= (-3.6d+23)) then
tmp = t_1
else if (y4 <= 1.06d+182) then
tmp = y0 * ((-1.0d0) * (b * (j * x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = y2 * (-1.0 * (c * (t * y4)));
double tmp;
if (y4 <= -1.05e+205) {
tmp = -1.0 * (b * (k * (y * y4)));
} else if (y4 <= -3.6e+23) {
tmp = t_1;
} else if (y4 <= 1.06e+182) {
tmp = y0 * (-1.0 * (b * (j * x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = y2 * (-1.0 * (c * (t * y4))) tmp = 0 if y4 <= -1.05e+205: tmp = -1.0 * (b * (k * (y * y4))) elif y4 <= -3.6e+23: tmp = t_1 elif y4 <= 1.06e+182: tmp = y0 * (-1.0 * (b * (j * x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(y2 * Float64(-1.0 * Float64(c * Float64(t * y4)))) tmp = 0.0 if (y4 <= -1.05e+205) tmp = Float64(-1.0 * Float64(b * Float64(k * Float64(y * y4)))); elseif (y4 <= -3.6e+23) tmp = t_1; elseif (y4 <= 1.06e+182) tmp = Float64(y0 * Float64(-1.0 * Float64(b * Float64(j * x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = y2 * (-1.0 * (c * (t * y4))); tmp = 0.0; if (y4 <= -1.05e+205) tmp = -1.0 * (b * (k * (y * y4))); elseif (y4 <= -3.6e+23) tmp = t_1; elseif (y4 <= 1.06e+182) tmp = y0 * (-1.0 * (b * (j * x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(y2 * N[(-1 * N[(c * N[(t * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y4, -10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040], N[(-1 * N[(b * N[(k * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, -359999999999999983222784], t$95$1, If[LessEqual[y4, 105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224], N[(y0 * N[(-1 * N[(b * N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := y2 \cdot \left(-1 \cdot \left(c \cdot \left(t \cdot y4\right)\right)\right)\\
\mathbf{if}\;y4 \leq -10500000000000000230162227660561077800556645328328581521460011546410713612135706429682960169738198235282059140669007091738867696479459408399894400379505191930471048755925787343585935892606024740416562135040:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\
\mathbf{elif}\;y4 \leq -359999999999999983222784:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y4 \leq 105999999999999992687947972006489862327633718848898179017571538741048351473747877828557191622418791320768886340008516950497320117433408019534154826824186436765698985418219486365876224:\\
\;\;\;\;y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y4 < -1.05e205Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1%
Applied rewrites17.1%
if -1.05e205 < y4 < -3.5999999999999998e23 or 1.0599999999999999e182 < y4 Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Taylor expanded in t around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.6%
Applied rewrites17.6%
if -3.5999999999999998e23 < y4 < 1.0599999999999999e182Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.2%
Applied rewrites17.2%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y4
-59999999999999995156912937696420957419420301676936215618657876227129344)
(* k (* -1 (* b (* y y4))))
(if (<=
y4
1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992)
(* y0 (* -1 (* b (* j x))))
(* y2 (* y4 (* 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 (y4 <= -6e+70) {
tmp = k * (-1.0 * (b * (y * y4)));
} else if (y4 <= 1.85e+180) {
tmp = y0 * (-1.0 * (b * (j * x)));
} else {
tmp = y2 * (y4 * (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 (y4 <= (-6d+70)) then
tmp = k * ((-1.0d0) * (b * (y * y4)))
else if (y4 <= 1.85d+180) then
tmp = y0 * ((-1.0d0) * (b * (j * x)))
else
tmp = y2 * (y4 * (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 (y4 <= -6e+70) {
tmp = k * (-1.0 * (b * (y * y4)));
} else if (y4 <= 1.85e+180) {
tmp = y0 * (-1.0 * (b * (j * x)));
} else {
tmp = y2 * (y4 * (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 y4 <= -6e+70: tmp = k * (-1.0 * (b * (y * y4))) elif y4 <= 1.85e+180: tmp = y0 * (-1.0 * (b * (j * x))) else: tmp = y2 * (y4 * (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 (y4 <= -6e+70) tmp = Float64(k * Float64(-1.0 * Float64(b * Float64(y * y4)))); elseif (y4 <= 1.85e+180) tmp = Float64(y0 * Float64(-1.0 * Float64(b * Float64(j * x)))); else tmp = Float64(y2 * Float64(y4 * 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 (y4 <= -6e+70) tmp = k * (-1.0 * (b * (y * y4))); elseif (y4 <= 1.85e+180) tmp = y0 * (-1.0 * (b * (j * x))); else tmp = y2 * (y4 * (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[y4, -59999999999999995156912937696420957419420301676936215618657876227129344], N[(k * N[(-1 * N[(b * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992], N[(y0 * N[(-1 * N[(b * N[(j * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y2 * N[(y4 * N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -59999999999999995156912937696420957419420301676936215618657876227129344:\\
\;\;\;\;k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right)\\
\mathbf{elif}\;y4 \leq 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992:\\
\;\;\;\;y0 \cdot \left(-1 \cdot \left(b \cdot \left(j \cdot x\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\
\end{array}
if y4 < -5.9999999999999995e70Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.0%
Applied rewrites17.0%
if -5.9999999999999995e70 < y4 < 1.8500000000000001e180Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.2%
Applied rewrites17.2%
if 1.8500000000000001e180 < y4 Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Taylor expanded in t around 0
lower-*.f6416.8%
Applied rewrites16.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
b
-101999999999999994211605678262383332680468213278501237048897552095448954825144283129551018746232818586615808)
(* x (* y0 (* -1 (* b j))))
(if (<= b -872305872233851/41538374868278621028243970633760768)
(* (* y0 x) (* y2 c))
(if (<=
b
5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544)
(* y2 (* k (* y1 y4)))
(* (* (* (- b) j) x) y0)))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (b <= -1.02e+107) {
tmp = x * (y0 * (-1.0 * (b * j)));
} else if (b <= -2.1e-20) {
tmp = (y0 * x) * (y2 * c);
} else if (b <= 5e+96) {
tmp = y2 * (k * (y1 * y4));
} else {
tmp = ((-b * j) * x) * y0;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (b <= (-1.02d+107)) then
tmp = x * (y0 * ((-1.0d0) * (b * j)))
else if (b <= (-2.1d-20)) then
tmp = (y0 * x) * (y2 * c)
else if (b <= 5d+96) then
tmp = y2 * (k * (y1 * y4))
else
tmp = ((-b * j) * x) * y0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (b <= -1.02e+107) {
tmp = x * (y0 * (-1.0 * (b * j)));
} else if (b <= -2.1e-20) {
tmp = (y0 * x) * (y2 * c);
} else if (b <= 5e+96) {
tmp = y2 * (k * (y1 * y4));
} else {
tmp = ((-b * j) * x) * y0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if b <= -1.02e+107: tmp = x * (y0 * (-1.0 * (b * j))) elif b <= -2.1e-20: tmp = (y0 * x) * (y2 * c) elif b <= 5e+96: tmp = y2 * (k * (y1 * y4)) else: tmp = ((-b * j) * x) * y0 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (b <= -1.02e+107) tmp = Float64(x * Float64(y0 * Float64(-1.0 * Float64(b * j)))); elseif (b <= -2.1e-20) tmp = Float64(Float64(y0 * x) * Float64(y2 * c)); elseif (b <= 5e+96) tmp = Float64(y2 * Float64(k * Float64(y1 * y4))); else tmp = Float64(Float64(Float64(Float64(-b) * j) * x) * y0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (b <= -1.02e+107) tmp = x * (y0 * (-1.0 * (b * j))); elseif (b <= -2.1e-20) tmp = (y0 * x) * (y2 * c); elseif (b <= 5e+96) tmp = y2 * (k * (y1 * y4)); else tmp = ((-b * j) * x) * y0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[b, -101999999999999994211605678262383332680468213278501237048897552095448954825144283129551018746232818586615808], N[(x * N[(y0 * N[(-1 * N[(b * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -872305872233851/41538374868278621028243970633760768], N[(N[(y0 * x), $MachinePrecision] * N[(y2 * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-b) * j), $MachinePrecision] * x), $MachinePrecision] * y0), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;b \leq -101999999999999994211605678262383332680468213278501237048897552095448954825144283129551018746232818586615808:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(-1 \cdot \left(b \cdot j\right)\right)\right)\\
\mathbf{elif}\;b \leq \frac{-872305872233851}{41538374868278621028243970633760768}:\\
\;\;\;\;\left(y0 \cdot x\right) \cdot \left(y2 \cdot c\right)\\
\mathbf{elif}\;b \leq 5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot y0\\
\end{array}
if b < -1.0199999999999999e107Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f6417.0%
Applied rewrites17.0%
if -1.0199999999999999e107 < b < -2.0999999999999999e-20Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6417.6%
Applied rewrites17.6%
if -2.0999999999999999e-20 < b < 5.0000000000000004e96Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
if 5.0000000000000004e96 < b Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f6417.4%
Applied rewrites17.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6417.4%
Applied rewrites17.4%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y4
-62000000000000006029444596520701436180166240548393544860868151823302656)
(* k (* -1 (* b (* y y4))))
(if (<=
y4
1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992)
(* (* (* (- b) j) x) y0)
(* y2 (* y4 (* 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 (y4 <= -6.2e+70) {
tmp = k * (-1.0 * (b * (y * y4)));
} else if (y4 <= 1.85e+180) {
tmp = ((-b * j) * x) * y0;
} else {
tmp = y2 * (y4 * (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 (y4 <= (-6.2d+70)) then
tmp = k * ((-1.0d0) * (b * (y * y4)))
else if (y4 <= 1.85d+180) then
tmp = ((-b * j) * x) * y0
else
tmp = y2 * (y4 * (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 (y4 <= -6.2e+70) {
tmp = k * (-1.0 * (b * (y * y4)));
} else if (y4 <= 1.85e+180) {
tmp = ((-b * j) * x) * y0;
} else {
tmp = y2 * (y4 * (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 y4 <= -6.2e+70: tmp = k * (-1.0 * (b * (y * y4))) elif y4 <= 1.85e+180: tmp = ((-b * j) * x) * y0 else: tmp = y2 * (y4 * (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 (y4 <= -6.2e+70) tmp = Float64(k * Float64(-1.0 * Float64(b * Float64(y * y4)))); elseif (y4 <= 1.85e+180) tmp = Float64(Float64(Float64(Float64(-b) * j) * x) * y0); else tmp = Float64(y2 * Float64(y4 * 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 (y4 <= -6.2e+70) tmp = k * (-1.0 * (b * (y * y4))); elseif (y4 <= 1.85e+180) tmp = ((-b * j) * x) * y0; else tmp = y2 * (y4 * (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[y4, -62000000000000006029444596520701436180166240548393544860868151823302656], N[(k * N[(-1 * N[(b * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992], N[(N[(N[((-b) * j), $MachinePrecision] * x), $MachinePrecision] * y0), $MachinePrecision], N[(y2 * N[(y4 * N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -62000000000000006029444596520701436180166240548393544860868151823302656:\\
\;\;\;\;k \cdot \left(-1 \cdot \left(b \cdot \left(y \cdot y4\right)\right)\right)\\
\mathbf{elif}\;y4 \leq 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992:\\
\;\;\;\;\left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot y0\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\
\end{array}
if y4 < -6.2000000000000006e70Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.0%
Applied rewrites17.0%
if -6.2000000000000006e70 < y4 < 1.8500000000000001e180Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f6417.4%
Applied rewrites17.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6417.4%
Applied rewrites17.4%
if 1.8500000000000001e180 < y4 Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Taylor expanded in t around 0
lower-*.f6416.8%
Applied rewrites16.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y4
-62000000000000006029444596520701436180166240548393544860868151823302656)
(* -1 (* b (* k (* y y4))))
(if (<=
y4
1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992)
(* (* (* (- b) j) x) y0)
(* y2 (* y4 (* 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 (y4 <= -6.2e+70) {
tmp = -1.0 * (b * (k * (y * y4)));
} else if (y4 <= 1.85e+180) {
tmp = ((-b * j) * x) * y0;
} else {
tmp = y2 * (y4 * (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 (y4 <= (-6.2d+70)) then
tmp = (-1.0d0) * (b * (k * (y * y4)))
else if (y4 <= 1.85d+180) then
tmp = ((-b * j) * x) * y0
else
tmp = y2 * (y4 * (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 (y4 <= -6.2e+70) {
tmp = -1.0 * (b * (k * (y * y4)));
} else if (y4 <= 1.85e+180) {
tmp = ((-b * j) * x) * y0;
} else {
tmp = y2 * (y4 * (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 y4 <= -6.2e+70: tmp = -1.0 * (b * (k * (y * y4))) elif y4 <= 1.85e+180: tmp = ((-b * j) * x) * y0 else: tmp = y2 * (y4 * (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 (y4 <= -6.2e+70) tmp = Float64(-1.0 * Float64(b * Float64(k * Float64(y * y4)))); elseif (y4 <= 1.85e+180) tmp = Float64(Float64(Float64(Float64(-b) * j) * x) * y0); else tmp = Float64(y2 * Float64(y4 * 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 (y4 <= -6.2e+70) tmp = -1.0 * (b * (k * (y * y4))); elseif (y4 <= 1.85e+180) tmp = ((-b * j) * x) * y0; else tmp = y2 * (y4 * (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[y4, -62000000000000006029444596520701436180166240548393544860868151823302656], N[(-1 * N[(b * N[(k * N[(y * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y4, 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992], N[(N[(N[((-b) * j), $MachinePrecision] * x), $MachinePrecision] * y0), $MachinePrecision], N[(y2 * N[(y4 * N[(k * y1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y4 \leq -62000000000000006029444596520701436180166240548393544860868151823302656:\\
\;\;\;\;-1 \cdot \left(b \cdot \left(k \cdot \left(y \cdot y4\right)\right)\right)\\
\mathbf{elif}\;y4 \leq 1850000000000000086213126020982953562417360610123142591667462306089241519987624615538466820102682770192216411087794395738618713790384491872370636589523266841665691372045950613716992:\\
\;\;\;\;\left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot y0\\
\mathbf{else}:\\
\;\;\;\;y2 \cdot \left(y4 \cdot \left(k \cdot y1\right)\right)\\
\end{array}
if y4 < -6.2000000000000006e70Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y around inf
lower-*.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.1%
Applied rewrites17.1%
if -6.2000000000000006e70 < y4 < 1.8500000000000001e180Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f6417.4%
Applied rewrites17.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6417.4%
Applied rewrites17.4%
if 1.8500000000000001e180 < y4 Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Taylor expanded in t around 0
lower-*.f6416.8%
Applied rewrites16.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(let* ((t_1 (* (* (* (- b) j) x) y0)))
(if (<= b -7443676776395529/664613997892457936451903530140172288)
t_1
(if (<=
b
5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544)
(* y2 (* k (* y1 y4)))
t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = ((-b * j) * x) * y0;
double tmp;
if (b <= -1.12e-20) {
tmp = t_1;
} else if (b <= 5e+96) {
tmp = y2 * (k * (y1 * y4));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = ((-b * j) * x) * y0
if (b <= (-1.12d-20)) then
tmp = t_1
else if (b <= 5d+96) then
tmp = y2 * (k * (y1 * y4))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = ((-b * j) * x) * y0;
double tmp;
if (b <= -1.12e-20) {
tmp = t_1;
} else if (b <= 5e+96) {
tmp = y2 * (k * (y1 * y4));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = ((-b * j) * x) * y0 tmp = 0 if b <= -1.12e-20: tmp = t_1 elif b <= 5e+96: tmp = y2 * (k * (y1 * y4)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(Float64(Float64(Float64(-b) * j) * x) * y0) tmp = 0.0 if (b <= -1.12e-20) tmp = t_1; elseif (b <= 5e+96) tmp = Float64(y2 * Float64(k * Float64(y1 * y4))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = ((-b * j) * x) * y0; tmp = 0.0; if (b <= -1.12e-20) tmp = t_1; elseif (b <= 5e+96) tmp = y2 * (k * (y1 * y4)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(N[(N[((-b) * j), $MachinePrecision] * x), $MachinePrecision] * y0), $MachinePrecision]}, If[LessEqual[b, -7443676776395529/664613997892457936451903530140172288], t$95$1, If[LessEqual[b, 5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(\left(\left(-b\right) \cdot j\right) \cdot x\right) \cdot y0\\
\mathbf{if}\;b \leq \frac{-7443676776395529}{664613997892457936451903530140172288}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5000000000000000367879369238556249198788031076088728399622928950675879571901095101025339828076544:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if b < -1.12e-20 or 5.0000000000000004e96 < b Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around inf
lower-*.f64N/A
lower-*.f6417.4%
Applied rewrites17.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6417.4%
Applied rewrites17.4%
if -1.12e-20 < b < 5.0000000000000004e96Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y2
-379999999999999990016080260846504022712149994135889713011834025014266823015022099964951506519588864)
(* y0 (* x (* c y2)))
(if (<= y2 8437482395119095/162259276829213363391578010288128)
(* (* c (* y0 x)) y2)
(* 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 (y2 <= -3.8e+98) {
tmp = y0 * (x * (c * y2));
} else if (y2 <= 5.2e-17) {
tmp = (c * (y0 * x)) * y2;
} 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 (y2 <= (-3.8d+98)) then
tmp = y0 * (x * (c * y2))
else if (y2 <= 5.2d-17) then
tmp = (c * (y0 * x)) * y2
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 (y2 <= -3.8e+98) {
tmp = y0 * (x * (c * y2));
} else if (y2 <= 5.2e-17) {
tmp = (c * (y0 * x)) * y2;
} 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 y2 <= -3.8e+98: tmp = y0 * (x * (c * y2)) elif y2 <= 5.2e-17: tmp = (c * (y0 * x)) * y2 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 (y2 <= -3.8e+98) tmp = Float64(y0 * Float64(x * Float64(c * y2))); elseif (y2 <= 5.2e-17) tmp = Float64(Float64(c * Float64(y0 * x)) * y2); 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 (y2 <= -3.8e+98) tmp = y0 * (x * (c * y2)); elseif (y2 <= 5.2e-17) tmp = (c * (y0 * x)) * y2; else tmp = k * (y1 * (y2 * y4)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y2, -379999999999999990016080260846504022712149994135889713011834025014266823015022099964951506519588864], N[(y0 * N[(x * N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 8437482395119095/162259276829213363391578010288128], N[(N[(c * N[(y0 * x), $MachinePrecision]), $MachinePrecision] * y2), $MachinePrecision], N[(k * N[(y1 * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y2 \leq -379999999999999990016080260846504022712149994135889713011834025014266823015022099964951506519588864:\\
\;\;\;\;y0 \cdot \left(x \cdot \left(c \cdot y2\right)\right)\\
\mathbf{elif}\;y2 \leq \frac{8437482395119095}{162259276829213363391578010288128}:\\
\;\;\;\;\left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\
\end{array}
if y2 < -3.7999999999999999e98Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.5%
Applied rewrites27.5%
Taylor expanded in b around 0
lower-*.f6418.0%
Applied rewrites18.0%
if -3.7999999999999999e98 < y2 < 5.2000000000000001e-17Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6418.1%
Applied rewrites18.1%
if 5.2000000000000001e-17 < y2 Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6416.8%
Applied rewrites16.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y2
-159999999999999997285391487193812127684945283850954501149415267193067667456)
(* x (* y0 (* c y2)))
(if (<= y2 8437482395119095/162259276829213363391578010288128)
(* (* c (* y0 x)) y2)
(* 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 (y2 <= -1.6e+74) {
tmp = x * (y0 * (c * y2));
} else if (y2 <= 5.2e-17) {
tmp = (c * (y0 * x)) * y2;
} 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 (y2 <= (-1.6d+74)) then
tmp = x * (y0 * (c * y2))
else if (y2 <= 5.2d-17) then
tmp = (c * (y0 * x)) * y2
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 (y2 <= -1.6e+74) {
tmp = x * (y0 * (c * y2));
} else if (y2 <= 5.2e-17) {
tmp = (c * (y0 * x)) * y2;
} 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 y2 <= -1.6e+74: tmp = x * (y0 * (c * y2)) elif y2 <= 5.2e-17: tmp = (c * (y0 * x)) * y2 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 (y2 <= -1.6e+74) tmp = Float64(x * Float64(y0 * Float64(c * y2))); elseif (y2 <= 5.2e-17) tmp = Float64(Float64(c * Float64(y0 * x)) * y2); 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 (y2 <= -1.6e+74) tmp = x * (y0 * (c * y2)); elseif (y2 <= 5.2e-17) tmp = (c * (y0 * x)) * y2; else tmp = k * (y1 * (y2 * y4)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[y2, -159999999999999997285391487193812127684945283850954501149415267193067667456], N[(x * N[(y0 * N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y2, 8437482395119095/162259276829213363391578010288128], N[(N[(c * N[(y0 * x), $MachinePrecision]), $MachinePrecision] * y2), $MachinePrecision], N[(k * N[(y1 * N[(y2 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y2 \leq -159999999999999997285391487193812127684945283850954501149415267193067667456:\\
\;\;\;\;x \cdot \left(y0 \cdot \left(c \cdot y2\right)\right)\\
\mathbf{elif}\;y2 \leq \frac{8437482395119095}{162259276829213363391578010288128}:\\
\;\;\;\;\left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(y1 \cdot \left(y2 \cdot y4\right)\right)\\
\end{array}
if y2 < -1.6e74Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f6417.9%
Applied rewrites17.9%
if -1.6e74 < y2 < 5.2000000000000001e-17Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6418.1%
Applied rewrites18.1%
if 5.2000000000000001e-17 < y2 Initial program 30.1%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites36.6%
Taylor expanded in k around inf
lower-*.f64N/A
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6426.5%
Applied rewrites26.5%
Taylor expanded in y around 0
lower-*.f64N/A
lower-*.f6416.8%
Applied rewrites16.8%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
x
2948744166719601/105312291668557186697918027683670432318895095400549111254310977536)
(* y2 (* k (* y1 y4)))
(* (* (* c x) y0) y2)))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (x <= 2.8e-50) {
tmp = y2 * (k * (y1 * y4));
} else {
tmp = ((c * x) * y0) * y2;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: tmp
if (x <= 2.8d-50) then
tmp = y2 * (k * (y1 * y4))
else
tmp = ((c * x) * y0) * y2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double tmp;
if (x <= 2.8e-50) {
tmp = y2 * (k * (y1 * y4));
} else {
tmp = ((c * x) * y0) * y2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if x <= 2.8e-50: tmp = y2 * (k * (y1 * y4)) else: tmp = ((c * x) * y0) * y2 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0 if (x <= 2.8e-50) tmp = Float64(y2 * Float64(k * Float64(y1 * y4))); else tmp = Float64(Float64(Float64(c * x) * y0) * y2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = 0.0; if (x <= 2.8e-50) tmp = y2 * (k * (y1 * y4)); else tmp = ((c * x) * y0) * y2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := If[LessEqual[x, 2948744166719601/105312291668557186697918027683670432318895095400549111254310977536], N[(y2 * N[(k * N[(y1 * y4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(c * x), $MachinePrecision] * y0), $MachinePrecision] * y2), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;x \leq \frac{2948744166719601}{105312291668557186697918027683670432318895095400549111254310977536}:\\
\;\;\;\;y2 \cdot \left(k \cdot \left(y1 \cdot y4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(c \cdot x\right) \cdot y0\right) \cdot y2\\
\end{array}
if x < 2.7999999999999998e-50Initial program 30.1%
Taylor expanded in y2 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites37.0%
Taylor expanded in y4 around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6426.9%
Applied rewrites26.9%
Taylor expanded in t around 0
lower-*.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
if 2.7999999999999998e-50 < x Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6418.2%
Applied rewrites18.2%
(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)))))
(if (<=
y2
-159999999999999997285391487193812127684945283850954501149415267193067667456)
t_1
(if (<=
y2
999999999999999959416724456350362731491996089648451439669739009806703922950954425516032)
(* (* c (* y0 x)) y2)
t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = x * (y0 * (c * y2));
double tmp;
if (y2 <= -1.6e+74) {
tmp = t_1;
} else if (y2 <= 1e+87) {
tmp = (c * (y0 * x)) * y2;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y0 * (c * y2))
if (y2 <= (-1.6d+74)) then
tmp = t_1
else if (y2 <= 1d+87) then
tmp = (c * (y0 * x)) * y2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
double t_1 = x * (y0 * (c * y2));
double tmp;
if (y2 <= -1.6e+74) {
tmp = t_1;
} else if (y2 <= 1e+87) {
tmp = (c * (y0 * x)) * y2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): t_1 = x * (y0 * (c * y2)) tmp = 0 if y2 <= -1.6e+74: tmp = t_1 elif y2 <= 1e+87: tmp = (c * (y0 * x)) * y2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = Float64(x * Float64(y0 * Float64(c * y2))) tmp = 0.0 if (y2 <= -1.6e+74) tmp = t_1; elseif (y2 <= 1e+87) tmp = Float64(Float64(c * Float64(y0 * x)) * y2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) t_1 = x * (y0 * (c * y2)); tmp = 0.0; if (y2 <= -1.6e+74) tmp = t_1; elseif (y2 <= 1e+87) tmp = (c * (y0 * x)) * y2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := Block[{t$95$1 = N[(x * N[(y0 * N[(c * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y2, -159999999999999997285391487193812127684945283850954501149415267193067667456], t$95$1, If[LessEqual[y2, 999999999999999959416724456350362731491996089648451439669739009806703922950954425516032], N[(N[(c * N[(y0 * x), $MachinePrecision]), $MachinePrecision] * y2), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x \cdot \left(y0 \cdot \left(c \cdot y2\right)\right)\\
\mathbf{if}\;y2 \leq -159999999999999997285391487193812127684945283850954501149415267193067667456:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y2 \leq 999999999999999959416724456350362731491996089648451439669739009806703922950954425516032:\\
\;\;\;\;\left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y2 < -1.6e74 or 9.9999999999999996e86 < y2 Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f6417.9%
Applied rewrites17.9%
if -1.6e74 < y2 < 9.9999999999999996e86Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6418.1%
Applied rewrites18.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:precision binary64
(if (<=
y0
6039028053441743/431359146674410236714672241392314090778194310760649159697657763987456)
(* (* (* c x) y0) y2)
(* (* y0 x) (* y2 c))))double code(double x, double y, double z, double t, double 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 <= 1.4e-53) {
tmp = ((c * x) * y0) * y2;
} else {
tmp = (y0 * x) * (y2 * c);
}
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 <= 1.4d-53) then
tmp = ((c * x) * y0) * y2
else
tmp = (y0 * x) * (y2 * c)
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 <= 1.4e-53) {
tmp = ((c * x) * y0) * y2;
} else {
tmp = (y0 * x) * (y2 * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): tmp = 0 if y0 <= 1.4e-53: tmp = ((c * x) * y0) * y2 else: tmp = (y0 * x) * (y2 * c) 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 <= 1.4e-53) tmp = Float64(Float64(Float64(c * x) * y0) * y2); else tmp = Float64(Float64(y0 * x) * Float64(y2 * c)); 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 <= 1.4e-53) tmp = ((c * x) * y0) * y2; else tmp = (y0 * x) * (y2 * c); 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, 6039028053441743/431359146674410236714672241392314090778194310760649159697657763987456], N[(N[(N[(c * x), $MachinePrecision] * y0), $MachinePrecision] * y2), $MachinePrecision], N[(N[(y0 * x), $MachinePrecision] * N[(y2 * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;y0 \leq \frac{6039028053441743}{431359146674410236714672241392314090778194310760649159697657763987456}:\\
\;\;\;\;\left(\left(c \cdot x\right) \cdot y0\right) \cdot y2\\
\mathbf{else}:\\
\;\;\;\;\left(y0 \cdot x\right) \cdot \left(y2 \cdot c\right)\\
\end{array}
if y0 < 1.3999999999999999e-53Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6418.2%
Applied rewrites18.2%
if 1.3999999999999999e-53 < y0 Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6417.6%
Applied rewrites17.6%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* (* c (* y0 x)) y2))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (c * (y0 * x)) * y2;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = (c * (y0 * x)) * y2
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return (c * (y0 * x)) * y2;
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return (c * (y0 * x)) * y2
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(Float64(c * Float64(y0 * x)) * y2) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = (c * (y0 * x)) * y2; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(N[(c * N[(y0 * x), $MachinePrecision]), $MachinePrecision] * y2), $MachinePrecision]
\left(c \cdot \left(y0 \cdot x\right)\right) \cdot y2
Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6418.1%
Applied rewrites18.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* c (* (* y2 x) y0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return c * ((y2 * x) * 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 = c * ((y2 * x) * 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 c * ((y2 * x) * y0);
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return c * ((y2 * x) * y0)
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(c * Float64(Float64(y2 * x) * y0)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = c * ((y2 * x) * y0); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(c * N[(N[(y2 * x), $MachinePrecision] * y0), $MachinePrecision]), $MachinePrecision]
c \cdot \left(\left(y2 \cdot x\right) \cdot y0\right)
Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6418.1%
Applied rewrites18.1%
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5) :precision binary64 (* c (* x (* y0 y2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return c * (x * (y0 * y2));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8), intent (in) :: y0
real(8), intent (in) :: y1
real(8), intent (in) :: y2
real(8), intent (in) :: y3
real(8), intent (in) :: y4
real(8), intent (in) :: y5
code = c * (x * (y0 * y2))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k, double y0, double y1, double y2, double y3, double y4, double y5) {
return c * (x * (y0 * y2));
}
def code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5): return c * (x * (y0 * y2))
function code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) return Float64(c * Float64(x * Float64(y0 * y2))) end
function tmp = code(x, y, z, t, a, b, c, i, j, k, y0, y1, y2, y3, y4, y5) tmp = c * (x * (y0 * y2)); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_, y0_, y1_, y2_, y3_, y4_, y5_] := N[(c * N[(x * N[(y0 * y2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
c \cdot \left(x \cdot \left(y0 \cdot y2\right)\right)
Initial program 30.1%
Taylor expanded in y0 around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites38.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6427.1%
Applied rewrites27.1%
Taylor expanded in b around 0
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6417.9%
Applied rewrites17.9%
herbie shell --seed 2025271 -o generate:evaluate
(FPCore (x y z t a b c i j k y0 y1 y2 y3 y4 y5)
:name "Linear.Matrix:det44 from linear-1.19.1.3"
:precision binary64
(+ (- (+ (+ (- (* (- (* x y) (* z t)) (- (* a b) (* c i))) (* (- (* x j) (* z k)) (- (* y0 b) (* y1 i)))) (* (- (* x y2) (* z y3)) (- (* y0 c) (* y1 a)))) (* (- (* t j) (* y k)) (- (* y4 b) (* y5 i)))) (* (- (* t y2) (* y y3)) (- (* y4 c) (* y5 a)))) (* (- (* k y2) (* j y3)) (- (* y4 y1) (* y5 y0)))))