
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y z) (- t x)) (- a z))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - z) * (t - x)) / (a - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - z) * (t - x)) / (a - z));
}
def code(x, y, z, t, a): return x + (((y - z) * (t - x)) / (a - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - z) * (t - x)) / (a - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (/ (- z y) (- a z)) (- t x))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 -4e-303)
t_1
(if (<= t_2 0.0)
(+ t (* -1.0 (/ (- (* y (- t x)) (* a (- t x))) z)))
t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((z - y) / (a - z)) * (t - x));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -4e-303) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t + (-1.0 * (((y * (t - x)) - (a * (t - x))) / z));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, 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 - (((z - y) / (a - z)) * (t - x))
t_2 = x + (((y - z) * (t - x)) / (a - z))
if (t_2 <= (-4d-303)) then
tmp = t_1
else if (t_2 <= 0.0d0) then
tmp = t + ((-1.0d0) * (((y * (t - x)) - (a * (t - x))) / z))
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 - (((z - y) / (a - z)) * (t - x));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -4e-303) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t + (-1.0 * (((y * (t - x)) - (a * (t - x))) / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (((z - y) / (a - z)) * (t - x)) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -4e-303: tmp = t_1 elif t_2 <= 0.0: tmp = t + (-1.0 * (((y * (t - x)) - (a * (t - x))) / z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(z - y) / Float64(a - z)) * Float64(t - x))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= -4e-303) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(t + Float64(-1.0 * Float64(Float64(Float64(y * Float64(t - x)) - Float64(a * Float64(t - x))) / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (((z - y) / (a - z)) * (t - x)); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -4e-303) tmp = t_1; elseif (t_2 <= 0.0) tmp = t + (-1.0 * (((y * (t - x)) - (a * (t - x))) / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -4e-303], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t + N[(-1.0 * N[(N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := x - \frac{z - y}{a - z} \cdot \left(t - x\right)\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{-303}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -3.9999999999999997e-303 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 68.3%
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 rewrites84.1%
if -3.9999999999999997e-303 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0Initial program 68.3%
Taylor expanded in z around -inf
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6446.9%
Applied rewrites46.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.7e+176) (* t 1.0) (- x (* (/ (- z y) (- a z)) (- t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.7e+176) {
tmp = t * 1.0;
} else {
tmp = x - (((z - y) / (a - z)) * (t - x));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4.7d+176)) then
tmp = t * 1.0d0
else
tmp = x - (((z - y) / (a - z)) * (t - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.7e+176) {
tmp = t * 1.0;
} else {
tmp = x - (((z - y) / (a - z)) * (t - x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.7e+176: tmp = t * 1.0 else: tmp = x - (((z - y) / (a - z)) * (t - x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.7e+176) tmp = Float64(t * 1.0); else tmp = Float64(x - Float64(Float64(Float64(z - y) / Float64(a - z)) * Float64(t - x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.7e+176) tmp = t * 1.0; else tmp = x - (((z - y) / (a - z)) * (t - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.7e+176], N[(t * 1.0), $MachinePrecision], N[(x - N[(N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+176}:\\
\;\;\;\;t \cdot 1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z - y}{a - z} \cdot \left(t - x\right)\\
\end{array}
if z < -4.6999999999999998e176Initial program 68.3%
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 rewrites84.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.7%
Applied rewrites51.7%
Taylor expanded in z around inf
Applied rewrites25.6%
if -4.6999999999999998e176 < z Initial program 68.3%
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 rewrites84.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- x t) (- z a)) (- y z))))
(t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
(if (<= t_2 (- INFINITY)) t_1 (if (<= t_2 5e+275) t_2 t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((x - t) / (z - a)) * (y - z));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= 5e+275) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((x - t) / (z - a)) * (y - z));
double t_2 = x + (((y - z) * (t - x)) / (a - z));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= 5e+275) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((x - t) / (z - a)) * (y - z)) t_2 = x + (((y - z) * (t - x)) / (a - z)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= 5e+275: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(x - t) / Float64(z - a)) * Float64(y - z))) t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= 5e+275) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((x - t) / (z - a)) * (y - z)); t_2 = x + (((y - z) * (t - x)) / (a - z)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= 5e+275) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 5e+275], t$95$2, t$95$1]]]]
\begin{array}{l}
t_1 := x + \frac{x - t}{z - a} \cdot \left(y - z\right)\\
t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+275}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 5.0000000000000003e275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) Initial program 68.3%
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--.f6479.6%
Applied rewrites79.6%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000003e275Initial program 68.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -4e+176) (* t 1.0) (+ x (* (/ (- x t) (- z a)) (- y z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+176) {
tmp = t * 1.0;
} else {
tmp = x + (((x - t) / (z - a)) * (y - z));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, 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 <= (-4d+176)) then
tmp = t * 1.0d0
else
tmp = x + (((x - t) / (z - a)) * (y - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+176) {
tmp = t * 1.0;
} else {
tmp = x + (((x - t) / (z - a)) * (y - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4e+176: tmp = t * 1.0 else: tmp = x + (((x - t) / (z - a)) * (y - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+176) tmp = Float64(t * 1.0); else tmp = Float64(x + Float64(Float64(Float64(x - t) / Float64(z - a)) * Float64(y - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4e+176) tmp = t * 1.0; else tmp = x + (((x - t) / (z - a)) * (y - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+176], N[(t * 1.0), $MachinePrecision], N[(x + N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+176}:\\
\;\;\;\;t \cdot 1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{x - t}{z - a} \cdot \left(y - z\right)\\
\end{array}
if z < -4e176Initial program 68.3%
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 rewrites84.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.7%
Applied rewrites51.7%
Taylor expanded in z around inf
Applied rewrites25.6%
if -4e176 < z Initial program 68.3%
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--.f6479.6%
Applied rewrites79.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ (- y z) (- a z))))))
(if (<= z -1.16e+197)
(* t 1.0)
(if (<= z -3.2e-31)
t_1
(if (<= z 1.66e-212) (- x (* (/ (- z y) a) (- t x))) t_1)))))double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * ((y - z) / (a - z)));
double tmp;
if (z <= -1.16e+197) {
tmp = t * 1.0;
} else if (z <= -3.2e-31) {
tmp = t_1;
} else if (z <= 1.66e-212) {
tmp = x - (((z - y) / a) * (t - x));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (t * ((y - z) / (a - z)))
if (z <= (-1.16d+197)) then
tmp = t * 1.0d0
else if (z <= (-3.2d-31)) then
tmp = t_1
else if (z <= 1.66d-212) then
tmp = x - (((z - y) / a) * (t - x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * ((y - z) / (a - z)));
double tmp;
if (z <= -1.16e+197) {
tmp = t * 1.0;
} else if (z <= -3.2e-31) {
tmp = t_1;
} else if (z <= 1.66e-212) {
tmp = x - (((z - y) / a) * (t - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * ((y - z) / (a - z))) tmp = 0 if z <= -1.16e+197: tmp = t * 1.0 elif z <= -3.2e-31: tmp = t_1 elif z <= 1.66e-212: tmp = x - (((z - y) / a) * (t - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))) tmp = 0.0 if (z <= -1.16e+197) tmp = Float64(t * 1.0); elseif (z <= -3.2e-31) tmp = t_1; elseif (z <= 1.66e-212) tmp = Float64(x - Float64(Float64(Float64(z - y) / a) * Float64(t - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * ((y - z) / (a - z))); tmp = 0.0; if (z <= -1.16e+197) tmp = t * 1.0; elseif (z <= -3.2e-31) tmp = t_1; elseif (z <= 1.66e-212) tmp = x - (((z - y) / a) * (t - x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e+197], N[(t * 1.0), $MachinePrecision], If[LessEqual[z, -3.2e-31], t$95$1, If[LessEqual[z, 1.66e-212], N[(x - N[(N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := x + t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.16 \cdot 10^{+197}:\\
\;\;\;\;t \cdot 1\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.66 \cdot 10^{-212}:\\
\;\;\;\;x - \frac{z - y}{a} \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -1.16e197Initial program 68.3%
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 rewrites84.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.7%
Applied rewrites51.7%
Taylor expanded in z around inf
Applied rewrites25.6%
if -1.16e197 < z < -3.2000000000000002e-31 or 1.66e-212 < z Initial program 68.3%
Taylor expanded in x around 0
Applied rewrites56.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
frac-2negN/A
mul-1-negN/A
distribute-neg-frac2N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
distribute-neg-frac2N/A
mul-1-negN/A
frac-2negN/A
lift-/.f6467.4%
Applied rewrites67.4%
if -3.2000000000000002e-31 < z < 1.66e-212Initial program 68.3%
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 rewrites84.1%
Taylor expanded in z around 0
Applied rewrites52.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ (- y z) (- a z))))))
(if (<= z -1.16e+197)
(* t 1.0)
(if (<= z -6.2e-120)
t_1
(if (<= z 7.4e-219) (+ x (/ (* y (- t x)) (- a z))) t_1)))))double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * ((y - z) / (a - z)));
double tmp;
if (z <= -1.16e+197) {
tmp = t * 1.0;
} else if (z <= -6.2e-120) {
tmp = t_1;
} else if (z <= 7.4e-219) {
tmp = x + ((y * (t - x)) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, 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 * ((y - z) / (a - z)))
if (z <= (-1.16d+197)) then
tmp = t * 1.0d0
else if (z <= (-6.2d-120)) then
tmp = t_1
else if (z <= 7.4d-219) then
tmp = x + ((y * (t - x)) / (a - z))
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 * ((y - z) / (a - z)));
double tmp;
if (z <= -1.16e+197) {
tmp = t * 1.0;
} else if (z <= -6.2e-120) {
tmp = t_1;
} else if (z <= 7.4e-219) {
tmp = x + ((y * (t - x)) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * ((y - z) / (a - z))) tmp = 0 if z <= -1.16e+197: tmp = t * 1.0 elif z <= -6.2e-120: tmp = t_1 elif z <= 7.4e-219: tmp = x + ((y * (t - x)) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))) tmp = 0.0 if (z <= -1.16e+197) tmp = Float64(t * 1.0); elseif (z <= -6.2e-120) tmp = t_1; elseif (z <= 7.4e-219) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * ((y - z) / (a - z))); tmp = 0.0; if (z <= -1.16e+197) tmp = t * 1.0; elseif (z <= -6.2e-120) tmp = t_1; elseif (z <= 7.4e-219) tmp = x + ((y * (t - x)) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e+197], N[(t * 1.0), $MachinePrecision], If[LessEqual[z, -6.2e-120], t$95$1, If[LessEqual[z, 7.4e-219], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := x + t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.16 \cdot 10^{+197}:\\
\;\;\;\;t \cdot 1\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-120}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{-219}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -1.16e197Initial program 68.3%
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 rewrites84.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.7%
Applied rewrites51.7%
Taylor expanded in z around inf
Applied rewrites25.6%
if -1.16e197 < z < -6.2000000000000004e-120 or 7.4e-219 < z Initial program 68.3%
Taylor expanded in x around 0
Applied rewrites56.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
frac-2negN/A
mul-1-negN/A
distribute-neg-frac2N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
distribute-neg-frac2N/A
mul-1-negN/A
frac-2negN/A
lift-/.f6467.4%
Applied rewrites67.4%
if -6.2000000000000004e-120 < z < 7.4e-219Initial program 68.3%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f6454.8%
Applied rewrites54.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- t x) (/ y (- a z)))))
(if (<= y -5.2e-11)
t_1
(if (<= y 4.6e+175) (+ x (* t (/ (- y z) (- a z)))) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) * (y / (a - z));
double tmp;
if (y <= -5.2e-11) {
tmp = t_1;
} else if (y <= 4.6e+175) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (t - x) * (y / (a - z))
if (y <= (-5.2d-11)) then
tmp = t_1
else if (y <= 4.6d+175) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) * (y / (a - z));
double tmp;
if (y <= -5.2e-11) {
tmp = t_1;
} else if (y <= 4.6e+175) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) * (y / (a - z)) tmp = 0 if y <= -5.2e-11: tmp = t_1 elif y <= 4.6e+175: tmp = x + (t * ((y - z) / (a - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) * Float64(y / Float64(a - z))) tmp = 0.0 if (y <= -5.2e-11) tmp = t_1; elseif (y <= 4.6e+175) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t - x) * (y / (a - z)); tmp = 0.0; if (y <= -5.2e-11) tmp = t_1; elseif (y <= 4.6e+175) tmp = x + (t * ((y - z) / (a - z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.2e-11], t$95$1, If[LessEqual[y, 4.6e+175], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+175}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -5.2000000000000001e-11 or 4.5999999999999999e175 < y Initial program 68.3%
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 rewrites84.1%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6437.4%
Applied rewrites37.4%
lift--.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6443.3%
Applied rewrites43.3%
if -5.2000000000000001e-11 < y < 4.5999999999999999e175Initial program 68.3%
Taylor expanded in x around 0
Applied rewrites56.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
frac-2negN/A
mul-1-negN/A
distribute-neg-frac2N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
distribute-neg-frac2N/A
mul-1-negN/A
frac-2negN/A
lift-/.f6467.4%
Applied rewrites67.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (* (- z y) (/ t (- a z))))))
(if (<= z -9.2e+169)
(* t 1.0)
(if (<= z -3.5e-14)
t_1
(if (<= z 7.4e-219)
(+ x (/ (* y (- t x)) a))
(if (<= z 7e-104) (+ x (* t (/ (- y z) a))) t_1))))))double code(double x, double y, double z, double t, double a) {
double t_1 = -((z - y) * (t / (a - z)));
double tmp;
if (z <= -9.2e+169) {
tmp = t * 1.0;
} else if (z <= -3.5e-14) {
tmp = t_1;
} else if (z <= 7.4e-219) {
tmp = x + ((y * (t - x)) / a);
} else if (z <= 7e-104) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -((z - y) * (t / (a - z)))
if (z <= (-9.2d+169)) then
tmp = t * 1.0d0
else if (z <= (-3.5d-14)) then
tmp = t_1
else if (z <= 7.4d-219) then
tmp = x + ((y * (t - x)) / a)
else if (z <= 7d-104) then
tmp = x + (t * ((y - z) / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -((z - y) * (t / (a - z)));
double tmp;
if (z <= -9.2e+169) {
tmp = t * 1.0;
} else if (z <= -3.5e-14) {
tmp = t_1;
} else if (z <= 7.4e-219) {
tmp = x + ((y * (t - x)) / a);
} else if (z <= 7e-104) {
tmp = x + (t * ((y - z) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -((z - y) * (t / (a - z))) tmp = 0 if z <= -9.2e+169: tmp = t * 1.0 elif z <= -3.5e-14: tmp = t_1 elif z <= 7.4e-219: tmp = x + ((y * (t - x)) / a) elif z <= 7e-104: tmp = x + (t * ((y - z) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-Float64(Float64(z - y) * Float64(t / Float64(a - z)))) tmp = 0.0 if (z <= -9.2e+169) tmp = Float64(t * 1.0); elseif (z <= -3.5e-14) tmp = t_1; elseif (z <= 7.4e-219) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); elseif (z <= 7e-104) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -((z - y) * (t / (a - z))); tmp = 0.0; if (z <= -9.2e+169) tmp = t * 1.0; elseif (z <= -3.5e-14) tmp = t_1; elseif (z <= 7.4e-219) tmp = x + ((y * (t - x)) / a); elseif (z <= 7e-104) tmp = x + (t * ((y - z) / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = (-N[(N[(z - y), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])}, If[LessEqual[z, -9.2e+169], N[(t * 1.0), $MachinePrecision], If[LessEqual[z, -3.5e-14], t$95$1, If[LessEqual[z, 7.4e-219], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-104], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := -\left(z - y\right) \cdot \frac{t}{a - z}\\
\mathbf{if}\;z \leq -9.2 \cdot 10^{+169}:\\
\;\;\;\;t \cdot 1\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{-219}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-104}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if z < -9.1999999999999997e169Initial program 68.3%
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 rewrites84.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.7%
Applied rewrites51.7%
Taylor expanded in z around inf
Applied rewrites25.6%
if -9.1999999999999997e169 < z < -3.5000000000000002e-14 or 7.0000000000000006e-104 < z Initial program 68.3%
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 rewrites84.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.7%
Applied rewrites51.7%
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
associate-*r/N/A
sub-negate-revN/A
lift--.f64N/A
distribute-rgt-neg-inN/A
lift-*.f64N/A
distribute-neg-fracN/A
lift-/.f64N/A
lower-neg.f6439.9%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lift-/.f64N/A
lower-*.f6445.6%
Applied rewrites45.6%
if -3.5000000000000002e-14 < z < 7.4e-219Initial program 68.3%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6443.9%
Applied rewrites43.9%
if 7.4e-219 < z < 7.0000000000000006e-104Initial program 68.3%
Taylor expanded in x around 0
Applied rewrites56.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
frac-2negN/A
mul-1-negN/A
distribute-neg-frac2N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
distribute-neg-frac2N/A
mul-1-negN/A
frac-2negN/A
lift-/.f6467.4%
Applied rewrites67.4%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6445.4%
Applied rewrites45.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (- t x) (/ y (- a z))))) (if (<= y -3.1e-61) t_1 (if (<= y 2.8e+23) (+ t x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) * (y / (a - z));
double tmp;
if (y <= -3.1e-61) {
tmp = t_1;
} else if (y <= 2.8e+23) {
tmp = t + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (t - x) * (y / (a - z))
if (y <= (-3.1d-61)) then
tmp = t_1
else if (y <= 2.8d+23) then
tmp = t + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) * (y / (a - z));
double tmp;
if (y <= -3.1e-61) {
tmp = t_1;
} else if (y <= 2.8e+23) {
tmp = t + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (t - x) * (y / (a - z)) tmp = 0 if y <= -3.1e-61: tmp = t_1 elif y <= 2.8e+23: tmp = t + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) * Float64(y / Float64(a - z))) tmp = 0.0 if (y <= -3.1e-61) tmp = t_1; elseif (y <= 2.8e+23) tmp = Float64(t + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (t - x) * (y / (a - z)); tmp = 0.0; if (y <= -3.1e-61) tmp = t_1; elseif (y <= 2.8e+23) tmp = t + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.1e-61], t$95$1, If[LessEqual[y, 2.8e+23], N[(t + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \left(t - x\right) \cdot \frac{y}{a - z}\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{-61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+23}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -3.0999999999999999e-61 or 2.8000000000000002e23 < y Initial program 68.3%
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 rewrites84.1%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6437.4%
Applied rewrites37.4%
lift--.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6443.3%
Applied rewrites43.3%
if -3.0999999999999999e-61 < y < 2.8000000000000002e23Initial program 68.3%
Taylor expanded in z around inf
lower--.f6419.7%
Applied rewrites19.7%
Taylor expanded in x around inf
lower-*.f642.8%
Applied rewrites2.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f642.8%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f642.8%
Applied rewrites2.8%
Taylor expanded in x around 0
Applied rewrites34.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ (- x t) (- z a)) y))) (if (<= y -4e-54) t_1 (if (<= y 2.8e+23) (+ t x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - t) / (z - a)) * y;
double tmp;
if (y <= -4e-54) {
tmp = t_1;
} else if (y <= 2.8e+23) {
tmp = t + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = ((x - t) / (z - a)) * y
if (y <= (-4d-54)) then
tmp = t_1
else if (y <= 2.8d+23) then
tmp = t + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((x - t) / (z - a)) * y;
double tmp;
if (y <= -4e-54) {
tmp = t_1;
} else if (y <= 2.8e+23) {
tmp = t + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((x - t) / (z - a)) * y tmp = 0 if y <= -4e-54: tmp = t_1 elif y <= 2.8e+23: tmp = t + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(x - t) / Float64(z - a)) * y) tmp = 0.0 if (y <= -4e-54) tmp = t_1; elseif (y <= 2.8e+23) tmp = Float64(t + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((x - t) / (z - a)) * y; tmp = 0.0; if (y <= -4e-54) tmp = t_1; elseif (y <= 2.8e+23) tmp = t + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4e-54], t$95$1, If[LessEqual[y, 2.8e+23], N[(t + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \frac{x - t}{z - a} \cdot y\\
\mathbf{if}\;y \leq -4 \cdot 10^{-54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+23}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -4.0000000000000001e-54 or 2.8000000000000002e23 < y Initial program 68.3%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6441.5%
Applied rewrites41.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6441.5%
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
lift--.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--.f6441.8%
Applied rewrites41.8%
if -4.0000000000000001e-54 < y < 2.8000000000000002e23Initial program 68.3%
Taylor expanded in z around inf
lower--.f6419.7%
Applied rewrites19.7%
Taylor expanded in x around inf
lower-*.f642.8%
Applied rewrites2.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f642.8%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f642.8%
Applied rewrites2.8%
Taylor expanded in x around 0
Applied rewrites34.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -9e+178) (* t 1.0) (if (<= z 0.006) (+ x (* t (/ y a))) (+ t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+178) {
tmp = t * 1.0;
} else if (z <= 0.006) {
tmp = x + (t * (y / a));
} else {
tmp = t + x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-9d+178)) then
tmp = t * 1.0d0
else if (z <= 0.006d0) then
tmp = x + (t * (y / a))
else
tmp = t + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+178) {
tmp = t * 1.0;
} else if (z <= 0.006) {
tmp = x + (t * (y / a));
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9e+178: tmp = t * 1.0 elif z <= 0.006: tmp = x + (t * (y / a)) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9e+178) tmp = Float64(t * 1.0); elseif (z <= 0.006) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9e+178) tmp = t * 1.0; elseif (z <= 0.006) tmp = x + (t * (y / a)); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e+178], N[(t * 1.0), $MachinePrecision], If[LessEqual[z, 0.006], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+178}:\\
\;\;\;\;t \cdot 1\\
\mathbf{elif}\;z \leq 0.006:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
if z < -8.9999999999999994e178Initial program 68.3%
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 rewrites84.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.7%
Applied rewrites51.7%
Taylor expanded in z around inf
Applied rewrites25.6%
if -8.9999999999999994e178 < z < 0.0060000000000000001Initial program 68.3%
Taylor expanded in x around 0
Applied rewrites56.1%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
frac-2negN/A
mul-1-negN/A
distribute-neg-frac2N/A
associate-*r/N/A
lift-/.f64N/A
lift-*.f64N/A
lower-*.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*r/N/A
distribute-neg-frac2N/A
mul-1-negN/A
frac-2negN/A
lift-/.f6467.4%
Applied rewrites67.4%
Taylor expanded in z around 0
lower-/.f6441.2%
Applied rewrites41.2%
if 0.0060000000000000001 < z Initial program 68.3%
Taylor expanded in z around inf
lower--.f6419.7%
Applied rewrites19.7%
Taylor expanded in x around inf
lower-*.f642.8%
Applied rewrites2.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f642.8%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f642.8%
Applied rewrites2.8%
Taylor expanded in x around 0
Applied rewrites34.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ (- t x) a)))) (if (<= y -8e+170) t_1 (if (<= y 1.45e+50) (+ t x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / a);
double tmp;
if (y <= -8e+170) {
tmp = t_1;
} else if (y <= 1.45e+50) {
tmp = t + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((t - x) / a)
if (y <= (-8d+170)) then
tmp = t_1
else if (y <= 1.45d+50) then
tmp = t + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / a);
double tmp;
if (y <= -8e+170) {
tmp = t_1;
} else if (y <= 1.45e+50) {
tmp = t + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / a) tmp = 0 if y <= -8e+170: tmp = t_1 elif y <= 1.45e+50: tmp = t + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / a)) tmp = 0.0 if (y <= -8e+170) tmp = t_1; elseif (y <= 1.45e+50) tmp = Float64(t + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / a); tmp = 0.0; if (y <= -8e+170) tmp = t_1; elseif (y <= 1.45e+50) tmp = t + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8e+170], t$95$1, If[LessEqual[y, 1.45e+50], N[(t + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a}\\
\mathbf{if}\;y \leq -8 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+50}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -8.0000000000000003e170 or 1.45e50 < y Initial program 68.3%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6441.5%
Applied rewrites41.5%
Taylor expanded in x around 0
lower-/.f64N/A
lower--.f6423.1%
Applied rewrites23.1%
Taylor expanded in a around inf
lower-/.f64N/A
lower--.f6424.9%
Applied rewrites24.9%
if -8.0000000000000003e170 < y < 1.45e50Initial program 68.3%
Taylor expanded in z around inf
lower--.f6419.7%
Applied rewrites19.7%
Taylor expanded in x around inf
lower-*.f642.8%
Applied rewrites2.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f642.8%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f642.8%
Applied rewrites2.8%
Taylor expanded in x around 0
Applied rewrites34.6%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ t (- a z))))) (if (<= y -1.05e+171) t_1 (if (<= y 1.45e+50) (+ t x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / (a - z));
double tmp;
if (y <= -1.05e+171) {
tmp = t_1;
} else if (y <= 1.45e+50) {
tmp = t + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (t / (a - z))
if (y <= (-1.05d+171)) then
tmp = t_1
else if (y <= 1.45d+50) then
tmp = t + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / (a - z));
double tmp;
if (y <= -1.05e+171) {
tmp = t_1;
} else if (y <= 1.45e+50) {
tmp = t + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / (a - z)) tmp = 0 if y <= -1.05e+171: tmp = t_1 elif y <= 1.45e+50: tmp = t + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / Float64(a - z))) tmp = 0.0 if (y <= -1.05e+171) tmp = t_1; elseif (y <= 1.45e+50) tmp = Float64(t + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / (a - z)); tmp = 0.0; if (y <= -1.05e+171) tmp = t_1; elseif (y <= 1.45e+50) tmp = t + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.05e+171], t$95$1, If[LessEqual[y, 1.45e+50], N[(t + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := y \cdot \frac{t}{a - z}\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{+171}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+50}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.0500000000000001e171 or 1.45e50 < y Initial program 68.3%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6441.5%
Applied rewrites41.5%
Taylor expanded in x around 0
lower-/.f64N/A
lower--.f6423.1%
Applied rewrites23.1%
if -1.0500000000000001e171 < y < 1.45e50Initial program 68.3%
Taylor expanded in z around inf
lower--.f6419.7%
Applied rewrites19.7%
Taylor expanded in x around inf
lower-*.f642.8%
Applied rewrites2.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f642.8%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f642.8%
Applied rewrites2.8%
Taylor expanded in x around 0
Applied rewrites34.6%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.05e+171) (* y (/ t a)) (if (<= y 1.45e+50) (+ t x) (/ (* t y) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.05e+171) {
tmp = y * (t / a);
} else if (y <= 1.45e+50) {
tmp = t + x;
} else {
tmp = (t * y) / (a - z);
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.05d+171)) then
tmp = y * (t / a)
else if (y <= 1.45d+50) then
tmp = t + x
else
tmp = (t * y) / (a - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.05e+171) {
tmp = y * (t / a);
} else if (y <= 1.45e+50) {
tmp = t + x;
} else {
tmp = (t * y) / (a - z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.05e+171: tmp = y * (t / a) elif y <= 1.45e+50: tmp = t + x else: tmp = (t * y) / (a - z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.05e+171) tmp = Float64(y * Float64(t / a)); elseif (y <= 1.45e+50) tmp = Float64(t + x); else tmp = Float64(Float64(t * y) / Float64(a - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.05e+171) tmp = y * (t / a); elseif (y <= 1.45e+50) tmp = t + x; else tmp = (t * y) / (a - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.05e+171], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+50], N[(t + x), $MachinePrecision], N[(N[(t * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+171}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+50}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot y}{a - z}\\
\end{array}
if y < -1.0500000000000001e171Initial program 68.3%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6441.5%
Applied rewrites41.5%
Taylor expanded in x around 0
lower-/.f64N/A
lower--.f6423.1%
Applied rewrites23.1%
Taylor expanded in z around 0
Applied rewrites17.8%
if -1.0500000000000001e171 < y < 1.45e50Initial program 68.3%
Taylor expanded in z around inf
lower--.f6419.7%
Applied rewrites19.7%
Taylor expanded in x around inf
lower-*.f642.8%
Applied rewrites2.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f642.8%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f642.8%
Applied rewrites2.8%
Taylor expanded in x around 0
Applied rewrites34.6%
if 1.45e50 < y Initial program 68.3%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6441.5%
Applied rewrites41.5%
Taylor expanded in x around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6421.3%
Applied rewrites21.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ t a)))) (if (<= y -1.05e+171) t_1 (if (<= y 8.5e+116) (+ t x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / a);
double tmp;
if (y <= -1.05e+171) {
tmp = t_1;
} else if (y <= 8.5e+116) {
tmp = t + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (t / a)
if (y <= (-1.05d+171)) then
tmp = t_1
else if (y <= 8.5d+116) then
tmp = t + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / a);
double tmp;
if (y <= -1.05e+171) {
tmp = t_1;
} else if (y <= 8.5e+116) {
tmp = t + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / a) tmp = 0 if y <= -1.05e+171: tmp = t_1 elif y <= 8.5e+116: tmp = t + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / a)) tmp = 0.0 if (y <= -1.05e+171) tmp = t_1; elseif (y <= 8.5e+116) tmp = Float64(t + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / a); tmp = 0.0; if (y <= -1.05e+171) tmp = t_1; elseif (y <= 8.5e+116) tmp = t + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.05e+171], t$95$1, If[LessEqual[y, 8.5e+116], N[(t + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := y \cdot \frac{t}{a}\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{+171}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+116}:\\
\;\;\;\;t + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.0500000000000001e171 or 8.5000000000000002e116 < y Initial program 68.3%
Taylor expanded in y around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6441.5%
Applied rewrites41.5%
Taylor expanded in x around 0
lower-/.f64N/A
lower--.f6423.1%
Applied rewrites23.1%
Taylor expanded in z around 0
Applied rewrites17.8%
if -1.0500000000000001e171 < y < 8.5000000000000002e116Initial program 68.3%
Taylor expanded in z around inf
lower--.f6419.7%
Applied rewrites19.7%
Taylor expanded in x around inf
lower-*.f642.8%
Applied rewrites2.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f642.8%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f642.8%
Applied rewrites2.8%
Taylor expanded in x around 0
Applied rewrites34.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.6e-12)
(+ t x)
(if (<= a 5.5e-278)
(* t 1.0)
(if (<= a 1.6e-179) (* x (/ y z)) (+ t x)))))double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-12) {
tmp = t + x;
} else if (a <= 5.5e-278) {
tmp = t * 1.0;
} else if (a <= 1.6e-179) {
tmp = x * (y / z);
} else {
tmp = t + x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.6d-12)) then
tmp = t + x
else if (a <= 5.5d-278) then
tmp = t * 1.0d0
else if (a <= 1.6d-179) then
tmp = x * (y / z)
else
tmp = t + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-12) {
tmp = t + x;
} else if (a <= 5.5e-278) {
tmp = t * 1.0;
} else if (a <= 1.6e-179) {
tmp = x * (y / z);
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.6e-12: tmp = t + x elif a <= 5.5e-278: tmp = t * 1.0 elif a <= 1.6e-179: tmp = x * (y / z) else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e-12) tmp = Float64(t + x); elseif (a <= 5.5e-278) tmp = Float64(t * 1.0); elseif (a <= 1.6e-179) tmp = Float64(x * Float64(y / z)); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.6e-12) tmp = t + x; elseif (a <= 5.5e-278) tmp = t * 1.0; elseif (a <= 1.6e-179) tmp = x * (y / z); else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e-12], N[(t + x), $MachinePrecision], If[LessEqual[a, 5.5e-278], N[(t * 1.0), $MachinePrecision], If[LessEqual[a, 1.6e-179], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-12}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-278}:\\
\;\;\;\;t \cdot 1\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-179}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
if a < -1.6e-12 or 1.6e-179 < a Initial program 68.3%
Taylor expanded in z around inf
lower--.f6419.7%
Applied rewrites19.7%
Taylor expanded in x around inf
lower-*.f642.8%
Applied rewrites2.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f642.8%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f642.8%
Applied rewrites2.8%
Taylor expanded in x around 0
Applied rewrites34.6%
if -1.6e-12 < a < 5.4999999999999999e-278Initial program 68.3%
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 rewrites84.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.7%
Applied rewrites51.7%
Taylor expanded in z around inf
Applied rewrites25.6%
if 5.4999999999999999e-278 < a < 1.6e-179Initial program 68.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in a around 0
lower-/.f6419.4%
Applied rewrites19.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.6e-12)
(+ t x)
(if (<= a 5.5e-278)
(* t 1.0)
(if (<= a 8.6e-180) (/ (* x y) z) (+ t x)))))double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-12) {
tmp = t + x;
} else if (a <= 5.5e-278) {
tmp = t * 1.0;
} else if (a <= 8.6e-180) {
tmp = (x * y) / z;
} else {
tmp = t + x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.6d-12)) then
tmp = t + x
else if (a <= 5.5d-278) then
tmp = t * 1.0d0
else if (a <= 8.6d-180) then
tmp = (x * y) / z
else
tmp = t + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-12) {
tmp = t + x;
} else if (a <= 5.5e-278) {
tmp = t * 1.0;
} else if (a <= 8.6e-180) {
tmp = (x * y) / z;
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.6e-12: tmp = t + x elif a <= 5.5e-278: tmp = t * 1.0 elif a <= 8.6e-180: tmp = (x * y) / z else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e-12) tmp = Float64(t + x); elseif (a <= 5.5e-278) tmp = Float64(t * 1.0); elseif (a <= 8.6e-180) tmp = Float64(Float64(x * y) / z); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.6e-12) tmp = t + x; elseif (a <= 5.5e-278) tmp = t * 1.0; elseif (a <= 8.6e-180) tmp = (x * y) / z; else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e-12], N[(t + x), $MachinePrecision], If[LessEqual[a, 5.5e-278], N[(t * 1.0), $MachinePrecision], If[LessEqual[a, 8.6e-180], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], N[(t + x), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-12}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-278}:\\
\;\;\;\;t \cdot 1\\
\mathbf{elif}\;a \leq 8.6 \cdot 10^{-180}:\\
\;\;\;\;\frac{x \cdot y}{z}\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
if a < -1.6e-12 or 8.5999999999999991e-180 < a Initial program 68.3%
Taylor expanded in z around inf
lower--.f6419.7%
Applied rewrites19.7%
Taylor expanded in x around inf
lower-*.f642.8%
Applied rewrites2.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f642.8%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f642.8%
Applied rewrites2.8%
Taylor expanded in x around 0
Applied rewrites34.6%
if -1.6e-12 < a < 5.4999999999999999e-278Initial program 68.3%
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 rewrites84.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.7%
Applied rewrites51.7%
Taylor expanded in z around inf
Applied rewrites25.6%
if 5.4999999999999999e-278 < a < 8.5999999999999991e-180Initial program 68.3%
Taylor expanded in x around inf
lower-*.f64N/A
lower-+.f64N/A
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6443.2%
Applied rewrites43.2%
Taylor expanded in z around -inf
lower-/.f64N/A
lower--.f6423.6%
Applied rewrites23.6%
Taylor expanded in a around 0
lower-/.f64N/A
lower-*.f6416.7%
Applied rewrites16.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.6e-12) (+ t x) (if (<= a 68000000000000.0) (* t 1.0) (+ t x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-12) {
tmp = t + x;
} else if (a <= 68000000000000.0) {
tmp = t * 1.0;
} else {
tmp = t + x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.6d-12)) then
tmp = t + x
else if (a <= 68000000000000.0d0) then
tmp = t * 1.0d0
else
tmp = t + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.6e-12) {
tmp = t + x;
} else if (a <= 68000000000000.0) {
tmp = t * 1.0;
} else {
tmp = t + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.6e-12: tmp = t + x elif a <= 68000000000000.0: tmp = t * 1.0 else: tmp = t + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.6e-12) tmp = Float64(t + x); elseif (a <= 68000000000000.0) tmp = Float64(t * 1.0); else tmp = Float64(t + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.6e-12) tmp = t + x; elseif (a <= 68000000000000.0) tmp = t * 1.0; else tmp = t + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.6e-12], N[(t + x), $MachinePrecision], If[LessEqual[a, 68000000000000.0], N[(t * 1.0), $MachinePrecision], N[(t + x), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;a \leq -1.6 \cdot 10^{-12}:\\
\;\;\;\;t + x\\
\mathbf{elif}\;a \leq 68000000000000:\\
\;\;\;\;t \cdot 1\\
\mathbf{else}:\\
\;\;\;\;t + x\\
\end{array}
if a < -1.6e-12 or 6.8e13 < a Initial program 68.3%
Taylor expanded in z around inf
lower--.f6419.7%
Applied rewrites19.7%
Taylor expanded in x around inf
lower-*.f642.8%
Applied rewrites2.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f642.8%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f642.8%
Applied rewrites2.8%
Taylor expanded in x around 0
Applied rewrites34.6%
if -1.6e-12 < a < 6.8e13Initial program 68.3%
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 rewrites84.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.7%
Applied rewrites51.7%
Taylor expanded in z around inf
Applied rewrites25.6%
(FPCore (x y z t a) :precision binary64 (+ t x))
double code(double x, double y, double z, double t, double a) {
return t + 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 = t + x
end function
public static double code(double x, double y, double z, double t, double a) {
return t + x;
}
def code(x, y, z, t, a): return t + x
function code(x, y, z, t, a) return Float64(t + x) end
function tmp = code(x, y, z, t, a) tmp = t + x; end
code[x_, y_, z_, t_, a_] := N[(t + x), $MachinePrecision]
t + x
Initial program 68.3%
Taylor expanded in z around inf
lower--.f6419.7%
Applied rewrites19.7%
Taylor expanded in x around inf
lower-*.f642.8%
Applied rewrites2.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f642.8%
lift-*.f64N/A
mul-1-negN/A
lower-neg.f642.8%
Applied rewrites2.8%
Taylor expanded in x around 0
Applied rewrites34.6%
herbie shell --seed 2025258
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
:precision binary64
(+ x (/ (* (- y z) (- t x)) (- a z))))