
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (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 - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- t z) (- t a)) (- y x))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -4e-284)
t_1
(if (<= t_2 0.0)
(+ y (* -1.0 (/ (- (* z (- y x)) (* a (- y x))) t)))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - z) / (t - a)) * (y - x));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -4e-284) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y + (-1.0 * (((z * (y - x)) - (a * (y - x))) / 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) :: t_2
real(8) :: tmp
t_1 = x + (((t - z) / (t - a)) * (y - x))
t_2 = x + (((y - x) * (z - t)) / (a - t))
if (t_2 <= (-4d-284)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = y + ((-1.0d0) * (((z * (y - x)) - (a * (y - x))) / t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - z) / (t - a)) * (y - x));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -4e-284) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = y + (-1.0 * (((z * (y - x)) - (a * (y - x))) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((t - z) / (t - a)) * (y - x)) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -4e-284: tmp = t_1 elif t_2 <= 0.0: tmp = y + (-1.0 * (((z * (y - x)) - (a * (y - x))) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(t - z) / Float64(t - a)) * Float64(y - x))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -4e-284) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(-1.0 * Float64(Float64(Float64(z * Float64(y - x)) - Float64(a * Float64(y - x))) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((t - z) / (t - a)) * (y - x)); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -4e-284) tmp = t_1; elseif (t_2 <= 0.0) tmp = y + (-1.0 * (((z * (y - x)) - (a * (y - x))) / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e-284], t$95$1, If[LessEqual[t$95$2, 0.0], N[(y + N[(-1.0 * N[(N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := x + \frac{t - z}{t - a} \cdot \left(y - x\right)\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{-284}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + -1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.0000000000000001e-284 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.9%
Applied rewrites84.9%
if -4.0000000000000001e-284 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 68.6%
Taylor expanded in t around -inf
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6445.8%
Applied rewrites45.8%
(FPCore (x y z t a) :precision binary64 (if (<= t 1.08e+201) (+ x (* (/ (- t z) (- t a)) (- y x))) (* y (- (/ z (- a t)) (/ t (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 1.08e+201) {
tmp = x + (((t - z) / (t - a)) * (y - x));
} else {
tmp = y * ((z / (a - t)) - (t / (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 <= 1.08d+201) then
tmp = x + (((t - z) / (t - a)) * (y - x))
else
tmp = y * ((z / (a - t)) - (t / (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 <= 1.08e+201) {
tmp = x + (((t - z) / (t - a)) * (y - x));
} else {
tmp = y * ((z / (a - t)) - (t / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 1.08e+201: tmp = x + (((t - z) / (t - a)) * (y - x)) else: tmp = y * ((z / (a - t)) - (t / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 1.08e+201) tmp = Float64(x + Float64(Float64(Float64(t - z) / Float64(t - a)) * Float64(y - x))); else tmp = Float64(y * Float64(Float64(z / Float64(a - t)) - Float64(t / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 1.08e+201) tmp = x + (((t - z) / (t - a)) * (y - x)); else tmp = y * ((z / (a - t)) - (t / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 1.08e+201], N[(x + N[(N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] - N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;t \leq 1.08 \cdot 10^{+201}:\\
\;\;\;\;x + \frac{t - z}{t - a} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\frac{z}{a - t} - \frac{t}{a - t}\right)\\
\end{array}
if t < 1.0800000000000001e201Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.9%
Applied rewrites84.9%
if 1.0800000000000001e201 < t Initial program 68.6%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.5%
Applied rewrites51.5%
(FPCore (x y z t a) :precision binary64 (+ x (* (/ (- t z) (- t a)) (- y x))))
double code(double x, double y, double z, double t, double a) {
return x + (((t - z) / (t - a)) * (y - x));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((t - z) / (t - a)) * (y - x))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((t - z) / (t - a)) * (y - x));
}
def code(x, y, z, t, a): return x + (((t - z) / (t - a)) * (y - x))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(t - z) / Float64(t - a)) * Float64(y - x))) end
function tmp = code(x, y, z, t, a) tmp = x + (((t - z) / (t - a)) * (y - x)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{t - z}{t - a} \cdot \left(y - x\right)
Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.9%
Applied rewrites84.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- x y) (/ z (- t a)))))
(if (<= z -3.5e+90)
t_1
(if (<= z 1.4e+169) (+ x (* (/ (- t z) (- t a)) y)) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * (z / (t - a));
double tmp;
if (z <= -3.5e+90) {
tmp = t_1;
} else if (z <= 1.4e+169) {
tmp = x + (((t - z) / (t - a)) * y);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (x - y) * (z / (t - a))
if (z <= (-3.5d+90)) then
tmp = t_1
else if (z <= 1.4d+169) then
tmp = x + (((t - z) / (t - a)) * y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * (z / (t - a));
double tmp;
if (z <= -3.5e+90) {
tmp = t_1;
} else if (z <= 1.4e+169) {
tmp = x + (((t - z) / (t - a)) * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - y) * (z / (t - a)) tmp = 0 if z <= -3.5e+90: tmp = t_1 elif z <= 1.4e+169: tmp = x + (((t - z) / (t - a)) * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) * Float64(z / Float64(t - a))) tmp = 0.0 if (z <= -3.5e+90) tmp = t_1; elseif (z <= 1.4e+169) tmp = Float64(x + Float64(Float64(Float64(t - z) / Float64(t - a)) * y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - y) * (z / (t - a)); tmp = 0.0; if (z <= -3.5e+90) tmp = t_1; elseif (z <= 1.4e+169) tmp = x + (((t - z) / (t - a)) * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+90], t$95$1, If[LessEqual[z, 1.4e+169], N[(x + N[(N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{z}{t - a}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+169}:\\
\;\;\;\;x + \frac{t - z}{t - a} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -3.4999999999999998e90 or 1.4000000000000001e169 < z Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.6%
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
frac-2neg-revN/A
lower-/.f6442.9%
Applied rewrites42.9%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.2%
Applied rewrites44.2%
if -3.4999999999999998e90 < z < 1.4000000000000001e169Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.9%
Applied rewrites84.9%
Taylor expanded in x around 0
Applied rewrites67.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- x y) (/ z (- t a)))))
(if (<= z -1e-88)
t_1
(if (<= z 2.25e+108) (+ x (* (/ t (- t a)) (- y x))) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * (z / (t - a));
double tmp;
if (z <= -1e-88) {
tmp = t_1;
} else if (z <= 2.25e+108) {
tmp = x + ((t / (t - a)) * (y - 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 = (x - y) * (z / (t - a))
if (z <= (-1d-88)) then
tmp = t_1
else if (z <= 2.25d+108) then
tmp = x + ((t / (t - a)) * (y - 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 - a));
double tmp;
if (z <= -1e-88) {
tmp = t_1;
} else if (z <= 2.25e+108) {
tmp = x + ((t / (t - a)) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - y) * (z / (t - a)) tmp = 0 if z <= -1e-88: tmp = t_1 elif z <= 2.25e+108: tmp = x + ((t / (t - a)) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) * Float64(z / Float64(t - a))) tmp = 0.0 if (z <= -1e-88) tmp = t_1; elseif (z <= 2.25e+108) tmp = Float64(x + Float64(Float64(t / Float64(t - a)) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - y) * (z / (t - a)); tmp = 0.0; if (z <= -1e-88) tmp = t_1; elseif (z <= 2.25e+108) tmp = x + ((t / (t - a)) * (y - 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[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e-88], t$95$1, If[LessEqual[z, 2.25e+108], N[(x + N[(N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{z}{t - a}\\
\mathbf{if}\;z \leq -1 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+108}:\\
\;\;\;\;x + \frac{t}{t - a} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -9.9999999999999993e-89 or 2.25e108 < z Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.6%
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
frac-2neg-revN/A
lower-/.f6442.9%
Applied rewrites42.9%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.2%
Applied rewrites44.2%
if -9.9999999999999993e-89 < z < 2.25e108Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.9%
Applied rewrites84.9%
Taylor expanded in z around 0
Applied rewrites46.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- x y) (/ z (- t a)))))
(if (<= z -1e-88)
t_1
(if (<= z 2.25e+108) (+ x (* (/ t (- t a)) y)) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * (z / (t - a));
double tmp;
if (z <= -1e-88) {
tmp = t_1;
} else if (z <= 2.25e+108) {
tmp = x + ((t / (t - a)) * y);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (x - y) * (z / (t - a))
if (z <= (-1d-88)) then
tmp = t_1
else if (z <= 2.25d+108) then
tmp = x + ((t / (t - a)) * y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * (z / (t - a));
double tmp;
if (z <= -1e-88) {
tmp = t_1;
} else if (z <= 2.25e+108) {
tmp = x + ((t / (t - a)) * y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - y) * (z / (t - a)) tmp = 0 if z <= -1e-88: tmp = t_1 elif z <= 2.25e+108: tmp = x + ((t / (t - a)) * y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) * Float64(z / Float64(t - a))) tmp = 0.0 if (z <= -1e-88) tmp = t_1; elseif (z <= 2.25e+108) tmp = Float64(x + Float64(Float64(t / Float64(t - a)) * y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - y) * (z / (t - a)); tmp = 0.0; if (z <= -1e-88) tmp = t_1; elseif (z <= 2.25e+108) tmp = x + ((t / (t - a)) * y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e-88], t$95$1, If[LessEqual[z, 2.25e+108], N[(x + N[(N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{z}{t - a}\\
\mathbf{if}\;z \leq -1 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+108}:\\
\;\;\;\;x + \frac{t}{t - a} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -9.9999999999999993e-89 or 2.25e108 < z Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.6%
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
frac-2neg-revN/A
lower-/.f6442.9%
Applied rewrites42.9%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.2%
Applied rewrites44.2%
if -9.9999999999999993e-89 < z < 2.25e108Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.9%
Applied rewrites84.9%
Taylor expanded in x around 0
Applied rewrites67.6%
Taylor expanded in z around 0
Applied rewrites45.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- t z) t) y))))
(if (<= t -3.4e+21)
t_1
(if (<= t 1.55e-12)
(+ x (* (/ z a) (- y x)))
(if (<= t 7e+118) (* (- x y) (/ z (- t a))) t_1)))))double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((t - z) / t) * y);
double tmp;
if (t <= -3.4e+21) {
tmp = t_1;
} else if (t <= 1.55e-12) {
tmp = x + ((z / a) * (y - x));
} else if (t <= 7e+118) {
tmp = (x - y) * (z / (t - 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 = x + (((t - z) / t) * y)
if (t <= (-3.4d+21)) then
tmp = t_1
else if (t <= 1.55d-12) then
tmp = x + ((z / a) * (y - x))
else if (t <= 7d+118) then
tmp = (x - y) * (z / (t - 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 = x + (((t - z) / t) * y);
double tmp;
if (t <= -3.4e+21) {
tmp = t_1;
} else if (t <= 1.55e-12) {
tmp = x + ((z / a) * (y - x));
} else if (t <= 7e+118) {
tmp = (x - y) * (z / (t - a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((t - z) / t) * y) tmp = 0 if t <= -3.4e+21: tmp = t_1 elif t <= 1.55e-12: tmp = x + ((z / a) * (y - x)) elif t <= 7e+118: tmp = (x - y) * (z / (t - a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(t - z) / t) * y)) tmp = 0.0 if (t <= -3.4e+21) tmp = t_1; elseif (t <= 1.55e-12) tmp = Float64(x + Float64(Float64(z / a) * Float64(y - x))); elseif (t <= 7e+118) tmp = Float64(Float64(x - y) * Float64(z / Float64(t - a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((t - z) / t) * y); tmp = 0.0; if (t <= -3.4e+21) tmp = t_1; elseif (t <= 1.55e-12) tmp = x + ((z / a) * (y - x)); elseif (t <= 7e+118) tmp = (x - y) * (z / (t - a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+21], t$95$1, If[LessEqual[t, 1.55e-12], N[(x + N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+118], N[(N[(x - y), $MachinePrecision] * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := x + \frac{t - z}{t} \cdot y\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-12}:\\
\;\;\;\;x + \frac{z}{a} \cdot \left(y - x\right)\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+118}:\\
\;\;\;\;\left(x - y\right) \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -3.4e21 or 7.0000000000000003e118 < t Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.9%
Applied rewrites84.9%
Taylor expanded in x around 0
Applied rewrites67.6%
Taylor expanded in a around 0
lower-/.f64N/A
lower--.f6441.5%
Applied rewrites41.5%
if -3.4e21 < t < 1.5500000000000001e-12Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around 0
lower-/.f6449.5%
Applied rewrites49.5%
if 1.5500000000000001e-12 < t < 7.0000000000000003e118Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.6%
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
frac-2neg-revN/A
lower-/.f6442.9%
Applied rewrites42.9%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.2%
Applied rewrites44.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- x y) (/ z (- t a)))))
(if (<= z -1e-88)
t_1
(if (<= z 3.5e-61)
(+ x (/ (* t y) (- t a)))
(if (<= z 1.3e+163) (+ x (* (/ z a) (- y x))) t_1)))))double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * (z / (t - a));
double tmp;
if (z <= -1e-88) {
tmp = t_1;
} else if (z <= 3.5e-61) {
tmp = x + ((t * y) / (t - a));
} else if (z <= 1.3e+163) {
tmp = x + ((z / a) * (y - 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 = (x - y) * (z / (t - a))
if (z <= (-1d-88)) then
tmp = t_1
else if (z <= 3.5d-61) then
tmp = x + ((t * y) / (t - a))
else if (z <= 1.3d+163) then
tmp = x + ((z / a) * (y - 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 - a));
double tmp;
if (z <= -1e-88) {
tmp = t_1;
} else if (z <= 3.5e-61) {
tmp = x + ((t * y) / (t - a));
} else if (z <= 1.3e+163) {
tmp = x + ((z / a) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - y) * (z / (t - a)) tmp = 0 if z <= -1e-88: tmp = t_1 elif z <= 3.5e-61: tmp = x + ((t * y) / (t - a)) elif z <= 1.3e+163: tmp = x + ((z / a) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) * Float64(z / Float64(t - a))) tmp = 0.0 if (z <= -1e-88) tmp = t_1; elseif (z <= 3.5e-61) tmp = Float64(x + Float64(Float64(t * y) / Float64(t - a))); elseif (z <= 1.3e+163) tmp = Float64(x + Float64(Float64(z / a) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - y) * (z / (t - a)); tmp = 0.0; if (z <= -1e-88) tmp = t_1; elseif (z <= 3.5e-61) tmp = x + ((t * y) / (t - a)); elseif (z <= 1.3e+163) tmp = x + ((z / a) * (y - 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[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e-88], t$95$1, If[LessEqual[z, 3.5e-61], N[(x + N[(N[(t * y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+163], N[(x + N[(N[(z / a), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{z}{t - a}\\
\mathbf{if}\;z \leq -1 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-61}:\\
\;\;\;\;x + \frac{t \cdot y}{t - a}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+163}:\\
\;\;\;\;x + \frac{z}{a} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -9.9999999999999993e-89 or 1.3000000000000001e163 < z Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.6%
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
frac-2neg-revN/A
lower-/.f6442.9%
Applied rewrites42.9%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.2%
Applied rewrites44.2%
if -9.9999999999999993e-89 < z < 3.5000000000000003e-61Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.9%
Applied rewrites84.9%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6437.3%
Applied rewrites37.3%
Taylor expanded in x around 0
Applied rewrites37.3%
if 3.5000000000000003e-61 < z < 1.3000000000000001e163Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around 0
lower-/.f6449.5%
Applied rewrites49.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- x y) (/ z (- t a)))))
(if (<= z -1e-88)
t_1
(if (<= z 4.9e+70) (+ x (/ (* t y) (- t a))) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * (z / (t - a));
double tmp;
if (z <= -1e-88) {
tmp = t_1;
} else if (z <= 4.9e+70) {
tmp = x + ((t * y) / (t - 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 = (x - y) * (z / (t - a))
if (z <= (-1d-88)) then
tmp = t_1
else if (z <= 4.9d+70) then
tmp = x + ((t * y) / (t - 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 = (x - y) * (z / (t - a));
double tmp;
if (z <= -1e-88) {
tmp = t_1;
} else if (z <= 4.9e+70) {
tmp = x + ((t * y) / (t - a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - y) * (z / (t - a)) tmp = 0 if z <= -1e-88: tmp = t_1 elif z <= 4.9e+70: tmp = x + ((t * y) / (t - a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) * Float64(z / Float64(t - a))) tmp = 0.0 if (z <= -1e-88) tmp = t_1; elseif (z <= 4.9e+70) tmp = Float64(x + Float64(Float64(t * y) / Float64(t - a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - y) * (z / (t - a)); tmp = 0.0; if (z <= -1e-88) tmp = t_1; elseif (z <= 4.9e+70) tmp = x + ((t * y) / (t - a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e-88], t$95$1, If[LessEqual[z, 4.9e+70], N[(x + N[(N[(t * y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{z}{t - a}\\
\mathbf{if}\;z \leq -1 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{+70}:\\
\;\;\;\;x + \frac{t \cdot y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -9.9999999999999993e-89 or 4.9000000000000003e70 < z Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.6%
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
frac-2neg-revN/A
lower-/.f6442.9%
Applied rewrites42.9%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.2%
Applied rewrites44.2%
if -9.9999999999999993e-89 < z < 4.9000000000000003e70Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.9%
Applied rewrites84.9%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6437.3%
Applied rewrites37.3%
Taylor expanded in x around 0
Applied rewrites37.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- x y) (/ z (- t a)))))
(if (<= z -1e-88)
t_1
(if (<= z 1.35e+76) (- x (* (* -1.0 y) 1.0)) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = (x - y) * (z / (t - a));
double tmp;
if (z <= -1e-88) {
tmp = t_1;
} else if (z <= 1.35e+76) {
tmp = x - ((-1.0 * y) * 1.0);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (x - y) * (z / (t - a))
if (z <= (-1d-88)) then
tmp = t_1
else if (z <= 1.35d+76) then
tmp = x - (((-1.0d0) * y) * 1.0d0)
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 - a));
double tmp;
if (z <= -1e-88) {
tmp = t_1;
} else if (z <= 1.35e+76) {
tmp = x - ((-1.0 * y) * 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - y) * (z / (t - a)) tmp = 0 if z <= -1e-88: tmp = t_1 elif z <= 1.35e+76: tmp = x - ((-1.0 * y) * 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - y) * Float64(z / Float64(t - a))) tmp = 0.0 if (z <= -1e-88) tmp = t_1; elseif (z <= 1.35e+76) tmp = Float64(x - Float64(Float64(-1.0 * y) * 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - y) * (z / (t - a)); tmp = 0.0; if (z <= -1e-88) tmp = t_1; elseif (z <= 1.35e+76) tmp = x - ((-1.0 * y) * 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - y), $MachinePrecision] * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e-88], t$95$1, If[LessEqual[z, 1.35e+76], N[(x - N[(N[(-1.0 * y), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(x - y\right) \cdot \frac{z}{t - a}\\
\mathbf{if}\;z \leq -1 \cdot 10^{-88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{+76}:\\
\;\;\;\;x - \left(-1 \cdot y\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -9.9999999999999993e-89 or 1.35e76 < z Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.6%
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
frac-2neg-revN/A
lower-/.f6442.9%
Applied rewrites42.9%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6444.2%
Applied rewrites44.2%
if -9.9999999999999993e-89 < z < 1.35e76Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
mult-flip-revN/A
lift--.f64N/A
div-subN/A
sub-negateN/A
div-subN/A
frac-2neg-revN/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f64N/A
Applied rewrites81.1%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around inf
Applied rewrites19.0%
Taylor expanded in x around 0
lower-*.f6433.7%
Applied rewrites33.7%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.22e+103)
(- x (* (* -1.0 y) 1.0))
(if (<= t -24000000000.0)
(* (/ (- x y) t) z)
(if (<= t 1.75e+140) (+ x (* (/ z a) y)) (- x (* (- x y) 1.0))))))double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.22e+103) {
tmp = x - ((-1.0 * y) * 1.0);
} else if (t <= -24000000000.0) {
tmp = ((x - y) / t) * z;
} else if (t <= 1.75e+140) {
tmp = x + ((z / a) * y);
} else {
tmp = x - ((x - y) * 1.0);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, 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 <= (-1.22d+103)) then
tmp = x - (((-1.0d0) * y) * 1.0d0)
else if (t <= (-24000000000.0d0)) then
tmp = ((x - y) / t) * z
else if (t <= 1.75d+140) then
tmp = x + ((z / a) * y)
else
tmp = x - ((x - y) * 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.22e+103) {
tmp = x - ((-1.0 * y) * 1.0);
} else if (t <= -24000000000.0) {
tmp = ((x - y) / t) * z;
} else if (t <= 1.75e+140) {
tmp = x + ((z / a) * y);
} else {
tmp = x - ((x - y) * 1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.22e+103: tmp = x - ((-1.0 * y) * 1.0) elif t <= -24000000000.0: tmp = ((x - y) / t) * z elif t <= 1.75e+140: tmp = x + ((z / a) * y) else: tmp = x - ((x - y) * 1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.22e+103) tmp = Float64(x - Float64(Float64(-1.0 * y) * 1.0)); elseif (t <= -24000000000.0) tmp = Float64(Float64(Float64(x - y) / t) * z); elseif (t <= 1.75e+140) tmp = Float64(x + Float64(Float64(z / a) * y)); else tmp = Float64(x - Float64(Float64(x - y) * 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.22e+103) tmp = x - ((-1.0 * y) * 1.0); elseif (t <= -24000000000.0) tmp = ((x - y) / t) * z; elseif (t <= 1.75e+140) tmp = x + ((z / a) * y); else tmp = x - ((x - y) * 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.22e+103], N[(x - N[(N[(-1.0 * y), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -24000000000.0], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 1.75e+140], N[(x + N[(N[(z / a), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x - y), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;t \leq -1.22 \cdot 10^{+103}:\\
\;\;\;\;x - \left(-1 \cdot y\right) \cdot 1\\
\mathbf{elif}\;t \leq -24000000000:\\
\;\;\;\;\frac{x - y}{t} \cdot z\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+140}:\\
\;\;\;\;x + \frac{z}{a} \cdot y\\
\mathbf{else}:\\
\;\;\;\;x - \left(x - y\right) \cdot 1\\
\end{array}
if t < -1.22e103Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
mult-flip-revN/A
lift--.f64N/A
div-subN/A
sub-negateN/A
div-subN/A
frac-2neg-revN/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f64N/A
Applied rewrites81.1%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around inf
Applied rewrites19.0%
Taylor expanded in x around 0
lower-*.f6433.7%
Applied rewrites33.7%
if -1.22e103 < t < -2.4e10Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.6%
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
frac-2neg-revN/A
lower-/.f6442.9%
Applied rewrites42.9%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6426.0%
Applied rewrites26.0%
if -2.4e10 < t < 1.7499999999999999e140Initial program 68.6%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lower-/.f64N/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6484.9%
Applied rewrites84.9%
Taylor expanded in x around 0
Applied rewrites67.6%
Taylor expanded in t around 0
lower-/.f6441.6%
Applied rewrites41.6%
if 1.7499999999999999e140 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
mult-flip-revN/A
lift--.f64N/A
div-subN/A
sub-negateN/A
div-subN/A
frac-2neg-revN/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f64N/A
Applied rewrites81.1%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around inf
Applied rewrites19.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.22e+103)
(- x (* (* -1.0 y) 1.0))
(if (<= t -24000000000.0)
(* (/ (- x y) t) z)
(if (<= t 1.75e+140) (+ x (/ (* z y) a)) (- x (* (- x y) 1.0))))))double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.22e+103) {
tmp = x - ((-1.0 * y) * 1.0);
} else if (t <= -24000000000.0) {
tmp = ((x - y) / t) * z;
} else if (t <= 1.75e+140) {
tmp = x + ((z * y) / a);
} else {
tmp = x - ((x - y) * 1.0);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, 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 <= (-1.22d+103)) then
tmp = x - (((-1.0d0) * y) * 1.0d0)
else if (t <= (-24000000000.0d0)) then
tmp = ((x - y) / t) * z
else if (t <= 1.75d+140) then
tmp = x + ((z * y) / a)
else
tmp = x - ((x - y) * 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.22e+103) {
tmp = x - ((-1.0 * y) * 1.0);
} else if (t <= -24000000000.0) {
tmp = ((x - y) / t) * z;
} else if (t <= 1.75e+140) {
tmp = x + ((z * y) / a);
} else {
tmp = x - ((x - y) * 1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.22e+103: tmp = x - ((-1.0 * y) * 1.0) elif t <= -24000000000.0: tmp = ((x - y) / t) * z elif t <= 1.75e+140: tmp = x + ((z * y) / a) else: tmp = x - ((x - y) * 1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.22e+103) tmp = Float64(x - Float64(Float64(-1.0 * y) * 1.0)); elseif (t <= -24000000000.0) tmp = Float64(Float64(Float64(x - y) / t) * z); elseif (t <= 1.75e+140) tmp = Float64(x + Float64(Float64(z * y) / a)); else tmp = Float64(x - Float64(Float64(x - y) * 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.22e+103) tmp = x - ((-1.0 * y) * 1.0); elseif (t <= -24000000000.0) tmp = ((x - y) / t) * z; elseif (t <= 1.75e+140) tmp = x + ((z * y) / a); else tmp = x - ((x - y) * 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.22e+103], N[(x - N[(N[(-1.0 * y), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -24000000000.0], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t, 1.75e+140], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(x - y), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;t \leq -1.22 \cdot 10^{+103}:\\
\;\;\;\;x - \left(-1 \cdot y\right) \cdot 1\\
\mathbf{elif}\;t \leq -24000000000:\\
\;\;\;\;\frac{x - y}{t} \cdot z\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+140}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \left(x - y\right) \cdot 1\\
\end{array}
if t < -1.22e103Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
mult-flip-revN/A
lift--.f64N/A
div-subN/A
sub-negateN/A
div-subN/A
frac-2neg-revN/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f64N/A
Applied rewrites81.1%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around inf
Applied rewrites19.0%
Taylor expanded in x around 0
lower-*.f6433.7%
Applied rewrites33.7%
if -1.22e103 < t < -2.4e10Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.6%
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
frac-2neg-revN/A
lower-/.f6442.9%
Applied rewrites42.9%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6426.0%
Applied rewrites26.0%
if -2.4e10 < t < 1.7499999999999999e140Initial program 68.6%
Taylor expanded in t around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6444.9%
Applied rewrites44.9%
Taylor expanded in x around 0
Applied rewrites38.7%
if 1.7499999999999999e140 < t Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
mult-flip-revN/A
lift--.f64N/A
div-subN/A
sub-negateN/A
div-subN/A
frac-2neg-revN/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f64N/A
Applied rewrites81.1%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around inf
Applied rewrites19.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.5e+90) (* (/ (- x y) t) z) (if (<= z 2.25e+108) (- x (* (* -1.0 y) 1.0)) (* z (/ (- y x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+90) {
tmp = ((x - y) / t) * z;
} else if (z <= 2.25e+108) {
tmp = x - ((-1.0 * y) * 1.0);
} else {
tmp = z * ((y - x) / a);
}
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 (z <= (-3.5d+90)) then
tmp = ((x - y) / t) * z
else if (z <= 2.25d+108) then
tmp = x - (((-1.0d0) * y) * 1.0d0)
else
tmp = z * ((y - x) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+90) {
tmp = ((x - y) / t) * z;
} else if (z <= 2.25e+108) {
tmp = x - ((-1.0 * y) * 1.0);
} else {
tmp = z * ((y - x) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e+90: tmp = ((x - y) / t) * z elif z <= 2.25e+108: tmp = x - ((-1.0 * y) * 1.0) else: tmp = z * ((y - x) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e+90) tmp = Float64(Float64(Float64(x - y) / t) * z); elseif (z <= 2.25e+108) tmp = Float64(x - Float64(Float64(-1.0 * y) * 1.0)); else tmp = Float64(z * Float64(Float64(y - x) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.5e+90) tmp = ((x - y) / t) * z; elseif (z <= 2.25e+108) tmp = x - ((-1.0 * y) * 1.0); else tmp = z * ((y - x) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e+90], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 2.25e+108], N[(x - N[(N[(-1.0 * y), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+90}:\\
\;\;\;\;\frac{x - y}{t} \cdot z\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+108}:\\
\;\;\;\;x - \left(-1 \cdot y\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\end{array}
if z < -3.4999999999999998e90Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.6%
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
frac-2neg-revN/A
lower-/.f6442.9%
Applied rewrites42.9%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f6426.0%
Applied rewrites26.0%
if -3.4999999999999998e90 < z < 2.25e108Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
mult-flip-revN/A
lift--.f64N/A
div-subN/A
sub-negateN/A
div-subN/A
frac-2neg-revN/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f64N/A
Applied rewrites81.1%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around inf
Applied rewrites19.0%
Taylor expanded in x around 0
lower-*.f6433.7%
Applied rewrites33.7%
if 2.25e108 < z Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6426.3%
Applied rewrites26.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.5e+90) (* (/ x (- t a)) z) (if (<= z 2.25e+108) (- x (* (* -1.0 y) 1.0)) (* z (/ (- y x) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+90) {
tmp = (x / (t - a)) * z;
} else if (z <= 2.25e+108) {
tmp = x - ((-1.0 * y) * 1.0);
} else {
tmp = z * ((y - x) / a);
}
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 (z <= (-3.5d+90)) then
tmp = (x / (t - a)) * z
else if (z <= 2.25d+108) then
tmp = x - (((-1.0d0) * y) * 1.0d0)
else
tmp = z * ((y - x) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+90) {
tmp = (x / (t - a)) * z;
} else if (z <= 2.25e+108) {
tmp = x - ((-1.0 * y) * 1.0);
} else {
tmp = z * ((y - x) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e+90: tmp = (x / (t - a)) * z elif z <= 2.25e+108: tmp = x - ((-1.0 * y) * 1.0) else: tmp = z * ((y - x) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e+90) tmp = Float64(Float64(x / Float64(t - a)) * z); elseif (z <= 2.25e+108) tmp = Float64(x - Float64(Float64(-1.0 * y) * 1.0)); else tmp = Float64(z * Float64(Float64(y - x) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.5e+90) tmp = (x / (t - a)) * z; elseif (z <= 2.25e+108) tmp = x - ((-1.0 * y) * 1.0); else tmp = z * ((y - x) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e+90], N[(N[(x / N[(t - a), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 2.25e+108], N[(x - N[(N[(-1.0 * y), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+90}:\\
\;\;\;\;\frac{x}{t - a} \cdot z\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+108}:\\
\;\;\;\;x - \left(-1 \cdot y\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\end{array}
if z < -3.4999999999999998e90Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.6%
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
frac-2neg-revN/A
lower-/.f6442.9%
Applied rewrites42.9%
Taylor expanded in x around inf
lower-/.f64N/A
lower--.f6423.6%
Applied rewrites23.6%
if -3.4999999999999998e90 < z < 2.25e108Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
mult-flip-revN/A
lift--.f64N/A
div-subN/A
sub-negateN/A
div-subN/A
frac-2neg-revN/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f64N/A
Applied rewrites81.1%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around inf
Applied rewrites19.0%
Taylor expanded in x around 0
lower-*.f6433.7%
Applied rewrites33.7%
if 2.25e108 < z Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6426.3%
Applied rewrites26.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ (- y x) a))))
(if (<= z -3.5e+90)
t_1
(if (<= z 2.25e+108) (- x (* (* -1.0 y) 1.0)) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = z * ((y - x) / a);
double tmp;
if (z <= -3.5e+90) {
tmp = t_1;
} else if (z <= 2.25e+108) {
tmp = x - ((-1.0 * y) * 1.0);
} 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 * ((y - x) / a)
if (z <= (-3.5d+90)) then
tmp = t_1
else if (z <= 2.25d+108) then
tmp = x - (((-1.0d0) * y) * 1.0d0)
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 * ((y - x) / a);
double tmp;
if (z <= -3.5e+90) {
tmp = t_1;
} else if (z <= 2.25e+108) {
tmp = x - ((-1.0 * y) * 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * ((y - x) / a) tmp = 0 if z <= -3.5e+90: tmp = t_1 elif z <= 2.25e+108: tmp = x - ((-1.0 * y) * 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(Float64(y - x) / a)) tmp = 0.0 if (z <= -3.5e+90) tmp = t_1; elseif (z <= 2.25e+108) tmp = Float64(x - Float64(Float64(-1.0 * y) * 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * ((y - x) / a); tmp = 0.0; if (z <= -3.5e+90) tmp = t_1; elseif (z <= 2.25e+108) tmp = x - ((-1.0 * y) * 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+90], t$95$1, If[LessEqual[z, 2.25e+108], N[(x - N[(N[(-1.0 * y), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := z \cdot \frac{y - x}{a}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+108}:\\
\;\;\;\;x - \left(-1 \cdot y\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -3.4999999999999998e90 or 2.25e108 < z Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6426.3%
Applied rewrites26.3%
if -3.4999999999999998e90 < z < 2.25e108Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
mult-flip-revN/A
lift--.f64N/A
div-subN/A
sub-negateN/A
div-subN/A
frac-2neg-revN/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f64N/A
Applied rewrites81.1%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around inf
Applied rewrites19.0%
Taylor expanded in x around 0
lower-*.f6433.7%
Applied rewrites33.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.5e+90) (* (/ z t) x) (if (<= z 1.4e+169) (- x (* (* -1.0 y) 1.0)) (/ (* x z) (- t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+90) {
tmp = (z / t) * x;
} else if (z <= 1.4e+169) {
tmp = x - ((-1.0 * y) * 1.0);
} else {
tmp = (x * z) / (t - a);
}
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 (z <= (-3.5d+90)) then
tmp = (z / t) * x
else if (z <= 1.4d+169) then
tmp = x - (((-1.0d0) * y) * 1.0d0)
else
tmp = (x * z) / (t - a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+90) {
tmp = (z / t) * x;
} else if (z <= 1.4e+169) {
tmp = x - ((-1.0 * y) * 1.0);
} else {
tmp = (x * z) / (t - a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e+90: tmp = (z / t) * x elif z <= 1.4e+169: tmp = x - ((-1.0 * y) * 1.0) else: tmp = (x * z) / (t - a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e+90) tmp = Float64(Float64(z / t) * x); elseif (z <= 1.4e+169) tmp = Float64(x - Float64(Float64(-1.0 * y) * 1.0)); else tmp = Float64(Float64(x * z) / Float64(t - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.5e+90) tmp = (z / t) * x; elseif (z <= 1.4e+169) tmp = x - ((-1.0 * y) * 1.0); else tmp = (x * z) / (t - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e+90], N[(N[(z / t), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 1.4e+169], N[(x - N[(N[(-1.0 * y), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+90}:\\
\;\;\;\;\frac{z}{t} \cdot x\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+169}:\\
\;\;\;\;x - \left(-1 \cdot y\right) \cdot 1\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot z}{t - a}\\
\end{array}
if z < -3.4999999999999998e90Initial program 68.6%
Taylor expanded in x around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f6447.6%
Applied rewrites47.6%
Taylor expanded in a around 0
lower-/.f64N/A
lower-*.f6417.1%
Applied rewrites17.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6419.1%
Applied rewrites19.1%
if -3.4999999999999998e90 < z < 1.4000000000000001e169Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
mult-flip-revN/A
lift--.f64N/A
div-subN/A
sub-negateN/A
div-subN/A
frac-2neg-revN/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f64N/A
Applied rewrites81.1%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around inf
Applied rewrites19.0%
Taylor expanded in x around 0
lower-*.f6433.7%
Applied rewrites33.7%
if 1.4000000000000001e169 < z Initial program 68.6%
Taylor expanded in z around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6442.6%
Applied rewrites42.6%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6442.6%
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
sub-negate-revN/A
lift--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
frac-2neg-revN/A
lower-/.f6442.9%
Applied rewrites42.9%
Taylor expanded in x around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f6421.9%
Applied rewrites21.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.5e+90) (* (/ z t) x) (- x (* (* -1.0 y) 1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+90) {
tmp = (z / t) * x;
} else {
tmp = x - ((-1.0 * y) * 1.0);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, 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 (z <= (-3.5d+90)) then
tmp = (z / t) * x
else
tmp = x - (((-1.0d0) * y) * 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+90) {
tmp = (z / t) * x;
} else {
tmp = x - ((-1.0 * y) * 1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e+90: tmp = (z / t) * x else: tmp = x - ((-1.0 * y) * 1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e+90) tmp = Float64(Float64(z / t) * x); else tmp = Float64(x - Float64(Float64(-1.0 * y) * 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.5e+90) tmp = (z / t) * x; else tmp = x - ((-1.0 * y) * 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e+90], N[(N[(z / t), $MachinePrecision] * x), $MachinePrecision], N[(x - N[(N[(-1.0 * y), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+90}:\\
\;\;\;\;\frac{z}{t} \cdot x\\
\mathbf{else}:\\
\;\;\;\;x - \left(-1 \cdot y\right) \cdot 1\\
\end{array}
if z < -3.4999999999999998e90Initial program 68.6%
Taylor expanded in x around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f6447.6%
Applied rewrites47.6%
Taylor expanded in a around 0
lower-/.f64N/A
lower-*.f6417.1%
Applied rewrites17.1%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6419.1%
Applied rewrites19.1%
if -3.4999999999999998e90 < z Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
mult-flip-revN/A
lift--.f64N/A
div-subN/A
sub-negateN/A
div-subN/A
frac-2neg-revN/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f64N/A
Applied rewrites81.1%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around inf
Applied rewrites19.0%
Taylor expanded in x around 0
lower-*.f6433.7%
Applied rewrites33.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.5e+90) (* z (/ x t)) (- x (* (* -1.0 y) 1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+90) {
tmp = z * (x / t);
} else {
tmp = x - ((-1.0 * y) * 1.0);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, 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 (z <= (-3.5d+90)) then
tmp = z * (x / t)
else
tmp = x - (((-1.0d0) * y) * 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.5e+90) {
tmp = z * (x / t);
} else {
tmp = x - ((-1.0 * y) * 1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.5e+90: tmp = z * (x / t) else: tmp = x - ((-1.0 * y) * 1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.5e+90) tmp = Float64(z * Float64(x / t)); else tmp = Float64(x - Float64(Float64(-1.0 * y) * 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.5e+90) tmp = z * (x / t); else tmp = x - ((-1.0 * y) * 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e+90], N[(z * N[(x / t), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(-1.0 * y), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+90}:\\
\;\;\;\;z \cdot \frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;x - \left(-1 \cdot y\right) \cdot 1\\
\end{array}
if z < -3.4999999999999998e90Initial program 68.6%
Taylor expanded in x around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f6447.6%
Applied rewrites47.6%
Taylor expanded in a around 0
lower-/.f64N/A
lower-*.f6417.1%
Applied rewrites17.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6418.1%
Applied rewrites18.1%
if -3.4999999999999998e90 < z Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
mult-flip-revN/A
lift--.f64N/A
div-subN/A
sub-negateN/A
div-subN/A
frac-2neg-revN/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f64N/A
Applied rewrites81.1%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around inf
Applied rewrites19.0%
Taylor expanded in x around 0
lower-*.f6433.7%
Applied rewrites33.7%
(FPCore (x y z t a) :precision binary64 (- x (* (* -1.0 y) 1.0)))
double code(double x, double y, double z, double t, double a) {
return x - ((-1.0 * y) * 1.0);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, 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 - (((-1.0d0) * y) * 1.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((-1.0 * y) * 1.0);
}
def code(x, y, z, t, a): return x - ((-1.0 * y) * 1.0)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(-1.0 * y) * 1.0)) end
function tmp = code(x, y, z, t, a) tmp = x - ((-1.0 * y) * 1.0); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(-1.0 * y), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]
x - \left(-1 \cdot y\right) \cdot 1
Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
mult-flip-revN/A
lift--.f64N/A
div-subN/A
sub-negateN/A
div-subN/A
frac-2neg-revN/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f64N/A
Applied rewrites81.1%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around inf
Applied rewrites19.0%
Taylor expanded in x around 0
lower-*.f6433.7%
Applied rewrites33.7%
(FPCore (x y z t a) :precision binary64 (- x (* (- x y) 1.0)))
double code(double x, double y, double z, double t, double a) {
return x - ((x - y) * 1.0);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, 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 - ((x - y) * 1.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((x - y) * 1.0);
}
def code(x, y, z, t, a): return x - ((x - y) * 1.0)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(x - y) * 1.0)) end
function tmp = code(x, y, z, t, a) tmp = x - ((x - y) * 1.0); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(x - y), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]
x - \left(x - y\right) \cdot 1
Initial program 68.6%
lift-+.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
fp-cancel-sign-sub-invN/A
lower--.f64N/A
mult-flip-revN/A
lift--.f64N/A
div-subN/A
sub-negateN/A
div-subN/A
frac-2neg-revN/A
sub-negate-revN/A
lift--.f64N/A
lower-*.f64N/A
Applied rewrites81.1%
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-/.f6484.9%
Applied rewrites84.9%
Taylor expanded in t around inf
Applied rewrites19.0%
(FPCore (x y z t a) :precision binary64 (* x (+ 1.0 -1.0)))
double code(double x, double y, double z, double t, double a) {
return x * (1.0 + -1.0);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, 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 * (1.0d0 + (-1.0d0))
end function
public static double code(double x, double y, double z, double t, double a) {
return x * (1.0 + -1.0);
}
def code(x, y, z, t, a): return x * (1.0 + -1.0)
function code(x, y, z, t, a) return Float64(x * Float64(1.0 + -1.0)) end
function tmp = code(x, y, z, t, a) tmp = x * (1.0 + -1.0); end
code[x_, y_, z_, t_, a_] := N[(x * N[(1.0 + -1.0), $MachinePrecision]), $MachinePrecision]
x \cdot \left(1 + -1\right)
Initial program 68.6%
Taylor expanded in x around -inf
lower-*.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f6447.6%
Applied rewrites47.6%
Taylor expanded in a around 0
lower-/.f64N/A
lower-*.f6417.1%
Applied rewrites17.1%
Taylor expanded in z around 0
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower--.f6425.4%
Applied rewrites25.4%
Taylor expanded in t around inf
Applied rewrites2.8%
herbie shell --seed 2025258
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
(+ x (/ (* (- y x) (- z t)) (- a t))))