
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
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)
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
code = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
Herbie found 24 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
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)
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
code = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<=
t_1
-4602094425247529/23010472126237643618935106442099516590310105330461524130999050388189782503104123280986685097268164610703374576623538349780325090408245327679084471121852687920354290358382782115366684108959500047289994617866880738411283287339835248828660878149225886356908865367627046174713247480125403687018925610191900689563648)
(134-z0z1z2z3z4 (/ -1 (- t a)) (- z t) (- y x) (- t a) x)
(if (<= t_1 0)
(+ y (* -1 (/ (- (* z (- y x)) (* a (- y x))) t)))
(+ x (* (/ (- t z) (- t a)) (- y x)))))))\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq \frac{-4602094425247529}{23010472126237643618935106442099516590310105330461524130999050388189782503104123280986685097268164610703374576623538349780325090408245327679084471121852687920354290358382782115366684108959500047289994617866880738411283287339835248828660878149225886356908865367627046174713247480125403687018925610191900689563648}:\\
\;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{t - a}\right), \left(z - t\right), \left(y - x\right), \left(t - a\right), x\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;y + -1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - z}{t - a} \cdot \left(y - x\right)\\
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.0000000000000001e-295Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
if -2.0000000000000001e-295 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in t around -inf
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6445.7%
Applied rewrites45.7%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.4%
Applied rewrites84.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- t z) (- t a)) (- y x))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<=
t_2
-4602094425247529/23010472126237643618935106442099516590310105330461524130999050388189782503104123280986685097268164610703374576623538349780325090408245327679084471121852687920354290358382782115366684108959500047289994617866880738411283287339835248828660878149225886356908865367627046174713247480125403687018925610191900689563648)
t_1
(if (<= t_2 0)
(+ y (* -1 (/ (- (* z (- y x)) (* a (- y x))) t)))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - z) / (t - a)) * (y - x));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -2e-295) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y + (-1.0 * (((z * (y - x)) - (a * (y - x))) / t));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (((t - z) / (t - a)) * (y - x))
t_2 = x + (((y - x) * (z - t)) / (a - t))
if (t_2 <= (-2d-295)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = y + ((-1.0d0) * (((z * (y - x)) - (a * (y - x))) / t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - z) / (t - a)) * (y - x));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -2e-295) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y + (-1.0 * (((z * (y - x)) - (a * (y - x))) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((t - z) / (t - a)) * (y - x)) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -2e-295: tmp = t_1 elif t_2 <= 0.0: tmp = y + (-1.0 * (((z * (y - x)) - (a * (y - x))) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(t - z) / Float64(t - a)) * Float64(y - x))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -2e-295) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(-1.0 * Float64(Float64(Float64(z * Float64(y - x)) - Float64(a * Float64(y - x))) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((t - z) / (t - a)) * (y - x)); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -2e-295) tmp = t_1; elseif (t_2 <= 0.0) tmp = y + (-1.0 * (((z * (y - x)) - (a * (y - x))) / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4602094425247529/23010472126237643618935106442099516590310105330461524130999050388189782503104123280986685097268164610703374576623538349780325090408245327679084471121852687920354290358382782115366684108959500047289994617866880738411283287339835248828660878149225886356908865367627046174713247480125403687018925610191900689563648], t$95$1, If[LessEqual[t$95$2, 0], N[(y + N[(-1 * N[(N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := x + \frac{t - z}{t - a} \cdot \left(y - x\right)\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq \frac{-4602094425247529}{23010472126237643618935106442099516590310105330461524130999050388189782503104123280986685097268164610703374576623538349780325090408245327679084471121852687920354290358382782115366684108959500047289994617866880738411283287339835248828660878149225886356908865367627046174713247480125403687018925610191900689563648}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + -1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.0000000000000001e-295 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.4%
Applied rewrites84.4%
if -2.0000000000000001e-295 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in t around -inf
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6445.7%
Applied rewrites45.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- (/ z (- a t)) (/ t (- a t))))))
(if (<=
t
-3199999999999999843658535884555242257084531347579589343829306844983523751599986938649084124535148872990680143605484242146223441040176797789643435496408465278006517292279496000248715692233307591802880)
t_1
(if (<=
t
47999999999999996758420028465010248540784950903205898777505147341473406437850717603188489528757242548373800041820977301682092317158153014221734479178139712973821722381169998168064)
(+ x (* (/ (- t z) (- t a)) (- y x)))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z / (a - t)) - (t / (a - t)));
double tmp;
if (t <= -3.2e+198) {
tmp = t_1;
} else if (t <= 4.8e+178) {
tmp = x + (((t - z) / (t - a)) * (y - 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)
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) :: t_1
real(8) :: tmp
t_1 = y * ((z / (a - t)) - (t / (a - t)))
if (t <= (-3.2d+198)) then
tmp = t_1
else if (t <= 4.8d+178) then
tmp = x + (((t - z) / (t - a)) * (y - 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 t_1 = y * ((z / (a - t)) - (t / (a - t)));
double tmp;
if (t <= -3.2e+198) {
tmp = t_1;
} else if (t <= 4.8e+178) {
tmp = x + (((t - z) / (t - a)) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z / (a - t)) - (t / (a - t))) tmp = 0 if t <= -3.2e+198: tmp = t_1 elif t <= 4.8e+178: tmp = x + (((t - z) / (t - a)) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z / Float64(a - t)) - Float64(t / Float64(a - t)))) tmp = 0.0 if (t <= -3.2e+198) tmp = t_1; elseif (t <= 4.8e+178) tmp = Float64(x + Float64(Float64(Float64(t - z) / Float64(t - a)) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z / (a - t)) - (t / (a - t))); tmp = 0.0; if (t <= -3.2e+198) tmp = t_1; elseif (t <= 4.8e+178) tmp = x + (((t - z) / (t - a)) * (y - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3199999999999999843658535884555242257084531347579589343829306844983523751599986938649084124535148872990680143605484242146223441040176797789643435496408465278006517292279496000248715692233307591802880], t$95$1, If[LessEqual[t, 47999999999999996758420028465010248540784950903205898777505147341473406437850717603188489528757242548373800041820977301682092317158153014221734479178139712973821722381169998168064], N[(x + N[(N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)\\
\mathbf{if}\;t \leq -3199999999999999843658535884555242257084531347579589343829306844983523751599986938649084124535148872990680143605484242146223441040176797789643435496408465278006517292279496000248715692233307591802880:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 47999999999999996758420028465010248540784950903205898777505147341473406437850717603188489528757242548373800041820977301682092317158153014221734479178139712973821722381169998168064:\\
\;\;\;\;x + \frac{t - z}{t - a} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -3.1999999999999998e198 or 4.7999999999999997e178 < t Initial program 68.6%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.7%
Applied rewrites51.7%
if -3.1999999999999998e198 < t < 4.7999999999999997e178Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.4%
Applied rewrites84.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (134-z0z1z2z3z4 (/ -1 (- t a)) z y t y)))
(if (<=
t
-3199999999999999843658535884555242257084531347579589343829306844983523751599986938649084124535148872990680143605484242146223441040176797789643435496408465278006517292279496000248715692233307591802880)
t_1
(if (<=
t
47999999999999996758420028465010248540784950903205898777505147341473406437850717603188489528757242548373800041820977301682092317158153014221734479178139712973821722381169998168064)
(+ x (* (/ (- t z) (- t a)) (- y x)))
t_1))))\begin{array}{l}
t_1 := \mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{t - a}\right), z, y, t, y\right)\\
\mathbf{if}\;t \leq -3199999999999999843658535884555242257084531347579589343829306844983523751599986938649084124535148872990680143605484242146223441040176797789643435496408465278006517292279496000248715692233307591802880:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 47999999999999996758420028465010248540784950903205898777505147341473406437850717603188489528757242548373800041820977301682092317158153014221734479178139712973821722381169998168064:\\
\;\;\;\;x + \frac{t - z}{t - a} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -3.1999999999999998e198 or 4.7999999999999997e178 < t Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6439.7%
Applied rewrites39.7%
lift-/.f64N/A
mult-flipN/A
*-commutativeN/A
lift-*.f64N/A
lift--.f64N/A
sub-flipN/A
distribute-rgt-inN/A
fp-cancel-sub-signN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6451.9%
Applied rewrites51.9%
if -3.1999999999999998e198 < t < 4.7999999999999997e178Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.4%
Applied rewrites84.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- t z) (- t a)) (- y x))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<=
t_2
-4602094425247529/23010472126237643618935106442099516590310105330461524130999050388189782503104123280986685097268164610703374576623538349780325090408245327679084471121852687920354290358382782115366684108959500047289994617866880738411283287339835248828660878149225886356908865367627046174713247480125403687018925610191900689563648)
t_1
(if (<= t_2 0) (* x (/ (- z a) t)) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - z) / (t - a)) * (y - x));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -2e-295) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = x * ((z - a) / t);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (((t - z) / (t - a)) * (y - x))
t_2 = x + (((y - x) * (z - t)) / (a - t))
if (t_2 <= (-2d-295)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = x * ((z - a) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - z) / (t - a)) * (y - x));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -2e-295) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = x * ((z - a) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((t - z) / (t - a)) * (y - x)) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -2e-295: tmp = t_1 elif t_2 <= 0.0: tmp = x * ((z - a) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(t - z) / Float64(t - a)) * Float64(y - x))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -2e-295) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(x * Float64(Float64(z - a) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((t - z) / (t - a)) * (y - x)); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -2e-295) tmp = t_1; elseif (t_2 <= 0.0) tmp = x * ((z - a) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4602094425247529/23010472126237643618935106442099516590310105330461524130999050388189782503104123280986685097268164610703374576623538349780325090408245327679084471121852687920354290358382782115366684108959500047289994617866880738411283287339835248828660878149225886356908865367627046174713247480125403687018925610191900689563648], t$95$1, If[LessEqual[t$95$2, 0], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := x + \frac{t - z}{t - a} \cdot \left(y - x\right)\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq \frac{-4602094425247529}{23010472126237643618935106442099516590310105330461524130999050388189782503104123280986685097268164610703374576623538349780325090408245327679084471121852687920354290358382782115366684108959500047289994617866880738411283287339835248828660878149225886356908865367627046174713247480125403687018925610191900689563648}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -2.0000000000000001e-295 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.4%
Applied rewrites84.4%
if -2.0000000000000001e-295 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around -inf
lower-/.f64N/A
lower--.f6423.0%
Applied rewrites23.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (/ (- t z) (- t a)) x))))
(if (<=
x
-30000000000000000606566373814678409657282889696430732234133305686240120149944929280760934825984)
t_1
(if (<=
x
229999999999999994953556542904221181187001180058745893459291421216394549673437691904)
(- x (* y (/ (- t z) (- a t))))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((t - z) / (t - a)) * x);
double tmp;
if (x <= -3e+94) {
tmp = t_1;
} else if (x <= 2.3e+83) {
tmp = x - (y * ((t - z) / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = x - (((t - z) / (t - a)) * x)
if (x <= (-3d+94)) then
tmp = t_1
else if (x <= 2.3d+83) then
tmp = x - (y * ((t - z) / (a - t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((t - z) / (t - a)) * x);
double tmp;
if (x <= -3e+94) {
tmp = t_1;
} else if (x <= 2.3e+83) {
tmp = x - (y * ((t - z) / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (((t - z) / (t - a)) * x) tmp = 0 if x <= -3e+94: tmp = t_1 elif x <= 2.3e+83: tmp = x - (y * ((t - z) / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(t - z) / Float64(t - a)) * x)) tmp = 0.0 if (x <= -3e+94) tmp = t_1; elseif (x <= 2.3e+83) tmp = Float64(x - Float64(y * Float64(Float64(t - z) / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (((t - z) / (t - a)) * x); tmp = 0.0; if (x <= -3e+94) tmp = t_1; elseif (x <= 2.3e+83) tmp = x - (y * ((t - z) / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -30000000000000000606566373814678409657282889696430732234133305686240120149944929280760934825984], t$95$1, If[LessEqual[x, 229999999999999994953556542904221181187001180058745893459291421216394549673437691904], N[(x - N[(y * N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \frac{t - z}{t - a} \cdot x\\
\mathbf{if}\;x \leq -30000000000000000606566373814678409657282889696430732234133305686240120149944929280760934825984:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 229999999999999994953556542904221181187001180058745893459291421216394549673437691904:\\
\;\;\;\;x - y \cdot \frac{t - z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if x < -3.0000000000000001e94 or 2.2999999999999999e83 < x Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
lift-*.f64N/A
lift-+.f64N/A
distribute-rgt-inN/A
fp-cancel-sign-sub-invN/A
*-lft-identityN/A
lower--.f64N/A
lower-*.f64N/A
lift-*.f64N/A
mul-1-negN/A
lift-/.f64N/A
distribute-neg-frac2N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
distribute-frac-negN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6443.2%
Applied rewrites43.2%
if -3.0000000000000001e94 < x < 2.2999999999999999e83Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Applied rewrites84.4%
Taylor expanded in x around 0
Applied rewrites67.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (+ x (* -1 x)))))
(if (<=
t
-879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176)
t_1
(if (<= t -23000)
(- x (* y (/ t (- a t))))
(if (<=
t
-8107084883601233/386051661123868214325895970762095083331216144111904370034983364157543830047598546775742309000849007597326427200921653578548066591998660043462778854257084865420374725869305346230443778499781067545394454342790117394565596548890481374012190543459242928201313126587598361115137891035519604744312911050121319319358268243968)
(+ x (/ (* z (- y x)) (- a t)))
(if (<= t 55000000000000003204716691456)
(+ x (* (- z t) (/ (- y x) a)))
(if (<=
t
95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696)
(* (/ z (- t a)) (- x y))
t_1)))))))double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -8.8e+149) {
tmp = t_1;
} else if (t <= -23000.0) {
tmp = x - (y * (t / (a - t)));
} else if (t <= -2.1e-302) {
tmp = x + ((z * (y - x)) / (a - t));
} else if (t <= 5.5e+28) {
tmp = x + ((z - t) * ((y - x) / a));
} else if (t <= 9.5e+178) {
tmp = (z / (t - a)) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y - (x + ((-1.0d0) * x))
if (t <= (-8.8d+149)) then
tmp = t_1
else if (t <= (-23000.0d0)) then
tmp = x - (y * (t / (a - t)))
else if (t <= (-2.1d-302)) then
tmp = x + ((z * (y - x)) / (a - t))
else if (t <= 5.5d+28) then
tmp = x + ((z - t) * ((y - x) / a))
else if (t <= 9.5d+178) then
tmp = (z / (t - a)) * (x - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -8.8e+149) {
tmp = t_1;
} else if (t <= -23000.0) {
tmp = x - (y * (t / (a - t)));
} else if (t <= -2.1e-302) {
tmp = x + ((z * (y - x)) / (a - t));
} else if (t <= 5.5e+28) {
tmp = x + ((z - t) * ((y - x) / a));
} else if (t <= 9.5e+178) {
tmp = (z / (t - a)) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (x + (-1.0 * x)) tmp = 0 if t <= -8.8e+149: tmp = t_1 elif t <= -23000.0: tmp = x - (y * (t / (a - t))) elif t <= -2.1e-302: tmp = x + ((z * (y - x)) / (a - t)) elif t <= 5.5e+28: tmp = x + ((z - t) * ((y - x) / a)) elif t <= 9.5e+178: tmp = (z / (t - a)) * (x - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(x + Float64(-1.0 * x))) tmp = 0.0 if (t <= -8.8e+149) tmp = t_1; elseif (t <= -23000.0) tmp = Float64(x - Float64(y * Float64(t / Float64(a - t)))); elseif (t <= -2.1e-302) tmp = Float64(x + Float64(Float64(z * Float64(y - x)) / Float64(a - t))); elseif (t <= 5.5e+28) tmp = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / a))); elseif (t <= 9.5e+178) tmp = Float64(Float64(z / Float64(t - a)) * Float64(x - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (x + (-1.0 * x)); tmp = 0.0; if (t <= -8.8e+149) tmp = t_1; elseif (t <= -23000.0) tmp = x - (y * (t / (a - t))); elseif (t <= -2.1e-302) tmp = x + ((z * (y - x)) / (a - t)); elseif (t <= 5.5e+28) tmp = x + ((z - t) * ((y - x) / a)); elseif (t <= 9.5e+178) tmp = (z / (t - a)) * (x - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176], t$95$1, If[LessEqual[t, -23000], N[(x - N[(y * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8107084883601233/386051661123868214325895970762095083331216144111904370034983364157543830047598546775742309000849007597326427200921653578548066591998660043462778854257084865420374725869305346230443778499781067545394454342790117394565596548890481374012190543459242928201313126587598361115137891035519604744312911050121319319358268243968], N[(x + N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 55000000000000003204716691456], N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696], N[(N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
t_1 := y - \left(x + -1 \cdot x\right)\\
\mathbf{if}\;t \leq -879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -23000:\\
\;\;\;\;x - y \cdot \frac{t}{a - t}\\
\mathbf{elif}\;t \leq \frac{-8107084883601233}{386051661123868214325895970762095083331216144111904370034983364157543830047598546775742309000849007597326427200921653578548066591998660043462778854257084865420374725869305346230443778499781067545394454342790117394565596548890481374012190543459242928201313126587598361115137891035519604744312911050121319319358268243968}:\\
\;\;\;\;x + \frac{z \cdot \left(y - x\right)}{a - t}\\
\mathbf{elif}\;t \leq 55000000000000003204716691456:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696:\\
\;\;\;\;\frac{z}{t - a} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -8.8e149 or 9.5000000000000003e178 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
if -8.8e149 < t < -23000Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Applied rewrites84.4%
Taylor expanded in x around 0
Applied rewrites67.3%
Taylor expanded in z around 0
Applied rewrites45.0%
if -23000 < t < -2.1000000000000001e-302Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f6455.5%
Applied rewrites55.5%
if -2.1000000000000001e-302 < t < 5.5000000000000003e28Initial program 68.6%
Taylor expanded in t around 0
Applied rewrites46.6%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6452.2%
Applied rewrites52.2%
if 5.5000000000000003e28 < t < 9.5000000000000003e178Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.4%
Applied rewrites42.4%
lift--.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-/.f64N/A
mult-flipN/A
distribute-rgt-out--N/A
lift--.f64N/A
lower-*.f64N/A
lower-/.f6442.8%
Applied rewrites42.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-/.f64N/A
mult-flip-revN/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
distribute-neg-frac2N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6444.0%
Applied rewrites44.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (+ x (* -1 x)))))
(if (<=
t
-879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176)
t_1
(if (<= t -800000)
(- x (* y (/ t (- a t))))
(if (<= t 55000000000000003204716691456)
(+ (* (/ (- z t) a) (- y x)) x)
(if (<=
t
95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696)
(* (/ z (- t a)) (- x y))
t_1))))))double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -8.8e+149) {
tmp = t_1;
} else if (t <= -800000.0) {
tmp = x - (y * (t / (a - t)));
} else if (t <= 5.5e+28) {
tmp = (((z - t) / a) * (y - x)) + x;
} else if (t <= 9.5e+178) {
tmp = (z / (t - a)) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y - (x + ((-1.0d0) * x))
if (t <= (-8.8d+149)) then
tmp = t_1
else if (t <= (-800000.0d0)) then
tmp = x - (y * (t / (a - t)))
else if (t <= 5.5d+28) then
tmp = (((z - t) / a) * (y - x)) + x
else if (t <= 9.5d+178) then
tmp = (z / (t - a)) * (x - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -8.8e+149) {
tmp = t_1;
} else if (t <= -800000.0) {
tmp = x - (y * (t / (a - t)));
} else if (t <= 5.5e+28) {
tmp = (((z - t) / a) * (y - x)) + x;
} else if (t <= 9.5e+178) {
tmp = (z / (t - a)) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (x + (-1.0 * x)) tmp = 0 if t <= -8.8e+149: tmp = t_1 elif t <= -800000.0: tmp = x - (y * (t / (a - t))) elif t <= 5.5e+28: tmp = (((z - t) / a) * (y - x)) + x elif t <= 9.5e+178: tmp = (z / (t - a)) * (x - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(x + Float64(-1.0 * x))) tmp = 0.0 if (t <= -8.8e+149) tmp = t_1; elseif (t <= -800000.0) tmp = Float64(x - Float64(y * Float64(t / Float64(a - t)))); elseif (t <= 5.5e+28) tmp = Float64(Float64(Float64(Float64(z - t) / a) * Float64(y - x)) + x); elseif (t <= 9.5e+178) tmp = Float64(Float64(z / Float64(t - a)) * Float64(x - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (x + (-1.0 * x)); tmp = 0.0; if (t <= -8.8e+149) tmp = t_1; elseif (t <= -800000.0) tmp = x - (y * (t / (a - t))); elseif (t <= 5.5e+28) tmp = (((z - t) / a) * (y - x)) + x; elseif (t <= 9.5e+178) tmp = (z / (t - a)) * (x - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176], t$95$1, If[LessEqual[t, -800000], N[(x - N[(y * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 55000000000000003204716691456], N[(N[(N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696], N[(N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := y - \left(x + -1 \cdot x\right)\\
\mathbf{if}\;t \leq -879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -800000:\\
\;\;\;\;x - y \cdot \frac{t}{a - t}\\
\mathbf{elif}\;t \leq 55000000000000003204716691456:\\
\;\;\;\;\frac{z - t}{a} \cdot \left(y - x\right) + x\\
\mathbf{elif}\;t \leq 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696:\\
\;\;\;\;\frac{z}{t - a} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -8.8e149 or 9.5000000000000003e178 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
if -8.8e149 < t < -8e5Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Applied rewrites84.4%
Taylor expanded in x around 0
Applied rewrites67.3%
Taylor expanded in z around 0
Applied rewrites45.0%
if -8e5 < t < 5.5000000000000003e28Initial program 68.6%
Taylor expanded in t around 0
Applied rewrites46.6%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6446.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6453.6%
Applied rewrites53.6%
if 5.5000000000000003e28 < t < 9.5000000000000003e178Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.4%
Applied rewrites42.4%
lift--.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-/.f64N/A
mult-flipN/A
distribute-rgt-out--N/A
lift--.f64N/A
lower-*.f64N/A
lower-/.f6442.8%
Applied rewrites42.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-/.f64N/A
mult-flip-revN/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
distribute-neg-frac2N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6444.0%
Applied rewrites44.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (+ x (* -1 x)))))
(if (<=
t
-879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176)
t_1
(if (<=
t
-501766766966939/696898287454081973172991196020261297061888)
(- x (* y (/ t (- a t))))
(if (<= t 55000000000000003204716691456)
(+ x (* (- z t) (/ (- y x) a)))
(if (<=
t
95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696)
(* (/ z (- t a)) (- x y))
t_1))))))double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -8.8e+149) {
tmp = t_1;
} else if (t <= -7.2e-28) {
tmp = x - (y * (t / (a - t)));
} else if (t <= 5.5e+28) {
tmp = x + ((z - t) * ((y - x) / a));
} else if (t <= 9.5e+178) {
tmp = (z / (t - a)) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y - (x + ((-1.0d0) * x))
if (t <= (-8.8d+149)) then
tmp = t_1
else if (t <= (-7.2d-28)) then
tmp = x - (y * (t / (a - t)))
else if (t <= 5.5d+28) then
tmp = x + ((z - t) * ((y - x) / a))
else if (t <= 9.5d+178) then
tmp = (z / (t - a)) * (x - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -8.8e+149) {
tmp = t_1;
} else if (t <= -7.2e-28) {
tmp = x - (y * (t / (a - t)));
} else if (t <= 5.5e+28) {
tmp = x + ((z - t) * ((y - x) / a));
} else if (t <= 9.5e+178) {
tmp = (z / (t - a)) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (x + (-1.0 * x)) tmp = 0 if t <= -8.8e+149: tmp = t_1 elif t <= -7.2e-28: tmp = x - (y * (t / (a - t))) elif t <= 5.5e+28: tmp = x + ((z - t) * ((y - x) / a)) elif t <= 9.5e+178: tmp = (z / (t - a)) * (x - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(x + Float64(-1.0 * x))) tmp = 0.0 if (t <= -8.8e+149) tmp = t_1; elseif (t <= -7.2e-28) tmp = Float64(x - Float64(y * Float64(t / Float64(a - t)))); elseif (t <= 5.5e+28) tmp = Float64(x + Float64(Float64(z - t) * Float64(Float64(y - x) / a))); elseif (t <= 9.5e+178) tmp = Float64(Float64(z / Float64(t - a)) * Float64(x - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (x + (-1.0 * x)); tmp = 0.0; if (t <= -8.8e+149) tmp = t_1; elseif (t <= -7.2e-28) tmp = x - (y * (t / (a - t))); elseif (t <= 5.5e+28) tmp = x + ((z - t) * ((y - x) / a)); elseif (t <= 9.5e+178) tmp = (z / (t - a)) * (x - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176], t$95$1, If[LessEqual[t, -501766766966939/696898287454081973172991196020261297061888], N[(x - N[(y * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 55000000000000003204716691456], N[(x + N[(N[(z - t), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696], N[(N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := y - \left(x + -1 \cdot x\right)\\
\mathbf{if}\;t \leq -879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq \frac{-501766766966939}{696898287454081973172991196020261297061888}:\\
\;\;\;\;x - y \cdot \frac{t}{a - t}\\
\mathbf{elif}\;t \leq 55000000000000003204716691456:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696:\\
\;\;\;\;\frac{z}{t - a} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -8.8e149 or 9.5000000000000003e178 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
if -8.8e149 < t < -7.1999999999999997e-28Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Applied rewrites84.4%
Taylor expanded in x around 0
Applied rewrites67.3%
Taylor expanded in z around 0
Applied rewrites45.0%
if -7.1999999999999997e-28 < t < 5.5000000000000003e28Initial program 68.6%
Taylor expanded in t around 0
Applied rewrites46.6%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6452.2%
Applied rewrites52.2%
if 5.5000000000000003e28 < t < 9.5000000000000003e178Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.4%
Applied rewrites42.4%
lift--.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-/.f64N/A
mult-flipN/A
distribute-rgt-out--N/A
lift--.f64N/A
lower-*.f64N/A
lower-/.f6442.8%
Applied rewrites42.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-/.f64N/A
mult-flip-revN/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
distribute-neg-frac2N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6444.0%
Applied rewrites44.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (+ x (* -1 x)))))
(if (<=
t
-879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176)
t_1
(if (<= t -880000)
(- x (* y (/ t (- a t))))
(if (<= t 77999999999999997188138598400)
(+ x (* (- y x) (/ z a)))
(if (<=
t
95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696)
(* (/ z (- t a)) (- x y))
t_1))))))double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -8.8e+149) {
tmp = t_1;
} else if (t <= -880000.0) {
tmp = x - (y * (t / (a - t)));
} else if (t <= 7.8e+28) {
tmp = x + ((y - x) * (z / a));
} else if (t <= 9.5e+178) {
tmp = (z / (t - a)) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y - (x + ((-1.0d0) * x))
if (t <= (-8.8d+149)) then
tmp = t_1
else if (t <= (-880000.0d0)) then
tmp = x - (y * (t / (a - t)))
else if (t <= 7.8d+28) then
tmp = x + ((y - x) * (z / a))
else if (t <= 9.5d+178) then
tmp = (z / (t - a)) * (x - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -8.8e+149) {
tmp = t_1;
} else if (t <= -880000.0) {
tmp = x - (y * (t / (a - t)));
} else if (t <= 7.8e+28) {
tmp = x + ((y - x) * (z / a));
} else if (t <= 9.5e+178) {
tmp = (z / (t - a)) * (x - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (x + (-1.0 * x)) tmp = 0 if t <= -8.8e+149: tmp = t_1 elif t <= -880000.0: tmp = x - (y * (t / (a - t))) elif t <= 7.8e+28: tmp = x + ((y - x) * (z / a)) elif t <= 9.5e+178: tmp = (z / (t - a)) * (x - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(x + Float64(-1.0 * x))) tmp = 0.0 if (t <= -8.8e+149) tmp = t_1; elseif (t <= -880000.0) tmp = Float64(x - Float64(y * Float64(t / Float64(a - t)))); elseif (t <= 7.8e+28) tmp = Float64(x + Float64(Float64(y - x) * Float64(z / a))); elseif (t <= 9.5e+178) tmp = Float64(Float64(z / Float64(t - a)) * Float64(x - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (x + (-1.0 * x)); tmp = 0.0; if (t <= -8.8e+149) tmp = t_1; elseif (t <= -880000.0) tmp = x - (y * (t / (a - t))); elseif (t <= 7.8e+28) tmp = x + ((y - x) * (z / a)); elseif (t <= 9.5e+178) tmp = (z / (t - a)) * (x - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176], t$95$1, If[LessEqual[t, -880000], N[(x - N[(y * N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 77999999999999997188138598400], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696], N[(N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := y - \left(x + -1 \cdot x\right)\\
\mathbf{if}\;t \leq -879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -880000:\\
\;\;\;\;x - y \cdot \frac{t}{a - t}\\
\mathbf{elif}\;t \leq 77999999999999997188138598400:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696:\\
\;\;\;\;\frac{z}{t - a} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -8.8e149 or 9.5000000000000003e178 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
if -8.8e149 < t < -8.8e5Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Applied rewrites84.4%
Taylor expanded in x around 0
Applied rewrites67.3%
Taylor expanded in z around 0
Applied rewrites45.0%
if -8.8e5 < t < 7.7999999999999997e28Initial program 68.6%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6444.1%
Applied rewrites44.1%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6448.9%
Applied rewrites48.9%
if 7.7999999999999997e28 < t < 9.5000000000000003e178Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.4%
Applied rewrites42.4%
lift--.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-/.f64N/A
mult-flipN/A
distribute-rgt-out--N/A
lift--.f64N/A
lower-*.f64N/A
lower-/.f6442.8%
Applied rewrites42.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-/.f64N/A
mult-flip-revN/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
distribute-neg-frac2N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6444.0%
Applied rewrites44.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2050000)
(* (- z t) (/ y (- a t)))
(if (<= t 77999999999999997188138598400)
(+ x (* (- y x) (/ z a)))
(if (<=
t
95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696)
(* (/ z (- t a)) (- x y))
(- y (+ x (* -1 x)))))))double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2050000.0) {
tmp = (z - t) * (y / (a - t));
} else if (t <= 7.8e+28) {
tmp = x + ((y - x) * (z / a));
} else if (t <= 9.5e+178) {
tmp = (z / (t - a)) * (x - y);
} else {
tmp = y - (x + (-1.0 * 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)
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) :: tmp
if (t <= (-2050000.0d0)) then
tmp = (z - t) * (y / (a - t))
else if (t <= 7.8d+28) then
tmp = x + ((y - x) * (z / a))
else if (t <= 9.5d+178) then
tmp = (z / (t - a)) * (x - y)
else
tmp = y - (x + ((-1.0d0) * x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2050000.0) {
tmp = (z - t) * (y / (a - t));
} else if (t <= 7.8e+28) {
tmp = x + ((y - x) * (z / a));
} else if (t <= 9.5e+178) {
tmp = (z / (t - a)) * (x - y);
} else {
tmp = y - (x + (-1.0 * x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2050000.0: tmp = (z - t) * (y / (a - t)) elif t <= 7.8e+28: tmp = x + ((y - x) * (z / a)) elif t <= 9.5e+178: tmp = (z / (t - a)) * (x - y) else: tmp = y - (x + (-1.0 * x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2050000.0) tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t))); elseif (t <= 7.8e+28) tmp = Float64(x + Float64(Float64(y - x) * Float64(z / a))); elseif (t <= 9.5e+178) tmp = Float64(Float64(z / Float64(t - a)) * Float64(x - y)); else tmp = Float64(y - Float64(x + Float64(-1.0 * x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2050000.0) tmp = (z - t) * (y / (a - t)); elseif (t <= 7.8e+28) tmp = x + ((y - x) * (z / a)); elseif (t <= 9.5e+178) tmp = (z / (t - a)) * (x - y); else tmp = y - (x + (-1.0 * x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2050000], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 77999999999999997188138598400], N[(x + N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696], N[(N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;t \leq -2050000:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{elif}\;t \leq 77999999999999997188138598400:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696:\\
\;\;\;\;\frac{z}{t - a} \cdot \left(x - y\right)\\
\mathbf{else}:\\
\;\;\;\;y - \left(x + -1 \cdot x\right)\\
\end{array}
if t < -2.05e6Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6439.7%
Applied rewrites39.7%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lift-/.f64N/A
lower-*.f6446.3%
Applied rewrites46.3%
if -2.05e6 < t < 7.7999999999999997e28Initial program 68.6%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6444.1%
Applied rewrites44.1%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6448.9%
Applied rewrites48.9%
if 7.7999999999999997e28 < t < 9.5000000000000003e178Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.4%
Applied rewrites42.4%
lift--.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-/.f64N/A
mult-flipN/A
distribute-rgt-out--N/A
lift--.f64N/A
lower-*.f64N/A
lower-/.f6442.8%
Applied rewrites42.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-/.f64N/A
mult-flip-revN/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
distribute-neg-frac2N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6444.0%
Applied rewrites44.0%
if 9.5000000000000003e178 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ z (- t a)) (- x y))))
(if (<= t -195000)
(* (- z t) (/ y (- a t)))
(if (<=
t
-6166959734027569/9343878384890255807777119448474196633381331982845050737826186276657715542443371287564109437577976626746659450006721346172290467269376897020421450382791094657540085093089822617769726345721044533248)
t_1
(if (<= t 19999999999999999166239473664)
(+ x (* y (/ z a)))
(if (<=
t
95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696)
t_1
(- y (+ x (* -1 x)))))))))double code(double x, double y, double z, double t, double a) {
double t_1 = (z / (t - a)) * (x - y);
double tmp;
if (t <= -195000.0) {
tmp = (z - t) * (y / (a - t));
} else if (t <= -6.6e-181) {
tmp = t_1;
} else if (t <= 2e+28) {
tmp = x + (y * (z / a));
} else if (t <= 9.5e+178) {
tmp = t_1;
} else {
tmp = y - (x + (-1.0 * 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)
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) :: t_1
real(8) :: tmp
t_1 = (z / (t - a)) * (x - y)
if (t <= (-195000.0d0)) then
tmp = (z - t) * (y / (a - t))
else if (t <= (-6.6d-181)) then
tmp = t_1
else if (t <= 2d+28) then
tmp = x + (y * (z / a))
else if (t <= 9.5d+178) then
tmp = t_1
else
tmp = y - (x + ((-1.0d0) * x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z / (t - a)) * (x - y);
double tmp;
if (t <= -195000.0) {
tmp = (z - t) * (y / (a - t));
} else if (t <= -6.6e-181) {
tmp = t_1;
} else if (t <= 2e+28) {
tmp = x + (y * (z / a));
} else if (t <= 9.5e+178) {
tmp = t_1;
} else {
tmp = y - (x + (-1.0 * x));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z / (t - a)) * (x - y) tmp = 0 if t <= -195000.0: tmp = (z - t) * (y / (a - t)) elif t <= -6.6e-181: tmp = t_1 elif t <= 2e+28: tmp = x + (y * (z / a)) elif t <= 9.5e+178: tmp = t_1 else: tmp = y - (x + (-1.0 * x)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z / Float64(t - a)) * Float64(x - y)) tmp = 0.0 if (t <= -195000.0) tmp = Float64(Float64(z - t) * Float64(y / Float64(a - t))); elseif (t <= -6.6e-181) tmp = t_1; elseif (t <= 2e+28) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= 9.5e+178) tmp = t_1; else tmp = Float64(y - Float64(x + Float64(-1.0 * x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z / (t - a)) * (x - y); tmp = 0.0; if (t <= -195000.0) tmp = (z - t) * (y / (a - t)); elseif (t <= -6.6e-181) tmp = t_1; elseif (t <= 2e+28) tmp = x + (y * (z / a)); elseif (t <= 9.5e+178) tmp = t_1; else tmp = y - (x + (-1.0 * x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -195000], N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6166959734027569/9343878384890255807777119448474196633381331982845050737826186276657715542443371287564109437577976626746659450006721346172290467269376897020421450382791094657540085093089822617769726345721044533248], t$95$1, If[LessEqual[t, 19999999999999999166239473664], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696], t$95$1, N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
t_1 := \frac{z}{t - a} \cdot \left(x - y\right)\\
\mathbf{if}\;t \leq -195000:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{elif}\;t \leq \frac{-6166959734027569}{9343878384890255807777119448474196633381331982845050737826186276657715542443371287564109437577976626746659450006721346172290467269376897020421450382791094657540085093089822617769726345721044533248}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 19999999999999999166239473664:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y - \left(x + -1 \cdot x\right)\\
\end{array}
if t < -195000Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6439.7%
Applied rewrites39.7%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lift-/.f64N/A
lower-*.f6446.3%
Applied rewrites46.3%
if -195000 < t < -6.6000000000000002e-181 or 1.9999999999999999e28 < t < 9.5000000000000003e178Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.4%
Applied rewrites42.4%
lift--.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-/.f64N/A
mult-flipN/A
distribute-rgt-out--N/A
lift--.f64N/A
lower-*.f64N/A
lower-/.f6442.8%
Applied rewrites42.8%
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lift-/.f64N/A
mult-flip-revN/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-outN/A
distribute-lft-neg-inN/A
distribute-neg-frac2N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6444.0%
Applied rewrites44.0%
if -6.6000000000000002e-181 < t < 1.9999999999999999e28Initial program 68.6%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6444.1%
Applied rewrites44.1%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6448.9%
Applied rewrites48.9%
Taylor expanded in x around 0
Applied rewrites41.2%
if 9.5000000000000003e178 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- z t) (/ y (- a t)))))
(if (<= t -2050000)
t_1
(if (<= t 3314649325744685/144115188075855872)
(+ x (* y (/ z a)))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * (y / (a - t));
double tmp;
if (t <= -2050000.0) {
tmp = t_1;
} else if (t <= 0.023) {
tmp = x + (y * (z / a));
} 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)
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) :: t_1
real(8) :: tmp
t_1 = (z - t) * (y / (a - t))
if (t <= (-2050000.0d0)) then
tmp = t_1
else if (t <= 0.023d0) then
tmp = x + (y * (z / a))
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 t_1 = (z - t) * (y / (a - t));
double tmp;
if (t <= -2050000.0) {
tmp = t_1;
} else if (t <= 0.023) {
tmp = x + (y * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) * (y / (a - t)) tmp = 0 if t <= -2050000.0: tmp = t_1 elif t <= 0.023: tmp = x + (y * (z / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) * Float64(y / Float64(a - t))) tmp = 0.0 if (t <= -2050000.0) tmp = t_1; elseif (t <= 0.023) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) * (y / (a - t)); tmp = 0.0; if (t <= -2050000.0) tmp = t_1; elseif (t <= 0.023) tmp = x + (y * (z / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2050000], t$95$1, If[LessEqual[t, 3314649325744685/144115188075855872], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{if}\;t \leq -2050000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq \frac{3314649325744685}{144115188075855872}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -2.05e6 or 0.023 < t Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6439.7%
Applied rewrites39.7%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lift-/.f64N/A
lower-*.f6446.3%
Applied rewrites46.3%
if -2.05e6 < t < 0.023Initial program 68.6%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6444.1%
Applied rewrites44.1%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6448.9%
Applied rewrites48.9%
Taylor expanded in x around 0
Applied rewrites41.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (+ x (* -1 x)))))
(if (<= t -2050000)
t_1
(if (<= t 1049999999999999924343677575419984678682242318336)
(+ x (* y (/ z a)))
(if (<=
t
3600000000000000263202775859717469256018174328535138252152055447988004720056054266751308276517886685603398476798911472512056500497788749608139688697102507805581500737953993050408248616802767716133203854546173952)
(* x (/ (- z a) t))
t_1)))))double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -2050000.0) {
tmp = t_1;
} else if (t <= 1.05e+48) {
tmp = x + (y * (z / a));
} else if (t <= 3.6e+210) {
tmp = x * ((z - a) / t);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y - (x + ((-1.0d0) * x))
if (t <= (-2050000.0d0)) then
tmp = t_1
else if (t <= 1.05d+48) then
tmp = x + (y * (z / a))
else if (t <= 3.6d+210) then
tmp = x * ((z - a) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -2050000.0) {
tmp = t_1;
} else if (t <= 1.05e+48) {
tmp = x + (y * (z / a));
} else if (t <= 3.6e+210) {
tmp = x * ((z - a) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (x + (-1.0 * x)) tmp = 0 if t <= -2050000.0: tmp = t_1 elif t <= 1.05e+48: tmp = x + (y * (z / a)) elif t <= 3.6e+210: tmp = x * ((z - a) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(x + Float64(-1.0 * x))) tmp = 0.0 if (t <= -2050000.0) tmp = t_1; elseif (t <= 1.05e+48) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= 3.6e+210) tmp = Float64(x * Float64(Float64(z - a) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (x + (-1.0 * x)); tmp = 0.0; if (t <= -2050000.0) tmp = t_1; elseif (t <= 1.05e+48) tmp = x + (y * (z / a)); elseif (t <= 3.6e+210) tmp = x * ((z - a) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2050000], t$95$1, If[LessEqual[t, 1049999999999999924343677575419984678682242318336], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3600000000000000263202775859717469256018174328535138252152055447988004720056054266751308276517886685603398476798911472512056500497788749608139688697102507805581500737953993050408248616802767716133203854546173952], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := y - \left(x + -1 \cdot x\right)\\
\mathbf{if}\;t \leq -2050000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1049999999999999924343677575419984678682242318336:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 3600000000000000263202775859717469256018174328535138252152055447988004720056054266751308276517886685603398476798911472512056500497788749608139688697102507805581500737953993050408248616802767716133203854546173952:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -2.05e6 or 3.6000000000000003e210 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
if -2.05e6 < t < 1.0499999999999999e48Initial program 68.6%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6444.1%
Applied rewrites44.1%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6448.9%
Applied rewrites48.9%
Taylor expanded in x around 0
Applied rewrites41.2%
if 1.0499999999999999e48 < t < 3.6000000000000003e210Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around -inf
lower-/.f64N/A
lower--.f6423.0%
Applied rewrites23.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (+ x (* -1 x)))))
(if (<=
t
-1799999999999999869449922363021060919684697761148896472674919768617891425020663242208887992937348489434422362932188577849477458618078907521302528)
t_1
(if (<=
t
-1067993517960455/266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867072)
(- x (* y -1))
(if (<=
t
-2588678114201735/5752618031559410904733776610524879147577526332615381032749762597047445625776030820246671274317041152675843644155884587445081272602061331919771117780463171980088572589595695528841671027239875011822498654466720184602820821834958812207165219537306471589227216341906761543678311870031350921754731402547975172390912)
(* z (/ (- y x) a))
(if (<= t 1049999999999999924343677575419984678682242318336)
(* x 1)
(if (<=
t
3600000000000000263202775859717469256018174328535138252152055447988004720056054266751308276517886685603398476798911472512056500497788749608139688697102507805581500737953993050408248616802767716133203854546173952)
(* x (/ (- z a) t))
t_1)))))))double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -1.8e+144) {
tmp = t_1;
} else if (t <= -4e-81) {
tmp = x - (y * -1.0);
} else if (t <= -4.5e-295) {
tmp = z * ((y - x) / a);
} else if (t <= 1.05e+48) {
tmp = x * 1.0;
} else if (t <= 3.6e+210) {
tmp = x * ((z - a) / t);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y - (x + ((-1.0d0) * x))
if (t <= (-1.8d+144)) then
tmp = t_1
else if (t <= (-4d-81)) then
tmp = x - (y * (-1.0d0))
else if (t <= (-4.5d-295)) then
tmp = z * ((y - x) / a)
else if (t <= 1.05d+48) then
tmp = x * 1.0d0
else if (t <= 3.6d+210) then
tmp = x * ((z - a) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -1.8e+144) {
tmp = t_1;
} else if (t <= -4e-81) {
tmp = x - (y * -1.0);
} else if (t <= -4.5e-295) {
tmp = z * ((y - x) / a);
} else if (t <= 1.05e+48) {
tmp = x * 1.0;
} else if (t <= 3.6e+210) {
tmp = x * ((z - a) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (x + (-1.0 * x)) tmp = 0 if t <= -1.8e+144: tmp = t_1 elif t <= -4e-81: tmp = x - (y * -1.0) elif t <= -4.5e-295: tmp = z * ((y - x) / a) elif t <= 1.05e+48: tmp = x * 1.0 elif t <= 3.6e+210: tmp = x * ((z - a) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(x + Float64(-1.0 * x))) tmp = 0.0 if (t <= -1.8e+144) tmp = t_1; elseif (t <= -4e-81) tmp = Float64(x - Float64(y * -1.0)); elseif (t <= -4.5e-295) tmp = Float64(z * Float64(Float64(y - x) / a)); elseif (t <= 1.05e+48) tmp = Float64(x * 1.0); elseif (t <= 3.6e+210) tmp = Float64(x * Float64(Float64(z - a) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (x + (-1.0 * x)); tmp = 0.0; if (t <= -1.8e+144) tmp = t_1; elseif (t <= -4e-81) tmp = x - (y * -1.0); elseif (t <= -4.5e-295) tmp = z * ((y - x) / a); elseif (t <= 1.05e+48) tmp = x * 1.0; elseif (t <= 3.6e+210) tmp = x * ((z - a) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1799999999999999869449922363021060919684697761148896472674919768617891425020663242208887992937348489434422362932188577849477458618078907521302528], t$95$1, If[LessEqual[t, -1067993517960455/266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867072], N[(x - N[(y * -1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2588678114201735/5752618031559410904733776610524879147577526332615381032749762597047445625776030820246671274317041152675843644155884587445081272602061331919771117780463171980088572589595695528841671027239875011822498654466720184602820821834958812207165219537306471589227216341906761543678311870031350921754731402547975172390912], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1049999999999999924343677575419984678682242318336], N[(x * 1), $MachinePrecision], If[LessEqual[t, 3600000000000000263202775859717469256018174328535138252152055447988004720056054266751308276517886685603398476798911472512056500497788749608139688697102507805581500737953993050408248616802767716133203854546173952], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
t_1 := y - \left(x + -1 \cdot x\right)\\
\mathbf{if}\;t \leq -1799999999999999869449922363021060919684697761148896472674919768617891425020663242208887992937348489434422362932188577849477458618078907521302528:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq \frac{-1067993517960455}{266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867072}:\\
\;\;\;\;x - y \cdot -1\\
\mathbf{elif}\;t \leq \frac{-2588678114201735}{5752618031559410904733776610524879147577526332615381032749762597047445625776030820246671274317041152675843644155884587445081272602061331919771117780463171980088572589595695528841671027239875011822498654466720184602820821834958812207165219537306471589227216341906761543678311870031350921754731402547975172390912}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 1049999999999999924343677575419984678682242318336:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;t \leq 3600000000000000263202775859717469256018174328535138252152055447988004720056054266751308276517886685603398476798911472512056500497788749608139688697102507805581500737953993050408248616802767716133203854546173952:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -1.7999999999999999e144 or 3.6000000000000003e210 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
if -1.7999999999999999e144 < t < -3.9999999999999998e-81Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Applied rewrites84.4%
Taylor expanded in x around 0
Applied rewrites67.3%
Taylor expanded in t around inf
Applied rewrites33.4%
if -3.9999999999999998e-81 < t < -4.5000000000000002e-295Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.4%
Applied rewrites42.4%
Taylor expanded in x around 0
lower-/.f64N/A
lower--.f6423.7%
Applied rewrites23.7%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6425.9%
Applied rewrites25.9%
if -4.5000000000000002e-295 < t < 1.0499999999999999e48Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
if 1.0499999999999999e48 < t < 3.6000000000000003e210Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around -inf
lower-/.f64N/A
lower--.f6423.0%
Applied rewrites23.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (+ x (* -1 x)))))
(if (<=
t
-1799999999999999869449922363021060919684697761148896472674919768617891425020663242208887992937348489434422362932188577849477458618078907521302528)
t_1
(if (<=
t
-1067993517960455/266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867072)
(- x (* y -1))
(if (<=
t
-2588678114201735/5752618031559410904733776610524879147577526332615381032749762597047445625776030820246671274317041152675843644155884587445081272602061331919771117780463171980088572589595695528841671027239875011822498654466720184602820821834958812207165219537306471589227216341906761543678311870031350921754731402547975172390912)
(/ (* z (- y x)) a)
(if (<= t 1049999999999999924343677575419984678682242318336)
(* x 1)
(if (<=
t
3600000000000000263202775859717469256018174328535138252152055447988004720056054266751308276517886685603398476798911472512056500497788749608139688697102507805581500737953993050408248616802767716133203854546173952)
(* x (/ (- z a) t))
t_1)))))))double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -1.8e+144) {
tmp = t_1;
} else if (t <= -4e-81) {
tmp = x - (y * -1.0);
} else if (t <= -4.5e-295) {
tmp = (z * (y - x)) / a;
} else if (t <= 1.05e+48) {
tmp = x * 1.0;
} else if (t <= 3.6e+210) {
tmp = x * ((z - a) / t);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y - (x + ((-1.0d0) * x))
if (t <= (-1.8d+144)) then
tmp = t_1
else if (t <= (-4d-81)) then
tmp = x - (y * (-1.0d0))
else if (t <= (-4.5d-295)) then
tmp = (z * (y - x)) / a
else if (t <= 1.05d+48) then
tmp = x * 1.0d0
else if (t <= 3.6d+210) then
tmp = x * ((z - a) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -1.8e+144) {
tmp = t_1;
} else if (t <= -4e-81) {
tmp = x - (y * -1.0);
} else if (t <= -4.5e-295) {
tmp = (z * (y - x)) / a;
} else if (t <= 1.05e+48) {
tmp = x * 1.0;
} else if (t <= 3.6e+210) {
tmp = x * ((z - a) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (x + (-1.0 * x)) tmp = 0 if t <= -1.8e+144: tmp = t_1 elif t <= -4e-81: tmp = x - (y * -1.0) elif t <= -4.5e-295: tmp = (z * (y - x)) / a elif t <= 1.05e+48: tmp = x * 1.0 elif t <= 3.6e+210: tmp = x * ((z - a) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(x + Float64(-1.0 * x))) tmp = 0.0 if (t <= -1.8e+144) tmp = t_1; elseif (t <= -4e-81) tmp = Float64(x - Float64(y * -1.0)); elseif (t <= -4.5e-295) tmp = Float64(Float64(z * Float64(y - x)) / a); elseif (t <= 1.05e+48) tmp = Float64(x * 1.0); elseif (t <= 3.6e+210) tmp = Float64(x * Float64(Float64(z - a) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (x + (-1.0 * x)); tmp = 0.0; if (t <= -1.8e+144) tmp = t_1; elseif (t <= -4e-81) tmp = x - (y * -1.0); elseif (t <= -4.5e-295) tmp = (z * (y - x)) / a; elseif (t <= 1.05e+48) tmp = x * 1.0; elseif (t <= 3.6e+210) tmp = x * ((z - a) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1799999999999999869449922363021060919684697761148896472674919768617891425020663242208887992937348489434422362932188577849477458618078907521302528], t$95$1, If[LessEqual[t, -1067993517960455/266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867072], N[(x - N[(y * -1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2588678114201735/5752618031559410904733776610524879147577526332615381032749762597047445625776030820246671274317041152675843644155884587445081272602061331919771117780463171980088572589595695528841671027239875011822498654466720184602820821834958812207165219537306471589227216341906761543678311870031350921754731402547975172390912], N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 1049999999999999924343677575419984678682242318336], N[(x * 1), $MachinePrecision], If[LessEqual[t, 3600000000000000263202775859717469256018174328535138252152055447988004720056054266751308276517886685603398476798911472512056500497788749608139688697102507805581500737953993050408248616802767716133203854546173952], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
t_1 := y - \left(x + -1 \cdot x\right)\\
\mathbf{if}\;t \leq -1799999999999999869449922363021060919684697761148896472674919768617891425020663242208887992937348489434422362932188577849477458618078907521302528:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq \frac{-1067993517960455}{266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867072}:\\
\;\;\;\;x - y \cdot -1\\
\mathbf{elif}\;t \leq \frac{-2588678114201735}{5752618031559410904733776610524879147577526332615381032749762597047445625776030820246671274317041152675843644155884587445081272602061331919771117780463171980088572589595695528841671027239875011822498654466720184602820821834958812207165219537306471589227216341906761543678311870031350921754731402547975172390912}:\\
\;\;\;\;\frac{z \cdot \left(y - x\right)}{a}\\
\mathbf{elif}\;t \leq 1049999999999999924343677575419984678682242318336:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;t \leq 3600000000000000263202775859717469256018174328535138252152055447988004720056054266751308276517886685603398476798911472512056500497788749608139688697102507805581500737953993050408248616802767716133203854546173952:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -1.7999999999999999e144 or 3.6000000000000003e210 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
if -1.7999999999999999e144 < t < -3.9999999999999998e-81Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Applied rewrites84.4%
Taylor expanded in x around 0
Applied rewrites67.3%
Taylor expanded in t around inf
Applied rewrites33.4%
if -3.9999999999999998e-81 < t < -4.5000000000000002e-295Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.4%
Applied rewrites42.4%
Taylor expanded in x around 0
lower-/.f64N/A
lower--.f6423.7%
Applied rewrites23.7%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f6423.7%
Applied rewrites23.7%
if -4.5000000000000002e-295 < t < 1.0499999999999999e48Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
if 1.0499999999999999e48 < t < 3.6000000000000003e210Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around -inf
lower-/.f64N/A
lower--.f6423.0%
Applied rewrites23.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (+ x (* -1 x)))))
(if (<=
t
-1799999999999999869449922363021060919684697761148896472674919768617891425020663242208887992937348489434422362932188577849477458618078907521302528)
t_1
(if (<=
t
-1067993517960455/266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867072)
(- x (* y -1))
(if (<=
t
-2588678114201735/5752618031559410904733776610524879147577526332615381032749762597047445625776030820246671274317041152675843644155884587445081272602061331919771117780463171980088572589595695528841671027239875011822498654466720184602820821834958812207165219537306471589227216341906761543678311870031350921754731402547975172390912)
(/ (* z (- y x)) a)
(if (<= t 1049999999999999924343677575419984678682242318336)
(* x 1)
(if (<=
t
95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696)
(* x (/ z t))
t_1)))))))double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -1.8e+144) {
tmp = t_1;
} else if (t <= -4e-81) {
tmp = x - (y * -1.0);
} else if (t <= -4.5e-295) {
tmp = (z * (y - x)) / a;
} else if (t <= 1.05e+48) {
tmp = x * 1.0;
} else if (t <= 9.5e+178) {
tmp = x * (z / t);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y - (x + ((-1.0d0) * x))
if (t <= (-1.8d+144)) then
tmp = t_1
else if (t <= (-4d-81)) then
tmp = x - (y * (-1.0d0))
else if (t <= (-4.5d-295)) then
tmp = (z * (y - x)) / a
else if (t <= 1.05d+48) then
tmp = x * 1.0d0
else if (t <= 9.5d+178) then
tmp = x * (z / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -1.8e+144) {
tmp = t_1;
} else if (t <= -4e-81) {
tmp = x - (y * -1.0);
} else if (t <= -4.5e-295) {
tmp = (z * (y - x)) / a;
} else if (t <= 1.05e+48) {
tmp = x * 1.0;
} else if (t <= 9.5e+178) {
tmp = x * (z / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (x + (-1.0 * x)) tmp = 0 if t <= -1.8e+144: tmp = t_1 elif t <= -4e-81: tmp = x - (y * -1.0) elif t <= -4.5e-295: tmp = (z * (y - x)) / a elif t <= 1.05e+48: tmp = x * 1.0 elif t <= 9.5e+178: tmp = x * (z / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(x + Float64(-1.0 * x))) tmp = 0.0 if (t <= -1.8e+144) tmp = t_1; elseif (t <= -4e-81) tmp = Float64(x - Float64(y * -1.0)); elseif (t <= -4.5e-295) tmp = Float64(Float64(z * Float64(y - x)) / a); elseif (t <= 1.05e+48) tmp = Float64(x * 1.0); elseif (t <= 9.5e+178) tmp = Float64(x * Float64(z / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (x + (-1.0 * x)); tmp = 0.0; if (t <= -1.8e+144) tmp = t_1; elseif (t <= -4e-81) tmp = x - (y * -1.0); elseif (t <= -4.5e-295) tmp = (z * (y - x)) / a; elseif (t <= 1.05e+48) tmp = x * 1.0; elseif (t <= 9.5e+178) tmp = x * (z / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1799999999999999869449922363021060919684697761148896472674919768617891425020663242208887992937348489434422362932188577849477458618078907521302528], t$95$1, If[LessEqual[t, -1067993517960455/266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867072], N[(x - N[(y * -1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2588678114201735/5752618031559410904733776610524879147577526332615381032749762597047445625776030820246671274317041152675843644155884587445081272602061331919771117780463171980088572589595695528841671027239875011822498654466720184602820821834958812207165219537306471589227216341906761543678311870031350921754731402547975172390912], N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 1049999999999999924343677575419984678682242318336], N[(x * 1), $MachinePrecision], If[LessEqual[t, 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
t_1 := y - \left(x + -1 \cdot x\right)\\
\mathbf{if}\;t \leq -1799999999999999869449922363021060919684697761148896472674919768617891425020663242208887992937348489434422362932188577849477458618078907521302528:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq \frac{-1067993517960455}{266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867072}:\\
\;\;\;\;x - y \cdot -1\\
\mathbf{elif}\;t \leq \frac{-2588678114201735}{5752618031559410904733776610524879147577526332615381032749762597047445625776030820246671274317041152675843644155884587445081272602061331919771117780463171980088572589595695528841671027239875011822498654466720184602820821834958812207165219537306471589227216341906761543678311870031350921754731402547975172390912}:\\
\;\;\;\;\frac{z \cdot \left(y - x\right)}{a}\\
\mathbf{elif}\;t \leq 1049999999999999924343677575419984678682242318336:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;t \leq 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -1.7999999999999999e144 or 9.5000000000000003e178 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
if -1.7999999999999999e144 < t < -3.9999999999999998e-81Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Applied rewrites84.4%
Taylor expanded in x around 0
Applied rewrites67.3%
Taylor expanded in t around inf
Applied rewrites33.4%
if -3.9999999999999998e-81 < t < -4.5000000000000002e-295Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.4%
Applied rewrites42.4%
Taylor expanded in x around 0
lower-/.f64N/A
lower--.f6423.7%
Applied rewrites23.7%
Taylor expanded in a around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f6423.7%
Applied rewrites23.7%
if -4.5000000000000002e-295 < t < 1.0499999999999999e48Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
if 1.0499999999999999e48 < t < 9.5000000000000003e178Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
Taylor expanded in a around 0
lower-/.f6419.1%
Applied rewrites19.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (+ x (* -1 x)))))
(if (<=
t
-879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176)
t_1
(if (<=
t
-6521557777124079/6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152)
(- x (* y -1))
(if (<=
t
-3949107279145325/270486799941460606132397969877256502537649830930494219329515883021657038109043128050901635014480480202073290236547649883587761950465374995072275956973025063377093982207490603094390537050330337819148407249004128462923790485888799610285259212168722675962643753419641855148032)
(/ (* y z) (- a t))
(if (<= t 1049999999999999924343677575419984678682242318336)
(* x 1)
(if (<=
t
95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696)
(* x (/ z t))
t_1)))))))double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -8.8e+149) {
tmp = t_1;
} else if (t <= -9.5e-142) {
tmp = x - (y * -1.0);
} else if (t <= -1.46e-257) {
tmp = (y * z) / (a - t);
} else if (t <= 1.05e+48) {
tmp = x * 1.0;
} else if (t <= 9.5e+178) {
tmp = x * (z / t);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y - (x + ((-1.0d0) * x))
if (t <= (-8.8d+149)) then
tmp = t_1
else if (t <= (-9.5d-142)) then
tmp = x - (y * (-1.0d0))
else if (t <= (-1.46d-257)) then
tmp = (y * z) / (a - t)
else if (t <= 1.05d+48) then
tmp = x * 1.0d0
else if (t <= 9.5d+178) then
tmp = x * (z / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -8.8e+149) {
tmp = t_1;
} else if (t <= -9.5e-142) {
tmp = x - (y * -1.0);
} else if (t <= -1.46e-257) {
tmp = (y * z) / (a - t);
} else if (t <= 1.05e+48) {
tmp = x * 1.0;
} else if (t <= 9.5e+178) {
tmp = x * (z / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (x + (-1.0 * x)) tmp = 0 if t <= -8.8e+149: tmp = t_1 elif t <= -9.5e-142: tmp = x - (y * -1.0) elif t <= -1.46e-257: tmp = (y * z) / (a - t) elif t <= 1.05e+48: tmp = x * 1.0 elif t <= 9.5e+178: tmp = x * (z / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(x + Float64(-1.0 * x))) tmp = 0.0 if (t <= -8.8e+149) tmp = t_1; elseif (t <= -9.5e-142) tmp = Float64(x - Float64(y * -1.0)); elseif (t <= -1.46e-257) tmp = Float64(Float64(y * z) / Float64(a - t)); elseif (t <= 1.05e+48) tmp = Float64(x * 1.0); elseif (t <= 9.5e+178) tmp = Float64(x * Float64(z / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (x + (-1.0 * x)); tmp = 0.0; if (t <= -8.8e+149) tmp = t_1; elseif (t <= -9.5e-142) tmp = x - (y * -1.0); elseif (t <= -1.46e-257) tmp = (y * z) / (a - t); elseif (t <= 1.05e+48) tmp = x * 1.0; elseif (t <= 9.5e+178) tmp = x * (z / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176], t$95$1, If[LessEqual[t, -6521557777124079/6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152], N[(x - N[(y * -1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3949107279145325/270486799941460606132397969877256502537649830930494219329515883021657038109043128050901635014480480202073290236547649883587761950465374995072275956973025063377093982207490603094390537050330337819148407249004128462923790485888799610285259212168722675962643753419641855148032], N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1049999999999999924343677575419984678682242318336], N[(x * 1), $MachinePrecision], If[LessEqual[t, 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
t_1 := y - \left(x + -1 \cdot x\right)\\
\mathbf{if}\;t \leq -879999999999999997672099117657027450690821770106771224993052246681969304369041136631928238650233080250998827309506196002949420576786954145137401266176:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq \frac{-6521557777124079}{6864797660130609714981900799081393217269435300143305409394463459185543183397656052122559640661454554977296311391480858037121987999716643812574028291115057152}:\\
\;\;\;\;x - y \cdot -1\\
\mathbf{elif}\;t \leq \frac{-3949107279145325}{270486799941460606132397969877256502537649830930494219329515883021657038109043128050901635014480480202073290236547649883587761950465374995072275956973025063377093982207490603094390537050330337819148407249004128462923790485888799610285259212168722675962643753419641855148032}:\\
\;\;\;\;\frac{y \cdot z}{a - t}\\
\mathbf{elif}\;t \leq 1049999999999999924343677575419984678682242318336:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;t \leq 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -8.8e149 or 9.5000000000000003e178 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
if -8.8e149 < t < -9.4999999999999997e-142Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Applied rewrites84.4%
Taylor expanded in x around 0
Applied rewrites67.3%
Taylor expanded in t around inf
Applied rewrites33.4%
if -9.4999999999999997e-142 < t < -1.4600000000000001e-257Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.4%
Applied rewrites42.4%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6421.4%
Applied rewrites21.4%
if -1.4600000000000001e-257 < t < 1.0499999999999999e48Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
if 1.0499999999999999e48 < t < 9.5000000000000003e178Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
Taylor expanded in a around 0
lower-/.f6419.1%
Applied rewrites19.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (+ x (* -1 x)))))
(if (<=
t
-1799999999999999869449922363021060919684697761148896472674919768617891425020663242208887992937348489434422362932188577849477458618078907521302528)
t_1
(if (<=
t
-1067993517960455/266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867072)
(- x (* y -1))
(if (<=
t
-4254389501031255/8863311460481781141746416676937941075153709659930434578989576454853657824757125219971944776154496375261537574471193391385403783592849407838528338558092085276740615608975052082196989118065224509657855008735367281473086766641604185629827373864344704645943910512054824309490712576)
(* z (/ y a))
(if (<= t 1049999999999999924343677575419984678682242318336)
(* x 1)
(if (<=
t
95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696)
(* x (/ z t))
t_1)))))))double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -1.8e+144) {
tmp = t_1;
} else if (t <= -4e-81) {
tmp = x - (y * -1.0);
} else if (t <= -4.8e-262) {
tmp = z * (y / a);
} else if (t <= 1.05e+48) {
tmp = x * 1.0;
} else if (t <= 9.5e+178) {
tmp = x * (z / t);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y - (x + ((-1.0d0) * x))
if (t <= (-1.8d+144)) then
tmp = t_1
else if (t <= (-4d-81)) then
tmp = x - (y * (-1.0d0))
else if (t <= (-4.8d-262)) then
tmp = z * (y / a)
else if (t <= 1.05d+48) then
tmp = x * 1.0d0
else if (t <= 9.5d+178) then
tmp = x * (z / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -1.8e+144) {
tmp = t_1;
} else if (t <= -4e-81) {
tmp = x - (y * -1.0);
} else if (t <= -4.8e-262) {
tmp = z * (y / a);
} else if (t <= 1.05e+48) {
tmp = x * 1.0;
} else if (t <= 9.5e+178) {
tmp = x * (z / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (x + (-1.0 * x)) tmp = 0 if t <= -1.8e+144: tmp = t_1 elif t <= -4e-81: tmp = x - (y * -1.0) elif t <= -4.8e-262: tmp = z * (y / a) elif t <= 1.05e+48: tmp = x * 1.0 elif t <= 9.5e+178: tmp = x * (z / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(x + Float64(-1.0 * x))) tmp = 0.0 if (t <= -1.8e+144) tmp = t_1; elseif (t <= -4e-81) tmp = Float64(x - Float64(y * -1.0)); elseif (t <= -4.8e-262) tmp = Float64(z * Float64(y / a)); elseif (t <= 1.05e+48) tmp = Float64(x * 1.0); elseif (t <= 9.5e+178) tmp = Float64(x * Float64(z / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (x + (-1.0 * x)); tmp = 0.0; if (t <= -1.8e+144) tmp = t_1; elseif (t <= -4e-81) tmp = x - (y * -1.0); elseif (t <= -4.8e-262) tmp = z * (y / a); elseif (t <= 1.05e+48) tmp = x * 1.0; elseif (t <= 9.5e+178) tmp = x * (z / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1799999999999999869449922363021060919684697761148896472674919768617891425020663242208887992937348489434422362932188577849477458618078907521302528], t$95$1, If[LessEqual[t, -1067993517960455/266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867072], N[(x - N[(y * -1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4254389501031255/8863311460481781141746416676937941075153709659930434578989576454853657824757125219971944776154496375261537574471193391385403783592849407838528338558092085276740615608975052082196989118065224509657855008735367281473086766641604185629827373864344704645943910512054824309490712576], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1049999999999999924343677575419984678682242318336], N[(x * 1), $MachinePrecision], If[LessEqual[t, 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
t_1 := y - \left(x + -1 \cdot x\right)\\
\mathbf{if}\;t \leq -1799999999999999869449922363021060919684697761148896472674919768617891425020663242208887992937348489434422362932188577849477458618078907521302528:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq \frac{-1067993517960455}{266998379490113760299377713271194014325338065294581596243380200977777465722580068752870260867072}:\\
\;\;\;\;x - y \cdot -1\\
\mathbf{elif}\;t \leq \frac{-4254389501031255}{8863311460481781141746416676937941075153709659930434578989576454853657824757125219971944776154496375261537574471193391385403783592849407838528338558092085276740615608975052082196989118065224509657855008735367281473086766641604185629827373864344704645943910512054824309490712576}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 1049999999999999924343677575419984678682242318336:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;t \leq 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -1.7999999999999999e144 or 9.5000000000000003e178 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
if -1.7999999999999999e144 < t < -3.9999999999999998e-81Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Applied rewrites84.4%
Taylor expanded in x around 0
Applied rewrites67.3%
Taylor expanded in t around inf
Applied rewrites33.4%
if -3.9999999999999998e-81 < t < -4.8000000000000001e-262Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.4%
Applied rewrites42.4%
Taylor expanded in x around 0
lower-/.f64N/A
lower--.f6423.7%
Applied rewrites23.7%
Taylor expanded in t around 0
Applied rewrites18.1%
if -4.8000000000000001e-262 < t < 1.0499999999999999e48Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
if 1.0499999999999999e48 < t < 9.5000000000000003e178Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
Taylor expanded in a around 0
lower-/.f6419.1%
Applied rewrites19.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (+ x (* -1 x)))))
(if (<=
t
-32999999999999999224551649921188376054309610847698636434518172229497721989585267143685755563589344485225679296183401740245116370550784000)
t_1
(if (<=
t
-2980834737217361/12420144738405671481191835907700020442055088136933572889112416304208407621491015090647027270629171823603901845577048585649372640352918515131554298200329449113635639808166799244402122285052787558602103993549731750007142774830528462848)
(- x (* y -1))
(if (<=
t
-3949107279145325/270486799941460606132397969877256502537649830930494219329515883021657038109043128050901635014480480202073290236547649883587761950465374995072275956973025063377093982207490603094390537050330337819148407249004128462923790485888799610285259212168722675962643753419641855148032)
(/ (* y z) a)
(if (<= t 1049999999999999924343677575419984678682242318336)
(* x 1)
(if (<=
t
95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696)
(* x (/ z t))
t_1)))))))double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -3.3e+136) {
tmp = t_1;
} else if (t <= -2.4e-217) {
tmp = x - (y * -1.0);
} else if (t <= -1.46e-257) {
tmp = (y * z) / a;
} else if (t <= 1.05e+48) {
tmp = x * 1.0;
} else if (t <= 9.5e+178) {
tmp = x * (z / t);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = y - (x + ((-1.0d0) * x))
if (t <= (-3.3d+136)) then
tmp = t_1
else if (t <= (-2.4d-217)) then
tmp = x - (y * (-1.0d0))
else if (t <= (-1.46d-257)) then
tmp = (y * z) / a
else if (t <= 1.05d+48) then
tmp = x * 1.0d0
else if (t <= 9.5d+178) then
tmp = x * (z / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -3.3e+136) {
tmp = t_1;
} else if (t <= -2.4e-217) {
tmp = x - (y * -1.0);
} else if (t <= -1.46e-257) {
tmp = (y * z) / a;
} else if (t <= 1.05e+48) {
tmp = x * 1.0;
} else if (t <= 9.5e+178) {
tmp = x * (z / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (x + (-1.0 * x)) tmp = 0 if t <= -3.3e+136: tmp = t_1 elif t <= -2.4e-217: tmp = x - (y * -1.0) elif t <= -1.46e-257: tmp = (y * z) / a elif t <= 1.05e+48: tmp = x * 1.0 elif t <= 9.5e+178: tmp = x * (z / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(x + Float64(-1.0 * x))) tmp = 0.0 if (t <= -3.3e+136) tmp = t_1; elseif (t <= -2.4e-217) tmp = Float64(x - Float64(y * -1.0)); elseif (t <= -1.46e-257) tmp = Float64(Float64(y * z) / a); elseif (t <= 1.05e+48) tmp = Float64(x * 1.0); elseif (t <= 9.5e+178) tmp = Float64(x * Float64(z / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (x + (-1.0 * x)); tmp = 0.0; if (t <= -3.3e+136) tmp = t_1; elseif (t <= -2.4e-217) tmp = x - (y * -1.0); elseif (t <= -1.46e-257) tmp = (y * z) / a; elseif (t <= 1.05e+48) tmp = x * 1.0; elseif (t <= 9.5e+178) tmp = x * (z / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -32999999999999999224551649921188376054309610847698636434518172229497721989585267143685755563589344485225679296183401740245116370550784000], t$95$1, If[LessEqual[t, -2980834737217361/12420144738405671481191835907700020442055088136933572889112416304208407621491015090647027270629171823603901845577048585649372640352918515131554298200329449113635639808166799244402122285052787558602103993549731750007142774830528462848], N[(x - N[(y * -1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3949107279145325/270486799941460606132397969877256502537649830930494219329515883021657038109043128050901635014480480202073290236547649883587761950465374995072275956973025063377093982207490603094390537050330337819148407249004128462923790485888799610285259212168722675962643753419641855148032], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 1049999999999999924343677575419984678682242318336], N[(x * 1), $MachinePrecision], If[LessEqual[t, 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
t_1 := y - \left(x + -1 \cdot x\right)\\
\mathbf{if}\;t \leq -32999999999999999224551649921188376054309610847698636434518172229497721989585267143685755563589344485225679296183401740245116370550784000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq \frac{-2980834737217361}{12420144738405671481191835907700020442055088136933572889112416304208407621491015090647027270629171823603901845577048585649372640352918515131554298200329449113635639808166799244402122285052787558602103993549731750007142774830528462848}:\\
\;\;\;\;x - y \cdot -1\\
\mathbf{elif}\;t \leq \frac{-3949107279145325}{270486799941460606132397969877256502537649830930494219329515883021657038109043128050901635014480480202073290236547649883587761950465374995072275956973025063377093982207490603094390537050330337819148407249004128462923790485888799610285259212168722675962643753419641855148032}:\\
\;\;\;\;\frac{y \cdot z}{a}\\
\mathbf{elif}\;t \leq 1049999999999999924343677575419984678682242318336:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;t \leq 95000000000000003182055734695818400232785698392689640252499456490754934189858100161564057624839499224276609604404512829410417062553420770158150408427907518478854544725081845661696:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -3.2999999999999999e136 or 9.5000000000000003e178 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
if -3.2999999999999999e136 < t < -2.3999999999999999e-217Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Applied rewrites84.4%
Taylor expanded in x around 0
Applied rewrites67.3%
Taylor expanded in t around inf
Applied rewrites33.4%
if -2.3999999999999999e-217 < t < -1.4600000000000001e-257Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6439.7%
Applied rewrites39.7%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f6416.3%
Applied rewrites16.3%
if -1.4600000000000001e-257 < t < 1.0499999999999999e48Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
if 1.0499999999999999e48 < t < 9.5000000000000003e178Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
Taylor expanded in a around 0
lower-/.f6419.1%
Applied rewrites19.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (+ x (* -1 x)))))
(if (<=
t
-32999999999999999224551649921188376054309610847698636434518172229497721989585267143685755563589344485225679296183401740245116370550784000)
t_1
(if (<=
t
-2980834737217361/12420144738405671481191835907700020442055088136933572889112416304208407621491015090647027270629171823603901845577048585649372640352918515131554298200329449113635639808166799244402122285052787558602103993549731750007142774830528462848)
(- x (* y -1))
(if (<=
t
-3949107279145325/270486799941460606132397969877256502537649830930494219329515883021657038109043128050901635014480480202073290236547649883587761950465374995072275956973025063377093982207490603094390537050330337819148407249004128462923790485888799610285259212168722675962643753419641855148032)
(/ (* y z) a)
(if (<= t 1060000000000000025165824) (* x 1) t_1))))))double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -3.3e+136) {
tmp = t_1;
} else if (t <= -2.4e-217) {
tmp = x - (y * -1.0);
} else if (t <= -1.46e-257) {
tmp = (y * z) / a;
} else if (t <= 1.06e+24) {
tmp = x * 1.0;
} 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)
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) :: t_1
real(8) :: tmp
t_1 = y - (x + ((-1.0d0) * x))
if (t <= (-3.3d+136)) then
tmp = t_1
else if (t <= (-2.4d-217)) then
tmp = x - (y * (-1.0d0))
else if (t <= (-1.46d-257)) then
tmp = (y * z) / a
else if (t <= 1.06d+24) then
tmp = x * 1.0d0
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 t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -3.3e+136) {
tmp = t_1;
} else if (t <= -2.4e-217) {
tmp = x - (y * -1.0);
} else if (t <= -1.46e-257) {
tmp = (y * z) / a;
} else if (t <= 1.06e+24) {
tmp = x * 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (x + (-1.0 * x)) tmp = 0 if t <= -3.3e+136: tmp = t_1 elif t <= -2.4e-217: tmp = x - (y * -1.0) elif t <= -1.46e-257: tmp = (y * z) / a elif t <= 1.06e+24: tmp = x * 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(x + Float64(-1.0 * x))) tmp = 0.0 if (t <= -3.3e+136) tmp = t_1; elseif (t <= -2.4e-217) tmp = Float64(x - Float64(y * -1.0)); elseif (t <= -1.46e-257) tmp = Float64(Float64(y * z) / a); elseif (t <= 1.06e+24) tmp = Float64(x * 1.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (x + (-1.0 * x)); tmp = 0.0; if (t <= -3.3e+136) tmp = t_1; elseif (t <= -2.4e-217) tmp = x - (y * -1.0); elseif (t <= -1.46e-257) tmp = (y * z) / a; elseif (t <= 1.06e+24) tmp = x * 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -32999999999999999224551649921188376054309610847698636434518172229497721989585267143685755563589344485225679296183401740245116370550784000], t$95$1, If[LessEqual[t, -2980834737217361/12420144738405671481191835907700020442055088136933572889112416304208407621491015090647027270629171823603901845577048585649372640352918515131554298200329449113635639808166799244402122285052787558602103993549731750007142774830528462848], N[(x - N[(y * -1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3949107279145325/270486799941460606132397969877256502537649830930494219329515883021657038109043128050901635014480480202073290236547649883587761950465374995072275956973025063377093982207490603094390537050330337819148407249004128462923790485888799610285259212168722675962643753419641855148032], N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 1060000000000000025165824], N[(x * 1), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := y - \left(x + -1 \cdot x\right)\\
\mathbf{if}\;t \leq -32999999999999999224551649921188376054309610847698636434518172229497721989585267143685755563589344485225679296183401740245116370550784000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq \frac{-2980834737217361}{12420144738405671481191835907700020442055088136933572889112416304208407621491015090647027270629171823603901845577048585649372640352918515131554298200329449113635639808166799244402122285052787558602103993549731750007142774830528462848}:\\
\;\;\;\;x - y \cdot -1\\
\mathbf{elif}\;t \leq \frac{-3949107279145325}{270486799941460606132397969877256502537649830930494219329515883021657038109043128050901635014480480202073290236547649883587761950465374995072275956973025063377093982207490603094390537050330337819148407249004128462923790485888799610285259212168722675962643753419641855148032}:\\
\;\;\;\;\frac{y \cdot z}{a}\\
\mathbf{elif}\;t \leq 1060000000000000025165824:\\
\;\;\;\;x \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -3.2999999999999999e136 or 1.06e24 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
if -3.2999999999999999e136 < t < -2.3999999999999999e-217Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Applied rewrites84.4%
Taylor expanded in x around 0
Applied rewrites67.3%
Taylor expanded in t around inf
Applied rewrites33.4%
if -2.3999999999999999e-217 < t < -1.4600000000000001e-257Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6439.7%
Applied rewrites39.7%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f6416.3%
Applied rewrites16.3%
if -1.4600000000000001e-257 < t < 1.06e24Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- y (+ x (* -1 x)))))
(if (<= t -4842270319348757/2305843009213693952)
t_1
(if (<= t 1060000000000000025165824) (* x 1) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -0.0021) {
tmp = t_1;
} else if (t <= 1.06e+24) {
tmp = x * 1.0;
} 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)
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) :: t_1
real(8) :: tmp
t_1 = y - (x + ((-1.0d0) * x))
if (t <= (-0.0021d0)) then
tmp = t_1
else if (t <= 1.06d+24) then
tmp = x * 1.0d0
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 t_1 = y - (x + (-1.0 * x));
double tmp;
if (t <= -0.0021) {
tmp = t_1;
} else if (t <= 1.06e+24) {
tmp = x * 1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (x + (-1.0 * x)) tmp = 0 if t <= -0.0021: tmp = t_1 elif t <= 1.06e+24: tmp = x * 1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(x + Float64(-1.0 * x))) tmp = 0.0 if (t <= -0.0021) tmp = t_1; elseif (t <= 1.06e+24) tmp = Float64(x * 1.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (x + (-1.0 * x)); tmp = 0.0; if (t <= -0.0021) tmp = t_1; elseif (t <= 1.06e+24) tmp = x * 1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y - N[(x + N[(-1 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4842270319348757/2305843009213693952], t$95$1, If[LessEqual[t, 1060000000000000025165824], N[(x * 1), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := y - \left(x + -1 \cdot x\right)\\
\mathbf{if}\;t \leq \frac{-4842270319348757}{2305843009213693952}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1060000000000000025165824:\\
\;\;\;\;x \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -0.0020999999999999999 or 1.06e24 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Taylor expanded in t around -inf
lower--.f64N/A
lower-+.f64N/A
lower-*.f6424.9%
Applied rewrites24.9%
if -0.0020999999999999999 < t < 1.06e24Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -40999999999999999722058895648826747034930046119706624) (* x 1) (- x (* y -1))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.1e+52) {
tmp = x * 1.0;
} else {
tmp = x - (y * -1.0);
}
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)
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) :: tmp
if (a <= (-4.1d+52)) then
tmp = x * 1.0d0
else
tmp = x - (y * (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.1e+52) {
tmp = x * 1.0;
} else {
tmp = x - (y * -1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.1e+52: tmp = x * 1.0 else: tmp = x - (y * -1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.1e+52) tmp = Float64(x * 1.0); else tmp = Float64(x - Float64(y * -1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.1e+52) tmp = x * 1.0; else tmp = x - (y * -1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -40999999999999999722058895648826747034930046119706624], N[(x * 1), $MachinePrecision], N[(x - N[(y * -1), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;a \leq -40999999999999999722058895648826747034930046119706624:\\
\;\;\;\;x \cdot 1\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot -1\\
\end{array}
if a < -4.1e52Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
if -4.1e52 < a Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
add-to-fractionN/A
mult-flipN/A
*-commutativeN/A
+-commutativeN/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lift-*.f64N/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6485.3%
Applied rewrites85.3%
Applied rewrites84.4%
Taylor expanded in x around 0
Applied rewrites67.3%
Taylor expanded in t around inf
Applied rewrites33.4%
(FPCore (x y z t a) :precision binary64 (* x 1))
double code(double x, double y, double z, double t, double a) {
return x * 1.0;
}
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)
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
code = x * 1.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return x * 1.0;
}
def code(x, y, z, t, a): return x * 1.0
function code(x, y, z, t, a) return Float64(x * 1.0) end
function tmp = code(x, y, z, t, a) tmp = x * 1.0; end
code[x_, y_, z_, t_, a_] := N[(x * 1), $MachinePrecision]
x \cdot 1
Initial program 68.6%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in t around inf
Applied rewrites2.8%
Taylor expanded in a around inf
Applied rewrites25.0%
herbie shell --seed 2025271 -o generate:evaluate
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
(+ x (/ (* (- y x) (- z t)) (- a t))))