
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * (y - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ (* x (- y z)) (- t z)))
double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = (x * (y - z)) / (t - z)
end function
public static double code(double x, double y, double z, double t) {
return (x * (y - z)) / (t - z);
}
def code(x, y, z, t): return (x * (y - z)) / (t - z)
function code(x, y, z, t) return Float64(Float64(x * Float64(y - z)) / Float64(t - z)) end
function tmp = code(x, y, z, t) tmp = (x * (y - z)) / (t - z); end
code[x_, y_, z_, t_] := N[(N[(x * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot \left(y - z\right)}{t - z}
\end{array}
(FPCore (x y z t) :precision binary64 (fma x (/ z (- z t)) (* x (/ y (- t z)))))
double code(double x, double y, double z, double t) {
return fma(x, (z / (z - t)), (x * (y / (t - z))));
}
function code(x, y, z, t) return fma(x, Float64(z / Float64(z - t)), Float64(x * Float64(y / Float64(t - z)))) end
code[x_, y_, z_, t_] := N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, \frac{z}{z - t}, x \cdot \frac{y}{t - z}\right)
\end{array}
Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
lift--.f64N/A
lift--.f64N/A
lift-/.f64N/A
mult-flipN/A
lower-*.f64N/A
lift--.f64N/A
frac-2negN/A
metadata-evalN/A
sub-negate-revN/A
lower-/.f64N/A
lift--.f6496.8
Applied rewrites96.8%
Taylor expanded in y around 0
associate-*r/N/A
*-commutativeN/A
associate-/l*N/A
mul-1-negN/A
sub-negate-revN/A
associate-*r/N/A
mul-1-negN/A
sub-negate-revN/A
frac-2negN/A
associate-/l*N/A
frac-2negN/A
mul-1-negN/A
sub-negate-revN/A
associate-*r/N/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
associate-*r/N/A
Applied rewrites97.0%
(FPCore (x y z t) :precision binary64 (* x (/ (- z y) (- z t))))
double code(double x, double y, double z, double t) {
return x * ((z - y) / (z - 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)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x * ((z - y) / (z - t))
end function
public static double code(double x, double y, double z, double t) {
return x * ((z - y) / (z - t));
}
def code(x, y, z, t): return x * ((z - y) / (z - t))
function code(x, y, z, t) return Float64(x * Float64(Float64(z - y) / Float64(z - t))) end
function tmp = code(x, y, z, t) tmp = x * ((z - y) / (z - t)); end
code[x_, y_, z_, t_] := N[(x * N[(N[(z - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \frac{z - y}{z - t}
\end{array}
Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
(FPCore (x y z t) :precision binary64 (if (<= z -3.9e-28) (* x (/ z (- z t))) (if (<= z 0.000185) (* x (/ y (- t z))) (* x (/ (- z y) z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.9e-28) {
tmp = x * (z / (z - t));
} else if (z <= 0.000185) {
tmp = x * (y / (t - z));
} else {
tmp = x * ((z - y) / z);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: tmp
if (z <= (-3.9d-28)) then
tmp = x * (z / (z - t))
else if (z <= 0.000185d0) then
tmp = x * (y / (t - z))
else
tmp = x * ((z - y) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -3.9e-28) {
tmp = x * (z / (z - t));
} else if (z <= 0.000185) {
tmp = x * (y / (t - z));
} else {
tmp = x * ((z - y) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -3.9e-28: tmp = x * (z / (z - t)) elif z <= 0.000185: tmp = x * (y / (t - z)) else: tmp = x * ((z - y) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -3.9e-28) tmp = Float64(x * Float64(z / Float64(z - t))); elseif (z <= 0.000185) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = Float64(x * Float64(Float64(z - y) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -3.9e-28) tmp = x * (z / (z - t)); elseif (z <= 0.000185) tmp = x * (y / (t - z)); else tmp = x * ((z - y) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -3.9e-28], N[(x * N[(z / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.000185], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{-28}:\\
\;\;\;\;x \cdot \frac{z}{z - t}\\
\mathbf{elif}\;z \leq 0.000185:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z - y}{z}\\
\end{array}
\end{array}
if z < -3.89999999999999999e-28Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in y around 0
Applied rewrites53.8%
if -3.89999999999999999e-28 < z < 1.85e-4Initial program 84.2%
Taylor expanded in y around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6453.2
Applied rewrites53.2%
if 1.85e-4 < z Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in t around 0
lower-/.f64N/A
lift--.f6452.5
Applied rewrites52.5%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (/ (- z y) z)))) (if (<= z -1.65e+16) t_1 (if (<= z 0.000185) (* x (/ y (- t z))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * ((z - y) / z);
double tmp;
if (z <= -1.65e+16) {
tmp = t_1;
} else if (z <= 0.000185) {
tmp = x * (y / (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)
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) :: t_1
real(8) :: tmp
t_1 = x * ((z - y) / z)
if (z <= (-1.65d+16)) then
tmp = t_1
else if (z <= 0.000185d0) then
tmp = x * (y / (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 t_1 = x * ((z - y) / z);
double tmp;
if (z <= -1.65e+16) {
tmp = t_1;
} else if (z <= 0.000185) {
tmp = x * (y / (t - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * ((z - y) / z) tmp = 0 if z <= -1.65e+16: tmp = t_1 elif z <= 0.000185: tmp = x * (y / (t - z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(Float64(z - y) / z)) tmp = 0.0 if (z <= -1.65e+16) tmp = t_1; elseif (z <= 0.000185) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * ((z - y) / z); tmp = 0.0; if (z <= -1.65e+16) tmp = t_1; elseif (z <= 0.000185) tmp = x * (y / (t - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e+16], t$95$1, If[LessEqual[z, 0.000185], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{z - y}{z}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.000185:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.65e16 or 1.85e-4 < z Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in t around 0
lower-/.f64N/A
lift--.f6452.5
Applied rewrites52.5%
if -1.65e16 < z < 1.85e-4Initial program 84.2%
Taylor expanded in y around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6453.2
Applied rewrites53.2%
(FPCore (x y z t) :precision binary64 (if (<= z -1.75e+69) (* x 1.0) (if (<= z 4.6e+69) (* x (/ y (- t z))) (fma t (/ x z) x))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1.75e+69) {
tmp = x * 1.0;
} else if (z <= 4.6e+69) {
tmp = x * (y / (t - z));
} else {
tmp = fma(t, (x / z), x);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (z <= -1.75e+69) tmp = Float64(x * 1.0); elseif (z <= 4.6e+69) tmp = Float64(x * Float64(y / Float64(t - z))); else tmp = fma(t, Float64(x / z), x); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[z, -1.75e+69], N[(x * 1.0), $MachinePrecision], If[LessEqual[z, 4.6e+69], N[(x * N[(y / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(x / z), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+69}:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+69}:\\
\;\;\;\;x \cdot \frac{y}{t - z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{x}{z}, x\right)\\
\end{array}
\end{array}
if z < -1.74999999999999994e69Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around inf
Applied rewrites35.0%
if -1.74999999999999994e69 < z < 4.60000000000000033e69Initial program 84.2%
Taylor expanded in y around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6453.2
Applied rewrites53.2%
if 4.60000000000000033e69 < z Initial program 84.2%
Taylor expanded in y around 0
associate-*r/N/A
mul-1-negN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6444.5
Applied rewrites44.5%
Taylor expanded in z around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6436.0
Applied rewrites36.0%
(FPCore (x y z t)
:precision binary64
(if (<= z -6.9e+56)
(* x 1.0)
(if (<= z 4.7e-47)
(* x (/ y t))
(if (<= z 24500.0)
(/ (* x (- z)) t)
(if (<= z 6.8e+195) (/ (* (- z y) x) z) (* x 1.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= 4.7e-47) {
tmp = x * (y / t);
} else if (z <= 24500.0) {
tmp = (x * -z) / t;
} else if (z <= 6.8e+195) {
tmp = ((z - y) * x) / z;
} else {
tmp = x * 1.0;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: tmp
if (z <= (-6.9d+56)) then
tmp = x * 1.0d0
else if (z <= 4.7d-47) then
tmp = x * (y / t)
else if (z <= 24500.0d0) then
tmp = (x * -z) / t
else if (z <= 6.8d+195) then
tmp = ((z - y) * x) / z
else
tmp = x * 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= 4.7e-47) {
tmp = x * (y / t);
} else if (z <= 24500.0) {
tmp = (x * -z) / t;
} else if (z <= 6.8e+195) {
tmp = ((z - y) * x) / z;
} else {
tmp = x * 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.9e+56: tmp = x * 1.0 elif z <= 4.7e-47: tmp = x * (y / t) elif z <= 24500.0: tmp = (x * -z) / t elif z <= 6.8e+195: tmp = ((z - y) * x) / z else: tmp = x * 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.9e+56) tmp = Float64(x * 1.0); elseif (z <= 4.7e-47) tmp = Float64(x * Float64(y / t)); elseif (z <= 24500.0) tmp = Float64(Float64(x * Float64(-z)) / t); elseif (z <= 6.8e+195) tmp = Float64(Float64(Float64(z - y) * x) / z); else tmp = Float64(x * 1.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.9e+56) tmp = x * 1.0; elseif (z <= 4.7e-47) tmp = x * (y / t); elseif (z <= 24500.0) tmp = (x * -z) / t; elseif (z <= 6.8e+195) tmp = ((z - y) * x) / z; else tmp = x * 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.9e+56], N[(x * 1.0), $MachinePrecision], If[LessEqual[z, 4.7e-47], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 24500.0], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 6.8e+195], N[(N[(N[(z - y), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision], N[(x * 1.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.9 \cdot 10^{+56}:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-47}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 24500:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+195}:\\
\;\;\;\;\frac{\left(z - y\right) \cdot x}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 1\\
\end{array}
\end{array}
if z < -6.9e56 or 6.80000000000000021e195 < z Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around inf
Applied rewrites35.0%
if -6.9e56 < z < 4.70000000000000024e-47Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around 0
lower-/.f6439.6
Applied rewrites39.6%
if 4.70000000000000024e-47 < z < 24500Initial program 84.2%
Taylor expanded in z around 0
Applied rewrites47.9%
Taylor expanded in y around 0
mul-1-negN/A
lower-neg.f6422.1
Applied rewrites22.1%
if 24500 < z < 6.80000000000000021e195Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6444.5
Applied rewrites44.5%
(FPCore (x y z t)
:precision binary64
(if (<= z -6.9e+56)
(* x 1.0)
(if (<= z 4.7e-47)
(* x (/ y t))
(if (<= z 18500000.0) (/ (* x (- z)) t) (fma t (/ x z) x)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= 4.7e-47) {
tmp = x * (y / t);
} else if (z <= 18500000.0) {
tmp = (x * -z) / t;
} else {
tmp = fma(t, (x / z), x);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (z <= -6.9e+56) tmp = Float64(x * 1.0); elseif (z <= 4.7e-47) tmp = Float64(x * Float64(y / t)); elseif (z <= 18500000.0) tmp = Float64(Float64(x * Float64(-z)) / t); else tmp = fma(t, Float64(x / z), x); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.9e+56], N[(x * 1.0), $MachinePrecision], If[LessEqual[z, 4.7e-47], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 18500000.0], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], N[(t * N[(x / z), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.9 \cdot 10^{+56}:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-47}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 18500000:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{x}{z}, x\right)\\
\end{array}
\end{array}
if z < -6.9e56Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around inf
Applied rewrites35.0%
if -6.9e56 < z < 4.70000000000000024e-47Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around 0
lower-/.f6439.6
Applied rewrites39.6%
if 4.70000000000000024e-47 < z < 1.85e7Initial program 84.2%
Taylor expanded in z around 0
Applied rewrites47.9%
Taylor expanded in y around 0
mul-1-negN/A
lower-neg.f6422.1
Applied rewrites22.1%
if 1.85e7 < z Initial program 84.2%
Taylor expanded in y around 0
associate-*r/N/A
mul-1-negN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6444.5
Applied rewrites44.5%
Taylor expanded in z around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f6436.0
Applied rewrites36.0%
(FPCore (x y z t)
:precision binary64
(if (<= z -6.9e+56)
(* x 1.0)
(if (<= z 4.7e-47)
(* x (/ y t))
(if (<= z 18500000.0) (/ (* x (- z)) t) (* x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= 4.7e-47) {
tmp = x * (y / t);
} else if (z <= 18500000.0) {
tmp = (x * -z) / t;
} else {
tmp = x * 1.0;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: tmp
if (z <= (-6.9d+56)) then
tmp = x * 1.0d0
else if (z <= 4.7d-47) then
tmp = x * (y / t)
else if (z <= 18500000.0d0) then
tmp = (x * -z) / t
else
tmp = x * 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= 4.7e-47) {
tmp = x * (y / t);
} else if (z <= 18500000.0) {
tmp = (x * -z) / t;
} else {
tmp = x * 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.9e+56: tmp = x * 1.0 elif z <= 4.7e-47: tmp = x * (y / t) elif z <= 18500000.0: tmp = (x * -z) / t else: tmp = x * 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.9e+56) tmp = Float64(x * 1.0); elseif (z <= 4.7e-47) tmp = Float64(x * Float64(y / t)); elseif (z <= 18500000.0) tmp = Float64(Float64(x * Float64(-z)) / t); else tmp = Float64(x * 1.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.9e+56) tmp = x * 1.0; elseif (z <= 4.7e-47) tmp = x * (y / t); elseif (z <= 18500000.0) tmp = (x * -z) / t; else tmp = x * 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.9e+56], N[(x * 1.0), $MachinePrecision], If[LessEqual[z, 4.7e-47], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 18500000.0], N[(N[(x * (-z)), $MachinePrecision] / t), $MachinePrecision], N[(x * 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.9 \cdot 10^{+56}:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-47}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 18500000:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 1\\
\end{array}
\end{array}
if z < -6.9e56 or 1.85e7 < z Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around inf
Applied rewrites35.0%
if -6.9e56 < z < 4.70000000000000024e-47Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around 0
lower-/.f6439.6
Applied rewrites39.6%
if 4.70000000000000024e-47 < z < 1.85e7Initial program 84.2%
Taylor expanded in z around 0
Applied rewrites47.9%
Taylor expanded in y around 0
mul-1-negN/A
lower-neg.f6422.1
Applied rewrites22.1%
(FPCore (x y z t)
:precision binary64
(if (<= z -6.9e+56)
(* x 1.0)
(if (<= z 4.7e-47)
(* x (/ y t))
(if (<= z 18500000.0) (* x (/ (- z) t)) (* x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= 4.7e-47) {
tmp = x * (y / t);
} else if (z <= 18500000.0) {
tmp = x * (-z / t);
} else {
tmp = x * 1.0;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: tmp
if (z <= (-6.9d+56)) then
tmp = x * 1.0d0
else if (z <= 4.7d-47) then
tmp = x * (y / t)
else if (z <= 18500000.0d0) then
tmp = x * (-z / t)
else
tmp = x * 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= 4.7e-47) {
tmp = x * (y / t);
} else if (z <= 18500000.0) {
tmp = x * (-z / t);
} else {
tmp = x * 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.9e+56: tmp = x * 1.0 elif z <= 4.7e-47: tmp = x * (y / t) elif z <= 18500000.0: tmp = x * (-z / t) else: tmp = x * 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.9e+56) tmp = Float64(x * 1.0); elseif (z <= 4.7e-47) tmp = Float64(x * Float64(y / t)); elseif (z <= 18500000.0) tmp = Float64(x * Float64(Float64(-z) / t)); else tmp = Float64(x * 1.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.9e+56) tmp = x * 1.0; elseif (z <= 4.7e-47) tmp = x * (y / t); elseif (z <= 18500000.0) tmp = x * (-z / t); else tmp = x * 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.9e+56], N[(x * 1.0), $MachinePrecision], If[LessEqual[z, 4.7e-47], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 18500000.0], N[(x * N[((-z) / t), $MachinePrecision]), $MachinePrecision], N[(x * 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.9 \cdot 10^{+56}:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-47}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 18500000:\\
\;\;\;\;x \cdot \frac{-z}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 1\\
\end{array}
\end{array}
if z < -6.9e56 or 1.85e7 < z Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around inf
Applied rewrites35.0%
if -6.9e56 < z < 4.70000000000000024e-47Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around 0
lower-/.f6439.6
Applied rewrites39.6%
if 4.70000000000000024e-47 < z < 1.85e7Initial program 84.2%
Taylor expanded in z around 0
Applied rewrites47.9%
Taylor expanded in y around 0
mul-1-negN/A
lower-neg.f6422.1
Applied rewrites22.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6422.9
Applied rewrites22.9%
(FPCore (x y z t)
:precision binary64
(if (<= z -6.9e+56)
(* x 1.0)
(if (<= z 7.2e-47)
(* x (/ y t))
(if (<= z 2.6e+69) (* x (/ (- y) z)) (* x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= 7.2e-47) {
tmp = x * (y / t);
} else if (z <= 2.6e+69) {
tmp = x * (-y / z);
} else {
tmp = x * 1.0;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: tmp
if (z <= (-6.9d+56)) then
tmp = x * 1.0d0
else if (z <= 7.2d-47) then
tmp = x * (y / t)
else if (z <= 2.6d+69) then
tmp = x * (-y / z)
else
tmp = x * 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= 7.2e-47) {
tmp = x * (y / t);
} else if (z <= 2.6e+69) {
tmp = x * (-y / z);
} else {
tmp = x * 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.9e+56: tmp = x * 1.0 elif z <= 7.2e-47: tmp = x * (y / t) elif z <= 2.6e+69: tmp = x * (-y / z) else: tmp = x * 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.9e+56) tmp = Float64(x * 1.0); elseif (z <= 7.2e-47) tmp = Float64(x * Float64(y / t)); elseif (z <= 2.6e+69) tmp = Float64(x * Float64(Float64(-y) / z)); else tmp = Float64(x * 1.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.9e+56) tmp = x * 1.0; elseif (z <= 7.2e-47) tmp = x * (y / t); elseif (z <= 2.6e+69) tmp = x * (-y / z); else tmp = x * 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.9e+56], N[(x * 1.0), $MachinePrecision], If[LessEqual[z, 7.2e-47], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+69], N[(x * N[((-y) / z), $MachinePrecision]), $MachinePrecision], N[(x * 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.9 \cdot 10^{+56}:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-47}:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+69}:\\
\;\;\;\;x \cdot \frac{-y}{z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 1\\
\end{array}
\end{array}
if z < -6.9e56 or 2.6000000000000002e69 < z Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around inf
Applied rewrites35.0%
if -6.9e56 < z < 7.19999999999999982e-47Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around 0
lower-/.f6439.6
Applied rewrites39.6%
if 7.19999999999999982e-47 < z < 2.6000000000000002e69Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in t around 0
lower-/.f64N/A
lift--.f6452.5
Applied rewrites52.5%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6422.7
Applied rewrites22.7%
(FPCore (x y z t)
:precision binary64
(if (<= z -6.9e+56)
(* x 1.0)
(if (<= z -3.5e-286)
(/ (* y x) t)
(if (<= z 0.000185) (* y (/ x t)) (* x 1.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= -3.5e-286) {
tmp = (y * x) / t;
} else if (z <= 0.000185) {
tmp = y * (x / t);
} else {
tmp = x * 1.0;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: tmp
if (z <= (-6.9d+56)) then
tmp = x * 1.0d0
else if (z <= (-3.5d-286)) then
tmp = (y * x) / t
else if (z <= 0.000185d0) then
tmp = y * (x / t)
else
tmp = x * 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= -3.5e-286) {
tmp = (y * x) / t;
} else if (z <= 0.000185) {
tmp = y * (x / t);
} else {
tmp = x * 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.9e+56: tmp = x * 1.0 elif z <= -3.5e-286: tmp = (y * x) / t elif z <= 0.000185: tmp = y * (x / t) else: tmp = x * 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.9e+56) tmp = Float64(x * 1.0); elseif (z <= -3.5e-286) tmp = Float64(Float64(y * x) / t); elseif (z <= 0.000185) tmp = Float64(y * Float64(x / t)); else tmp = Float64(x * 1.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.9e+56) tmp = x * 1.0; elseif (z <= -3.5e-286) tmp = (y * x) / t; elseif (z <= 0.000185) tmp = y * (x / t); else tmp = x * 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.9e+56], N[(x * 1.0), $MachinePrecision], If[LessEqual[z, -3.5e-286], N[(N[(y * x), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 0.000185], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(x * 1.0), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.9 \cdot 10^{+56}:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-286}:\\
\;\;\;\;\frac{y \cdot x}{t}\\
\mathbf{elif}\;z \leq 0.000185:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 1\\
\end{array}
\end{array}
if z < -6.9e56 or 1.85e-4 < z Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around inf
Applied rewrites35.0%
if -6.9e56 < z < -3.49999999999999988e-286Initial program 84.2%
Taylor expanded in z around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6437.9
Applied rewrites37.9%
if -3.49999999999999988e-286 < z < 1.85e-4Initial program 84.2%
Taylor expanded in z around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6437.9
Applied rewrites37.9%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6437.9
Applied rewrites37.9%
(FPCore (x y z t) :precision binary64 (if (<= z -6.9e+56) (* x 1.0) (if (<= z 0.000185) (* x (/ y t)) (* x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= 0.000185) {
tmp = x * (y / t);
} else {
tmp = x * 1.0;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: tmp
if (z <= (-6.9d+56)) then
tmp = x * 1.0d0
else if (z <= 0.000185d0) then
tmp = x * (y / t)
else
tmp = x * 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= 0.000185) {
tmp = x * (y / t);
} else {
tmp = x * 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.9e+56: tmp = x * 1.0 elif z <= 0.000185: tmp = x * (y / t) else: tmp = x * 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.9e+56) tmp = Float64(x * 1.0); elseif (z <= 0.000185) tmp = Float64(x * Float64(y / t)); else tmp = Float64(x * 1.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.9e+56) tmp = x * 1.0; elseif (z <= 0.000185) tmp = x * (y / t); else tmp = x * 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.9e+56], N[(x * 1.0), $MachinePrecision], If[LessEqual[z, 0.000185], N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(x * 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.9 \cdot 10^{+56}:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;z \leq 0.000185:\\
\;\;\;\;x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 1\\
\end{array}
\end{array}
if z < -6.9e56 or 1.85e-4 < z Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around inf
Applied rewrites35.0%
if -6.9e56 < z < 1.85e-4Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around 0
lower-/.f6439.6
Applied rewrites39.6%
(FPCore (x y z t) :precision binary64 (if (<= z -6.9e+56) (* x 1.0) (if (<= z 0.000185) (* y (/ x t)) (* x 1.0))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= 0.000185) {
tmp = y * (x / t);
} else {
tmp = x * 1.0;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
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) :: tmp
if (z <= (-6.9d+56)) then
tmp = x * 1.0d0
else if (z <= 0.000185d0) then
tmp = y * (x / t)
else
tmp = x * 1.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -6.9e+56) {
tmp = x * 1.0;
} else if (z <= 0.000185) {
tmp = y * (x / t);
} else {
tmp = x * 1.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -6.9e+56: tmp = x * 1.0 elif z <= 0.000185: tmp = y * (x / t) else: tmp = x * 1.0 return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -6.9e+56) tmp = Float64(x * 1.0); elseif (z <= 0.000185) tmp = Float64(y * Float64(x / t)); else tmp = Float64(x * 1.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -6.9e+56) tmp = x * 1.0; elseif (z <= 0.000185) tmp = y * (x / t); else tmp = x * 1.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -6.9e+56], N[(x * 1.0), $MachinePrecision], If[LessEqual[z, 0.000185], N[(y * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(x * 1.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.9 \cdot 10^{+56}:\\
\;\;\;\;x \cdot 1\\
\mathbf{elif}\;z \leq 0.000185:\\
\;\;\;\;y \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot 1\\
\end{array}
\end{array}
if z < -6.9e56 or 1.85e-4 < z Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around inf
Applied rewrites35.0%
if -6.9e56 < z < 1.85e-4Initial program 84.2%
Taylor expanded in z around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6437.9
Applied rewrites37.9%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6437.9
Applied rewrites37.9%
(FPCore (x y z t) :precision binary64 (* x 1.0))
double code(double x, double y, double z, double t) {
return x * 1.0;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x * 1.0d0
end function
public static double code(double x, double y, double z, double t) {
return x * 1.0;
}
def code(x, y, z, t): return x * 1.0
function code(x, y, z, t) return Float64(x * 1.0) end
function tmp = code(x, y, z, t) tmp = x * 1.0; end
code[x_, y_, z_, t_] := N[(x * 1.0), $MachinePrecision]
\begin{array}{l}
\\
x \cdot 1
\end{array}
Initial program 84.2%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
lower-*.f64N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.0
Applied rewrites97.0%
Taylor expanded in z around inf
Applied rewrites35.0%
herbie shell --seed 2025134
(FPCore (x y z t)
:name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
:precision binary64
(/ (* x (- y z)) (- t z)))