
(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 13 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 (+ x (- y (* (- z t) (/ y (- a t))))))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (<= t_2 -2e-138)
t_1
(if (<= t_2 0.0) (+ (- (/ (- (* a y) (* z y)) t)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - ((z - t) * (y / (a - t))));
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -2e-138) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = -(((a * y) - (z * y)) / t) + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y - ((z - t) * (y / (a - t))))
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 <= (-2d-138)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = -(((a * y) - (z * y)) / t) + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - ((z - t) * (y / (a - t))));
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -2e-138) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = -(((a * y) - (z * y)) / t) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y - ((z - t) * (y / (a - t)))) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 <= -2e-138: tmp = t_1 elif t_2 <= 0.0: tmp = -(((a * y) - (z * y)) / t) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - Float64(Float64(z - t) * Float64(y / Float64(a - t))))) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 <= -2e-138) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(Float64(-Float64(Float64(Float64(a * y) - Float64(z * y)) / t)) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y - ((z - t) * (y / (a - t)))); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 <= -2e-138) tmp = t_1; elseif (t_2 <= 0.0) tmp = -(((a * y) - (z * y)) / t) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-138], t$95$1, If[LessEqual[t$95$2, 0.0], N[((-N[(N[(N[(a * y), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]) + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - \left(z - t\right) \cdot \frac{y}{a - t}\right)\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\left(-\frac{a \cdot y - z \cdot y}{t}\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2.00000000000000013e-138 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 77.1%
lift-+.f64N/A
lift--.f64N/A
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
*-commutativeN/A
associate--l+N/A
lower-+.f64N/A
*-commutativeN/A
lower--.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6487.7
Applied rewrites87.7%
if -2.00000000000000013e-138 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 77.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-*.f6457.5
Applied rewrites57.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ x y) (* y (/ z (- a t)))))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (<= t_2 -2e-138)
t_1
(if (<= t_2 0.0) (+ (- (/ (- (* a y) (* z y)) t)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - (y * (z / (a - t)));
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -2e-138) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = -(((a * y) - (z * y)) / t) + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + y) - (y * (z / (a - t)))
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 <= (-2d-138)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = -(((a * y) - (z * y)) / t) + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) - (y * (z / (a - t)));
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -2e-138) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = -(((a * y) - (z * y)) / t) + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) - (y * (z / (a - t))) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 <= -2e-138: tmp = t_1 elif t_2 <= 0.0: tmp = -(((a * y) - (z * y)) / t) + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) - Float64(y * Float64(z / Float64(a - t)))) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 <= -2e-138) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(Float64(-Float64(Float64(Float64(a * y) - Float64(z * y)) / t)) + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) - (y * (z / (a - t))); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 <= -2e-138) tmp = t_1; elseif (t_2 <= 0.0) tmp = -(((a * y) - (z * y)) / t) + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e-138], t$95$1, If[LessEqual[t$95$2, 0.0], N[((-N[(N[(N[(a * y), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]) + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) - y \cdot \frac{z}{a - t}\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\left(-\frac{a \cdot y - z \cdot y}{t}\right) + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2.00000000000000013e-138 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6482.4
Applied rewrites82.4%
if -2.00000000000000013e-138 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 77.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-*.f6457.5
Applied rewrites57.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.7e+174) (* 1.0 x) (- (+ x y) (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.7e+174) {
tmp = 1.0 * x;
} else {
tmp = (x + y) - (y * (z / (a - t)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.7d+174)) then
tmp = 1.0d0 * x
else
tmp = (x + y) - (y * (z / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.7e+174) {
tmp = 1.0 * x;
} else {
tmp = (x + y) - (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.7e+174: tmp = 1.0 * x else: tmp = (x + y) - (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.7e+174) tmp = Float64(1.0 * x); else tmp = Float64(Float64(x + y) - Float64(y * Float64(z / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.7e+174) tmp = 1.0 * x; else tmp = (x + y) - (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.7e+174], N[(1.0 * x), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{+174}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if t < -2.6999999999999999e174Initial program 77.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6470.3
Applied rewrites70.3%
Taylor expanded in x around inf
Applied rewrites51.4%
if -2.6999999999999999e174 < t Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6482.4
Applied rewrites82.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.35e+26) (* 1.0 x) (if (<= t 9.5e+130) (- (+ x y) (* y (/ z a))) (* 1.0 x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.35e+26) {
tmp = 1.0 * x;
} else if (t <= 9.5e+130) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = 1.0 * x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-2.35d+26)) then
tmp = 1.0d0 * x
else if (t <= 9.5d+130) then
tmp = (x + y) - (y * (z / a))
else
tmp = 1.0d0 * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.35e+26) {
tmp = 1.0 * x;
} else if (t <= 9.5e+130) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = 1.0 * x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.35e+26: tmp = 1.0 * x elif t <= 9.5e+130: tmp = (x + y) - (y * (z / a)) else: tmp = 1.0 * x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.35e+26) tmp = Float64(1.0 * x); elseif (t <= 9.5e+130) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(1.0 * x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.35e+26) tmp = 1.0 * x; elseif (t <= 9.5e+130) tmp = (x + y) - (y * (z / a)); else tmp = 1.0 * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.35e+26], N[(1.0 * x), $MachinePrecision], If[LessEqual[t, 9.5e+130], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{+26}:\\
\;\;\;\;1 \cdot x\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+130}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;1 \cdot x\\
\end{array}
\end{array}
if t < -2.3499999999999999e26 or 9.5000000000000009e130 < t Initial program 77.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6470.3
Applied rewrites70.3%
Taylor expanded in x around inf
Applied rewrites51.4%
if -2.3499999999999999e26 < t < 9.5000000000000009e130Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6482.4
Applied rewrites82.4%
Taylor expanded in t around 0
lower-/.f6467.0
Applied rewrites67.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (- 1.0 (/ z (- a t))) y))) (if (<= y -2.15e+33) t_1 (if (<= y 5.8e-44) (* 1.0 x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (1.0 - (z / (a - t))) * y;
double tmp;
if (y <= -2.15e+33) {
tmp = t_1;
} else if (y <= 5.8e-44) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (1.0d0 - (z / (a - t))) * y
if (y <= (-2.15d+33)) then
tmp = t_1
else if (y <= 5.8d-44) then
tmp = 1.0d0 * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (1.0 - (z / (a - t))) * y;
double tmp;
if (y <= -2.15e+33) {
tmp = t_1;
} else if (y <= 5.8e-44) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (1.0 - (z / (a - t))) * y tmp = 0 if y <= -2.15e+33: tmp = t_1 elif y <= 5.8e-44: tmp = 1.0 * x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(1.0 - Float64(z / Float64(a - t))) * y) tmp = 0.0 if (y <= -2.15e+33) tmp = t_1; elseif (y <= 5.8e-44) tmp = Float64(1.0 * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (1.0 - (z / (a - t))) * y; tmp = 0.0; if (y <= -2.15e+33) tmp = t_1; elseif (y <= 5.8e-44) tmp = 1.0 * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(1.0 - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -2.15e+33], t$95$1, If[LessEqual[y, 5.8e-44], N[(1.0 * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - \frac{z}{a - t}\right) \cdot y\\
\mathbf{if}\;y \leq -2.15 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-44}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.15000000000000014e33 or 5.8000000000000003e-44 < y Initial program 77.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6444.8
Applied rewrites44.8%
Taylor expanded in t around 0
Applied rewrites39.6%
if -2.15000000000000014e33 < y < 5.8000000000000003e-44Initial program 77.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6470.3
Applied rewrites70.3%
Taylor expanded in x around inf
Applied rewrites51.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ (- z) (- a t)) y))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (<= t_2 -1e+308) t_1 (if (<= t_2 1e+307) (* (+ 1.0 (/ y x)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (-z / (a - t)) * y;
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -1e+308) {
tmp = t_1;
} else if (t_2 <= 1e+307) {
tmp = (1.0 + (y / x)) * x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-z / (a - t)) * y
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 <= (-1d+308)) then
tmp = t_1
else if (t_2 <= 1d+307) then
tmp = (1.0d0 + (y / x)) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (-z / (a - t)) * y;
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 <= -1e+308) {
tmp = t_1;
} else if (t_2 <= 1e+307) {
tmp = (1.0 + (y / x)) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (-z / (a - t)) * y t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 <= -1e+308: tmp = t_1 elif t_2 <= 1e+307: tmp = (1.0 + (y / x)) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(-z) / Float64(a - t)) * y) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 <= -1e+308) tmp = t_1; elseif (t_2 <= 1e+307) tmp = Float64(Float64(1.0 + Float64(y / x)) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (-z / (a - t)) * y; t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 <= -1e+308) tmp = t_1; elseif (t_2 <= 1e+307) tmp = (1.0 + (y / x)) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[((-z) / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+308], t$95$1, If[LessEqual[t$95$2, 1e+307], N[(N[(1.0 + N[(y / x), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-z}{a - t} \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+308}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+307}:\\
\;\;\;\;\left(1 + \frac{y}{x}\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -1e308 or 9.99999999999999986e306 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 77.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6444.8
Applied rewrites44.8%
Taylor expanded in t around 0
Applied rewrites39.6%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift--.f6428.9
Applied rewrites28.9%
if -1e308 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 9.99999999999999986e306Initial program 77.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6470.3
Applied rewrites70.3%
Taylor expanded in a around inf
lower-+.f64N/A
lift-/.f6458.0
Applied rewrites58.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (- 1.0 (/ z a)) y))) (if (<= y -7.5e+167) t_1 (if (<= y 8.5e+94) (* (+ 1.0 (/ y x)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (1.0 - (z / a)) * y;
double tmp;
if (y <= -7.5e+167) {
tmp = t_1;
} else if (y <= 8.5e+94) {
tmp = (1.0 + (y / x)) * x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (1.0d0 - (z / a)) * y
if (y <= (-7.5d+167)) then
tmp = t_1
else if (y <= 8.5d+94) then
tmp = (1.0d0 + (y / x)) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (1.0 - (z / a)) * y;
double tmp;
if (y <= -7.5e+167) {
tmp = t_1;
} else if (y <= 8.5e+94) {
tmp = (1.0 + (y / x)) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (1.0 - (z / a)) * y tmp = 0 if y <= -7.5e+167: tmp = t_1 elif y <= 8.5e+94: tmp = (1.0 + (y / x)) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(1.0 - Float64(z / a)) * y) tmp = 0.0 if (y <= -7.5e+167) tmp = t_1; elseif (y <= 8.5e+94) tmp = Float64(Float64(1.0 + Float64(y / x)) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (1.0 - (z / a)) * y; tmp = 0.0; if (y <= -7.5e+167) tmp = t_1; elseif (y <= 8.5e+94) tmp = (1.0 + (y / x)) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -7.5e+167], t$95$1, If[LessEqual[y, 8.5e+94], N[(N[(1.0 + N[(y / x), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - \frac{z}{a}\right) \cdot y\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+167}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+94}:\\
\;\;\;\;\left(1 + \frac{y}{x}\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.4999999999999995e167 or 8.50000000000000054e94 < y Initial program 77.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6444.8
Applied rewrites44.8%
Taylor expanded in t around 0
lower--.f64N/A
lower-/.f6430.6
Applied rewrites30.6%
if -7.4999999999999995e167 < y < 8.50000000000000054e94Initial program 77.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6470.3
Applied rewrites70.3%
Taylor expanded in a around inf
lower-+.f64N/A
lift-/.f6458.0
Applied rewrites58.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (- 1.0 (/ z a)) y))) (if (<= y -9e+154) t_1 (if (<= y 4.2e+73) (* 1.0 x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (1.0 - (z / a)) * y;
double tmp;
if (y <= -9e+154) {
tmp = t_1;
} else if (y <= 4.2e+73) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (1.0d0 - (z / a)) * y
if (y <= (-9d+154)) then
tmp = t_1
else if (y <= 4.2d+73) then
tmp = 1.0d0 * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (1.0 - (z / a)) * y;
double tmp;
if (y <= -9e+154) {
tmp = t_1;
} else if (y <= 4.2e+73) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (1.0 - (z / a)) * y tmp = 0 if y <= -9e+154: tmp = t_1 elif y <= 4.2e+73: tmp = 1.0 * x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(1.0 - Float64(z / a)) * y) tmp = 0.0 if (y <= -9e+154) tmp = t_1; elseif (y <= 4.2e+73) tmp = Float64(1.0 * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (1.0 - (z / a)) * y; tmp = 0.0; if (y <= -9e+154) tmp = t_1; elseif (y <= 4.2e+73) tmp = 1.0 * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -9e+154], t$95$1, If[LessEqual[y, 4.2e+73], N[(1.0 * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - \frac{z}{a}\right) \cdot y\\
\mathbf{if}\;y \leq -9 \cdot 10^{+154}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+73}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.00000000000000018e154 or 4.2000000000000003e73 < y Initial program 77.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6444.8
Applied rewrites44.8%
Taylor expanded in t around 0
lower--.f64N/A
lower-/.f6430.6
Applied rewrites30.6%
if -9.00000000000000018e154 < y < 4.2000000000000003e73Initial program 77.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6470.3
Applied rewrites70.3%
Taylor expanded in x around inf
Applied rewrites51.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ (- z a) t)))) (if (<= y -1.9e+163) t_1 (if (<= y 2.5e+88) (* 1.0 x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - a) / t);
double tmp;
if (y <= -1.9e+163) {
tmp = t_1;
} else if (y <= 2.5e+88) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((z - a) / t)
if (y <= (-1.9d+163)) then
tmp = t_1
else if (y <= 2.5d+88) then
tmp = 1.0d0 * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - a) / t);
double tmp;
if (y <= -1.9e+163) {
tmp = t_1;
} else if (y <= 2.5e+88) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - a) / t) tmp = 0 if y <= -1.9e+163: tmp = t_1 elif y <= 2.5e+88: tmp = 1.0 * x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - a) / t)) tmp = 0.0 if (y <= -1.9e+163) tmp = t_1; elseif (y <= 2.5e+88) tmp = Float64(1.0 * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - a) / t); tmp = 0.0; if (y <= -1.9e+163) tmp = t_1; elseif (y <= 2.5e+88) tmp = 1.0 * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.9e+163], t$95$1, If[LessEqual[y, 2.5e+88], N[(1.0 * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - a}{t}\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+163}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+88}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.90000000000000004e163 or 2.49999999999999999e88 < y Initial program 77.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6444.8
Applied rewrites44.8%
Taylor expanded in t around 0
Applied rewrites39.6%
Taylor expanded in t around -inf
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6421.5
Applied rewrites21.5%
Taylor expanded in y around 0
lower-*.f64N/A
sub-divN/A
lower-/.f64N/A
lower--.f6424.4
Applied rewrites24.4%
if -1.90000000000000004e163 < y < 2.49999999999999999e88Initial program 77.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6470.3
Applied rewrites70.3%
Taylor expanded in x around inf
Applied rewrites51.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* (- y) z) a))) (if (<= z -3.4e+227) t_1 (if (<= z 2.25e+179) (* 1.0 x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (-y * z) / a;
double tmp;
if (z <= -3.4e+227) {
tmp = t_1;
} else if (z <= 2.25e+179) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (-y * z) / a
if (z <= (-3.4d+227)) then
tmp = t_1
else if (z <= 2.25d+179) then
tmp = 1.0d0 * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (-y * z) / a;
double tmp;
if (z <= -3.4e+227) {
tmp = t_1;
} else if (z <= 2.25e+179) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (-y * z) / a tmp = 0 if z <= -3.4e+227: tmp = t_1 elif z <= 2.25e+179: tmp = 1.0 * x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(-y) * z) / a) tmp = 0.0 if (z <= -3.4e+227) tmp = t_1; elseif (z <= 2.25e+179) tmp = Float64(1.0 * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (-y * z) / a; tmp = 0.0; if (z <= -3.4e+227) tmp = t_1; elseif (z <= 2.25e+179) tmp = 1.0 * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[((-y) * z), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -3.4e+227], t$95$1, If[LessEqual[z, 2.25e+179], N[(1.0 * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(-y\right) \cdot z}{a}\\
\mathbf{if}\;z \leq -3.4 \cdot 10^{+227}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+179}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.39999999999999989e227 or 2.2500000000000001e179 < z Initial program 77.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--.f6426.1
Applied rewrites26.1%
Taylor expanded in t around inf
lower-/.f64N/A
lower-*.f6418.3
Applied rewrites18.3%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
distribute-lft-neg-outN/A
lower-*.f64N/A
lower-neg.f6414.5
Applied rewrites14.5%
if -3.39999999999999989e227 < z < 2.2500000000000001e179Initial program 77.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6470.3
Applied rewrites70.3%
Taylor expanded in x around inf
Applied rewrites51.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ z t) y))) (if (<= y -1.15e+197) t_1 (if (<= y 4.2e+88) (* 1.0 x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z / t) * y;
double tmp;
if (y <= -1.15e+197) {
tmp = t_1;
} else if (y <= 4.2e+88) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (z / t) * y
if (y <= (-1.15d+197)) then
tmp = t_1
else if (y <= 4.2d+88) then
tmp = 1.0d0 * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z / t) * y;
double tmp;
if (y <= -1.15e+197) {
tmp = t_1;
} else if (y <= 4.2e+88) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z / t) * y tmp = 0 if y <= -1.15e+197: tmp = t_1 elif y <= 4.2e+88: tmp = 1.0 * x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z / t) * y) tmp = 0.0 if (y <= -1.15e+197) tmp = t_1; elseif (y <= 4.2e+88) tmp = Float64(1.0 * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z / t) * y; tmp = 0.0; if (y <= -1.15e+197) tmp = t_1; elseif (y <= 4.2e+88) tmp = 1.0 * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.15e+197], t$95$1, If[LessEqual[y, 4.2e+88], N[(1.0 * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{t} \cdot y\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+197}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{+88}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.15e197 or 4.2e88 < y Initial program 77.1%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6444.8
Applied rewrites44.8%
Taylor expanded in a around 0
lower-/.f6420.3
Applied rewrites20.3%
if -1.15e197 < y < 4.2e88Initial program 77.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6470.3
Applied rewrites70.3%
Taylor expanded in x around inf
Applied rewrites51.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (* y z) t))) (if (<= y -2.2e+227) t_1 (if (<= y 1.6e+116) (* 1.0 x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / t;
double tmp;
if (y <= -2.2e+227) {
tmp = t_1;
} else if (y <= 1.6e+116) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y * z) / t
if (y <= (-2.2d+227)) then
tmp = t_1
else if (y <= 1.6d+116) then
tmp = 1.0d0 * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / t;
double tmp;
if (y <= -2.2e+227) {
tmp = t_1;
} else if (y <= 1.6e+116) {
tmp = 1.0 * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * z) / t tmp = 0 if y <= -2.2e+227: tmp = t_1 elif y <= 1.6e+116: tmp = 1.0 * x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * z) / t) tmp = 0.0 if (y <= -2.2e+227) tmp = t_1; elseif (y <= 1.6e+116) tmp = Float64(1.0 * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * z) / t; tmp = 0.0; if (y <= -2.2e+227) tmp = t_1; elseif (y <= 1.6e+116) tmp = 1.0 * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[y, -2.2e+227], t$95$1, If[LessEqual[y, 1.6e+116], N[(1.0 * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot z}{t}\\
\mathbf{if}\;y \leq -2.2 \cdot 10^{+227}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{+116}:\\
\;\;\;\;1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.2000000000000002e227 or 1.6e116 < y Initial program 77.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--.f6426.1
Applied rewrites26.1%
Taylor expanded in t around inf
lower-/.f64N/A
lower-*.f6418.3
Applied rewrites18.3%
if -2.2000000000000002e227 < y < 1.6e116Initial program 77.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6470.3
Applied rewrites70.3%
Taylor expanded in x around inf
Applied rewrites51.4%
(FPCore (x y z t a) :precision binary64 (* 1.0 x))
double code(double x, double y, double z, double t, double a) {
return 1.0 * 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 = 1.0d0 * x
end function
public static double code(double x, double y, double z, double t, double a) {
return 1.0 * x;
}
def code(x, y, z, t, a): return 1.0 * x
function code(x, y, z, t, a) return Float64(1.0 * x) end
function tmp = code(x, y, z, t, a) tmp = 1.0 * x; end
code[x_, y_, z_, t_, a_] := N[(1.0 * x), $MachinePrecision]
\begin{array}{l}
\\
1 \cdot x
\end{array}
Initial program 77.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
lower-+.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f6470.3
Applied rewrites70.3%
Taylor expanded in x around inf
Applied rewrites51.4%
herbie shell --seed 2025127
(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))))