
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (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) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (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) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (- (* (/ y (- a t)) (- z t)) y))))
(if (<=
x
-140000000000000000959427848218759767512090254448657972060114688665452544)
t_1
(if (<=
x
3299999999999999986428798326532941143297361994102300032786005566284043072254603818945699398355660046336)
(* y (+ (* -1 (/ (- a z) (- t a))) (/ x y)))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((y / (a - t)) * (z - t)) - y);
double tmp;
if (x <= -1.4e+71) {
tmp = t_1;
} else if (x <= 3.3e+102) {
tmp = y * ((-1.0 * ((a - 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 = x - (((y / (a - t)) * (z - t)) - y)
if (x <= (-1.4d+71)) then
tmp = t_1
else if (x <= 3.3d+102) then
tmp = y * (((-1.0d0) * ((a - 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 = x - (((y / (a - t)) * (z - t)) - y);
double tmp;
if (x <= -1.4e+71) {
tmp = t_1;
} else if (x <= 3.3e+102) {
tmp = y * ((-1.0 * ((a - z) / (t - a))) + (x / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (((y / (a - t)) * (z - t)) - y) tmp = 0 if x <= -1.4e+71: tmp = t_1 elif x <= 3.3e+102: tmp = y * ((-1.0 * ((a - z) / (t - a))) + (x / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(y / Float64(a - t)) * Float64(z - t)) - y)) tmp = 0.0 if (x <= -1.4e+71) tmp = t_1; elseif (x <= 3.3e+102) tmp = Float64(y * Float64(Float64(-1.0 * Float64(Float64(a - 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 = x - (((y / (a - t)) * (z - t)) - y); tmp = 0.0; if (x <= -1.4e+71) tmp = t_1; elseif (x <= 3.3e+102) tmp = y * ((-1.0 * ((a - 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[(x - N[(N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -140000000000000000959427848218759767512090254448657972060114688665452544], t$95$1, If[LessEqual[x, 3299999999999999986428798326532941143297361994102300032786005566284043072254603818945699398355660046336], N[(y * N[(N[(-1 * N[(N[(a - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \left(\frac{y}{a - t} \cdot \left(z - t\right) - y\right)\\
\mathbf{if}\;x \leq -140000000000000000959427848218759767512090254448657972060114688665452544:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3299999999999999986428798326532941143297361994102300032786005566284043072254603818945699398355660046336:\\
\;\;\;\;y \cdot \left(-1 \cdot \frac{a - z}{t - a} + \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if x < -1.4e71 or 3.3e102 < x Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
if -1.4e71 < x < 3.3e102Initial program 77.5%
lift--.f64N/A
lift-/.f64N/A
sub-to-fractionN/A
mult-flipN/A
*-commutativeN/A
sub-flipN/A
+-commutativeN/A
add-flip-revN/A
distribute-rgt-neg-outN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
Applied rewrites85.4%
Taylor expanded in y around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f64N/A
lower-/.f6486.6%
Applied rewrites86.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (/ (- a z) t) y))))
(if (<= t -3100000)
t_1
(if (<=
t
6499999999999999593644510990384774520498798802555127355660083857349028219105312768)
(- (+ x y) (134-z0z1z2z3z4 (/ -1 (- t a)) z y t y))
t_1))))\begin{array}{l}
t_1 := x - \frac{a - z}{t} \cdot y\\
\mathbf{if}\;t \leq -3100000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6499999999999999593644510990384774520498798802555127355660083857349028219105312768:\\
\;\;\;\;\left(x + y\right) - \mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{t - a}\right), z, y, t, y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -3.1e6 or 6.4999999999999996e81 < t Initial program 77.5%
Taylor expanded in t around -inf
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6457.6%
Applied rewrites57.6%
lift-+.f64N/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
mul-1-negN/A
lift-/.f64N/A
distribute-neg-fracN/A
distribute-frac-neg2N/A
frac-2negN/A
lift-/.f6457.6%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower--.f6457.9%
Applied rewrites57.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6460.3%
Applied rewrites60.3%
if -3.1e6 < t < 6.4999999999999996e81Initial program 77.5%
lift-/.f64N/A
mult-flipN/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/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--.f6485.6%
Applied rewrites85.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (/ (- a z) t) y))))
(if (<=
t
-1399999999999999900203233431268652273291712969981745991179757449936038368516204096864475053543900305296086173322588784333804428058190581690313277506617355347169378304)
t_1
(if (<=
t
13799999999999999440971610140959812744900457990581986660825254493315091665584806574573350325060890000217524680209619688111305757435101184)
(- x (- (* (/ y (- a t)) (- z t)) y))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((a - z) / t) * y);
double tmp;
if (t <= -1.4e+165) {
tmp = t_1;
} else if (t <= 1.38e+136) {
tmp = x - (((y / (a - t)) * (z - t)) - 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 = x - (((a - z) / t) * y)
if (t <= (-1.4d+165)) then
tmp = t_1
else if (t <= 1.38d+136) then
tmp = x - (((y / (a - t)) * (z - t)) - 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 = x - (((a - z) / t) * y);
double tmp;
if (t <= -1.4e+165) {
tmp = t_1;
} else if (t <= 1.38e+136) {
tmp = x - (((y / (a - t)) * (z - t)) - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (((a - z) / t) * y) tmp = 0 if t <= -1.4e+165: tmp = t_1 elif t <= 1.38e+136: tmp = x - (((y / (a - t)) * (z - t)) - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(a - z) / t) * y)) tmp = 0.0 if (t <= -1.4e+165) tmp = t_1; elseif (t <= 1.38e+136) tmp = Float64(x - Float64(Float64(Float64(y / Float64(a - t)) * Float64(z - t)) - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (((a - z) / t) * y); tmp = 0.0; if (t <= -1.4e+165) tmp = t_1; elseif (t <= 1.38e+136) tmp = x - (((y / (a - t)) * (z - t)) - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1399999999999999900203233431268652273291712969981745991179757449936038368516204096864475053543900305296086173322588784333804428058190581690313277506617355347169378304], t$95$1, If[LessEqual[t, 13799999999999999440971610140959812744900457990581986660825254493315091665584806574573350325060890000217524680209619688111305757435101184], N[(x - N[(N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \frac{a - z}{t} \cdot y\\
\mathbf{if}\;t \leq -1399999999999999900203233431268652273291712969981745991179757449936038368516204096864475053543900305296086173322588784333804428058190581690313277506617355347169378304:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 13799999999999999440971610140959812744900457990581986660825254493315091665584806574573350325060890000217524680209619688111305757435101184:\\
\;\;\;\;x - \left(\frac{y}{a - t} \cdot \left(z - t\right) - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -1.3999999999999999e165 or 1.3799999999999999e136 < t Initial program 77.5%
Taylor expanded in t around -inf
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6457.6%
Applied rewrites57.6%
lift-+.f64N/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
mul-1-negN/A
lift-/.f64N/A
distribute-neg-fracN/A
distribute-frac-neg2N/A
frac-2negN/A
lift-/.f6457.6%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower--.f6457.9%
Applied rewrites57.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6460.3%
Applied rewrites60.3%
if -1.3999999999999999e165 < t < 1.3799999999999999e136Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (/ (- a z) t) y))))
(if (<= t -3100000)
t_1
(if (<=
t
105000000000000008560894109403544066905437438919810482176)
(- (+ x y) (/ (* y z) (- a t)))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((a - z) / t) * y);
double tmp;
if (t <= -3100000.0) {
tmp = t_1;
} else if (t <= 1.05e+56) {
tmp = (x + y) - ((y * 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 - (((a - z) / t) * y)
if (t <= (-3100000.0d0)) then
tmp = t_1
else if (t <= 1.05d+56) then
tmp = (x + y) - ((y * 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 - (((a - z) / t) * y);
double tmp;
if (t <= -3100000.0) {
tmp = t_1;
} else if (t <= 1.05e+56) {
tmp = (x + y) - ((y * z) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (((a - z) / t) * y) tmp = 0 if t <= -3100000.0: tmp = t_1 elif t <= 1.05e+56: tmp = (x + y) - ((y * z) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(a - z) / t) * y)) tmp = 0.0 if (t <= -3100000.0) tmp = t_1; elseif (t <= 1.05e+56) tmp = Float64(Float64(x + y) - Float64(Float64(y * z) / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (((a - z) / t) * y); tmp = 0.0; if (t <= -3100000.0) tmp = t_1; elseif (t <= 1.05e+56) tmp = (x + y) - ((y * 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[(a - z), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3100000], t$95$1, If[LessEqual[t, 105000000000000008560894109403544066905437438919810482176], N[(N[(x + y), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \frac{a - z}{t} \cdot y\\
\mathbf{if}\;t \leq -3100000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 105000000000000008560894109403544066905437438919810482176:\\
\;\;\;\;\left(x + y\right) - \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -3.1e6 or 1.0500000000000001e56 < t Initial program 77.5%
Taylor expanded in t around -inf
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6457.6%
Applied rewrites57.6%
lift-+.f64N/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
mul-1-negN/A
lift-/.f64N/A
distribute-neg-fracN/A
distribute-frac-neg2N/A
frac-2negN/A
lift-/.f6457.6%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower--.f6457.9%
Applied rewrites57.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6460.3%
Applied rewrites60.3%
if -3.1e6 < t < 1.0500000000000001e56Initial program 77.5%
Taylor expanded in z around inf
lower-*.f6478.7%
Applied rewrites78.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (* (/ z a) y))))
(if (<=
a
-1519771171239775/3618502788666131106986593281521497120414687020801267626233049500247285301248)
t_1
(if (<= a 64999999999999997811068662022740957101817856)
(- x (* (/ z (- a t)) y))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - ((z / a) * y);
double tmp;
if (a <= -4.2e-61) {
tmp = t_1;
} else if (a <= 6.5e+43) {
tmp = x - ((z / (a - t)) * 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 = (x + y) - ((z / a) * y)
if (a <= (-4.2d-61)) then
tmp = t_1
else if (a <= 6.5d+43) then
tmp = x - ((z / (a - t)) * 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 = (x + y) - ((z / a) * y);
double tmp;
if (a <= -4.2e-61) {
tmp = t_1;
} else if (a <= 6.5e+43) {
tmp = x - ((z / (a - t)) * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - ((z / a) * y) tmp = 0 if a <= -4.2e-61: tmp = t_1 elif a <= 6.5e+43: tmp = x - ((z / (a - t)) * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(Float64(z / a) * y)) tmp = 0.0 if (a <= -4.2e-61) tmp = t_1; elseif (a <= 6.5e+43) tmp = Float64(x - Float64(Float64(z / Float64(a - t)) * y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - ((z / a) * y); tmp = 0.0; if (a <= -4.2e-61) tmp = t_1; elseif (a <= 6.5e+43) tmp = x - ((z / (a - t)) * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(N[(z / a), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1519771171239775/3618502788666131106986593281521497120414687020801267626233049500247285301248], t$95$1, If[LessEqual[a, 64999999999999997811068662022740957101817856], N[(x - N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{z}{a} \cdot y\\
\mathbf{if}\;a \leq \frac{-1519771171239775}{3618502788666131106986593281521497120414687020801267626233049500247285301248}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 64999999999999997811068662022740957101817856:\\
\;\;\;\;x - \frac{z}{a - t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -4.1999999999999998e-61 or 6.4999999999999998e43 < a Initial program 77.5%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f6464.3%
Applied rewrites64.3%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6466.1%
Applied rewrites66.1%
if -4.1999999999999998e-61 < a < 6.4999999999999998e43Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
Taylor expanded in a around inf
lower-*.f6460.2%
Applied rewrites60.2%
Taylor expanded in z around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f6473.6%
Applied rewrites73.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6476.3%
Applied rewrites76.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (* z (/ y a)))))
(if (<= a -7098843361278085/633825300114114700748351602688)
t_1
(if (<= a 64999999999999997811068662022740957101817856)
(- x (* (/ z (- a t)) y))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - (z * (y / a));
double tmp;
if (a <= -1.12e-14) {
tmp = t_1;
} else if (a <= 6.5e+43) {
tmp = x - ((z / (a - t)) * 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 = (x + y) - (z * (y / a))
if (a <= (-1.12d-14)) then
tmp = t_1
else if (a <= 6.5d+43) then
tmp = x - ((z / (a - t)) * 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 = (x + y) - (z * (y / a));
double tmp;
if (a <= -1.12e-14) {
tmp = t_1;
} else if (a <= 6.5e+43) {
tmp = x - ((z / (a - t)) * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - (z * (y / a)) tmp = 0 if a <= -1.12e-14: tmp = t_1 elif a <= 6.5e+43: tmp = x - ((z / (a - t)) * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(z * Float64(y / a))) tmp = 0.0 if (a <= -1.12e-14) tmp = t_1; elseif (a <= 6.5e+43) tmp = Float64(x - Float64(Float64(z / Float64(a - t)) * y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - (z * (y / a)); tmp = 0.0; if (a <= -1.12e-14) tmp = t_1; elseif (a <= 6.5e+43) tmp = x - ((z / (a - t)) * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -7098843361278085/633825300114114700748351602688], t$95$1, If[LessEqual[a, 64999999999999997811068662022740957101817856], N[(x - N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x + y\right) - z \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq \frac{-7098843361278085}{633825300114114700748351602688}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 64999999999999997811068662022740957101817856:\\
\;\;\;\;x - \frac{z}{a - t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -1.1200000000000001e-14 or 6.4999999999999998e43 < a Initial program 77.5%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f6464.3%
Applied rewrites64.3%
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
mult-flip-revN/A
lower-/.f6466.3%
Applied rewrites66.3%
if -1.1200000000000001e-14 < a < 6.4999999999999998e43Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
Taylor expanded in a around inf
lower-*.f6460.2%
Applied rewrites60.2%
Taylor expanded in z around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f6473.6%
Applied rewrites73.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6476.3%
Applied rewrites76.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (- y))))
(if (<= a -18999999999999999372737526393527479213844812791808)
t_1
(if (<=
a
1600000000000000132252141346013980646946023622824710961127370204984986009601639603374216973286408832068967823086973685020378115268670332314107856711878259818402975154563453039165720875006574998605330053237867864265850880)
(- x (* (/ z (- a t)) y))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - -y;
double tmp;
if (a <= -1.9e+49) {
tmp = t_1;
} else if (a <= 1.6e+219) {
tmp = x - ((z / (a - t)) * 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 = x - -y
if (a <= (-1.9d+49)) then
tmp = t_1
else if (a <= 1.6d+219) then
tmp = x - ((z / (a - t)) * 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 = x - -y;
double tmp;
if (a <= -1.9e+49) {
tmp = t_1;
} else if (a <= 1.6e+219) {
tmp = x - ((z / (a - t)) * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - -y tmp = 0 if a <= -1.9e+49: tmp = t_1 elif a <= 1.6e+219: tmp = x - ((z / (a - t)) * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(-y)) tmp = 0.0 if (a <= -1.9e+49) tmp = t_1; elseif (a <= 1.6e+219) tmp = Float64(x - Float64(Float64(z / Float64(a - t)) * y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - -y; tmp = 0.0; if (a <= -1.9e+49) tmp = t_1; elseif (a <= 1.6e+219) tmp = x - ((z / (a - t)) * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - (-y)), $MachinePrecision]}, If[LessEqual[a, -18999999999999999372737526393527479213844812791808], t$95$1, If[LessEqual[a, 1600000000000000132252141346013980646946023622824710961127370204984986009601639603374216973286408832068967823086973685020378115268670332314107856711878259818402975154563453039165720875006574998605330053237867864265850880], N[(x - N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \left(-y\right)\\
\mathbf{if}\;a \leq -18999999999999999372737526393527479213844812791808:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1600000000000000132252141346013980646946023622824710961127370204984986009601639603374216973286408832068967823086973685020378115268670332314107856711878259818402975154563453039165720875006574998605330053237867864265850880:\\
\;\;\;\;x - \frac{z}{a - t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -1.8999999999999999e49 or 1.6000000000000001e219 < a Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
Taylor expanded in a around inf
lower-*.f6460.2%
Applied rewrites60.2%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6460.2%
Applied rewrites60.2%
if -1.8999999999999999e49 < a < 1.6000000000000001e219Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
Taylor expanded in a around inf
lower-*.f6460.2%
Applied rewrites60.2%
Taylor expanded in z around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f6473.6%
Applied rewrites73.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6476.3%
Applied rewrites76.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (- y))))
(if (<= a -16000000000000000701533488721219157674144762429440)
t_1
(if (<=
a
101999999999999997731603845368375289752342362849906699345834936350186795924394979613921904737278646871526473728)
(- x (* (/ y (- a t)) z))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - -y;
double tmp;
if (a <= -1.6e+49) {
tmp = t_1;
} else if (a <= 1.02e+110) {
tmp = x - ((y / (a - t)) * z);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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 - -y
if (a <= (-1.6d+49)) then
tmp = t_1
else if (a <= 1.02d+110) then
tmp = x - ((y / (a - t)) * z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - -y;
double tmp;
if (a <= -1.6e+49) {
tmp = t_1;
} else if (a <= 1.02e+110) {
tmp = x - ((y / (a - t)) * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - -y tmp = 0 if a <= -1.6e+49: tmp = t_1 elif a <= 1.02e+110: tmp = x - ((y / (a - t)) * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(-y)) tmp = 0.0 if (a <= -1.6e+49) tmp = t_1; elseif (a <= 1.02e+110) tmp = Float64(x - Float64(Float64(y / Float64(a - t)) * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - -y; tmp = 0.0; if (a <= -1.6e+49) tmp = t_1; elseif (a <= 1.02e+110) tmp = x - ((y / (a - t)) * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - (-y)), $MachinePrecision]}, If[LessEqual[a, -16000000000000000701533488721219157674144762429440], t$95$1, If[LessEqual[a, 101999999999999997731603845368375289752342362849906699345834936350186795924394979613921904737278646871526473728], N[(x - N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \left(-y\right)\\
\mathbf{if}\;a \leq -16000000000000000701533488721219157674144762429440:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 101999999999999997731603845368375289752342362849906699345834936350186795924394979613921904737278646871526473728:\\
\;\;\;\;x - \frac{y}{a - t} \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -1.6000000000000001e49 or 1.02e110 < a Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
Taylor expanded in a around inf
lower-*.f6460.2%
Applied rewrites60.2%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6460.2%
Applied rewrites60.2%
if -1.6000000000000001e49 < a < 1.02e110Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
Taylor expanded in a around inf
lower-*.f6460.2%
Applied rewrites60.2%
Taylor expanded in z around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f6473.6%
Applied rewrites73.6%
lift-/.f64N/A
lift-*.f64N/A
associate-*l/N/A
lift--.f64N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f6476.2%
Applied rewrites76.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (- y))))
(if (<=
a
-4553130216154053/1897137590064188545819787018382342682267975428761855001222473056385648716020711424)
t_1
(if (<=
a
480000000000000036083753719928740141186285950889155942471796369131727644116359298238979728526923857005567658418649212636805201920)
(- x (* (/ (- a z) t) y))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - -y;
double tmp;
if (a <= -2.4e-66) {
tmp = t_1;
} else if (a <= 4.8e+128) {
tmp = x - (((a - z) / t) * 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 = x - -y
if (a <= (-2.4d-66)) then
tmp = t_1
else if (a <= 4.8d+128) then
tmp = x - (((a - z) / t) * 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 = x - -y;
double tmp;
if (a <= -2.4e-66) {
tmp = t_1;
} else if (a <= 4.8e+128) {
tmp = x - (((a - z) / t) * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - -y tmp = 0 if a <= -2.4e-66: tmp = t_1 elif a <= 4.8e+128: tmp = x - (((a - z) / t) * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(-y)) tmp = 0.0 if (a <= -2.4e-66) tmp = t_1; elseif (a <= 4.8e+128) tmp = Float64(x - Float64(Float64(Float64(a - z) / t) * y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - -y; tmp = 0.0; if (a <= -2.4e-66) tmp = t_1; elseif (a <= 4.8e+128) tmp = x - (((a - z) / t) * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - (-y)), $MachinePrecision]}, If[LessEqual[a, -4553130216154053/1897137590064188545819787018382342682267975428761855001222473056385648716020711424], t$95$1, If[LessEqual[a, 480000000000000036083753719928740141186285950889155942471796369131727644116359298238979728526923857005567658418649212636805201920], N[(x - N[(N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \left(-y\right)\\
\mathbf{if}\;a \leq \frac{-4553130216154053}{1897137590064188545819787018382342682267975428761855001222473056385648716020711424}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 480000000000000036083753719928740141186285950889155942471796369131727644116359298238979728526923857005567658418649212636805201920:\\
\;\;\;\;x - \frac{a - z}{t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -2.4000000000000003e-66 or 4.8000000000000004e128 < a Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
Taylor expanded in a around inf
lower-*.f6460.2%
Applied rewrites60.2%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6460.2%
Applied rewrites60.2%
if -2.4000000000000003e-66 < a < 4.8000000000000004e128Initial program 77.5%
Taylor expanded in t around -inf
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6457.6%
Applied rewrites57.6%
lift-+.f64N/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
mul-1-negN/A
lift-/.f64N/A
distribute-neg-fracN/A
distribute-frac-neg2N/A
frac-2negN/A
lift-/.f6457.6%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower--.f6457.9%
Applied rewrites57.9%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lift-/.f64N/A
*-commutativeN/A
lower-*.f6460.3%
Applied rewrites60.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (- y))))
(if (<=
a
-8256342791959349/121416805764108066932466369176469931665150427440758720078238275608681517825325531136)
t_1
(if (<=
a
480000000000000036083753719928740141186285950889155942471796369131727644116359298238979728526923857005567658418649212636805201920)
(- x (* (- a z) (/ y t)))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - -y;
double tmp;
if (a <= -6.8e-68) {
tmp = t_1;
} else if (a <= 4.8e+128) {
tmp = x - ((a - z) * (y / 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 - -y
if (a <= (-6.8d-68)) then
tmp = t_1
else if (a <= 4.8d+128) then
tmp = x - ((a - z) * (y / 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 - -y;
double tmp;
if (a <= -6.8e-68) {
tmp = t_1;
} else if (a <= 4.8e+128) {
tmp = x - ((a - z) * (y / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - -y tmp = 0 if a <= -6.8e-68: tmp = t_1 elif a <= 4.8e+128: tmp = x - ((a - z) * (y / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(-y)) tmp = 0.0 if (a <= -6.8e-68) tmp = t_1; elseif (a <= 4.8e+128) tmp = Float64(x - Float64(Float64(a - z) * Float64(y / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - -y; tmp = 0.0; if (a <= -6.8e-68) tmp = t_1; elseif (a <= 4.8e+128) tmp = x - ((a - z) * (y / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - (-y)), $MachinePrecision]}, If[LessEqual[a, -8256342791959349/121416805764108066932466369176469931665150427440758720078238275608681517825325531136], t$95$1, If[LessEqual[a, 480000000000000036083753719928740141186285950889155942471796369131727644116359298238979728526923857005567658418649212636805201920], N[(x - N[(N[(a - z), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \left(-y\right)\\
\mathbf{if}\;a \leq \frac{-8256342791959349}{121416805764108066932466369176469931665150427440758720078238275608681517825325531136}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 480000000000000036083753719928740141186285950889155942471796369131727644116359298238979728526923857005567658418649212636805201920:\\
\;\;\;\;x - \left(a - z\right) \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -6.8000000000000004e-68 or 4.8000000000000004e128 < a Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
Taylor expanded in a around inf
lower-*.f6460.2%
Applied rewrites60.2%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6460.2%
Applied rewrites60.2%
if -6.8000000000000004e-68 < a < 4.8000000000000004e128Initial program 77.5%
Taylor expanded in t around -inf
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6457.6%
Applied rewrites57.6%
lift-+.f64N/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
mul-1-negN/A
lift-/.f64N/A
distribute-neg-fracN/A
distribute-frac-neg2N/A
frac-2negN/A
lift-/.f6457.6%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower--.f6457.9%
Applied rewrites57.9%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6460.5%
Applied rewrites60.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (- y))))
(if (<= a -4360718064785109/2535301200456458802993406410752)
t_1
(if (<=
a
600000000000000046473455524883116661202489643467779290086853867826709171176518251711725606799149906700271616)
(+ x (* (/ z t) y))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - -y;
double tmp;
if (a <= -1.72e-15) {
tmp = t_1;
} else if (a <= 6e+107) {
tmp = x + ((z / t) * 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 = x - -y
if (a <= (-1.72d-15)) then
tmp = t_1
else if (a <= 6d+107) then
tmp = x + ((z / t) * 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 = x - -y;
double tmp;
if (a <= -1.72e-15) {
tmp = t_1;
} else if (a <= 6e+107) {
tmp = x + ((z / t) * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - -y tmp = 0 if a <= -1.72e-15: tmp = t_1 elif a <= 6e+107: tmp = x + ((z / t) * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(-y)) tmp = 0.0 if (a <= -1.72e-15) tmp = t_1; elseif (a <= 6e+107) tmp = Float64(x + Float64(Float64(z / t) * y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - -y; tmp = 0.0; if (a <= -1.72e-15) tmp = t_1; elseif (a <= 6e+107) tmp = x + ((z / t) * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - (-y)), $MachinePrecision]}, If[LessEqual[a, -4360718064785109/2535301200456458802993406410752], t$95$1, If[LessEqual[a, 600000000000000046473455524883116661202489643467779290086853867826709171176518251711725606799149906700271616], N[(x + N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \left(-y\right)\\
\mathbf{if}\;a \leq \frac{-4360718064785109}{2535301200456458802993406410752}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 600000000000000046473455524883116661202489643467779290086853867826709171176518251711725606799149906700271616:\\
\;\;\;\;x + \frac{z}{t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -1.7199999999999999e-15 or 6.0000000000000005e107 < a Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
Taylor expanded in a around inf
lower-*.f6460.2%
Applied rewrites60.2%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6460.2%
Applied rewrites60.2%
if -1.7199999999999999e-15 < a < 6.0000000000000005e107Initial program 77.5%
Taylor expanded in t around -inf
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6457.6%
Applied rewrites57.6%
Taylor expanded in z around inf
lower-/.f64N/A
lower-*.f6460.2%
Applied rewrites60.2%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6461.4%
Applied rewrites61.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (- y))))
(if (<= a -4360718064785109/2535301200456458802993406410752)
t_1
(if (<=
a
600000000000000046473455524883116661202489643467779290086853867826709171176518251711725606799149906700271616)
(+ x (* z (/ y t)))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - -y;
double tmp;
if (a <= -1.72e-15) {
tmp = t_1;
} else if (a <= 6e+107) {
tmp = x + (z * (y / 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 - -y
if (a <= (-1.72d-15)) then
tmp = t_1
else if (a <= 6d+107) then
tmp = x + (z * (y / 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 - -y;
double tmp;
if (a <= -1.72e-15) {
tmp = t_1;
} else if (a <= 6e+107) {
tmp = x + (z * (y / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - -y tmp = 0 if a <= -1.72e-15: tmp = t_1 elif a <= 6e+107: tmp = x + (z * (y / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(-y)) tmp = 0.0 if (a <= -1.72e-15) tmp = t_1; elseif (a <= 6e+107) tmp = Float64(x + Float64(z * Float64(y / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - -y; tmp = 0.0; if (a <= -1.72e-15) tmp = t_1; elseif (a <= 6e+107) tmp = x + (z * (y / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - (-y)), $MachinePrecision]}, If[LessEqual[a, -4360718064785109/2535301200456458802993406410752], t$95$1, If[LessEqual[a, 600000000000000046473455524883116661202489643467779290086853867826709171176518251711725606799149906700271616], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x - \left(-y\right)\\
\mathbf{if}\;a \leq \frac{-4360718064785109}{2535301200456458802993406410752}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 600000000000000046473455524883116661202489643467779290086853867826709171176518251711725606799149906700271616:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if a < -1.7199999999999999e-15 or 6.0000000000000005e107 < a Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
Taylor expanded in a around inf
lower-*.f6460.2%
Applied rewrites60.2%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6460.2%
Applied rewrites60.2%
if -1.7199999999999999e-15 < a < 6.0000000000000005e107Initial program 77.5%
Taylor expanded in t around -inf
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6457.6%
Applied rewrites57.6%
Taylor expanded in z around inf
lower-/.f64N/A
lower-*.f6460.2%
Applied rewrites60.2%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6461.1%
Applied rewrites61.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y z) (- t a)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<=
t_2
1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208)
(- x (- y))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / (t - a);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= 1e+306) {
tmp = x - -y;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / (t - a);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= 1e+306) {
tmp = x - -y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * z) / (t - a) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= 1e+306: tmp = x - -y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * z) / Float64(t - a)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= 1e+306) tmp = Float64(x - Float64(-y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * z) / (t - a); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= 1e+306) tmp = x - -y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208], N[(x - (-y)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \frac{y \cdot z}{t - a}\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208:\\
\;\;\;\;x - \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -inf.0 or 1e306 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 77.5%
lift--.f64N/A
lift-/.f64N/A
sub-to-fractionN/A
mult-flipN/A
*-commutativeN/A
sub-flipN/A
+-commutativeN/A
add-flip-revN/A
distribute-rgt-neg-outN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lift--.f64N/A
sub-negate-revN/A
*-commutativeN/A
lower-134-z0z1z2z3z4N/A
Applied rewrites85.4%
Taylor expanded in z around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f6426.8%
Applied rewrites26.8%
if -inf.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1e306Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
Taylor expanded in a around inf
lower-*.f6460.2%
Applied rewrites60.2%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6460.2%
Applied rewrites60.2%
(FPCore (x y z t a)
:precision binary64
(if (<=
(- (+ x y) (/ (* (- z t) y) (- a t)))
1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208)
(- x (- y))
(/ (* y z) t)))double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x + y) - (((z - t) * y) / (a - t))) <= 1e+306) {
tmp = x - -y;
} else {
tmp = (y * z) / t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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 (((x + y) - (((z - t) * y) / (a - t))) <= 1d+306) then
tmp = x - -y
else
tmp = (y * z) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x + y) - (((z - t) * y) / (a - t))) <= 1e+306) {
tmp = x - -y;
} else {
tmp = (y * z) / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((x + y) - (((z - t) * y) / (a - t))) <= 1e+306: tmp = x - -y else: tmp = (y * z) / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) <= 1e+306) tmp = Float64(x - Float64(-y)); else tmp = Float64(Float64(y * z) / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((x + y) - (((z - t) * y) / (a - t))) <= 1e+306) tmp = x - -y; else tmp = (y * z) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208], N[(x - (-y)), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \leq 1000000000000000017216064596736454828831087825013238982328892017892380671244575047987920451875459594568606138861698291060311049225532948520696938805711440650122628514669428460356992624968028329550689224175284346730060716088829214255439694630119794546505512415617982143262670862918816362862119154749127262208:\\
\;\;\;\;x - \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 1e306Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
Taylor expanded in a around inf
lower-*.f6460.2%
Applied rewrites60.2%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6460.2%
Applied rewrites60.2%
if 1e306 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 77.5%
Taylor expanded in t around -inf
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower-*.f6457.6%
Applied rewrites57.6%
lift-+.f64N/A
add-flipN/A
lower--.f64N/A
lift-*.f64N/A
mul-1-negN/A
lift-/.f64N/A
distribute-neg-fracN/A
distribute-frac-neg2N/A
frac-2negN/A
lift-/.f6457.6%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
distribute-rgt-out--N/A
lower-*.f64N/A
lower--.f6457.9%
Applied rewrites57.9%
Taylor expanded in z around inf
lower-/.f64N/A
lower-*.f6418.8%
Applied rewrites18.8%
(FPCore (x y z t a) :precision binary64 (- x (- y)))
double code(double x, double y, double z, double t, double a) {
return x - -y;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x - -y;
}
def code(x, y, z, t, a): return x - -y
function code(x, y, z, t, a) return Float64(x - Float64(-y)) end
function tmp = code(x, y, z, t, a) tmp = x - -y; end
code[x_, y_, z_, t_, a_] := N[(x - (-y)), $MachinePrecision]
x - \left(-y\right)
Initial program 77.5%
lift--.f64N/A
lift-+.f64N/A
associate--l+N/A
add-flipN/A
sub-negate-revN/A
lower--.f64N/A
lower--.f6480.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6487.5%
Applied rewrites87.5%
Taylor expanded in a around inf
lower-*.f6460.2%
Applied rewrites60.2%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f6460.2%
Applied rewrites60.2%
herbie shell --seed 2025271 -o generate:evaluate
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
(- (+ x y) (/ (* (- z t) y) (- a t))))