
(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]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
Herbie found 11 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]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- (+ (+ (/ t (- a t)) 1.0) (/ x y)) (/ z (- a t))) y)))
(if (<= y -4e-79)
t_1
(if (<= y 4.8e-65) (- (+ x y) (/ (* (- z t) y) (- a t))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((((t / (a - t)) + 1.0) + (x / y)) - (z / (a - t))) * y;
double tmp;
if (y <= -4e-79) {
tmp = t_1;
} else if (y <= 4.8e-65) {
tmp = (x + y) - (((z - t) * y) / (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 = ((((t / (a - t)) + 1.0d0) + (x / y)) - (z / (a - t))) * y
if (y <= (-4d-79)) then
tmp = t_1
else if (y <= 4.8d-65) then
tmp = (x + y) - (((z - t) * y) / (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 = ((((t / (a - t)) + 1.0) + (x / y)) - (z / (a - t))) * y;
double tmp;
if (y <= -4e-79) {
tmp = t_1;
} else if (y <= 4.8e-65) {
tmp = (x + y) - (((z - t) * y) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((((t / (a - t)) + 1.0) + (x / y)) - (z / (a - t))) * y tmp = 0 if y <= -4e-79: tmp = t_1 elif y <= 4.8e-65: tmp = (x + y) - (((z - t) * y) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(Float64(Float64(t / Float64(a - t)) + 1.0) + Float64(x / y)) - Float64(z / Float64(a - t))) * y) tmp = 0.0 if (y <= -4e-79) tmp = t_1; elseif (y <= 4.8e-65) tmp = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((((t / (a - t)) + 1.0) + (x / y)) - (z / (a - t))) * y; tmp = 0.0; if (y <= -4e-79) tmp = t_1; elseif (y <= 4.8e-65) tmp = (x + y) - (((z - t) * y) / (a - t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + N[(x / y), $MachinePrecision]), $MachinePrecision] - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4e-79], t$95$1, If[LessEqual[y, 4.8e-65], N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\frac{t}{a - t} + 1\right) + \frac{x}{y}\right) - \frac{z}{a - t}\right) \cdot y\\
\mathbf{if}\;y \leq -4 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-65}:\\
\;\;\;\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4e-79 or 4.8000000000000003e-65 < y Initial program 66.6%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lift--.f6491.0
Applied rewrites91.0%
if -4e-79 < y < 4.8000000000000003e-65Initial program 94.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (* (/ (- z a) t) y) x)))
(if (<= t -5e+160)
t_1
(if (<= t 1.3e+114) (- (+ x y) (* y (/ z (- a t)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (((z - a) / t) * y) + x;
double tmp;
if (t <= -5e+160) {
tmp = t_1;
} else if (t <= 1.3e+114) {
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 = (((z - a) / t) * y) + x
if (t <= (-5d+160)) then
tmp = t_1
else if (t <= 1.3d+114) 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 = (((z - a) / t) * y) + x;
double tmp;
if (t <= -5e+160) {
tmp = t_1;
} else if (t <= 1.3e+114) {
tmp = (x + y) - (y * (z / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (((z - a) / t) * y) + x tmp = 0 if t <= -5e+160: tmp = t_1 elif t <= 1.3e+114: tmp = (x + y) - (y * (z / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(Float64(z - a) / t) * y) + x) tmp = 0.0 if (t <= -5e+160) tmp = t_1; elseif (t <= 1.3e+114) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (((z - a) / t) * y) + x; tmp = 0.0; if (t <= -5e+160) tmp = t_1; elseif (t <= 1.3e+114) 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[(N[(N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -5e+160], t$95$1, If[LessEqual[t, 1.3e+114], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - a}{t} \cdot y + x\\
\mathbf{if}\;t \leq -5 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+114}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.0000000000000002e160 or 1.3e114 < t Initial program 52.3%
Taylor expanded in t around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6477.2
Applied rewrites77.2%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
sub-divN/A
lower-/.f64N/A
lower--.f6489.6
Applied rewrites89.6%
if -5.0000000000000002e160 < t < 1.3e114Initial program 86.8%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6488.9
Applied rewrites88.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -16600000.0)
(+ y x)
(if (<= a -8.8e-115)
(- x (/ (* (- z t) y) (- a t)))
(if (<= a 4.2e-39) (fma z (/ y t) x) (- (+ x y) (/ (* z y) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -16600000.0) {
tmp = y + x;
} else if (a <= -8.8e-115) {
tmp = x - (((z - t) * y) / (a - t));
} else if (a <= 4.2e-39) {
tmp = fma(z, (y / t), x);
} else {
tmp = (x + y) - ((z * y) / a);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -16600000.0) tmp = Float64(y + x); elseif (a <= -8.8e-115) tmp = Float64(x - Float64(Float64(Float64(z - t) * y) / Float64(a - t))); elseif (a <= 4.2e-39) tmp = fma(z, Float64(y / t), x); else tmp = Float64(Float64(x + y) - Float64(Float64(z * y) / a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -16600000.0], N[(y + x), $MachinePrecision], If[LessEqual[a, -8.8e-115], N[(x - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e-39], N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -16600000:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq -8.8 \cdot 10^{-115}:\\
\;\;\;\;x - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-39}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{z \cdot y}{a}\\
\end{array}
\end{array}
if a < -1.66e7Initial program 79.4%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6475.2
Applied rewrites75.2%
if -1.66e7 < a < -8.7999999999999997e-115Initial program 74.8%
Taylor expanded in x around inf
Applied rewrites64.4%
if -8.7999999999999997e-115 < a < 4.19999999999999987e-39Initial program 74.1%
Taylor expanded in t around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6482.0
Applied rewrites82.0%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6480.5
Applied rewrites80.5%
lift-/.f64N/A
lift-fma.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-/.f6480.6
Applied rewrites80.6%
if 4.19999999999999987e-39 < a Initial program 81.0%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6480.0
Applied rewrites80.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- (+ x y) (/ (* z y) a)))) (if (<= a -2.4e-79) t_1 (if (<= a 4.2e-39) (fma z (/ y t) x) 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 <= -2.4e-79) {
tmp = t_1;
} else if (a <= 4.2e-39) {
tmp = fma(z, (y / t), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(Float64(z * y) / a)) tmp = 0.0 if (a <= -2.4e-79) tmp = t_1; elseif (a <= 4.2e-39) tmp = fma(z, Float64(y / t), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.4e-79], t$95$1, If[LessEqual[a, 4.2e-39], N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - \frac{z \cdot y}{a}\\
\mathbf{if}\;a \leq -2.4 \cdot 10^{-79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-39}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.40000000000000006e-79 or 4.19999999999999987e-39 < a Initial program 79.6%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6478.0
Applied rewrites78.0%
if -2.40000000000000006e-79 < a < 4.19999999999999987e-39Initial program 74.2%
Taylor expanded in t around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6481.6
Applied rewrites81.6%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6480.1
Applied rewrites80.1%
lift-/.f64N/A
lift-fma.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-/.f6480.3
Applied rewrites80.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.2e+134)
(+ y x)
(if (<= a -2.4e-77)
(- x (/ (* z y) a))
(if (<= a 3.4e+28) (fma z (/ y t) x) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.2e+134) {
tmp = y + x;
} else if (a <= -2.4e-77) {
tmp = x - ((z * y) / a);
} else if (a <= 3.4e+28) {
tmp = fma(z, (y / t), x);
} else {
tmp = y + x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.2e+134) tmp = Float64(y + x); elseif (a <= -2.4e-77) tmp = Float64(x - Float64(Float64(z * y) / a)); elseif (a <= 3.4e+28) tmp = fma(z, Float64(y / t), x); else tmp = Float64(y + x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.2e+134], N[(y + x), $MachinePrecision], If[LessEqual[a, -2.4e-77], N[(x - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e+28], N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{+134}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-77}:\\
\;\;\;\;x - \frac{z \cdot y}{a}\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -9.1999999999999992e134 or 3.4e28 < a Initial program 80.1%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6480.6
Applied rewrites80.6%
if -9.1999999999999992e134 < a < -2.3999999999999999e-77Initial program 77.9%
Taylor expanded in x around inf
Applied rewrites62.0%
Taylor expanded in t around 0
Applied rewrites51.2%
Taylor expanded in z around inf
Applied rewrites60.4%
if -2.3999999999999999e-77 < a < 3.4e28Initial program 75.0%
Taylor expanded in t around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6479.2
Applied rewrites79.2%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6477.6
Applied rewrites77.6%
lift-/.f64N/A
lift-fma.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-/.f6477.7
Applied rewrites77.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -46000.0) (+ y x) (if (<= a 3.4e+28) (fma z (/ y t) x) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -46000.0) {
tmp = y + x;
} else if (a <= 3.4e+28) {
tmp = fma(z, (y / t), x);
} else {
tmp = y + x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -46000.0) tmp = Float64(y + x); elseif (a <= 3.4e+28) tmp = fma(z, Float64(y / t), x); else tmp = Float64(y + x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -46000.0], N[(y + x), $MachinePrecision], If[LessEqual[a, 3.4e+28], N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -46000:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -46000 or 3.4e28 < a Initial program 80.0%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6476.6
Applied rewrites76.6%
if -46000 < a < 3.4e28Initial program 75.0%
Taylor expanded in t around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6477.4
Applied rewrites77.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6475.5
Applied rewrites75.5%
lift-/.f64N/A
lift-fma.f64N/A
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-/.f6475.6
Applied rewrites75.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -46000.0) (+ y x) (if (<= a 3.4e+28) (fma y (/ z t) x) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -46000.0) {
tmp = y + x;
} else if (a <= 3.4e+28) {
tmp = fma(y, (z / t), x);
} else {
tmp = y + x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (a <= -46000.0) tmp = Float64(y + x); elseif (a <= 3.4e+28) tmp = fma(y, Float64(z / t), x); else tmp = Float64(y + x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -46000.0], N[(y + x), $MachinePrecision], If[LessEqual[a, 3.4e+28], N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -46000:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{+28}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -46000 or 3.4e28 < a Initial program 80.0%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6476.6
Applied rewrites76.6%
if -46000 < a < 3.4e28Initial program 75.0%
Taylor expanded in t around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6477.4
Applied rewrites77.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6475.5
Applied rewrites75.5%
(FPCore (x y z t a) :precision binary64 (if (<= (- (+ x y) (/ (* (- z t) y) (- a t))) 1e+291) (+ y x) (* (/ z t) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x + y) - (((z - t) * y) / (a - t))) <= 1e+291) {
tmp = y + x;
} else {
tmp = (z / t) * y;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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+291) then
tmp = y + x
else
tmp = (z / t) * y
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+291) {
tmp = y + x;
} else {
tmp = (z / t) * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((x + y) - (((z - t) * y) / (a - t))) <= 1e+291: tmp = y + x else: tmp = (z / t) * y 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+291) tmp = Float64(y + x); else tmp = Float64(Float64(z / t) * y); 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+291) tmp = y + x; else tmp = (z / t) * y; 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], 1e+291], N[(y + x), $MachinePrecision], N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \leq 10^{+291}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{t} \cdot y\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999996e290Initial program 81.9%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6464.5
Applied rewrites64.5%
if 9.9999999999999996e290 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 47.1%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift--.f6439.4
Applied rewrites39.4%
Taylor expanded in t around inf
lower-/.f64N/A
*-commutativeN/A
lift-*.f6430.7
Applied rewrites30.7%
lift-*.f64N/A
lift-/.f64N/A
*-commutativeN/A
associate-*r/N/A
*-commutativeN/A
lower-*.f64N/A
lift-/.f6438.7
Applied rewrites38.7%
(FPCore (x y z t a) :precision binary64 (if (<= (- (+ x y) (/ (* (- z t) y) (- a t))) 1e+291) (+ y x) (* z (/ y t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((x + y) - (((z - t) * y) / (a - t))) <= 1e+291) {
tmp = y + x;
} else {
tmp = z * (y / 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+291) then
tmp = y + x
else
tmp = z * (y / 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+291) {
tmp = y + x;
} else {
tmp = z * (y / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((x + y) - (((z - t) * y) / (a - t))) <= 1e+291: tmp = y + x else: tmp = z * (y / 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+291) tmp = Float64(y + x); else tmp = Float64(z * Float64(y / 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+291) tmp = y + x; else tmp = z * (y / 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], 1e+291], N[(y + x), $MachinePrecision], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t} \leq 10^{+291}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.9999999999999996e290Initial program 81.9%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6464.5
Applied rewrites64.5%
if 9.9999999999999996e290 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 47.1%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift--.f6439.4
Applied rewrites39.4%
Taylor expanded in t around inf
lower-/.f64N/A
*-commutativeN/A
lift-*.f6430.7
Applied rewrites30.7%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f6439.1
Applied rewrites39.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -9.2e+134) (+ y x) (if (<= a 7.8e-140) x (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.2e+134) {
tmp = y + x;
} else if (a <= 7.8e-140) {
tmp = x;
} else {
tmp = y + 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 (a <= (-9.2d+134)) then
tmp = y + x
else if (a <= 7.8d-140) then
tmp = x
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.2e+134) {
tmp = y + x;
} else if (a <= 7.8e-140) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.2e+134: tmp = y + x elif a <= 7.8e-140: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.2e+134) tmp = Float64(y + x); elseif (a <= 7.8e-140) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.2e+134) tmp = y + x; elseif (a <= 7.8e-140) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.2e+134], N[(y + x), $MachinePrecision], If[LessEqual[a, 7.8e-140], x, N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.2 \cdot 10^{+134}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{-140}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -9.1999999999999992e134 or 7.80000000000000038e-140 < a Initial program 79.8%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6472.4
Applied rewrites72.4%
if -9.1999999999999992e134 < a < 7.80000000000000038e-140Initial program 75.0%
Taylor expanded in x around inf
Applied rewrites49.4%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 77.4%
Taylor expanded in x around inf
Applied rewrites50.1%
herbie shell --seed 2025119
(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))))