
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = ((60.0d0 * (x - y)) / (z - t)) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
def code(x, y, z, t, a): return ((60.0 * (x - y)) / (z - t)) + (a * 120.0)
function code(x, y, z, t, a) return Float64(Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) + Float64(a * 120.0)) end
function tmp = code(x, y, z, t, a) tmp = ((60.0 * (x - y)) / (z - t)) + (a * 120.0); end
code[x_, y_, z_, t_, a_] := N[(N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120
(FPCore (x y z t a) :precision binary64 (fma a 120.0 (* (/ -60.0 (- z t)) (- y x))))
double code(double x, double y, double z, double t, double a) {
return fma(a, 120.0, ((-60.0 / (z - t)) * (y - x)));
}
function code(x, y, z, t, a) return fma(a, 120.0, Float64(Float64(-60.0 / Float64(z - t)) * Float64(y - x))) end
code[x_, y_, z_, t_, a_] := N[(a * 120.0 + N[(N[(-60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\mathsf{fma}\left(a, 120, \frac{-60}{z - t} \cdot \left(y - x\right)\right)
Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
fp-cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-outN/A
sub-negate-revN/A
lift--.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
Applied rewrites99.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma a 120.0 (/ (* y -60.0) (- z t)))))
(if (<= y -1.8e+62)
t_1
(if (<= y 1.1e+38) (fma 60.0 (/ x (- z t)) (* 120.0 a)) t_1))))double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, 120.0, ((y * -60.0) / (z - t)));
double tmp;
if (y <= -1.8e+62) {
tmp = t_1;
} else if (y <= 1.1e+38) {
tmp = fma(60.0, (x / (z - t)), (120.0 * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, 120.0, Float64(Float64(y * -60.0) / Float64(z - t))) tmp = 0.0 if (y <= -1.8e+62) tmp = t_1; elseif (y <= 1.1e+38) tmp = fma(60.0, Float64(x / Float64(z - t)), Float64(120.0 * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * 120.0 + N[(N[(y * -60.0), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.8e+62], t$95$1, If[LessEqual[y, 1.1e+38], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, 120, \frac{y \cdot -60}{z - t}\right)\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+38}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x}{z - t}, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if y < -1.8e62 or 1.10000000000000003e38 < y Initial program 99.4%
Taylor expanded in x around 0
lower-*.f6474.9%
Applied rewrites74.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6474.9%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6474.9%
Applied rewrites74.9%
if -1.8e62 < y < 1.10000000000000003e38Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.62e-126)
(fma a 120.0 (* (/ 60.0 t) (- y x)))
(if (<= t 1.9e-93)
(fma a 120.0 (* (/ -60.0 z) (- y x)))
(if (<= t 7.8e-44)
(* (/ 60.0 (- z t)) (- x y))
(if (<= t 1.05e+109)
(fma 60.0 (/ x (- z t)) (* 120.0 a))
(fma -60.0 (/ (- x y) t) (* 120.0 a)))))))double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.62e-126) {
tmp = fma(a, 120.0, ((60.0 / t) * (y - x)));
} else if (t <= 1.9e-93) {
tmp = fma(a, 120.0, ((-60.0 / z) * (y - x)));
} else if (t <= 7.8e-44) {
tmp = (60.0 / (z - t)) * (x - y);
} else if (t <= 1.05e+109) {
tmp = fma(60.0, (x / (z - t)), (120.0 * a));
} else {
tmp = fma(-60.0, ((x - y) / t), (120.0 * a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.62e-126) tmp = fma(a, 120.0, Float64(Float64(60.0 / t) * Float64(y - x))); elseif (t <= 1.9e-93) tmp = fma(a, 120.0, Float64(Float64(-60.0 / z) * Float64(y - x))); elseif (t <= 7.8e-44) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); elseif (t <= 1.05e+109) tmp = fma(60.0, Float64(x / Float64(z - t)), Float64(120.0 * a)); else tmp = fma(-60.0, Float64(Float64(x - y) / t), Float64(120.0 * a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.62e-126], N[(a * 120.0 + N[(N[(60.0 / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-93], N[(a * 120.0 + N[(N[(-60.0 / z), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-44], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+109], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\mathbf{if}\;t \leq -2.62 \cdot 10^{-126}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{60}{t} \cdot \left(y - x\right)\right)\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-93}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{-60}{z} \cdot \left(y - x\right)\right)\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-44}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x}{z - t}, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x - y}{t}, 120 \cdot a\right)\\
\end{array}
if t < -2.6199999999999999e-126Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
fp-cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-outN/A
sub-negate-revN/A
lift--.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
Applied rewrites99.8%
Taylor expanded in z around 0
lower-/.f6464.1%
Applied rewrites64.1%
if -2.6199999999999999e-126 < t < 1.8999999999999999e-93Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
fp-cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-outN/A
sub-negate-revN/A
lift--.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
Applied rewrites99.8%
Taylor expanded in z around inf
lower-/.f6464.2%
Applied rewrites64.2%
if 1.8999999999999999e-93 < t < 7.8000000000000004e-44Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
associate-*l/N/A
metadata-evalN/A
distribute-neg-fracN/A
lift-/.f64N/A
lower-*.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6450.1%
Applied rewrites50.1%
if 7.8000000000000004e-44 < t < 1.0500000000000001e109Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
if 1.0500000000000001e109 < t Initial program 99.4%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6464.1%
Applied rewrites64.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma -60.0 (/ (- x y) t) (* 120.0 a))))
(if (<= t -2.62e-126)
t_1
(if (<= t 1.9e-93)
(fma a 120.0 (* (/ -60.0 z) (- y x)))
(if (<= t 7.8e-44)
(* (/ 60.0 (- z t)) (- x y))
(if (<= t 1.05e+109) (fma 60.0 (/ x (- z t)) (* 120.0 a)) t_1))))))double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-60.0, ((x - y) / t), (120.0 * a));
double tmp;
if (t <= -2.62e-126) {
tmp = t_1;
} else if (t <= 1.9e-93) {
tmp = fma(a, 120.0, ((-60.0 / z) * (y - x)));
} else if (t <= 7.8e-44) {
tmp = (60.0 / (z - t)) * (x - y);
} else if (t <= 1.05e+109) {
tmp = fma(60.0, (x / (z - t)), (120.0 * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(-60.0, Float64(Float64(x - y) / t), Float64(120.0 * a)) tmp = 0.0 if (t <= -2.62e-126) tmp = t_1; elseif (t <= 1.9e-93) tmp = fma(a, 120.0, Float64(Float64(-60.0 / z) * Float64(y - x))); elseif (t <= 7.8e-44) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); elseif (t <= 1.05e+109) tmp = fma(60.0, Float64(x / Float64(z - t)), Float64(120.0 * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.62e-126], t$95$1, If[LessEqual[t, 1.9e-93], N[(a * 120.0 + N[(N[(-60.0 / z), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-44], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+109], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(-60, \frac{x - y}{t}, 120 \cdot a\right)\\
\mathbf{if}\;t \leq -2.62 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-93}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{-60}{z} \cdot \left(y - x\right)\right)\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-44}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x}{z - t}, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -2.6199999999999999e-126 or 1.0500000000000001e109 < t Initial program 99.4%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6464.1%
Applied rewrites64.1%
if -2.6199999999999999e-126 < t < 1.8999999999999999e-93Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
fp-cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-outN/A
sub-negate-revN/A
lift--.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
Applied rewrites99.8%
Taylor expanded in z around inf
lower-/.f6464.2%
Applied rewrites64.2%
if 1.8999999999999999e-93 < t < 7.8000000000000004e-44Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
associate-*l/N/A
metadata-evalN/A
distribute-neg-fracN/A
lift-/.f64N/A
lower-*.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6450.1%
Applied rewrites50.1%
if 7.8000000000000004e-44 < t < 1.0500000000000001e109Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma -60.0 (/ (- x y) t) (* 120.0 a))))
(if (<= t -2.62e-126)
t_1
(if (<= t 1.9e-93)
(fma 60.0 (/ (- x y) z) (* 120.0 a))
(if (<= t 7.8e-44)
(* (/ 60.0 (- z t)) (- x y))
(if (<= t 1.05e+109) (fma 60.0 (/ x (- z t)) (* 120.0 a)) t_1))))))double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-60.0, ((x - y) / t), (120.0 * a));
double tmp;
if (t <= -2.62e-126) {
tmp = t_1;
} else if (t <= 1.9e-93) {
tmp = fma(60.0, ((x - y) / z), (120.0 * a));
} else if (t <= 7.8e-44) {
tmp = (60.0 / (z - t)) * (x - y);
} else if (t <= 1.05e+109) {
tmp = fma(60.0, (x / (z - t)), (120.0 * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(-60.0, Float64(Float64(x - y) / t), Float64(120.0 * a)) tmp = 0.0 if (t <= -2.62e-126) tmp = t_1; elseif (t <= 1.9e-93) tmp = fma(60.0, Float64(Float64(x - y) / z), Float64(120.0 * a)); elseif (t <= 7.8e-44) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); elseif (t <= 1.05e+109) tmp = fma(60.0, Float64(x / Float64(z - t)), Float64(120.0 * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.62e-126], t$95$1, If[LessEqual[t, 1.9e-93], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e-44], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+109], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(-60, \frac{x - y}{t}, 120 \cdot a\right)\\
\mathbf{if}\;t \leq -2.62 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-93}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x - y}{z}, 120 \cdot a\right)\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-44}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x}{z - t}, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -2.6199999999999999e-126 or 1.0500000000000001e109 < t Initial program 99.4%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6464.1%
Applied rewrites64.1%
if -2.6199999999999999e-126 < t < 1.8999999999999999e-93Initial program 99.4%
Taylor expanded in z around inf
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6464.2%
Applied rewrites64.2%
if 1.8999999999999999e-93 < t < 7.8000000000000004e-44Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
associate-*l/N/A
metadata-evalN/A
distribute-neg-fracN/A
lift-/.f64N/A
lower-*.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6450.1%
Applied rewrites50.1%
if 7.8000000000000004e-44 < t < 1.0500000000000001e109Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e-10)
(* 60.0 (/ (- x y) (- z t)))
(if (<= t_1 5e-22)
(fma 60.0 (/ x (- z t)) (* 120.0 a))
(* (/ 60.0 (- z t)) (- x y))))))double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e-10) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (t_1 <= 5e-22) {
tmp = fma(60.0, (x / (z - t)), (120.0 * a));
} else {
tmp = (60.0 / (z - t)) * (x - y);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -5e-10) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (t_1 <= 5e-22) tmp = fma(60.0, Float64(x / Float64(z - t)), Float64(120.0 * a)); else tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-10], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-22], N[(60.0 * N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-10}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-22}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x}{z - t}, 120 \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.00000000000000031e-10Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
if -5.00000000000000031e-10 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999954e-22Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
if 4.99999999999999954e-22 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
associate-*l/N/A
metadata-evalN/A
distribute-neg-fracN/A
lift-/.f64N/A
lower-*.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6450.1%
Applied rewrites50.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma -60.0 (/ (- x y) t) (* 120.0 a))))
(if (<= t -2.62e-126)
t_1
(if (<= t -4.6e-233)
(fma 60.0 (/ x z) (* 120.0 a))
(if (<= t 1.04e-32)
(* (/ 60.0 (- z t)) (- x y))
(if (<= t 2.9e+56) (fma a 120.0 (* (/ -60.0 z) y)) t_1))))))double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-60.0, ((x - y) / t), (120.0 * a));
double tmp;
if (t <= -2.62e-126) {
tmp = t_1;
} else if (t <= -4.6e-233) {
tmp = fma(60.0, (x / z), (120.0 * a));
} else if (t <= 1.04e-32) {
tmp = (60.0 / (z - t)) * (x - y);
} else if (t <= 2.9e+56) {
tmp = fma(a, 120.0, ((-60.0 / z) * y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(-60.0, Float64(Float64(x - y) / t), Float64(120.0 * a)) tmp = 0.0 if (t <= -2.62e-126) tmp = t_1; elseif (t <= -4.6e-233) tmp = fma(60.0, Float64(x / z), Float64(120.0 * a)); elseif (t <= 1.04e-32) tmp = Float64(Float64(60.0 / Float64(z - t)) * Float64(x - y)); elseif (t <= 2.9e+56) tmp = fma(a, 120.0, Float64(Float64(-60.0 / z) * y)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.62e-126], t$95$1, If[LessEqual[t, -4.6e-233], N[(60.0 * N[(x / z), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.04e-32], N[(N[(60.0 / N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+56], N[(a * 120.0 + N[(N[(-60.0 / z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(-60, \frac{x - y}{t}, 120 \cdot a\right)\\
\mathbf{if}\;t \leq -2.62 \cdot 10^{-126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{-233}:\\
\;\;\;\;\mathsf{fma}\left(60, \frac{x}{z}, 120 \cdot a\right)\\
\mathbf{elif}\;t \leq 1.04 \cdot 10^{-32}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{-60}{z} \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -2.6199999999999999e-126 or 2.90000000000000007e56 < t Initial program 99.4%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6464.1%
Applied rewrites64.1%
if -2.6199999999999999e-126 < t < -4.6000000000000004e-233Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
Taylor expanded in z around inf
lower-/.f6455.9%
Applied rewrites55.9%
if -4.6000000000000004e-233 < t < 1.03999999999999998e-32Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
associate-*l/N/A
metadata-evalN/A
distribute-neg-fracN/A
lift-/.f64N/A
lower-*.f64N/A
lift-/.f64N/A
distribute-neg-fracN/A
metadata-evalN/A
lower-/.f6450.1%
Applied rewrites50.1%
if 1.03999999999999998e-32 < t < 2.90000000000000007e56Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
fp-cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-outN/A
sub-negate-revN/A
lift--.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
Applied rewrites99.8%
Taylor expanded in z around inf
lower-/.f6464.2%
Applied rewrites64.2%
Taylor expanded in x around 0
Applied rewrites54.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma a 120.0 (* (/ 60.0 t) y))))
(if (<= a -9.6e+78)
t_1
(if (<= a 1.45e-70)
(* 60.0 (/ (- x y) (- z t)))
(if (<= a 2.5e+72) t_1 (fma a 120.0 (* (/ -60.0 z) y)))))))double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, 120.0, ((60.0 / t) * y));
double tmp;
if (a <= -9.6e+78) {
tmp = t_1;
} else if (a <= 1.45e-70) {
tmp = 60.0 * ((x - y) / (z - t));
} else if (a <= 2.5e+72) {
tmp = t_1;
} else {
tmp = fma(a, 120.0, ((-60.0 / z) * y));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, 120.0, Float64(Float64(60.0 / t) * y)) tmp = 0.0 if (a <= -9.6e+78) tmp = t_1; elseif (a <= 1.45e-70) tmp = Float64(60.0 * Float64(Float64(x - y) / Float64(z - t))); elseif (a <= 2.5e+72) tmp = t_1; else tmp = fma(a, 120.0, Float64(Float64(-60.0 / z) * y)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * 120.0 + N[(N[(60.0 / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.6e+78], t$95$1, If[LessEqual[a, 1.45e-70], N[(60.0 * N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.5e+72], t$95$1, N[(a * 120.0 + N[(N[(-60.0 / z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, 120, \frac{60}{t} \cdot y\right)\\
\mathbf{if}\;a \leq -9.6 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{-70}:\\
\;\;\;\;60 \cdot \frac{x - y}{z - t}\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{+72}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{-60}{z} \cdot y\right)\\
\end{array}
if a < -9.5999999999999994e78 or 1.44999999999999986e-70 < a < 2.49999999999999996e72Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
fp-cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-outN/A
sub-negate-revN/A
lift--.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
Applied rewrites99.8%
Taylor expanded in z around inf
lower-/.f6464.2%
Applied rewrites64.2%
Taylor expanded in x around 0
Applied rewrites54.8%
Taylor expanded in z around 0
lower-/.f6455.3%
Applied rewrites55.3%
if -9.5999999999999994e78 < a < 1.44999999999999986e-70Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
if 2.49999999999999996e72 < a Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
fp-cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-outN/A
sub-negate-revN/A
lift--.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
Applied rewrites99.8%
Taylor expanded in z around inf
lower-/.f6464.2%
Applied rewrites64.2%
Taylor expanded in x around 0
Applied rewrites54.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -4.5e-147)
(fma a 120.0 (* (/ 60.0 t) y))
(if (<= t 3.3e-196)
(* 60.0 (/ (- x y) z))
(if (<= t 2.9e+56)
(fma a 120.0 (* (/ -60.0 z) y))
(fma -60.0 (/ x t) (* 120.0 a))))))double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.5e-147) {
tmp = fma(a, 120.0, ((60.0 / t) * y));
} else if (t <= 3.3e-196) {
tmp = 60.0 * ((x - y) / z);
} else if (t <= 2.9e+56) {
tmp = fma(a, 120.0, ((-60.0 / z) * y));
} else {
tmp = fma(-60.0, (x / t), (120.0 * a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.5e-147) tmp = fma(a, 120.0, Float64(Float64(60.0 / t) * y)); elseif (t <= 3.3e-196) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); elseif (t <= 2.9e+56) tmp = fma(a, 120.0, Float64(Float64(-60.0 / z) * y)); else tmp = fma(-60.0, Float64(x / t), Float64(120.0 * a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.5e-147], N[(a * 120.0 + N[(N[(60.0 / t), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e-196], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+56], N[(a * 120.0 + N[(N[(-60.0 / z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-147}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{60}{t} \cdot y\right)\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-196}:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{-60}{z} \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x}{t}, 120 \cdot a\right)\\
\end{array}
if t < -4.49999999999999973e-147Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
fp-cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-outN/A
sub-negate-revN/A
lift--.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
Applied rewrites99.8%
Taylor expanded in z around inf
lower-/.f6464.2%
Applied rewrites64.2%
Taylor expanded in x around 0
Applied rewrites54.8%
Taylor expanded in z around 0
lower-/.f6455.3%
Applied rewrites55.3%
if -4.49999999999999973e-147 < t < 3.29999999999999999e-196Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f6428.1%
Applied rewrites28.1%
if 3.29999999999999999e-196 < t < 2.90000000000000007e56Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
fp-cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-outN/A
sub-negate-revN/A
lift--.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
Applied rewrites99.8%
Taylor expanded in z around inf
lower-/.f6464.2%
Applied rewrites64.2%
Taylor expanded in x around 0
Applied rewrites54.8%
if 2.90000000000000007e56 < t Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f6455.4%
Applied rewrites55.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma 60.0 (/ x z) (* 120.0 a))))
(if (<= t -2.62e-126)
(fma a 120.0 (* (/ x t) -60.0))
(if (<= t 1.9e-93)
t_1
(if (<= t 7.8e-44)
(* -60.0 (/ y (- z t)))
(if (<= t 2.9e+56) t_1 (fma -60.0 (/ x t) (* 120.0 a))))))))double code(double x, double y, double z, double t, double a) {
double t_1 = fma(60.0, (x / z), (120.0 * a));
double tmp;
if (t <= -2.62e-126) {
tmp = fma(a, 120.0, ((x / t) * -60.0));
} else if (t <= 1.9e-93) {
tmp = t_1;
} else if (t <= 7.8e-44) {
tmp = -60.0 * (y / (z - t));
} else if (t <= 2.9e+56) {
tmp = t_1;
} else {
tmp = fma(-60.0, (x / t), (120.0 * a));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(60.0, Float64(x / z), Float64(120.0 * a)) tmp = 0.0 if (t <= -2.62e-126) tmp = fma(a, 120.0, Float64(Float64(x / t) * -60.0)); elseif (t <= 1.9e-93) tmp = t_1; elseif (t <= 7.8e-44) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (t <= 2.9e+56) tmp = t_1; else tmp = fma(-60.0, Float64(x / t), Float64(120.0 * a)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(x / z), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.62e-126], N[(a * 120.0 + N[(N[(x / t), $MachinePrecision] * -60.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-93], t$95$1, If[LessEqual[t, 7.8e-44], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+56], t$95$1, N[(-60.0 * N[(x / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(60, \frac{x}{z}, 120 \cdot a\right)\\
\mathbf{if}\;t \leq -2.62 \cdot 10^{-126}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{x}{t} \cdot -60\right)\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{-44}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x}{t}, 120 \cdot a\right)\\
\end{array}
if t < -2.6199999999999999e-126Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f6455.4%
Applied rewrites55.4%
lift-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6455.4%
Applied rewrites55.4%
if -2.6199999999999999e-126 < t < 1.8999999999999999e-93 or 7.8000000000000004e-44 < t < 2.90000000000000007e56Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
Taylor expanded in z around inf
lower-/.f6455.9%
Applied rewrites55.9%
if 1.8999999999999999e-93 < t < 7.8000000000000004e-44Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6428.2%
Applied rewrites28.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower-/.f6416.3%
Applied rewrites16.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6426.0%
Applied rewrites26.0%
if 2.90000000000000007e56 < t Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f6455.4%
Applied rewrites55.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.62e-126)
(fma a 120.0 (* (/ x t) -60.0))
(if (<= t 2.9e+56)
(fma a 120.0 (* (/ -60.0 z) y))
(fma -60.0 (/ x t) (* 120.0 a)))))double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.62e-126) {
tmp = fma(a, 120.0, ((x / t) * -60.0));
} else if (t <= 2.9e+56) {
tmp = fma(a, 120.0, ((-60.0 / z) * y));
} else {
tmp = fma(-60.0, (x / t), (120.0 * a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.62e-126) tmp = fma(a, 120.0, Float64(Float64(x / t) * -60.0)); elseif (t <= 2.9e+56) tmp = fma(a, 120.0, Float64(Float64(-60.0 / z) * y)); else tmp = fma(-60.0, Float64(x / t), Float64(120.0 * a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.62e-126], N[(a * 120.0 + N[(N[(x / t), $MachinePrecision] * -60.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+56], N[(a * 120.0 + N[(N[(-60.0 / z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;t \leq -2.62 \cdot 10^{-126}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{x}{t} \cdot -60\right)\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{-60}{z} \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x}{t}, 120 \cdot a\right)\\
\end{array}
if t < -2.6199999999999999e-126Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f6455.4%
Applied rewrites55.4%
lift-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6455.4%
Applied rewrites55.4%
if -2.6199999999999999e-126 < t < 2.90000000000000007e56Initial program 99.4%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
mult-flipN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
fp-cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
distribute-rgt-neg-inN/A
fp-cancel-sub-sign-invN/A
lift-*.f64N/A
lift--.f64N/A
sub-negate-revN/A
distribute-rgt-neg-inN/A
distribute-lft-neg-outN/A
sub-negate-revN/A
lift--.f64N/A
associate-*l*N/A
*-commutativeN/A
lift-*.f64N/A
Applied rewrites99.8%
Taylor expanded in z around inf
lower-/.f6464.2%
Applied rewrites64.2%
Taylor expanded in x around 0
Applied rewrites54.8%
if 2.90000000000000007e56 < t Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f6455.4%
Applied rewrites55.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -7e-139)
(fma a 120.0 (* (/ x t) -60.0))
(if (<= t 170000000.0)
(* 60.0 (/ (- x y) z))
(fma -60.0 (/ x t) (* 120.0 a)))))double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7e-139) {
tmp = fma(a, 120.0, ((x / t) * -60.0));
} else if (t <= 170000000.0) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = fma(-60.0, (x / t), (120.0 * a));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7e-139) tmp = fma(a, 120.0, Float64(Float64(x / t) * -60.0)); elseif (t <= 170000000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); else tmp = fma(-60.0, Float64(x / t), Float64(120.0 * a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7e-139], N[(a * 120.0 + N[(N[(x / t), $MachinePrecision] * -60.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 170000000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{-139}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{x}{t} \cdot -60\right)\\
\mathbf{elif}\;t \leq 170000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x}{t}, 120 \cdot a\right)\\
\end{array}
if t < -7.00000000000000002e-139Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f6455.4%
Applied rewrites55.4%
lift-fma.f64N/A
lift-*.f64N/A
*-commutativeN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6455.4%
Applied rewrites55.4%
if -7.00000000000000002e-139 < t < 1.7e8Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f6428.1%
Applied rewrites28.1%
if 1.7e8 < t Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f6455.4%
Applied rewrites55.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma -60.0 (/ x t) (* 120.0 a)))) (if (<= t -7e-139) t_1 (if (<= t 170000000.0) (* 60.0 (/ (- x y) z)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(-60.0, (x / t), (120.0 * a));
double tmp;
if (t <= -7e-139) {
tmp = t_1;
} else if (t <= 170000000.0) {
tmp = 60.0 * ((x - y) / z);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(-60.0, Float64(x / t), Float64(120.0 * a)) tmp = 0.0 if (t <= -7e-139) tmp = t_1; elseif (t <= 170000000.0) tmp = Float64(60.0 * Float64(Float64(x - y) / z)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(x / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7e-139], t$95$1, If[LessEqual[t, 170000000.0], N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \mathsf{fma}\left(-60, \frac{x}{t}, 120 \cdot a\right)\\
\mathbf{if}\;t \leq -7 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 170000000:\\
\;\;\;\;60 \cdot \frac{x - y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if t < -7.00000000000000002e-139 or 1.7e8 < t Initial program 99.4%
Taylor expanded in y around 0
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-*.f6476.0%
Applied rewrites76.0%
Taylor expanded in z around 0
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f6455.4%
Applied rewrites55.4%
if -7.00000000000000002e-139 < t < 1.7e8Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
Taylor expanded in z around inf
lower-/.f64N/A
lower--.f6428.1%
Applied rewrites28.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e-10)
(* -60.0 (/ y (- z t)))
(if (<= t_1 5e-22) (* 120.0 a) (* (/ -60.0 t) (- x y))))))double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e-10) {
tmp = -60.0 * (y / (z - t));
} else if (t_1 <= 5e-22) {
tmp = 120.0 * a;
} else {
tmp = (-60.0 / t) * (x - y);
}
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 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-5d-10)) then
tmp = (-60.0d0) * (y / (z - t))
else if (t_1 <= 5d-22) then
tmp = 120.0d0 * a
else
tmp = ((-60.0d0) / t) * (x - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e-10) {
tmp = -60.0 * (y / (z - t));
} else if (t_1 <= 5e-22) {
tmp = 120.0 * a;
} else {
tmp = (-60.0 / t) * (x - y);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e-10: tmp = -60.0 * (y / (z - t)) elif t_1 <= 5e-22: tmp = 120.0 * a else: tmp = (-60.0 / t) * (x - y) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -5e-10) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (t_1 <= 5e-22) tmp = Float64(120.0 * a); else tmp = Float64(Float64(-60.0 / t) * Float64(x - y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -5e-10) tmp = -60.0 * (y / (z - t)); elseif (t_1 <= 5e-22) tmp = 120.0 * a; else tmp = (-60.0 / t) * (x - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-10], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-22], N[(120.0 * a), $MachinePrecision], N[(N[(-60.0 / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-10}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-22}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;\frac{-60}{t} \cdot \left(x - y\right)\\
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.00000000000000031e-10Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6428.2%
Applied rewrites28.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower-/.f6416.3%
Applied rewrites16.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6426.0%
Applied rewrites26.0%
if -5.00000000000000031e-10 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999954e-22Initial program 99.4%
Taylor expanded in z around inf
lower-*.f6451.4%
Applied rewrites51.4%
if 4.99999999999999954e-22 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6428.2%
Applied rewrites28.2%
lift-*.f64N/A
*-commutativeN/A
lift--.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
metadata-evalN/A
associate-*l/N/A
metadata-evalN/A
metadata-evalN/A
lower-/.f64N/A
lift--.f6428.2%
Applied rewrites28.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* 60.0 (- x y)) (- z t))))
(if (<= t_1 -5e-10)
(* -60.0 (/ y (- z t)))
(if (<= t_1 5e-22) (* 120.0 a) (* -60.0 (/ (- x y) t))))))double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e-10) {
tmp = -60.0 * (y / (z - t));
} else if (t_1 <= 5e-22) {
tmp = 120.0 * a;
} else {
tmp = -60.0 * ((x - y) / 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 = (60.0d0 * (x - y)) / (z - t)
if (t_1 <= (-5d-10)) then
tmp = (-60.0d0) * (y / (z - t))
else if (t_1 <= 5d-22) then
tmp = 120.0d0 * a
else
tmp = (-60.0d0) * ((x - y) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_1 <= -5e-10) {
tmp = -60.0 * (y / (z - t));
} else if (t_1 <= 5e-22) {
tmp = 120.0 * a;
} else {
tmp = -60.0 * ((x - y) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_1 <= -5e-10: tmp = -60.0 * (y / (z - t)) elif t_1 <= 5e-22: tmp = 120.0 * a else: tmp = -60.0 * ((x - y) / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_1 <= -5e-10) tmp = Float64(-60.0 * Float64(y / Float64(z - t))); elseif (t_1 <= 5e-22) tmp = Float64(120.0 * a); else tmp = Float64(-60.0 * Float64(Float64(x - y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_1 <= -5e-10) tmp = -60.0 * (y / (z - t)); elseif (t_1 <= 5e-22) tmp = 120.0 * a; else tmp = -60.0 * ((x - y) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-10], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e-22], N[(120.0 * a), $MachinePrecision], N[(-60.0 * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_1 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-10}:\\
\;\;\;\;-60 \cdot \frac{y}{z - t}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-22}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x - y}{t}\\
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.00000000000000031e-10Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6428.2%
Applied rewrites28.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower-/.f6416.3%
Applied rewrites16.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6426.0%
Applied rewrites26.0%
if -5.00000000000000031e-10 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999954e-22Initial program 99.4%
Taylor expanded in z around inf
lower-*.f6451.4%
Applied rewrites51.4%
if 4.99999999999999954e-22 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6428.2%
Applied rewrites28.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* -60.0 (/ y (- z t)))) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -5e-10) t_1 (if (<= t_2 5e-22) (* 120.0 a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e-10) {
tmp = t_1;
} else if (t_2 <= 5e-22) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-60.0d0) * (y / (z - t))
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-5d-10)) then
tmp = t_1
else if (t_2 <= 5d-22) then
tmp = 120.0d0 * a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -60.0 * (y / (z - t));
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -5e-10) {
tmp = t_1;
} else if (t_2 <= 5e-22) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -60.0 * (y / (z - t)) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -5e-10: tmp = t_1 elif t_2 <= 5e-22: tmp = 120.0 * a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(-60.0 * Float64(y / Float64(z - t))) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -5e-10) tmp = t_1; elseif (t_2 <= 5e-22) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -60.0 * (y / (z - t)); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -5e-10) tmp = t_1; elseif (t_2 <= 5e-22) tmp = 120.0 * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-10], t$95$1, If[LessEqual[t$95$2, 5e-22], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := -60 \cdot \frac{y}{z - t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-22}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.00000000000000031e-10 or 4.99999999999999954e-22 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6428.2%
Applied rewrites28.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower-/.f6416.3%
Applied rewrites16.3%
Taylor expanded in x around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6426.0%
Applied rewrites26.0%
if -5.00000000000000031e-10 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999954e-22Initial program 99.4%
Taylor expanded in z around inf
lower-*.f6451.4%
Applied rewrites51.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* 60.0 (/ y t))) (t_2 (/ (* 60.0 (- x y)) (- z t)))) (if (<= t_2 -1e+178) t_1 (if (<= t_2 1e+138) (* 120.0 a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (y / t);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -1e+178) {
tmp = t_1;
} else if (t_2 <= 1e+138) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 60.0d0 * (y / t)
t_2 = (60.0d0 * (x - y)) / (z - t)
if (t_2 <= (-1d+178)) then
tmp = t_1
else if (t_2 <= 1d+138) then
tmp = 120.0d0 * a
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = 60.0 * (y / t);
double t_2 = (60.0 * (x - y)) / (z - t);
double tmp;
if (t_2 <= -1e+178) {
tmp = t_1;
} else if (t_2 <= 1e+138) {
tmp = 120.0 * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = 60.0 * (y / t) t_2 = (60.0 * (x - y)) / (z - t) tmp = 0 if t_2 <= -1e+178: tmp = t_1 elif t_2 <= 1e+138: tmp = 120.0 * a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(60.0 * Float64(y / t)) t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t)) tmp = 0.0 if (t_2 <= -1e+178) tmp = t_1; elseif (t_2 <= 1e+138) tmp = Float64(120.0 * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = 60.0 * (y / t); t_2 = (60.0 * (x - y)) / (z - t); tmp = 0.0; if (t_2 <= -1e+178) tmp = t_1; elseif (t_2 <= 1e+138) tmp = 120.0 * a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+178], t$95$1, If[LessEqual[t$95$2, 1e+138], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
t_1 := 60 \cdot \frac{y}{t}\\
t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+178}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+138}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.0000000000000001e178 or 1e138 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6428.2%
Applied rewrites28.2%
Taylor expanded in x around 0
lower-*.f64N/A
lower-/.f6415.6%
Applied rewrites15.6%
if -1.0000000000000001e178 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e138Initial program 99.4%
Taylor expanded in z around inf
lower-*.f6451.4%
Applied rewrites51.4%
(FPCore (x y z t a) :precision binary64 (if (<= x 9.6e+103) (* 120.0 a) (* -60.0 (/ x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 9.6e+103) {
tmp = 120.0 * a;
} else {
tmp = -60.0 * (x / 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 (x <= 9.6d+103) then
tmp = 120.0d0 * a
else
tmp = (-60.0d0) * (x / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= 9.6e+103) {
tmp = 120.0 * a;
} else {
tmp = -60.0 * (x / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= 9.6e+103: tmp = 120.0 * a else: tmp = -60.0 * (x / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= 9.6e+103) tmp = Float64(120.0 * a); else tmp = Float64(-60.0 * Float64(x / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= 9.6e+103) tmp = 120.0 * a; else tmp = -60.0 * (x / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, 9.6e+103], N[(120.0 * a), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;x \leq 9.6 \cdot 10^{+103}:\\
\;\;\;\;120 \cdot a\\
\mathbf{else}:\\
\;\;\;\;-60 \cdot \frac{x}{t}\\
\end{array}
if x < 9.5999999999999994e103Initial program 99.4%
Taylor expanded in z around inf
lower-*.f6451.4%
Applied rewrites51.4%
if 9.5999999999999994e103 < x Initial program 99.4%
Taylor expanded in a around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6450.1%
Applied rewrites50.1%
Taylor expanded in z around 0
lower-*.f64N/A
lower-/.f64N/A
lower--.f6428.2%
Applied rewrites28.2%
Taylor expanded in x around inf
lower-*.f64N/A
lower-/.f6416.3%
Applied rewrites16.3%
(FPCore (x y z t a) :precision binary64 (* 120.0 a))
double code(double x, double y, double z, double t, double a) {
return 120.0 * a;
}
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 = 120.0d0 * a
end function
public static double code(double x, double y, double z, double t, double a) {
return 120.0 * a;
}
def code(x, y, z, t, a): return 120.0 * a
function code(x, y, z, t, a) return Float64(120.0 * a) end
function tmp = code(x, y, z, t, a) tmp = 120.0 * a; end
code[x_, y_, z_, t_, a_] := N[(120.0 * a), $MachinePrecision]
120 \cdot a
Initial program 99.4%
Taylor expanded in z around inf
lower-*.f6451.4%
Applied rewrites51.4%
herbie shell --seed 2025184
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))