
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\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
(if (<= t -6.2e+179)
(+ (- (/ (- (* a y) (* z y)) t)) x)
(if (<= t 6.6e-12)
(- (+ x y) (* y (/ z (- a t))))
(-
(*
(*
-1.0
(*
y
(-
(/ 1.0 y)
(*
-1.0
(/
(*
-1.0
(* z (fma -1.0 (/ (+ 1.0 (/ t (- a t))) z) (/ 1.0 (- a t)))))
x)))))
x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+179) {
tmp = -(((a * y) - (z * y)) / t) + x;
} else if (t <= 6.6e-12) {
tmp = (x + y) - (y * (z / (a - t)));
} else {
tmp = -((-1.0 * (y * ((1.0 / y) - (-1.0 * ((-1.0 * (z * fma(-1.0, ((1.0 + (t / (a - t))) / z), (1.0 / (a - t))))) / x))))) * x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e+179) tmp = Float64(Float64(-Float64(Float64(Float64(a * y) - Float64(z * y)) / t)) + x); elseif (t <= 6.6e-12) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(-Float64(Float64(-1.0 * Float64(y * Float64(Float64(1.0 / y) - Float64(-1.0 * Float64(Float64(-1.0 * Float64(z * fma(-1.0, Float64(Float64(1.0 + Float64(t / Float64(a - t))) / z), Float64(1.0 / Float64(a - t))))) / x))))) * x)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e+179], N[((-N[(N[(N[(a * y), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]) + x), $MachinePrecision], If[LessEqual[t, 6.6e-12], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(N[(-1.0 * N[(y * N[(N[(1.0 / y), $MachinePrecision] - N[(-1.0 * N[(N[(-1.0 * N[(z * N[(-1.0 * N[(N[(1.0 + N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+179}:\\
\;\;\;\;\left(-\frac{a \cdot y - z \cdot y}{t}\right) + x\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{-12}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;-\left(-1 \cdot \left(y \cdot \left(\frac{1}{y} - -1 \cdot \frac{-1 \cdot \left(z \cdot \mathsf{fma}\left(-1, \frac{1 + \frac{t}{a - t}}{z}, \frac{1}{a - t}\right)\right)}{x}\right)\right)\right) \cdot x\\
\end{array}
\end{array}
if t < -6.2e179Initial 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%
if -6.2e179 < t < 6.6000000000000001e-12Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6481.7
Applied rewrites81.7%
if 6.6000000000000001e-12 < t Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f64N/A
lift--.f6479.7
Applied rewrites79.7%
Taylor expanded in z around -inf
lower-*.f64N/A
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6483.3
Applied rewrites83.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.2e+179)
(+ (- (/ (- (* a y) (* z y)) t)) x)
(if (<= t 6.6e-12)
(- (+ x y) (* y (/ z (- a t))))
(-
(*
(*
-1.0
(*
y
(- (/ 1.0 y) (* -1.0 (/ (+ 1.0 (* -1.0 (/ (- z t) (- a t)))) x)))))
x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+179) {
tmp = -(((a * y) - (z * y)) / t) + x;
} else if (t <= 6.6e-12) {
tmp = (x + y) - (y * (z / (a - t)));
} else {
tmp = -((-1.0 * (y * ((1.0 / y) - (-1.0 * ((1.0 + (-1.0 * ((z - t) / (a - t)))) / x))))) * 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 <= (-6.2d+179)) then
tmp = -(((a * y) - (z * y)) / t) + x
else if (t <= 6.6d-12) then
tmp = (x + y) - (y * (z / (a - t)))
else
tmp = -(((-1.0d0) * (y * ((1.0d0 / y) - ((-1.0d0) * ((1.0d0 + ((-1.0d0) * ((z - t) / (a - t)))) / x))))) * 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 <= -6.2e+179) {
tmp = -(((a * y) - (z * y)) / t) + x;
} else if (t <= 6.6e-12) {
tmp = (x + y) - (y * (z / (a - t)));
} else {
tmp = -((-1.0 * (y * ((1.0 / y) - (-1.0 * ((1.0 + (-1.0 * ((z - t) / (a - t)))) / x))))) * x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.2e+179: tmp = -(((a * y) - (z * y)) / t) + x elif t <= 6.6e-12: tmp = (x + y) - (y * (z / (a - t))) else: tmp = -((-1.0 * (y * ((1.0 / y) - (-1.0 * ((1.0 + (-1.0 * ((z - t) / (a - t)))) / x))))) * x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e+179) tmp = Float64(Float64(-Float64(Float64(Float64(a * y) - Float64(z * y)) / t)) + x); elseif (t <= 6.6e-12) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(-Float64(Float64(-1.0 * Float64(y * Float64(Float64(1.0 / y) - Float64(-1.0 * Float64(Float64(1.0 + Float64(-1.0 * Float64(Float64(z - t) / Float64(a - t)))) / x))))) * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.2e+179) tmp = -(((a * y) - (z * y)) / t) + x; elseif (t <= 6.6e-12) tmp = (x + y) - (y * (z / (a - t))); else tmp = -((-1.0 * (y * ((1.0 / y) - (-1.0 * ((1.0 + (-1.0 * ((z - t) / (a - t)))) / x))))) * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e+179], N[((-N[(N[(N[(a * y), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]) + x), $MachinePrecision], If[LessEqual[t, 6.6e-12], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(N[(-1.0 * N[(y * N[(N[(1.0 / y), $MachinePrecision] - N[(-1.0 * N[(N[(1.0 + N[(-1.0 * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+179}:\\
\;\;\;\;\left(-\frac{a \cdot y - z \cdot y}{t}\right) + x\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{-12}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;-\left(-1 \cdot \left(y \cdot \left(\frac{1}{y} - -1 \cdot \frac{1 + -1 \cdot \frac{z - t}{a - t}}{x}\right)\right)\right) \cdot x\\
\end{array}
\end{array}
if t < -6.2e179Initial 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%
if -6.2e179 < t < 6.6000000000000001e-12Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6481.7
Applied rewrites81.7%
if 6.6000000000000001e-12 < t Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f64N/A
lift--.f6479.7
Applied rewrites79.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.2e+179)
(+ (- (/ (- (* a y) (* z y)) t)) x)
(if (<= t 5.8e+228)
(- (+ x y) (* y (/ z (- a t))))
(- (* (* -1.0 (* y (- (/ 1.0 y) (* -1.0 (/ (- z a) (* t x)))))) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+179) {
tmp = -(((a * y) - (z * y)) / t) + x;
} else if (t <= 5.8e+228) {
tmp = (x + y) - (y * (z / (a - t)));
} else {
tmp = -((-1.0 * (y * ((1.0 / y) - (-1.0 * ((z - a) / (t * x)))))) * 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 <= (-6.2d+179)) then
tmp = -(((a * y) - (z * y)) / t) + x
else if (t <= 5.8d+228) then
tmp = (x + y) - (y * (z / (a - t)))
else
tmp = -(((-1.0d0) * (y * ((1.0d0 / y) - ((-1.0d0) * ((z - a) / (t * x)))))) * 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 <= -6.2e+179) {
tmp = -(((a * y) - (z * y)) / t) + x;
} else if (t <= 5.8e+228) {
tmp = (x + y) - (y * (z / (a - t)));
} else {
tmp = -((-1.0 * (y * ((1.0 / y) - (-1.0 * ((z - a) / (t * x)))))) * x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.2e+179: tmp = -(((a * y) - (z * y)) / t) + x elif t <= 5.8e+228: tmp = (x + y) - (y * (z / (a - t))) else: tmp = -((-1.0 * (y * ((1.0 / y) - (-1.0 * ((z - a) / (t * x)))))) * x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e+179) tmp = Float64(Float64(-Float64(Float64(Float64(a * y) - Float64(z * y)) / t)) + x); elseif (t <= 5.8e+228) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(-Float64(Float64(-1.0 * Float64(y * Float64(Float64(1.0 / y) - Float64(-1.0 * Float64(Float64(z - a) / Float64(t * x)))))) * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.2e+179) tmp = -(((a * y) - (z * y)) / t) + x; elseif (t <= 5.8e+228) tmp = (x + y) - (y * (z / (a - t))); else tmp = -((-1.0 * (y * ((1.0 / y) - (-1.0 * ((z - a) / (t * x)))))) * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e+179], N[((-N[(N[(N[(a * y), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]) + x), $MachinePrecision], If[LessEqual[t, 5.8e+228], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(N[(-1.0 * N[(y * N[(N[(1.0 / y), $MachinePrecision] - N[(-1.0 * N[(N[(z - a), $MachinePrecision] / N[(t * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+179}:\\
\;\;\;\;\left(-\frac{a \cdot y - z \cdot y}{t}\right) + x\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+228}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;-\left(-1 \cdot \left(y \cdot \left(\frac{1}{y} - -1 \cdot \frac{z - a}{t \cdot x}\right)\right)\right) \cdot x\\
\end{array}
\end{array}
if t < -6.2e179Initial 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%
if -6.2e179 < t < 5.80000000000000003e228Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6481.7
Applied rewrites81.7%
if 5.80000000000000003e228 < t Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f64N/A
lift--.f6479.7
Applied rewrites79.7%
Taylor expanded in t around -inf
lower-/.f64N/A
lower--.f64N/A
lower-*.f6456.5
Applied rewrites56.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6.2e+179)
(+ (- (/ (- (* a y) (* z y)) t)) x)
(if (<= t 1.1e+247)
(- (+ x y) (* y (/ z (- a t))))
(- (* (* -1.0 (* y (fma -1.0 (/ (/ (- a z) x) t) (/ 1.0 y)))) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e+179) {
tmp = -(((a * y) - (z * y)) / t) + x;
} else if (t <= 1.1e+247) {
tmp = (x + y) - (y * (z / (a - t)));
} else {
tmp = -((-1.0 * (y * fma(-1.0, (((a - z) / x) / t), (1.0 / y)))) * x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e+179) tmp = Float64(Float64(-Float64(Float64(Float64(a * y) - Float64(z * y)) / t)) + x); elseif (t <= 1.1e+247) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(-Float64(Float64(-1.0 * Float64(y * fma(-1.0, Float64(Float64(Float64(a - z) / x) / t), Float64(1.0 / y)))) * x)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e+179], N[((-N[(N[(N[(a * y), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]) + x), $MachinePrecision], If[LessEqual[t, 1.1e+247], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(N[(-1.0 * N[(y * N[(-1.0 * N[(N[(N[(a - z), $MachinePrecision] / x), $MachinePrecision] / t), $MachinePrecision] + N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+179}:\\
\;\;\;\;\left(-\frac{a \cdot y - z \cdot y}{t}\right) + x\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+247}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;-\left(-1 \cdot \left(y \cdot \mathsf{fma}\left(-1, \frac{\frac{a - z}{x}}{t}, \frac{1}{y}\right)\right)\right) \cdot x\\
\end{array}
\end{array}
if t < -6.2e179Initial 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%
if -6.2e179 < t < 1.10000000000000006e247Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6481.7
Applied rewrites81.7%
if 1.10000000000000006e247 < t Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f64N/A
lift--.f6479.7
Applied rewrites79.7%
Taylor expanded in t around -inf
lower-fma.f64N/A
lower-/.f64N/A
sub-divN/A
lower-/.f64N/A
lower--.f64N/A
lift-/.f6453.8
Applied rewrites53.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (- (/ (- (* a y) (* z y)) t)) x)))
(if (<= t -6.2e+179)
t_1
(if (<= t 1.36e+214) (- (+ x y) (* y (/ z (- a t)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -(((a * y) - (z * y)) / t) + x;
double tmp;
if (t <= -6.2e+179) {
tmp = t_1;
} else if (t <= 1.36e+214) {
tmp = (x + y) - (y * (z / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -(((a * y) - (z * y)) / t) + x
if (t <= (-6.2d+179)) then
tmp = t_1
else if (t <= 1.36d+214) then
tmp = (x + y) - (y * (z / (a - t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -(((a * y) - (z * y)) / t) + x;
double tmp;
if (t <= -6.2e+179) {
tmp = t_1;
} else if (t <= 1.36e+214) {
tmp = (x + y) - (y * (z / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -(((a * y) - (z * y)) / t) + x tmp = 0 if t <= -6.2e+179: tmp = t_1 elif t <= 1.36e+214: tmp = (x + y) - (y * (z / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-Float64(Float64(Float64(a * y) - Float64(z * y)) / t)) + x) tmp = 0.0 if (t <= -6.2e+179) tmp = t_1; elseif (t <= 1.36e+214) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -(((a * y) - (z * y)) / t) + x; tmp = 0.0; if (t <= -6.2e+179) tmp = t_1; elseif (t <= 1.36e+214) tmp = (x + y) - (y * (z / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-N[(N[(N[(a * y), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]) + x), $MachinePrecision]}, If[LessEqual[t, -6.2e+179], t$95$1, If[LessEqual[t, 1.36e+214], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-\frac{a \cdot y - z \cdot y}{t}\right) + x\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+179}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.36 \cdot 10^{+214}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.2e179 or 1.35999999999999997e214 < t Initial 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%
if -6.2e179 < t < 1.35999999999999997e214Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6481.7
Applied rewrites81.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* -1.0 x))))
(if (<= t -6.2e+179)
t_1
(if (<= t 5.2e+247) (- (+ x y) (* y (/ z (- a t)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -(-1.0 * x);
double tmp;
if (t <= -6.2e+179) {
tmp = t_1;
} else if (t <= 5.2e+247) {
tmp = (x + y) - (y * (z / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -((-1.0d0) * x)
if (t <= (-6.2d+179)) then
tmp = t_1
else if (t <= 5.2d+247) then
tmp = (x + y) - (y * (z / (a - t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -(-1.0 * x);
double tmp;
if (t <= -6.2e+179) {
tmp = t_1;
} else if (t <= 5.2e+247) {
tmp = (x + y) - (y * (z / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -(-1.0 * x) tmp = 0 if t <= -6.2e+179: tmp = t_1 elif t <= 5.2e+247: tmp = (x + y) - (y * (z / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-Float64(-1.0 * x)) tmp = 0.0 if (t <= -6.2e+179) tmp = t_1; elseif (t <= 5.2e+247) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -(-1.0 * x); tmp = 0.0; if (t <= -6.2e+179) tmp = t_1; elseif (t <= 5.2e+247) tmp = (x + y) - (y * (z / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = (-N[(-1.0 * x), $MachinePrecision])}, If[LessEqual[t, -6.2e+179], t$95$1, If[LessEqual[t, 5.2e+247], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := --1 \cdot x\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+179}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+247}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.2e179 or 5.19999999999999981e247 < t Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in x around inf
Applied rewrites51.0%
if -6.2e179 < t < 5.19999999999999981e247Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6481.7
Applied rewrites81.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* -1.0 x))))
(if (<= t -7.6e+108)
t_1
(if (<= t 10500000000000.0)
(- (+ x y) (* y (/ z a)))
(if (<= t 5.2e+247) (- (+ x y) (* y (- 1.0 (/ z t)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -(-1.0 * x);
double tmp;
if (t <= -7.6e+108) {
tmp = t_1;
} else if (t <= 10500000000000.0) {
tmp = (x + y) - (y * (z / a));
} else if (t <= 5.2e+247) {
tmp = (x + y) - (y * (1.0 - (z / t)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -((-1.0d0) * x)
if (t <= (-7.6d+108)) then
tmp = t_1
else if (t <= 10500000000000.0d0) then
tmp = (x + y) - (y * (z / a))
else if (t <= 5.2d+247) then
tmp = (x + y) - (y * (1.0d0 - (z / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -(-1.0 * x);
double tmp;
if (t <= -7.6e+108) {
tmp = t_1;
} else if (t <= 10500000000000.0) {
tmp = (x + y) - (y * (z / a));
} else if (t <= 5.2e+247) {
tmp = (x + y) - (y * (1.0 - (z / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -(-1.0 * x) tmp = 0 if t <= -7.6e+108: tmp = t_1 elif t <= 10500000000000.0: tmp = (x + y) - (y * (z / a)) elif t <= 5.2e+247: tmp = (x + y) - (y * (1.0 - (z / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-Float64(-1.0 * x)) tmp = 0.0 if (t <= -7.6e+108) tmp = t_1; elseif (t <= 10500000000000.0) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); elseif (t <= 5.2e+247) tmp = Float64(Float64(x + y) - Float64(y * Float64(1.0 - Float64(z / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -(-1.0 * x); tmp = 0.0; if (t <= -7.6e+108) tmp = t_1; elseif (t <= 10500000000000.0) tmp = (x + y) - (y * (z / a)); elseif (t <= 5.2e+247) tmp = (x + y) - (y * (1.0 - (z / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = (-N[(-1.0 * x), $MachinePrecision])}, If[LessEqual[t, -7.6e+108], t$95$1, If[LessEqual[t, 10500000000000.0], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+247], N[(N[(x + y), $MachinePrecision] - N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := --1 \cdot x\\
\mathbf{if}\;t \leq -7.6 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 10500000000000:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+247}:\\
\;\;\;\;\left(x + y\right) - y \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.60000000000000015e108 or 5.19999999999999981e247 < t Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in x around inf
Applied rewrites51.0%
if -7.60000000000000015e108 < t < 1.05e13Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6481.7
Applied rewrites81.7%
Taylor expanded in t around 0
Applied rewrites67.2%
if 1.05e13 < t < 5.19999999999999981e247Initial program 77.1%
Taylor expanded in a around 0
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6450.0
Applied rewrites50.0%
Taylor expanded in y around 0
lower-*.f64N/A
lower--.f64N/A
lower-/.f6452.0
Applied rewrites52.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* -1.0 x))))
(if (<= t -7.6e+108)
t_1
(if (<= t 115.0)
(- (+ x y) (* y (/ z a)))
(if (<= t 2.55e+247) (- (+ x y) (- (/ (* y z) t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -(-1.0 * x);
double tmp;
if (t <= -7.6e+108) {
tmp = t_1;
} else if (t <= 115.0) {
tmp = (x + y) - (y * (z / a));
} else if (t <= 2.55e+247) {
tmp = (x + y) - -((y * z) / t);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -((-1.0d0) * x)
if (t <= (-7.6d+108)) then
tmp = t_1
else if (t <= 115.0d0) then
tmp = (x + y) - (y * (z / a))
else if (t <= 2.55d+247) then
tmp = (x + y) - -((y * z) / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -(-1.0 * x);
double tmp;
if (t <= -7.6e+108) {
tmp = t_1;
} else if (t <= 115.0) {
tmp = (x + y) - (y * (z / a));
} else if (t <= 2.55e+247) {
tmp = (x + y) - -((y * z) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -(-1.0 * x) tmp = 0 if t <= -7.6e+108: tmp = t_1 elif t <= 115.0: tmp = (x + y) - (y * (z / a)) elif t <= 2.55e+247: tmp = (x + y) - -((y * z) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-Float64(-1.0 * x)) tmp = 0.0 if (t <= -7.6e+108) tmp = t_1; elseif (t <= 115.0) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); elseif (t <= 2.55e+247) tmp = Float64(Float64(x + y) - Float64(-Float64(Float64(y * z) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -(-1.0 * x); tmp = 0.0; if (t <= -7.6e+108) tmp = t_1; elseif (t <= 115.0) tmp = (x + y) - (y * (z / a)); elseif (t <= 2.55e+247) tmp = (x + y) - -((y * z) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = (-N[(-1.0 * x), $MachinePrecision])}, If[LessEqual[t, -7.6e+108], t$95$1, If[LessEqual[t, 115.0], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.55e+247], N[(N[(x + y), $MachinePrecision] - (-N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision])), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := --1 \cdot x\\
\mathbf{if}\;t \leq -7.6 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 115:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{+247}:\\
\;\;\;\;\left(x + y\right) - \left(-\frac{y \cdot z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.60000000000000015e108 or 2.55000000000000001e247 < t Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in x around inf
Applied rewrites51.0%
if -7.60000000000000015e108 < t < 115Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6481.7
Applied rewrites81.7%
Taylor expanded in t around 0
Applied rewrites67.2%
if 115 < t < 2.55000000000000001e247Initial program 77.1%
Taylor expanded in a around 0
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-*.f6450.0
Applied rewrites50.0%
Taylor expanded in z around inf
lower-*.f6458.0
Applied rewrites58.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- (* -1.0 x)))) (if (<= t -7.6e+108) t_1 (if (<= t 1.2e-6) (- (+ x y) (* y (/ z a))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -(-1.0 * x);
double tmp;
if (t <= -7.6e+108) {
tmp = t_1;
} else if (t <= 1.2e-6) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -((-1.0d0) * x)
if (t <= (-7.6d+108)) then
tmp = t_1
else if (t <= 1.2d-6) then
tmp = (x + y) - (y * (z / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -(-1.0 * x);
double tmp;
if (t <= -7.6e+108) {
tmp = t_1;
} else if (t <= 1.2e-6) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -(-1.0 * x) tmp = 0 if t <= -7.6e+108: tmp = t_1 elif t <= 1.2e-6: tmp = (x + y) - (y * (z / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-Float64(-1.0 * x)) tmp = 0.0 if (t <= -7.6e+108) tmp = t_1; elseif (t <= 1.2e-6) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -(-1.0 * x); tmp = 0.0; if (t <= -7.6e+108) tmp = t_1; elseif (t <= 1.2e-6) tmp = (x + y) - (y * (z / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = (-N[(-1.0 * x), $MachinePrecision])}, If[LessEqual[t, -7.6e+108], t$95$1, If[LessEqual[t, 1.2e-6], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := --1 \cdot x\\
\mathbf{if}\;t \leq -7.6 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-6}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.60000000000000015e108 or 1.1999999999999999e-6 < t Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in x around inf
Applied rewrites51.0%
if -7.60000000000000015e108 < t < 1.1999999999999999e-6Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6481.7
Applied rewrites81.7%
Taylor expanded in t around 0
Applied rewrites67.2%
(FPCore (x y z t a)
:precision binary64
(if (<= x -1.7e-58)
(- (* -1.0 x))
(if (<= x 1.6e-112)
(- y (/ (* y z) (- a t)))
(- (* (- (- (/ y x)) 1.0) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.7e-58) {
tmp = -(-1.0 * x);
} else if (x <= 1.6e-112) {
tmp = y - ((y * z) / (a - t));
} else {
tmp = -((-(y / x) - 1.0) * x);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (x <= (-1.7d-58)) then
tmp = -((-1.0d0) * x)
else if (x <= 1.6d-112) then
tmp = y - ((y * z) / (a - t))
else
tmp = -((-(y / x) - 1.0d0) * x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -1.7e-58) {
tmp = -(-1.0 * x);
} else if (x <= 1.6e-112) {
tmp = y - ((y * z) / (a - t));
} else {
tmp = -((-(y / x) - 1.0) * x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -1.7e-58: tmp = -(-1.0 * x) elif x <= 1.6e-112: tmp = y - ((y * z) / (a - t)) else: tmp = -((-(y / x) - 1.0) * x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -1.7e-58) tmp = Float64(-Float64(-1.0 * x)); elseif (x <= 1.6e-112) tmp = Float64(y - Float64(Float64(y * z) / Float64(a - t))); else tmp = Float64(-Float64(Float64(Float64(-Float64(y / x)) - 1.0) * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -1.7e-58) tmp = -(-1.0 * x); elseif (x <= 1.6e-112) tmp = y - ((y * z) / (a - t)); else tmp = -((-(y / x) - 1.0) * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -1.7e-58], (-N[(-1.0 * x), $MachinePrecision]), If[LessEqual[x, 1.6e-112], N[(y - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(N[((-N[(y / x), $MachinePrecision]) - 1.0), $MachinePrecision] * x), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{-58}:\\
\;\;\;\;--1 \cdot x\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-112}:\\
\;\;\;\;y - \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;-\left(\left(-\frac{y}{x}\right) - 1\right) \cdot x\\
\end{array}
\end{array}
if x < -1.69999999999999987e-58Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in x around inf
Applied rewrites51.0%
if -1.69999999999999987e-58 < x < 1.59999999999999997e-112Initial program 77.1%
Taylor expanded in x around 0
Applied rewrites36.8%
Taylor expanded in z around inf
lower-*.f6437.2
Applied rewrites37.2%
if 1.59999999999999997e-112 < x Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in a around inf
lower-/.f6457.2
Applied rewrites57.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- y (* y (/ z a))))) (if (<= y -6.5e+40) t_1 (if (<= y 2.4e+53) (- (* -1.0 x)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y - (y * (z / a));
double tmp;
if (y <= -6.5e+40) {
tmp = t_1;
} else if (y <= 2.4e+53) {
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 - (y * (z / a))
if (y <= (-6.5d+40)) then
tmp = t_1
else if (y <= 2.4d+53) 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 - (y * (z / a));
double tmp;
if (y <= -6.5e+40) {
tmp = t_1;
} else if (y <= 2.4e+53) {
tmp = -(-1.0 * x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y - (y * (z / a)) tmp = 0 if y <= -6.5e+40: tmp = t_1 elif y <= 2.4e+53: tmp = -(-1.0 * x) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y - Float64(y * Float64(z / a))) tmp = 0.0 if (y <= -6.5e+40) tmp = t_1; elseif (y <= 2.4e+53) tmp = Float64(-Float64(-1.0 * x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y - (y * (z / a)); tmp = 0.0; if (y <= -6.5e+40) tmp = t_1; elseif (y <= 2.4e+53) 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[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+40], t$95$1, If[LessEqual[y, 2.4e+53], (-N[(-1.0 * x), $MachinePrecision]), t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y - y \cdot \frac{z}{a}\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+53}:\\
\;\;\;\;--1 \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.5000000000000001e40 or 2.4e53 < y Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6481.7
Applied rewrites81.7%
Taylor expanded in t around 0
Applied rewrites67.2%
Taylor expanded in x around 0
Applied rewrites31.3%
if -6.5000000000000001e40 < y < 2.4e53Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in x around inf
Applied rewrites51.0%
(FPCore (x y z t a) :precision binary64 (if (<= y -5.2e+126) (- y (* y (/ z a))) (- (* (- (- (/ y x)) 1.0) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.2e+126) {
tmp = y - (y * (z / a));
} else {
tmp = -((-(y / x) - 1.0) * x);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-5.2d+126)) then
tmp = y - (y * (z / a))
else
tmp = -((-(y / x) - 1.0d0) * x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.2e+126) {
tmp = y - (y * (z / a));
} else {
tmp = -((-(y / x) - 1.0) * x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.2e+126: tmp = y - (y * (z / a)) else: tmp = -((-(y / x) - 1.0) * x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.2e+126) tmp = Float64(y - Float64(y * Float64(z / a))); else tmp = Float64(-Float64(Float64(Float64(-Float64(y / x)) - 1.0) * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.2e+126) tmp = y - (y * (z / a)); else tmp = -((-(y / x) - 1.0) * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.2e+126], N[(y - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-N[(N[((-N[(y / x), $MachinePrecision]) - 1.0), $MachinePrecision] * x), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+126}:\\
\;\;\;\;y - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;-\left(\left(-\frac{y}{x}\right) - 1\right) \cdot x\\
\end{array}
\end{array}
if y < -5.1999999999999999e126Initial program 77.1%
Taylor expanded in z around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lift--.f6481.7
Applied rewrites81.7%
Taylor expanded in t around 0
Applied rewrites67.2%
Taylor expanded in x around 0
Applied rewrites31.3%
if -5.1999999999999999e126 < y Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in a around inf
lower-/.f6457.2
Applied rewrites57.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- (* -1.0 x)))) (if (<= x -6.2e-218) t_1 (if (<= x 1.1e-182) (/ (* y z) t) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -(-1.0 * x);
double tmp;
if (x <= -6.2e-218) {
tmp = t_1;
} else if (x <= 1.1e-182) {
tmp = (y * z) / t;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -((-1.0d0) * x)
if (x <= (-6.2d-218)) then
tmp = t_1
else if (x <= 1.1d-182) then
tmp = (y * z) / t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -(-1.0 * x);
double tmp;
if (x <= -6.2e-218) {
tmp = t_1;
} else if (x <= 1.1e-182) {
tmp = (y * z) / t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -(-1.0 * x) tmp = 0 if x <= -6.2e-218: tmp = t_1 elif x <= 1.1e-182: tmp = (y * z) / t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-Float64(-1.0 * x)) tmp = 0.0 if (x <= -6.2e-218) tmp = t_1; elseif (x <= 1.1e-182) tmp = Float64(Float64(y * z) / t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -(-1.0 * x); tmp = 0.0; if (x <= -6.2e-218) tmp = t_1; elseif (x <= 1.1e-182) tmp = (y * z) / t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = (-N[(-1.0 * x), $MachinePrecision])}, If[LessEqual[x, -6.2e-218], t$95$1, If[LessEqual[x, 1.1e-182], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := --1 \cdot x\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{-218}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-182}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.19999999999999994e-218 or 1.1e-182 < x Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in x around inf
Applied rewrites51.0%
if -6.19999999999999994e-218 < x < 1.1e-182Initial 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.7
Applied rewrites26.7%
Taylor expanded in a around -inf
lower-*.f64N/A
lower-/.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6411.0
Applied rewrites11.0%
Taylor expanded in t around inf
lower-/.f64N/A
lift-*.f6418.8
Applied rewrites18.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -5.5e+121) (/ (* (- y) z) a) (- (* -1.0 x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.5e+121) {
tmp = (-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 (y <= (-5.5d+121)) then
tmp = (-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 (y <= -5.5e+121) {
tmp = (-y * z) / a;
} else {
tmp = -(-1.0 * x);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.5e+121: tmp = (-y * z) / a else: tmp = -(-1.0 * x) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.5e+121) tmp = Float64(Float64(Float64(-y) * z) / a); else tmp = Float64(-Float64(-1.0 * x)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.5e+121) tmp = (-y * z) / a; else tmp = -(-1.0 * x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.5e+121], N[(N[((-y) * z), $MachinePrecision] / a), $MachinePrecision], (-N[(-1.0 * x), $MachinePrecision])]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+121}:\\
\;\;\;\;\frac{\left(-y\right) \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;--1 \cdot x\\
\end{array}
\end{array}
if y < -5.4999999999999998e121Initial 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.7
Applied rewrites26.7%
Taylor expanded in t around 0
Applied rewrites15.1%
if -5.4999999999999998e121 < y Initial program 77.1%
Taylor expanded in x around -inf
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in x around inf
Applied rewrites51.0%
(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(-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
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites79.8%
Taylor expanded in x around inf
Applied rewrites51.0%
herbie shell --seed 2025139
(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))))