
(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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Herbie found 17 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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- z y) (- z a)) (- t x) x))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_2 -1e-227)
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 = fma(((z - y) / (z - a)), (t - x), x);
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -1e-227) {
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;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(z - y) / Float64(z - a)), Float64(t - x), x) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_2 <= -1e-227) 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
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-227], 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}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z - y}{z - a}, t - x, x\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-227}:\\
\;\;\;\;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}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.99999999999999945e-228 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 79.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
div-flipN/A
associate-*r/N/A
mult-flipN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
metadata-evalN/A
mul-1-negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f6483.3
Applied rewrites83.3%
if -9.99999999999999945e-228 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 79.1%
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.3
Applied rewrites46.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- z y) (- z a)) (- t x) x))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_2 -1e-227) t_1 (if (<= t_2 0.0) (/ t (/ (- z a) (- z y))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((z - y) / (z - a)), (t - x), x);
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -1e-227) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = t / ((z - a) / (z - y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(z - y) / Float64(z - a)), Float64(t - x), x) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_2 <= -1e-227) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(t / Float64(Float64(z - a) / Float64(z - y))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-227], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t / N[(N[(z - a), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z - y}{z - a}, t - x, x\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-227}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{t}{\frac{z - a}{z - y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.99999999999999945e-228 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 79.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
div-flipN/A
associate-*r/N/A
mult-flipN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
metadata-evalN/A
mul-1-negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f6483.3
Applied rewrites83.3%
if -9.99999999999999945e-228 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
lift--.f64N/A
div-flipN/A
mult-flip-revN/A
lower-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6451.3
Applied rewrites51.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- x t) (- z a)) (- y z) x))
(t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_2 -1e-227)
t_1
(if (<= t_2 5e-256) (/ t (/ (- z a) (- z y))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((x - t) / (z - a)), (y - z), x);
double t_2 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_2 <= -1e-227) {
tmp = t_1;
} else if (t_2 <= 5e-256) {
tmp = t / ((z - a) / (z - y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(x - t) / Float64(z - a)), Float64(y - z), x) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_2 <= -1e-227) tmp = t_1; elseif (t_2 <= 5e-256) tmp = Float64(t / Float64(Float64(z - a) / Float64(z - y))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-227], t$95$1, If[LessEqual[t$95$2, 5e-256], N[(t / N[(N[(z - a), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{x - t}{z - a}, y - z, x\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-227}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-256}:\\
\;\;\;\;\frac{t}{\frac{z - a}{z - y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.99999999999999945e-228 or 5e-256 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 79.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6479.2
lift-/.f64N/A
frac-2negN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6479.2
Applied rewrites79.2%
if -9.99999999999999945e-228 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5e-256Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
lift--.f64N/A
div-flipN/A
mult-flip-revN/A
lower-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6451.3
Applied rewrites51.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.2e+165)
(/ t (/ (- z a) (- z y)))
(if (<= z -5.7e-158)
(fma (/ (- y z) (- a z)) t x)
(if (<= z 1.1e-114)
(+ x (/ (- y z) (/ a (- t x))))
(if (<= z 2.8e+45)
(+ x (/ (* y (- t x)) (- a z)))
(* (/ (- z y) (- z a)) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.2e+165) {
tmp = t / ((z - a) / (z - y));
} else if (z <= -5.7e-158) {
tmp = fma(((y - z) / (a - z)), t, x);
} else if (z <= 1.1e-114) {
tmp = x + ((y - z) / (a / (t - x)));
} else if (z <= 2.8e+45) {
tmp = x + ((y * (t - x)) / (a - z));
} else {
tmp = ((z - y) / (z - a)) * t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.2e+165) tmp = Float64(t / Float64(Float64(z - a) / Float64(z - y))); elseif (z <= -5.7e-158) tmp = fma(Float64(Float64(y - z) / Float64(a - z)), t, x); elseif (z <= 1.1e-114) tmp = Float64(x + Float64(Float64(y - z) / Float64(a / Float64(t - x)))); elseif (z <= 2.8e+45) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / Float64(a - z))); else tmp = Float64(Float64(Float64(z - y) / Float64(z - a)) * t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.2e+165], N[(t / N[(N[(z - a), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.7e-158], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t + x), $MachinePrecision], If[LessEqual[z, 1.1e-114], N[(x + N[(N[(y - z), $MachinePrecision] / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+45], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+165}:\\
\;\;\;\;\frac{t}{\frac{z - a}{z - y}}\\
\mathbf{elif}\;z \leq -5.7 \cdot 10^{-158}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t, x\right)\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-114}:\\
\;\;\;\;x + \frac{y - z}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+45}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{z - y}{z - a} \cdot t\\
\end{array}
\end{array}
if z < -6.2000000000000003e165Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
lift--.f64N/A
div-flipN/A
mult-flip-revN/A
lower-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6451.3
Applied rewrites51.3%
if -6.2000000000000003e165 < z < -5.69999999999999982e-158Initial program 79.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
div-flipN/A
associate-*r/N/A
mult-flipN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
Applied rewrites83.2%
Taylor expanded in x around 0
Applied rewrites66.9%
if -5.69999999999999982e-158 < z < 1.10000000000000006e-114Initial program 79.1%
Taylor expanded in z around 0
Applied rewrites51.9%
lift-*.f64N/A
lift-/.f64N/A
div-flipN/A
mult-flip-revN/A
lower-/.f64N/A
lower-/.f6452.0
Applied rewrites52.0%
if 1.10000000000000006e-114 < z < 2.7999999999999999e45Initial program 79.1%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6454.8
Applied rewrites54.8%
if 2.7999999999999999e45 < z Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6451.4
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
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6451.4
Applied rewrites51.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.2e+165)
(/ t (/ (- z a) (- z y)))
(if (<= z -5.7e-158)
(fma (/ (- y z) (- a z)) t x)
(if (<= z 1.1e-114)
(fma (/ (- t x) a) (- y z) x)
(if (<= z 2.8e+45)
(+ x (/ (* y (- t x)) (- a z)))
(* (/ (- z y) (- z a)) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.2e+165) {
tmp = t / ((z - a) / (z - y));
} else if (z <= -5.7e-158) {
tmp = fma(((y - z) / (a - z)), t, x);
} else if (z <= 1.1e-114) {
tmp = fma(((t - x) / a), (y - z), x);
} else if (z <= 2.8e+45) {
tmp = x + ((y * (t - x)) / (a - z));
} else {
tmp = ((z - y) / (z - a)) * t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.2e+165) tmp = Float64(t / Float64(Float64(z - a) / Float64(z - y))); elseif (z <= -5.7e-158) tmp = fma(Float64(Float64(y - z) / Float64(a - z)), t, x); elseif (z <= 1.1e-114) tmp = fma(Float64(Float64(t - x) / a), Float64(y - z), x); elseif (z <= 2.8e+45) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / Float64(a - z))); else tmp = Float64(Float64(Float64(z - y) / Float64(z - a)) * t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.2e+165], N[(t / N[(N[(z - a), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.7e-158], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t + x), $MachinePrecision], If[LessEqual[z, 1.1e-114], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 2.8e+45], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+165}:\\
\;\;\;\;\frac{t}{\frac{z - a}{z - y}}\\
\mathbf{elif}\;z \leq -5.7 \cdot 10^{-158}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t, x\right)\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-114}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y - z, x\right)\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+45}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\
\mathbf{else}:\\
\;\;\;\;\frac{z - y}{z - a} \cdot t\\
\end{array}
\end{array}
if z < -6.2000000000000003e165Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
lift--.f64N/A
div-flipN/A
mult-flip-revN/A
lower-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6451.3
Applied rewrites51.3%
if -6.2000000000000003e165 < z < -5.69999999999999982e-158Initial program 79.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
div-flipN/A
associate-*r/N/A
mult-flipN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
Applied rewrites83.2%
Taylor expanded in x around 0
Applied rewrites66.9%
if -5.69999999999999982e-158 < z < 1.10000000000000006e-114Initial program 79.1%
Taylor expanded in z around 0
Applied rewrites51.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6451.9
Applied rewrites51.9%
if 1.10000000000000006e-114 < z < 2.7999999999999999e45Initial program 79.1%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower--.f6454.8
Applied rewrites54.8%
if 2.7999999999999999e45 < z Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6451.4
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
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6451.4
Applied rewrites51.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- y z) (- a z)) t x)))
(if (<= z -6.2e+165)
(/ t (/ (- z a) (- z y)))
(if (<= z -1.1e-158)
t_1
(if (<= z 2.5e-220)
(fma (/ y a) (- t x) x)
(if (<= z 2.9e+46) t_1 (* (/ (- z y) (- z a)) t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((y - z) / (a - z)), t, x);
double tmp;
if (z <= -6.2e+165) {
tmp = t / ((z - a) / (z - y));
} else if (z <= -1.1e-158) {
tmp = t_1;
} else if (z <= 2.5e-220) {
tmp = fma((y / a), (t - x), x);
} else if (z <= 2.9e+46) {
tmp = t_1;
} else {
tmp = ((z - y) / (z - a)) * t;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(y - z) / Float64(a - z)), t, x) tmp = 0.0 if (z <= -6.2e+165) tmp = Float64(t / Float64(Float64(z - a) / Float64(z - y))); elseif (z <= -1.1e-158) tmp = t_1; elseif (z <= 2.5e-220) tmp = fma(Float64(y / a), Float64(t - x), x); elseif (z <= 2.9e+46) tmp = t_1; else tmp = Float64(Float64(Float64(z - y) / Float64(z - a)) * t); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t + x), $MachinePrecision]}, If[LessEqual[z, -6.2e+165], N[(t / N[(N[(z - a), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.1e-158], t$95$1, If[LessEqual[z, 2.5e-220], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 2.9e+46], t$95$1, N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y - z}{a - z}, t, x\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+165}:\\
\;\;\;\;\frac{t}{\frac{z - a}{z - y}}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-158}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-220}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z - y}{z - a} \cdot t\\
\end{array}
\end{array}
if z < -6.2000000000000003e165Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
lift--.f64N/A
div-flipN/A
mult-flip-revN/A
lower-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6451.3
Applied rewrites51.3%
if -6.2000000000000003e165 < z < -1.1000000000000001e-158 or 2.5000000000000001e-220 < z < 2.9000000000000002e46Initial program 79.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
div-flipN/A
associate-*r/N/A
mult-flipN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
Applied rewrites83.2%
Taylor expanded in x around 0
Applied rewrites66.9%
if -1.1000000000000001e-158 < z < 2.5000000000000001e-220Initial program 79.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
div-flipN/A
associate-*r/N/A
mult-flipN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
metadata-evalN/A
mul-1-negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f6483.3
Applied rewrites83.3%
Taylor expanded in z around 0
lower-/.f6448.8
Applied rewrites48.8%
if 2.9000000000000002e46 < z Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6451.4
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
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6451.4
Applied rewrites51.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ (- t x) a) (- y z) x)))
(if (<= a -3.2e+126)
t_1
(if (<= a 5.8e-15) (/ t (/ (- z a) (- z y))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(((t - x) / a), (y - z), x);
double tmp;
if (a <= -3.2e+126) {
tmp = t_1;
} else if (a <= 5.8e-15) {
tmp = t / ((z - a) / (z - y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(Float64(t - x) / a), Float64(y - z), x) tmp = 0.0 if (a <= -3.2e+126) tmp = t_1; elseif (a <= 5.8e-15) tmp = Float64(t / Float64(Float64(z - a) / Float64(z - y))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.2e+126], t$95$1, If[LessEqual[a, 5.8e-15], N[(t / N[(N[(z - a), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{t - x}{a}, y - z, x\right)\\
\mathbf{if}\;a \leq -3.2 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-15}:\\
\;\;\;\;\frac{t}{\frac{z - a}{z - y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.1999999999999998e126 or 5.80000000000000037e-15 < a Initial program 79.1%
Taylor expanded in z around 0
Applied rewrites51.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6451.9
Applied rewrites51.9%
if -3.1999999999999998e126 < a < 5.80000000000000037e-15Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
lift--.f64N/A
div-flipN/A
mult-flip-revN/A
lower-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6451.3
Applied rewrites51.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.95e-149) (/ t (/ (- z a) (- z y))) (if (<= z 9.5e+44) (fma (/ y a) (- t x) x) (* (/ (- z y) (- z a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e-149) {
tmp = t / ((z - a) / (z - y));
} else if (z <= 9.5e+44) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = ((z - y) / (z - a)) * t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.95e-149) tmp = Float64(t / Float64(Float64(z - a) / Float64(z - y))); elseif (z <= 9.5e+44) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = Float64(Float64(Float64(z - y) / Float64(z - a)) * t); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.95e-149], N[(t / N[(N[(z - a), $MachinePrecision] / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e+44], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{-149}:\\
\;\;\;\;\frac{t}{\frac{z - a}{z - y}}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z - y}{z - a} \cdot t\\
\end{array}
\end{array}
if z < -1.9500000000000001e-149Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
lift-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
lift-/.f64N/A
sub-divN/A
lift--.f64N/A
div-flipN/A
mult-flip-revN/A
lower-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6451.3
Applied rewrites51.3%
if -1.9500000000000001e-149 < z < 9.5000000000000004e44Initial program 79.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
div-flipN/A
associate-*r/N/A
mult-flipN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
metadata-evalN/A
mul-1-negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f6483.3
Applied rewrites83.3%
Taylor expanded in z around 0
lower-/.f6448.8
Applied rewrites48.8%
if 9.5000000000000004e44 < z Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6451.4
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
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6451.4
Applied rewrites51.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (/ (- z y) (- z a)) t))) (if (<= z -1.95e-149) t_1 (if (<= z 9.5e+44) (fma (/ y a) (- t x) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - y) / (z - a)) * t;
double tmp;
if (z <= -1.95e-149) {
tmp = t_1;
} else if (z <= 9.5e+44) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - y) / Float64(z - a)) * t) tmp = 0.0 if (z <= -1.95e-149) tmp = t_1; elseif (z <= 9.5e+44) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[z, -1.95e-149], t$95$1, If[LessEqual[z, 9.5e+44], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - y}{z - a} \cdot t\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{-149}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.9500000000000001e-149 or 9.5000000000000004e44 < z Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6451.4
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
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6451.4
Applied rewrites51.4%
if -1.9500000000000001e-149 < z < 9.5000000000000004e44Initial program 79.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
div-flipN/A
associate-*r/N/A
mult-flipN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
metadata-evalN/A
mul-1-negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f6483.3
Applied rewrites83.3%
Taylor expanded in z around 0
lower-/.f6448.8
Applied rewrites48.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (/ y a) (- t x) x)))
(if (<= a -1.15e+74)
t_1
(if (<= a 5.8e-15) (* t (- (/ y (- a z)) -1.0)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y / a), (t - x), x);
double tmp;
if (a <= -1.15e+74) {
tmp = t_1;
} else if (a <= 5.8e-15) {
tmp = t * ((y / (a - z)) - -1.0);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y / a), Float64(t - x), x) tmp = 0.0 if (a <= -1.15e+74) tmp = t_1; elseif (a <= 5.8e-15) tmp = Float64(t * Float64(Float64(y / Float64(a - z)) - -1.0)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.15e+74], t$95$1, If[LessEqual[a, 5.8e-15], N[(t * N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{if}\;a \leq -1.15 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.8 \cdot 10^{-15}:\\
\;\;\;\;t \cdot \left(\frac{y}{a - z} - -1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.1499999999999999e74 or 5.80000000000000037e-15 < a Initial program 79.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
div-flipN/A
associate-*r/N/A
mult-flipN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
metadata-evalN/A
mul-1-negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f6483.3
Applied rewrites83.3%
Taylor expanded in z around 0
lower-/.f6448.8
Applied rewrites48.8%
if -1.1499999999999999e74 < a < 5.80000000000000037e-15Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in z around inf
Applied rewrites41.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.2e+75) t (if (<= z 2.3e+33) (fma (/ y a) (- t x) x) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.2e+75) {
tmp = t;
} else if (z <= 2.3e+33) {
tmp = fma((y / a), (t - x), x);
} else {
tmp = t;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.2e+75) tmp = t; elseif (z <= 2.3e+33) tmp = fma(Float64(y / a), Float64(t - x), x); else tmp = t; end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e+75], t, If[LessEqual[z, 2.3e+33], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+75}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.1999999999999994e75 or 2.30000000000000011e33 < z Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f6416.4
Applied rewrites16.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6417.9
Applied rewrites17.9%
Taylor expanded in z around inf
Applied rewrites25.1%
if -9.1999999999999994e75 < z < 2.30000000000000011e33Initial program 79.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-/.f64N/A
div-flipN/A
associate-*r/N/A
mult-flipN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
frac-2negN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
Applied rewrites83.2%
lift-/.f64N/A
frac-2negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f64N/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f6483.2
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
metadata-evalN/A
mul-1-negN/A
lift--.f64N/A
sub-negate-revN/A
lift--.f6483.3
Applied rewrites83.3%
Taylor expanded in z around 0
lower-/.f6448.8
Applied rewrites48.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y (- z a)) x)))
(if (<= z -3.2e+55)
t
(if (<= z -75000000000000.0)
t_1
(if (<= z -6.5e-293) (/ (* t y) (- a z)) (if (<= z 2.25e+33) t_1 t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / (z - a)) * x;
double tmp;
if (z <= -3.2e+55) {
tmp = t;
} else if (z <= -75000000000000.0) {
tmp = t_1;
} else if (z <= -6.5e-293) {
tmp = (t * y) / (a - z);
} else if (z <= 2.25e+33) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y / (z - a)) * x
if (z <= (-3.2d+55)) then
tmp = t
else if (z <= (-75000000000000.0d0)) then
tmp = t_1
else if (z <= (-6.5d-293)) then
tmp = (t * y) / (a - z)
else if (z <= 2.25d+33) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y / (z - a)) * x;
double tmp;
if (z <= -3.2e+55) {
tmp = t;
} else if (z <= -75000000000000.0) {
tmp = t_1;
} else if (z <= -6.5e-293) {
tmp = (t * y) / (a - z);
} else if (z <= 2.25e+33) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / (z - a)) * x tmp = 0 if z <= -3.2e+55: tmp = t elif z <= -75000000000000.0: tmp = t_1 elif z <= -6.5e-293: tmp = (t * y) / (a - z) elif z <= 2.25e+33: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / Float64(z - a)) * x) tmp = 0.0 if (z <= -3.2e+55) tmp = t; elseif (z <= -75000000000000.0) tmp = t_1; elseif (z <= -6.5e-293) tmp = Float64(Float64(t * y) / Float64(a - z)); elseif (z <= 2.25e+33) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / (z - a)) * x; tmp = 0.0; if (z <= -3.2e+55) tmp = t; elseif (z <= -75000000000000.0) tmp = t_1; elseif (z <= -6.5e-293) tmp = (t * y) / (a - z); elseif (z <= 2.25e+33) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -3.2e+55], t, If[LessEqual[z, -75000000000000.0], t$95$1, If[LessEqual[z, -6.5e-293], N[(N[(t * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+33], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z - a} \cdot x\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+55}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -75000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-293}:\\
\;\;\;\;\frac{t \cdot y}{a - z}\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.2000000000000003e55 or 2.25e33 < z Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f6416.4
Applied rewrites16.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6417.9
Applied rewrites17.9%
Taylor expanded in z around inf
Applied rewrites25.1%
if -3.2000000000000003e55 < z < -7.5e13 or -6.50000000000000033e-293 < z < 2.25e33Initial program 79.1%
lift-+.f64N/A
sum-to-multN/A
lower-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift-/.f64N/A
frac-2negN/A
lower-/.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lift--.f64N/A
sub-negate-revN/A
lower--.f64N/A
lower-/.f6462.9
Applied rewrites62.9%
Taylor expanded in y around -inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
lower--.f6431.6
Applied rewrites31.6%
Taylor expanded in x around inf
lower-/.f64N/A
lower--.f6424.5
Applied rewrites24.5%
if -7.5e13 < z < -6.50000000000000033e-293Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f6421.1
Applied rewrites21.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.2e+36) t (if (<= z 4.2e+26) (/ (* t y) (- a z)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.2e+36) {
tmp = t;
} else if (z <= 4.2e+26) {
tmp = (t * y) / (a - z);
} else {
tmp = t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-7.2d+36)) then
tmp = t
else if (z <= 4.2d+26) then
tmp = (t * y) / (a - z)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.2e+36) {
tmp = t;
} else if (z <= 4.2e+26) {
tmp = (t * y) / (a - z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.2e+36: tmp = t elif z <= 4.2e+26: tmp = (t * y) / (a - z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.2e+36) tmp = t; elseif (z <= 4.2e+26) tmp = Float64(Float64(t * y) / Float64(a - z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.2e+36) tmp = t; elseif (z <= 4.2e+26) tmp = (t * y) / (a - z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.2e+36], t, If[LessEqual[z, 4.2e+26], N[(N[(t * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+36}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+26}:\\
\;\;\;\;\frac{t \cdot y}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -7.1999999999999995e36 or 4.2000000000000002e26 < z Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f6416.4
Applied rewrites16.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6417.9
Applied rewrites17.9%
Taylor expanded in z around inf
Applied rewrites25.1%
if -7.1999999999999995e36 < z < 4.2000000000000002e26Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in y around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f6421.1
Applied rewrites21.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.15e+39) t (if (<= z 8.5e-12) (/ y (/ a t)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+39) {
tmp = t;
} else if (z <= 8.5e-12) {
tmp = y / (a / t);
} else {
tmp = t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.15d+39)) then
tmp = t
else if (z <= 8.5d-12) then
tmp = y / (a / t)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+39) {
tmp = t;
} else if (z <= 8.5e-12) {
tmp = y / (a / t);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e+39: tmp = t elif z <= 8.5e-12: tmp = y / (a / t) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e+39) tmp = t; elseif (z <= 8.5e-12) tmp = Float64(y / Float64(a / t)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.15e+39) tmp = t; elseif (z <= 8.5e-12) tmp = y / (a / t); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+39], t, If[LessEqual[z, 8.5e-12], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+39}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.15000000000000006e39 or 8.4999999999999997e-12 < z Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f6416.4
Applied rewrites16.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6417.9
Applied rewrites17.9%
Taylor expanded in z around inf
Applied rewrites25.1%
if -1.15000000000000006e39 < z < 8.4999999999999997e-12Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f6416.4
Applied rewrites16.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6417.9
Applied rewrites17.9%
lift-*.f64N/A
lift-/.f64N/A
div-flipN/A
mult-flip-revN/A
lower-/.f64N/A
lower-/.f6417.9
Applied rewrites17.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.15e+39) t (if (<= z 8.5e-12) (* (/ y a) t) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+39) {
tmp = t;
} else if (z <= 8.5e-12) {
tmp = (y / a) * t;
} else {
tmp = t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.15d+39)) then
tmp = t
else if (z <= 8.5d-12) then
tmp = (y / a) * t
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+39) {
tmp = t;
} else if (z <= 8.5e-12) {
tmp = (y / a) * t;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e+39: tmp = t elif z <= 8.5e-12: tmp = (y / a) * t else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e+39) tmp = t; elseif (z <= 8.5e-12) tmp = Float64(Float64(y / a) * t); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.15e+39) tmp = t; elseif (z <= 8.5e-12) tmp = (y / a) * t; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+39], t, If[LessEqual[z, 8.5e-12], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+39}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-12}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.15000000000000006e39 or 8.4999999999999997e-12 < z Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f6416.4
Applied rewrites16.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6417.9
Applied rewrites17.9%
Taylor expanded in z around inf
Applied rewrites25.1%
if -1.15000000000000006e39 < z < 8.4999999999999997e-12Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f6416.4
Applied rewrites16.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6418.9
Applied rewrites18.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.2e+39) t (if (<= z 8.5e-12) (* y (/ t a)) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e+39) {
tmp = t;
} else if (z <= 8.5e-12) {
tmp = y * (t / a);
} else {
tmp = t;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.2d+39)) then
tmp = t
else if (z <= 8.5d-12) then
tmp = y * (t / a)
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e+39) {
tmp = t;
} else if (z <= 8.5e-12) {
tmp = y * (t / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2e+39: tmp = t elif z <= 8.5e-12: tmp = y * (t / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2e+39) tmp = t; elseif (z <= 8.5e-12) tmp = Float64(y * Float64(t / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.2e+39) tmp = t; elseif (z <= 8.5e-12) tmp = y * (t / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e+39], t, If[LessEqual[z, 8.5e-12], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+39}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-12}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.2e39 or 8.4999999999999997e-12 < z Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f6416.4
Applied rewrites16.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6417.9
Applied rewrites17.9%
Taylor expanded in z around inf
Applied rewrites25.1%
if -1.2e39 < z < 8.4999999999999997e-12Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f6416.4
Applied rewrites16.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6417.9
Applied rewrites17.9%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 79.1%
Taylor expanded in t around inf
lower-*.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-/.f64N/A
lower--.f6451.4
Applied rewrites51.4%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f6416.4
Applied rewrites16.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6417.9
Applied rewrites17.9%
Taylor expanded in z around inf
Applied rewrites25.1%
herbie shell --seed 2025142
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))