
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
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, b)
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), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
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, b)
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), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- t a) z (* y x)))
(t_2 (fma (- b y) z y))
(t_3 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_4 (fma (/ y (fma z (- b y) y)) x (/ (- t a) (- b y)))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -4e-291)
(/ t_1 t_2)
(if (<= t_3 0.0)
t_4
(if (<= t_3 1e+286)
(/ 1.0 (/ t_2 t_1))
(- (* x (/ -1.0 (- z 1.0))) (/ (- a t) (- (/ y z) (- y b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((t - a), z, (y * x));
double t_2 = fma((b - y), z, y);
double t_3 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_4 = fma((y / fma(z, (b - y), y)), x, ((t - a) / (b - y)));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -4e-291) {
tmp = t_1 / t_2;
} else if (t_3 <= 0.0) {
tmp = t_4;
} else if (t_3 <= 1e+286) {
tmp = 1.0 / (t_2 / t_1);
} else {
tmp = (x * (-1.0 / (z - 1.0))) - ((a - t) / ((y / z) - (y - b)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(t - a), z, Float64(y * x)) t_2 = fma(Float64(b - y), z, y) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_4 = fma(Float64(y / fma(z, Float64(b - y), y)), x, Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -4e-291) tmp = Float64(t_1 / t_2); elseif (t_3 <= 0.0) tmp = t_4; elseif (t_3 <= 1e+286) tmp = Float64(1.0 / Float64(t_2 / t_1)); else tmp = Float64(Float64(x * Float64(-1.0 / Float64(z - 1.0))) - Float64(Float64(a - t) / Float64(Float64(y / z) - Float64(y - b)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] * z + N[(y * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(y / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] * x + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -4e-291], N[(t$95$1 / t$95$2), $MachinePrecision], If[LessEqual[t$95$3, 0.0], t$95$4, If[LessEqual[t$95$3, 1e+286], N[(1.0 / N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(-1.0 / N[(z - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(a - t), $MachinePrecision] / N[(N[(y / z), $MachinePrecision] - N[(y - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - a, z, y \cdot x\right)\\
t_2 := \mathsf{fma}\left(b - y, z, y\right)\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_4 := \mathsf{fma}\left(\frac{y}{\mathsf{fma}\left(z, b - y, y\right)}, x, \frac{t - a}{b - y}\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq -4 \cdot 10^{-291}:\\
\;\;\;\;\frac{t\_1}{t\_2}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq 10^{+286}:\\
\;\;\;\;\frac{1}{\frac{t\_2}{t\_1}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-1}{z - 1} - \frac{a - t}{\frac{y}{z} - \left(y - b\right)}\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or -3.99999999999999985e-291 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in z around inf
lower--.f6476.3
Applied rewrites76.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -3.99999999999999985e-291Initial program 67.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.3
Applied rewrites67.3%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000003e286Initial program 67.3%
lift-/.f64N/A
div-flipN/A
lower-/.f64N/A
lower-/.f6467.2
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.2
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.2
Applied rewrites67.2%
if 1.00000000000000003e286 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in y around -inf
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
lift-fma.f64N/A
add-flipN/A
lower--.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
lower-/.f64N/A
sub-negate-revN/A
lower--.f6482.9
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
sub-negate-revN/A
sub-flip-reverseN/A
lower--.f64N/A
lower--.f6482.9
Applied rewrites82.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- t a) z (* y x)))
(t_2 (fma (- b y) z y))
(t_3 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_4 (fma (/ y (fma z (- b y) y)) x (/ (- t a) (- b y)))))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -4e-291)
(/ t_1 t_2)
(if (<= t_3 0.0)
t_4
(if (<= t_3 1e+286)
(/ 1.0 (/ t_2 t_1))
(fma (/ -1.0 (- z 1.0)) x (/ (- t a) (+ (- b y) (/ y z))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((t - a), z, (y * x));
double t_2 = fma((b - y), z, y);
double t_3 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_4 = fma((y / fma(z, (b - y), y)), x, ((t - a) / (b - y)));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -4e-291) {
tmp = t_1 / t_2;
} else if (t_3 <= 0.0) {
tmp = t_4;
} else if (t_3 <= 1e+286) {
tmp = 1.0 / (t_2 / t_1);
} else {
tmp = fma((-1.0 / (z - 1.0)), x, ((t - a) / ((b - y) + (y / z))));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(t - a), z, Float64(y * x)) t_2 = fma(Float64(b - y), z, y) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_4 = fma(Float64(y / fma(z, Float64(b - y), y)), x, Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -4e-291) tmp = Float64(t_1 / t_2); elseif (t_3 <= 0.0) tmp = t_4; elseif (t_3 <= 1e+286) tmp = Float64(1.0 / Float64(t_2 / t_1)); else tmp = fma(Float64(-1.0 / Float64(z - 1.0)), x, Float64(Float64(t - a) / Float64(Float64(b - y) + Float64(y / z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] * z + N[(y * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(y / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] * x + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -4e-291], N[(t$95$1 / t$95$2), $MachinePrecision], If[LessEqual[t$95$3, 0.0], t$95$4, If[LessEqual[t$95$3, 1e+286], N[(1.0 / N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * x + N[(N[(t - a), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - a, z, y \cdot x\right)\\
t_2 := \mathsf{fma}\left(b - y, z, y\right)\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_4 := \mathsf{fma}\left(\frac{y}{\mathsf{fma}\left(z, b - y, y\right)}, x, \frac{t - a}{b - y}\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq -4 \cdot 10^{-291}:\\
\;\;\;\;\frac{t\_1}{t\_2}\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq 10^{+286}:\\
\;\;\;\;\frac{1}{\frac{t\_2}{t\_1}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-1}{z - 1}, x, \frac{t - a}{\left(b - y\right) + \frac{y}{z}}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or -3.99999999999999985e-291 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in z around inf
lower--.f6476.3
Applied rewrites76.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -3.99999999999999985e-291Initial program 67.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.3
Applied rewrites67.3%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000003e286Initial program 67.3%
lift-/.f64N/A
div-flipN/A
lower-/.f64N/A
lower-/.f6467.2
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.2
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.2
Applied rewrites67.2%
if 1.00000000000000003e286 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in y around -inf
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (- t a) z (* y x)))
(t_2 (fma (- b y) z y))
(t_3 (/ (- t a) (- b y)))
(t_4 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_5 (fma (/ y (fma z (- b y) y)) x t_3)))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 -4e-291)
(/ t_1 t_2)
(if (<= t_4 0.0)
t_5
(if (<= t_4 1e+286)
(/ 1.0 (/ t_2 t_1))
(fma (/ -1.0 (- z 1.0)) x t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((t - a), z, (y * x));
double t_2 = fma((b - y), z, y);
double t_3 = (t - a) / (b - y);
double t_4 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_5 = fma((y / fma(z, (b - y), y)), x, t_3);
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= -4e-291) {
tmp = t_1 / t_2;
} else if (t_4 <= 0.0) {
tmp = t_5;
} else if (t_4 <= 1e+286) {
tmp = 1.0 / (t_2 / t_1);
} else {
tmp = fma((-1.0 / (z - 1.0)), x, t_3);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(t - a), z, Float64(y * x)) t_2 = fma(Float64(b - y), z, y) t_3 = Float64(Float64(t - a) / Float64(b - y)) t_4 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_5 = fma(Float64(y / fma(z, Float64(b - y), y)), x, t_3) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= -4e-291) tmp = Float64(t_1 / t_2); elseif (t_4 <= 0.0) tmp = t_5; elseif (t_4 <= 1e+286) tmp = Float64(1.0 / Float64(t_2 / t_1)); else tmp = fma(Float64(-1.0 / Float64(z - 1.0)), x, t_3); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] * z + N[(y * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[(y / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] * x + t$95$3), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, -4e-291], N[(t$95$1 / t$95$2), $MachinePrecision], If[LessEqual[t$95$4, 0.0], t$95$5, If[LessEqual[t$95$4, 1e+286], N[(1.0 / N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * x + t$95$3), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t - a, z, y \cdot x\right)\\
t_2 := \mathsf{fma}\left(b - y, z, y\right)\\
t_3 := \frac{t - a}{b - y}\\
t_4 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_5 := \mathsf{fma}\left(\frac{y}{\mathsf{fma}\left(z, b - y, y\right)}, x, t\_3\right)\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq -4 \cdot 10^{-291}:\\
\;\;\;\;\frac{t\_1}{t\_2}\\
\mathbf{elif}\;t\_4 \leq 0:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq 10^{+286}:\\
\;\;\;\;\frac{1}{\frac{t\_2}{t\_1}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-1}{z - 1}, x, t\_3\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or -3.99999999999999985e-291 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in z around inf
lower--.f6476.3
Applied rewrites76.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -3.99999999999999985e-291Initial program 67.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.3
Applied rewrites67.3%
if -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000003e286Initial program 67.3%
lift-/.f64N/A
div-flipN/A
lower-/.f64N/A
lower-/.f6467.2
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.2
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.2
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.2
Applied rewrites67.2%
if 1.00000000000000003e286 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in y around -inf
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
Taylor expanded in z around inf
lower--.f6465.6
Applied rewrites65.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y)))
(t_2 (/ (fma (- t a) z (* y x)) (fma (- b y) z y)))
(t_3 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_4 (fma (/ y (fma z (- b y) y)) x t_1)))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -4e-291)
t_2
(if (<= t_3 0.0)
t_4
(if (<= t_3 1e+286) t_2 (fma (/ -1.0 (- z 1.0)) x t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = fma((t - a), z, (y * x)) / fma((b - y), z, y);
double t_3 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_4 = fma((y / fma(z, (b - y), y)), x, t_1);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -4e-291) {
tmp = t_2;
} else if (t_3 <= 0.0) {
tmp = t_4;
} else if (t_3 <= 1e+286) {
tmp = t_2;
} else {
tmp = fma((-1.0 / (z - 1.0)), x, t_1);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(fma(Float64(t - a), z, Float64(y * x)) / fma(Float64(b - y), z, y)) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_4 = fma(Float64(y / fma(z, Float64(b - y), y)), x, t_1) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -4e-291) tmp = t_2; elseif (t_3 <= 0.0) tmp = t_4; elseif (t_3 <= 1e+286) tmp = t_2; else tmp = fma(Float64(-1.0 / Float64(z - 1.0)), x, t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - a), $MachinePrecision] * z + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(y / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] * x + t$95$1), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -4e-291], t$95$2, If[LessEqual[t$95$3, 0.0], t$95$4, If[LessEqual[t$95$3, 1e+286], t$95$2, N[(N[(-1.0 / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * x + t$95$1), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := \frac{\mathsf{fma}\left(t - a, z, y \cdot x\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_4 := \mathsf{fma}\left(\frac{y}{\mathsf{fma}\left(z, b - y, y\right)}, x, t\_1\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq -4 \cdot 10^{-291}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq 10^{+286}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-1}{z - 1}, x, t\_1\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or -3.99999999999999985e-291 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in z around inf
lower--.f6476.3
Applied rewrites76.3%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -3.99999999999999985e-291 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000003e286Initial program 67.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.3
Applied rewrites67.3%
if 1.00000000000000003e286 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in y around -inf
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
Taylor expanded in z around inf
lower--.f6465.6
Applied rewrites65.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (fma (- t a) z (* y x)) (fma (- b y) z y)))
(t_2 (/ (- t a) (- b y)))
(t_3 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
(t_4 (fma (/ -1.0 (- z 1.0)) x t_2)))
(if (<= t_3 (- INFINITY))
t_4
(if (<= t_3 -4e-291)
t_1
(if (<= t_3 0.0) t_2 (if (<= t_3 1e+286) t_1 t_4))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((t - a), z, (y * x)) / fma((b - y), z, y);
double t_2 = (t - a) / (b - y);
double t_3 = ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
double t_4 = fma((-1.0 / (z - 1.0)), x, t_2);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_3 <= -4e-291) {
tmp = t_1;
} else if (t_3 <= 0.0) {
tmp = t_2;
} else if (t_3 <= 1e+286) {
tmp = t_1;
} else {
tmp = t_4;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(fma(Float64(t - a), z, Float64(y * x)) / fma(Float64(b - y), z, y)) t_2 = Float64(Float64(t - a) / Float64(b - y)) t_3 = Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) t_4 = fma(Float64(-1.0 / Float64(z - 1.0)), x, t_2) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = t_4; elseif (t_3 <= -4e-291) tmp = t_1; elseif (t_3 <= 0.0) tmp = t_2; elseif (t_3 <= 1e+286) tmp = t_1; else tmp = t_4; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(t - a), $MachinePrecision] * z + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] * z + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(-1.0 / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * x + t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], t$95$4, If[LessEqual[t$95$3, -4e-291], t$95$1, If[LessEqual[t$95$3, 0.0], t$95$2, If[LessEqual[t$95$3, 1e+286], t$95$1, t$95$4]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(t - a, z, y \cdot x\right)}{\mathsf{fma}\left(b - y, z, y\right)}\\
t_2 := \frac{t - a}{b - y}\\
t_3 := \frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}\\
t_4 := \mathsf{fma}\left(\frac{-1}{z - 1}, x, t\_2\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 \leq -4 \cdot 10^{-291}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 10^{+286}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -inf.0 or 1.00000000000000003e286 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in y around -inf
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
Taylor expanded in z around inf
lower--.f6465.6
Applied rewrites65.6%
if -inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -3.99999999999999985e-291 or -0.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < 1.00000000000000003e286Initial program 67.3%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.3
Applied rewrites67.3%
if -3.99999999999999985e-291 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < -0.0Initial program 67.3%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6451.0
Applied rewrites51.0%
(FPCore (x y z t a b) :precision binary64 (if (<= (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))) INFINITY) (fma (/ y (fma z (- b y) y)) x (/ (- t a) (+ (- b y) (/ y z)))) (fma (/ x (fma (- b y) (/ z y) 1.0)) (/ y y) (/ (- t a) (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((((x * y) + (z * (t - a))) / (y + (z * (b - y)))) <= ((double) INFINITY)) {
tmp = fma((y / fma(z, (b - y), y)), x, ((t - a) / ((b - y) + (y / z))));
} else {
tmp = fma((x / fma((b - y), (z / y), 1.0)), (y / y), ((t - a) / (b - y)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) <= Inf) tmp = fma(Float64(y / fma(z, Float64(b - y), y)), x, Float64(Float64(t - a) / Float64(Float64(b - y) + Float64(y / z)))); else tmp = fma(Float64(x / fma(Float64(b - y), Float64(z / y), 1.0)), Float64(y / y), Float64(Float64(t - a) / Float64(b - y))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(y / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] * x + N[(N[(t - a), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(N[(b - y), $MachinePrecision] * N[(z / y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / y), $MachinePrecision] + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)} \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{\mathsf{fma}\left(z, b - y, y\right)}, x, \frac{t - a}{\left(b - y\right) + \frac{y}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{\mathsf{fma}\left(b - y, \frac{z}{y}, 1\right)}, \frac{y}{y}, \frac{t - a}{b - y}\right)\\
\end{array}
\end{array}
if (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) < +inf.0Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
if +inf.0 < (/.f64 (+.f64 (*.f64 x y) (*.f64 z (-.f64 t a))) (+.f64 y (*.f64 z (-.f64 b y)))) Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6480.2
Applied rewrites80.2%
(FPCore (x y z t a b) :precision binary64 (fma (/ y (fma z (- b y) y)) x (/ (- t a) (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((y / fma(z, (b - y), y)), x, ((t - a) / ((b - y) + (y / z))));
}
function code(x, y, z, t, a, b) return fma(Float64(y / fma(z, Float64(b - y), y)), x, Float64(Float64(t - a) / Float64(Float64(b - y) + Float64(y / z)))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y / N[(z * N[(b - y), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] * x + N[(N[(t - a), $MachinePrecision] / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{y}{\mathsf{fma}\left(z, b - y, y\right)}, x, \frac{t - a}{\left(b - y\right) + \frac{y}{z}}\right)
\end{array}
Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (/ -1.0 (- z 1.0)) x (/ (- t a) (- b y)))))
(if (<= z -2.7e-16)
t_1
(if (<= z 2900000000000.0)
(/ (fma y x (* (- t a) z)) (+ y (* z b)))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((-1.0 / (z - 1.0)), x, ((t - a) / (b - y)));
double tmp;
if (z <= -2.7e-16) {
tmp = t_1;
} else if (z <= 2900000000000.0) {
tmp = fma(y, x, ((t - a) * z)) / (y + (z * b));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(-1.0 / Float64(z - 1.0)), x, Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (z <= -2.7e-16) tmp = t_1; elseif (z <= 2900000000000.0) tmp = Float64(fma(y, x, Float64(Float64(t - a) * z)) / Float64(y + Float64(z * b))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(-1.0 / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * x + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e-16], t$95$1, If[LessEqual[z, 2900000000000.0], N[(N[(y * x + N[(N[(t - a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{-1}{z - 1}, x, \frac{t - a}{b - y}\right)\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2900000000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, x, \left(t - a\right) \cdot z\right)}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.69999999999999999e-16 or 2.9e12 < z Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in y around -inf
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
Taylor expanded in z around inf
lower--.f6465.6
Applied rewrites65.6%
if -2.69999999999999999e-16 < z < 2.9e12Initial program 67.3%
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6467.3
lift-*.f64N/A
*-commutativeN/A
lower-*.f6467.3
Applied rewrites67.3%
Taylor expanded in y around 0
Applied rewrites57.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (/ -1.0 (- z 1.0)) x (/ (- t a) (- b y)))))
(if (<= z -3.5e-73)
t_1
(if (<= z 1e-82)
(fma 1.0 x (/ (* z (- t a)) y))
(if (<= z 0.0098) (/ (fma t z (* x y)) (+ y (* z (- b y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((-1.0 / (z - 1.0)), x, ((t - a) / (b - y)));
double tmp;
if (z <= -3.5e-73) {
tmp = t_1;
} else if (z <= 1e-82) {
tmp = fma(1.0, x, ((z * (t - a)) / y));
} else if (z <= 0.0098) {
tmp = fma(t, z, (x * y)) / (y + (z * (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(-1.0 / Float64(z - 1.0)), x, Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (z <= -3.5e-73) tmp = t_1; elseif (z <= 1e-82) tmp = fma(1.0, x, Float64(Float64(z * Float64(t - a)) / y)); elseif (z <= 0.0098) tmp = Float64(fma(t, z, Float64(x * y)) / Float64(y + Float64(z * Float64(b - y)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(-1.0 / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * x + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e-73], t$95$1, If[LessEqual[z, 1e-82], N[(1.0 * x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0098], N[(N[(t * z + N[(x * y), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{-1}{z - 1}, x, \frac{t - a}{b - y}\right)\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{-82}:\\
\;\;\;\;\mathsf{fma}\left(1, x, \frac{z \cdot \left(t - a\right)}{y}\right)\\
\mathbf{elif}\;z \leq 0.0098:\\
\;\;\;\;\frac{\mathsf{fma}\left(t, z, x \cdot y\right)}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.4999999999999998e-73 or 0.0097999999999999997 < z Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in y around -inf
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
Taylor expanded in z around inf
lower--.f6465.6
Applied rewrites65.6%
if -3.4999999999999998e-73 < z < 1e-82Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in z around 0
Applied rewrites65.8%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6438.7
Applied rewrites38.7%
if 1e-82 < z < 0.0097999999999999997Initial program 67.3%
Taylor expanded in a around 0
lower-fma.f64N/A
lower-*.f6447.9
Applied rewrites47.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (fma (/ -1.0 (- z 1.0)) x (/ (- t a) (- b y)))))
(if (<= z -3.5e-73)
t_1
(if (<= z 1.2e-69) (fma 1.0 x (/ (* z (- t a)) y)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = fma((-1.0 / (z - 1.0)), x, ((t - a) / (b - y)));
double tmp;
if (z <= -3.5e-73) {
tmp = t_1;
} else if (z <= 1.2e-69) {
tmp = fma(1.0, x, ((z * (t - a)) / y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = fma(Float64(-1.0 / Float64(z - 1.0)), x, Float64(Float64(t - a) / Float64(b - y))) tmp = 0.0 if (z <= -3.5e-73) tmp = t_1; elseif (z <= 1.2e-69) tmp = fma(1.0, x, Float64(Float64(z * Float64(t - a)) / y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(-1.0 / N[(z - 1.0), $MachinePrecision]), $MachinePrecision] * x + N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e-73], t$95$1, If[LessEqual[z, 1.2e-69], N[(1.0 * x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{-1}{z - 1}, x, \frac{t - a}{b - y}\right)\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-69}:\\
\;\;\;\;\mathsf{fma}\left(1, x, \frac{z \cdot \left(t - a\right)}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.4999999999999998e-73 or 1.2000000000000001e-69 < z Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in y around -inf
lower-/.f64N/A
lower--.f6482.9
Applied rewrites82.9%
Taylor expanded in z around inf
lower--.f6465.6
Applied rewrites65.6%
if -3.4999999999999998e-73 < z < 1.2000000000000001e-69Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in z around 0
Applied rewrites65.8%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6438.7
Applied rewrites38.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- t a))) (t_2 (/ (- t a) (- b y))))
(if (<= z -3.2e-15)
t_2
(if (<= z 1.15e-82)
(fma 1.0 x (/ t_1 y))
(if (<= z 22000000000000.0) (/ (fma x y t_1) (* b z)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (t - a);
double t_2 = (t - a) / (b - y);
double tmp;
if (z <= -3.2e-15) {
tmp = t_2;
} else if (z <= 1.15e-82) {
tmp = fma(1.0, x, (t_1 / y));
} else if (z <= 22000000000000.0) {
tmp = fma(x, y, t_1) / (b * z);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(t - a)) t_2 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.2e-15) tmp = t_2; elseif (z <= 1.15e-82) tmp = fma(1.0, x, Float64(t_1 / y)); elseif (z <= 22000000000000.0) tmp = Float64(fma(x, y, t_1) / Float64(b * z)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e-15], t$95$2, If[LessEqual[z, 1.15e-82], N[(1.0 * x + N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 22000000000000.0], N[(N[(x * y + t$95$1), $MachinePrecision] / N[(b * z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(t - a\right)\\
t_2 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{-15}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.15 \cdot 10^{-82}:\\
\;\;\;\;\mathsf{fma}\left(1, x, \frac{t\_1}{y}\right)\\
\mathbf{elif}\;z \leq 22000000000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, y, t\_1\right)}{b \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.1999999999999999e-15 or 2.2e13 < z Initial program 67.3%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6451.0
Applied rewrites51.0%
if -3.1999999999999999e-15 < z < 1.14999999999999998e-82Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in z around 0
Applied rewrites65.8%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6438.7
Applied rewrites38.7%
if 1.14999999999999998e-82 < z < 2.2e13Initial program 67.3%
Taylor expanded in b around inf
lower-/.f64N/A
lower-fma.f64N/A
lower-*.f64N/A
lower--.f64N/A
lower-*.f6428.8
Applied rewrites28.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -3.2e-15)
t_1
(if (<= z 9.8e-37) (fma 1.0 x (/ (* z (- t a)) y)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.2e-15) {
tmp = t_1;
} else if (z <= 9.8e-37) {
tmp = fma(1.0, x, ((z * (t - a)) / y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.2e-15) tmp = t_1; elseif (z <= 9.8e-37) tmp = fma(1.0, x, Float64(Float64(z * Float64(t - a)) / y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e-15], t$95$1, If[LessEqual[z, 9.8e-37], N[(1.0 * x + N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-37}:\\
\;\;\;\;\mathsf{fma}\left(1, x, \frac{z \cdot \left(t - a\right)}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.1999999999999999e-15 or 9.80000000000000036e-37 < z Initial program 67.3%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6451.0
Applied rewrites51.0%
if -3.1999999999999999e-15 < z < 9.80000000000000036e-37Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in z around 0
Applied rewrites65.8%
Taylor expanded in z around 0
lower-/.f64N/A
lower-*.f64N/A
lower--.f6438.7
Applied rewrites38.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- t a) (- b y)))) (if (<= z -3.1e+22) t_1 (if (<= z 3.4e-40) (* -1.0 (/ x (- z 1.0))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.1e+22) {
tmp = t_1;
} else if (z <= 3.4e-40) {
tmp = -1.0 * (x / (z - 1.0));
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-3.1d+22)) then
tmp = t_1
else if (z <= 3.4d-40) then
tmp = (-1.0d0) * (x / (z - 1.0d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.1e+22) {
tmp = t_1;
} else if (z <= 3.4e-40) {
tmp = -1.0 * (x / (z - 1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -3.1e+22: tmp = t_1 elif z <= 3.4e-40: tmp = -1.0 * (x / (z - 1.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.1e+22) tmp = t_1; elseif (z <= 3.4e-40) tmp = Float64(-1.0 * Float64(x / Float64(z - 1.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.1e+22) tmp = t_1; elseif (z <= 3.4e-40) tmp = -1.0 * (x / (z - 1.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+22], t$95$1, If[LessEqual[z, 3.4e-40], N[(-1.0 * N[(x / N[(z - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-40}:\\
\;\;\;\;-1 \cdot \frac{x}{z - 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.1000000000000002e22 or 3.39999999999999984e-40 < z Initial program 67.3%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6451.0
Applied rewrites51.0%
if -3.1000000000000002e22 < z < 3.39999999999999984e-40Initial program 67.3%
Taylor expanded in y around -inf
lower-*.f64N/A
lower-/.f64N/A
lower--.f6433.2
Applied rewrites33.2%
(FPCore (x y z t a b) :precision binary64 (/ (- t a) (- b y)))
double code(double x, double y, double z, double t, double a, double b) {
return (t - a) / (b - y);
}
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, b)
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), intent (in) :: b
code = (t - a) / (b - y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (t - a) / (b - y);
}
def code(x, y, z, t, a, b): return (t - a) / (b - y)
function code(x, y, z, t, a, b) return Float64(Float64(t - a) / Float64(b - y)) end
function tmp = code(x, y, z, t, a, b) tmp = (t - a) / (b - y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t - a}{b - y}
\end{array}
Initial program 67.3%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f64N/A
lower--.f6451.0
Applied rewrites51.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- t a) b))) (if (<= b -67000000000000.0) t_1 (if (<= b 1e-63) (/ t (- b y)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / b;
double tmp;
if (b <= -67000000000000.0) {
tmp = t_1;
} else if (b <= 1e-63) {
tmp = t / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / b
if (b <= (-67000000000000.0d0)) then
tmp = t_1
else if (b <= 1d-63) then
tmp = t / (b - y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / b;
double tmp;
if (b <= -67000000000000.0) {
tmp = t_1;
} else if (b <= 1e-63) {
tmp = t / (b - y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / b tmp = 0 if b <= -67000000000000.0: tmp = t_1 elif b <= 1e-63: tmp = t / (b - y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / b) tmp = 0.0 if (b <= -67000000000000.0) tmp = t_1; elseif (b <= 1e-63) tmp = Float64(t / Float64(b - y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / b; tmp = 0.0; if (b <= -67000000000000.0) tmp = t_1; elseif (b <= 1e-63) tmp = t / (b - y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[b, -67000000000000.0], t$95$1, If[LessEqual[b, 1e-63], N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b}\\
\mathbf{if}\;b \leq -67000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 10^{-63}:\\
\;\;\;\;\frac{t}{b - y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -6.7e13 or 1.00000000000000007e-63 < b Initial program 67.3%
Taylor expanded in y around 0
lower-/.f64N/A
lower--.f6435.2
Applied rewrites35.2%
if -6.7e13 < b < 1.00000000000000007e-63Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6432.4
Applied rewrites32.4%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f6427.4
Applied rewrites27.4%
(FPCore (x y z t a b) :precision binary64 (/ t (- b y)))
double code(double x, double y, double z, double t, double a, double b) {
return t / (b - y);
}
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, b)
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), intent (in) :: b
code = t / (b - y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return t / (b - y);
}
def code(x, y, z, t, a, b): return t / (b - y)
function code(x, y, z, t, a, b) return Float64(t / Float64(b - y)) end
function tmp = code(x, y, z, t, a, b) tmp = t / (b - y); end
code[x_, y_, z_, t_, a_, b_] := N[(t / N[(b - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{b - y}
\end{array}
Initial program 67.3%
lift-/.f64N/A
lift-+.f64N/A
div-addN/A
lift-*.f64N/A
lift-+.f64N/A
sum-to-multN/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
Applied rewrites83.7%
lift-/.f64N/A
*-rgt-identityN/A
associate-*l/N/A
*-inversesN/A
lift-/.f64N/A
lift-/.f64N/A
lift-/.f64N/A
*-inversesN/A
lower-fma.f64N/A
*-commutativeN/A
*-lft-identityN/A
lift-/.f64N/A
*-inversesN/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
*-commutativeN/A
Applied rewrites93.6%
Taylor expanded in t around inf
lower-/.f64N/A
lower--.f64N/A
lower-+.f64N/A
lower-/.f6432.4
Applied rewrites32.4%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f6427.4
Applied rewrites27.4%
(FPCore (x y z t a b) :precision binary64 (/ t b))
double code(double x, double y, double z, double t, double a, double b) {
return t / b;
}
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, b)
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), intent (in) :: b
code = t / b
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return t / b;
}
def code(x, y, z, t, a, b): return t / b
function code(x, y, z, t, a, b) return Float64(t / b) end
function tmp = code(x, y, z, t, a, b) tmp = t / b; end
code[x_, y_, z_, t_, a_, b_] := N[(t / b), $MachinePrecision]
\begin{array}{l}
\\
\frac{t}{b}
\end{array}
Initial program 67.3%
Taylor expanded in y around 0
lower-/.f64N/A
lower--.f6435.2
Applied rewrites35.2%
Taylor expanded in t around inf
lower-/.f6419.8
Applied rewrites19.8%
herbie shell --seed 2025142
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))