
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_1 -5e-253)
(+ x (* (- y x) (* (- z t) (/ 1.0 (- a t)))))
(if (<= t_1 0.0)
(+ (- (/ (* (- y x) (- z a)) t)) y)
(+ x (* (- y x) (/ (- t z) (- t a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_1 <= -5e-253) {
tmp = x + ((y - x) * ((z - t) * (1.0 / (a - t))));
} else if (t_1 <= 0.0) {
tmp = -(((y - x) * (z - a)) / t) + y;
} else {
tmp = x + ((y - x) * ((t - z) / (t - a)));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - x) * (z - t)) / (a - t))
if (t_1 <= (-5d-253)) then
tmp = x + ((y - x) * ((z - t) * (1.0d0 / (a - t))))
else if (t_1 <= 0.0d0) then
tmp = -(((y - x) * (z - a)) / t) + y
else
tmp = x + ((y - x) * ((t - z) / (t - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_1 <= -5e-253) {
tmp = x + ((y - x) * ((z - t) * (1.0 / (a - t))));
} else if (t_1 <= 0.0) {
tmp = -(((y - x) * (z - a)) / t) + y;
} else {
tmp = x + ((y - x) * ((t - z) / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_1 <= -5e-253: tmp = x + ((y - x) * ((z - t) * (1.0 / (a - t)))) elif t_1 <= 0.0: tmp = -(((y - x) * (z - a)) / t) + y else: tmp = x + ((y - x) * ((t - z) / (t - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_1 <= -5e-253) tmp = Float64(x + Float64(Float64(y - x) * Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))))); elseif (t_1 <= 0.0) tmp = Float64(Float64(-Float64(Float64(Float64(y - x) * Float64(z - a)) / t)) + y); else tmp = Float64(x + Float64(Float64(y - x) * Float64(Float64(t - z) / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_1 <= -5e-253) tmp = x + ((y - x) * ((z - t) * (1.0 / (a - t)))); elseif (t_1 <= 0.0) tmp = -(((y - x) * (z - a)) / t) + y; else tmp = x + ((y - x) * ((t - z) / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e-253], N[(x + N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[((-N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]) + y), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-253}:\\
\;\;\;\;x + \left(y - x\right) \cdot \left(\left(z - t\right) \cdot \frac{1}{a - t}\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\left(-\frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\right) + y\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot \frac{t - z}{t - a}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999971e-253Initial program 68.4%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-divN/A
lower-*.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
lift--.f64N/A
lift--.f64N/A
lift-/.f64N/A
frac-2negN/A
sub-negate-revN/A
sub-negate-revN/A
mult-flipN/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6484.5
Applied rewrites84.5%
if -4.99999999999999971e-253 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 68.4%
Taylor expanded in t around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lift--.f64N/A
lower--.f6446.0
Applied rewrites46.0%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 68.4%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-divN/A
lower-*.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- t z) (- t a))) (t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -5e-253)
(fma (- y x) t_1 x)
(if (<= t_2 0.0)
(+ (- (/ (* (- y x) (- z a)) t)) y)
(+ x (* (- y x) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - z) / (t - a);
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -5e-253) {
tmp = fma((y - x), t_1, x);
} else if (t_2 <= 0.0) {
tmp = -(((y - x) * (z - a)) / t) + y;
} else {
tmp = x + ((y - x) * t_1);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t - z) / Float64(t - a)) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -5e-253) tmp = fma(Float64(y - x), t_1, x); elseif (t_2 <= 0.0) tmp = Float64(Float64(-Float64(Float64(Float64(y - x) * Float64(z - a)) / t)) + y); else tmp = Float64(x + Float64(Float64(y - x) * t_1)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-253], N[(N[(y - x), $MachinePrecision] * t$95$1 + x), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[((-N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]) + y), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - z}{t - a}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-253}:\\
\;\;\;\;\mathsf{fma}\left(y - x, t\_1, x\right)\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\left(-\frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\right) + y\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - x\right) \cdot t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999971e-253Initial program 68.4%
lift-+.f64N/A
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
+-commutativeN/A
associate-/l*N/A
sub-divN/A
lower-fma.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
if -4.99999999999999971e-253 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 68.4%
Taylor expanded in t around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lift--.f64N/A
lower--.f6446.0
Applied rewrites46.0%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 68.4%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-divN/A
lower-*.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y x) (/ (- t z) (- t a)) x))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 -5e-253)
t_1
(if (<= t_2 0.0) (+ (- (/ (* (- y x) (- z a)) t)) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - x), ((t - z) / (t - a)), x);
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -5e-253) {
tmp = t_1;
} else if (t_2 <= 0.0) {
tmp = -(((y - x) * (z - a)) / t) + y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - x), Float64(Float64(t - z) / Float64(t - a)), x) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= -5e-253) tmp = t_1; elseif (t_2 <= 0.0) tmp = Float64(Float64(-Float64(Float64(Float64(y - x) * Float64(z - a)) / t)) + y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-253], t$95$1, If[LessEqual[t$95$2, 0.0], N[((-N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]) + y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - x, \frac{t - z}{t - a}, x\right)\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-253}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\left(-\frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\right) + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999971e-253 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 68.4%
lift-+.f64N/A
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
+-commutativeN/A
associate-/l*N/A
sub-divN/A
lower-fma.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
if -4.99999999999999971e-253 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 68.4%
Taylor expanded in t around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lift--.f64N/A
lower--.f6446.0
Applied rewrites46.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma y (/ (- t z) (- t a)) x)))
(if (<= a -1.35e-16)
t_1
(if (<= a 3.3e-205) (+ (- (/ (* (- y x) (- z a)) t)) y) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, ((t - z) / (t - a)), x);
double tmp;
if (a <= -1.35e-16) {
tmp = t_1;
} else if (a <= 3.3e-205) {
tmp = -(((y - x) * (z - a)) / t) + y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(Float64(t - z) / Float64(t - a)), x) tmp = 0.0 if (a <= -1.35e-16) tmp = t_1; elseif (a <= 3.3e-205) tmp = Float64(Float64(-Float64(Float64(Float64(y - x) * Float64(z - a)) / t)) + y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.35e-16], t$95$1, If[LessEqual[a, 3.3e-205], N[((-N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]) + y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{t - z}{t - a}, x\right)\\
\mathbf{if}\;a \leq -1.35 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{-205}:\\
\;\;\;\;\left(-\frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\right) + y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.35e-16 or 3.2999999999999999e-205 < a Initial program 68.4%
Taylor expanded in x around 0
Applied rewrites55.9%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2negN/A
lower-fma.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift--.f6468.1
Applied rewrites68.1%
if -1.35e-16 < a < 3.2999999999999999e-205Initial program 68.4%
Taylor expanded in t around -inf
+-commutativeN/A
lower-+.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f64N/A
distribute-rgt-out--N/A
lower-*.f64N/A
lift--.f64N/A
lower--.f6446.0
Applied rewrites46.0%
(FPCore (x y z t a)
:precision binary64
(if (<= x -5.8e+116)
(fma (- z t) (/ x (- t a)) x)
(if (<= x 1.52e+184)
(fma y (/ (- t z) (- t a)) x)
(* (+ (/ (- z t) (- t a)) 1.0) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.8e+116) {
tmp = fma((z - t), (x / (t - a)), x);
} else if (x <= 1.52e+184) {
tmp = fma(y, ((t - z) / (t - a)), x);
} else {
tmp = (((z - t) / (t - a)) + 1.0) * x;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5.8e+116) tmp = fma(Float64(z - t), Float64(x / Float64(t - a)), x); elseif (x <= 1.52e+184) tmp = fma(y, Float64(Float64(t - z) / Float64(t - a)), x); else tmp = Float64(Float64(Float64(Float64(z - t) / Float64(t - a)) + 1.0) * x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5.8e+116], N[(N[(z - t), $MachinePrecision] * N[(x / N[(t - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[x, 1.52e+184], N[(y * N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{+116}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{x}{t - a}, x\right)\\
\mathbf{elif}\;x \leq 1.52 \cdot 10^{+184}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - z}{t - a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z - t}{t - a} + 1\right) \cdot x\\
\end{array}
\end{array}
if x < -5.8000000000000003e116Initial program 68.4%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-divN/A
lower-*.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
lift--.f64N/A
lift--.f64N/A
lift-/.f64N/A
frac-2negN/A
sub-negate-revN/A
sub-negate-revN/A
mult-flipN/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6484.5
Applied rewrites84.5%
Taylor expanded in y around 0
associate-*r*N/A
mult-flipN/A
+-commutativeN/A
associate-*r/N/A
mul-1-negN/A
*-commutativeN/A
sub-negate-revN/A
frac-2negN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6442.0
Applied rewrites42.0%
if -5.8000000000000003e116 < x < 1.52e184Initial program 68.4%
Taylor expanded in x around 0
Applied rewrites55.9%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2negN/A
lower-fma.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift--.f6468.1
Applied rewrites68.1%
if 1.52e184 < x Initial program 68.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-*r/N/A
mul-1-negN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lift--.f64N/A
lower--.f6443.2
Applied rewrites43.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- z t) (/ x (- t a)) x)))
(if (<= x -5.8e+116)
t_1
(if (<= x 1.1e+168) (fma y (/ (- t z) (- t a)) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((z - t), (x / (t - a)), x);
double tmp;
if (x <= -5.8e+116) {
tmp = t_1;
} else if (x <= 1.1e+168) {
tmp = fma(y, ((t - z) / (t - a)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(z - t), Float64(x / Float64(t - a)), x) tmp = 0.0 if (x <= -5.8e+116) tmp = t_1; elseif (x <= 1.1e+168) tmp = fma(y, Float64(Float64(t - z) / Float64(t - a)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(x / N[(t - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[x, -5.8e+116], t$95$1, If[LessEqual[x, 1.1e+168], N[(y * N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z - t, \frac{x}{t - a}, x\right)\\
\mathbf{if}\;x \leq -5.8 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+168}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{t - z}{t - a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.8000000000000003e116 or 1.1000000000000001e168 < x Initial program 68.4%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-divN/A
lower-*.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
lift--.f64N/A
lift--.f64N/A
lift-/.f64N/A
frac-2negN/A
sub-negate-revN/A
sub-negate-revN/A
mult-flipN/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6484.5
Applied rewrites84.5%
Taylor expanded in y around 0
associate-*r*N/A
mult-flipN/A
+-commutativeN/A
associate-*r/N/A
mul-1-negN/A
*-commutativeN/A
sub-negate-revN/A
frac-2negN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6442.0
Applied rewrites42.0%
if -5.8000000000000003e116 < x < 1.1000000000000001e168Initial program 68.4%
Taylor expanded in x around 0
Applied rewrites55.9%
lift-+.f64N/A
+-commutativeN/A
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-negate-revN/A
sub-negate-revN/A
frac-2negN/A
lower-fma.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift--.f6468.1
Applied rewrites68.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma (- y x) (/ (- z t) a) x)))
(if (<= a -2.8e+17)
t_1
(if (<= a 3.25e-125)
(fma (- t z) (/ (- y x) t) x)
(if (<= a 6.2e+16) (/ (* (- z t) y) (- a t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma((y - x), ((z - t) / a), x);
double tmp;
if (a <= -2.8e+17) {
tmp = t_1;
} else if (a <= 3.25e-125) {
tmp = fma((t - z), ((y - x) / t), x);
} else if (a <= 6.2e+16) {
tmp = ((z - t) * y) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(Float64(y - x), Float64(Float64(z - t) / a), x) tmp = 0.0 if (a <= -2.8e+17) tmp = t_1; elseif (a <= 3.25e-125) tmp = fma(Float64(t - z), Float64(Float64(y - x) / t), x); elseif (a <= 6.2e+16) tmp = Float64(Float64(Float64(z - t) * y) / Float64(a - t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -2.8e+17], t$95$1, If[LessEqual[a, 3.25e-125], N[(N[(t - z), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 6.2e+16], N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y - x, \frac{z - t}{a}, x\right)\\
\mathbf{if}\;a \leq -2.8 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.25 \cdot 10^{-125}:\\
\;\;\;\;\mathsf{fma}\left(t - z, \frac{y - x}{t}, x\right)\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{+16}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.8e17 or 6.2e16 < a Initial program 68.4%
Taylor expanded in a around inf
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6453.9
Applied rewrites53.9%
if -2.8e17 < a < 3.2499999999999999e-125Initial program 68.4%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-divN/A
lower-*.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
Taylor expanded in a around 0
frac-2negN/A
sub-negate-revN/A
sub-negate-revN/A
associate-/l*N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6436.5
Applied rewrites36.5%
if 3.2499999999999999e-125 < a < 6.2e16Initial program 68.4%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift--.f6439.0
Applied rewrites39.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- z t) y) (- a t))) (t_2 (fma z (/ (- y x) a) x)))
(if (<= a -1.05e+76)
t_2
(if (<= a -8.2e-39)
t_1
(if (<= a 3.25e-125)
(fma (- t z) (/ (- y x) t) x)
(if (<= a 1.7e+40) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) * y) / (a - t);
double t_2 = fma(z, ((y - x) / a), x);
double tmp;
if (a <= -1.05e+76) {
tmp = t_2;
} else if (a <= -8.2e-39) {
tmp = t_1;
} else if (a <= 3.25e-125) {
tmp = fma((t - z), ((y - x) / t), x);
} else if (a <= 1.7e+40) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - t) * y) / Float64(a - t)) t_2 = fma(z, Float64(Float64(y - x) / a), x) tmp = 0.0 if (a <= -1.05e+76) tmp = t_2; elseif (a <= -8.2e-39) tmp = t_1; elseif (a <= 3.25e-125) tmp = fma(Float64(t - z), Float64(Float64(y - x) / t), x); elseif (a <= 1.7e+40) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.05e+76], t$95$2, If[LessEqual[a, -8.2e-39], t$95$1, If[LessEqual[a, 3.25e-125], N[(N[(t - z), $MachinePrecision] * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 1.7e+40], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z - t\right) \cdot y}{a - t}\\
t_2 := \mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{if}\;a \leq -1.05 \cdot 10^{+76}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -8.2 \cdot 10^{-39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.25 \cdot 10^{-125}:\\
\;\;\;\;\mathsf{fma}\left(t - z, \frac{y - x}{t}, x\right)\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.05000000000000003e76 or 1.69999999999999994e40 < a Initial program 68.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lift--.f6448.0
Applied rewrites48.0%
if -1.05000000000000003e76 < a < -8.2e-39 or 3.2499999999999999e-125 < a < 1.69999999999999994e40Initial program 68.4%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift--.f6439.0
Applied rewrites39.0%
if -8.2e-39 < a < 3.2499999999999999e-125Initial program 68.4%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-divN/A
lower-*.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
Taylor expanded in a around 0
frac-2negN/A
sub-negate-revN/A
sub-negate-revN/A
associate-/l*N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6436.5
Applied rewrites36.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- y x) z) (- a t))))
(if (<= z -4.6e+212)
(fma z (/ (- y x) a) x)
(if (<= z -3.4e+71)
t_1
(if (<= z 4.5e+94) (fma t (/ (- y x) (- t a)) x) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((y - x) * z) / (a - t);
double tmp;
if (z <= -4.6e+212) {
tmp = fma(z, ((y - x) / a), x);
} else if (z <= -3.4e+71) {
tmp = t_1;
} else if (z <= 4.5e+94) {
tmp = fma(t, ((y - x) / (t - a)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(y - x) * z) / Float64(a - t)) tmp = 0.0 if (z <= -4.6e+212) tmp = fma(z, Float64(Float64(y - x) / a), x); elseif (z <= -3.4e+71) tmp = t_1; elseif (z <= 4.5e+94) tmp = fma(t, Float64(Float64(y - x) / Float64(t - a)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.6e+212], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, -3.4e+71], t$95$1, If[LessEqual[z, 4.5e+94], N[(t * N[(N[(y - x), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(y - x\right) \cdot z}{a - t}\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+212}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+94}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{y - x}{t - a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.5999999999999997e212Initial program 68.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lift--.f6448.0
Applied rewrites48.0%
if -4.5999999999999997e212 < z < -3.3999999999999998e71 or 4.49999999999999972e94 < z Initial program 68.4%
Taylor expanded in z around inf
sub-divN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift--.f6438.0
Applied rewrites38.0%
if -3.3999999999999998e71 < z < 4.49999999999999972e94Initial program 68.4%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-divN/A
lower-*.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
Taylor expanded in z around 0
frac-2negN/A
sub-negate-revN/A
sub-negate-revN/A
associate-/l*N/A
+-commutativeN/A
associate-/l*N/A
frac-2negN/A
mul-1-negN/A
sub-negate-revN/A
associate-*r/N/A
lower-fma.f64N/A
associate-*r/N/A
mul-1-negN/A
sub-negate-revN/A
frac-2negN/A
lower-/.f64N/A
lift--.f64N/A
lift--.f6447.0
Applied rewrites47.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma z (/ (- y x) a) x)))
(if (<= a -1.05e+76)
t_1
(if (<= a 1.7e+40) (/ (* (- z t) y) (- a t)) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(z, ((y - x) / a), x);
double tmp;
if (a <= -1.05e+76) {
tmp = t_1;
} else if (a <= 1.7e+40) {
tmp = ((z - t) * y) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(z, Float64(Float64(y - x) / a), x) tmp = 0.0 if (a <= -1.05e+76) tmp = t_1; elseif (a <= 1.7e+40) tmp = Float64(Float64(Float64(z - t) * y) / Float64(a - t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.05e+76], t$95$1, If[LessEqual[a, 1.7e+40], N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{if}\;a \leq -1.05 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{+40}:\\
\;\;\;\;\frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.05000000000000003e76 or 1.69999999999999994e40 < a Initial program 68.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lift--.f6448.0
Applied rewrites48.0%
if -1.05000000000000003e76 < a < 1.69999999999999994e40Initial program 68.4%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift--.f6439.0
Applied rewrites39.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y x) 1.0))))
(if (<= t -12.5)
t_1
(if (<= t 6.1e-59)
(fma z (/ (- y x) a) x)
(if (<= t 5.9e+79) (/ (* (- y x) z) (- a t)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - x) * 1.0);
double tmp;
if (t <= -12.5) {
tmp = t_1;
} else if (t <= 6.1e-59) {
tmp = fma(z, ((y - x) / a), x);
} else if (t <= 5.9e+79) {
tmp = ((y - x) * z) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - x) * 1.0)) tmp = 0.0 if (t <= -12.5) tmp = t_1; elseif (t <= 6.1e-59) tmp = fma(z, Float64(Float64(y - x) / a), x); elseif (t <= 5.9e+79) tmp = Float64(Float64(Float64(y - x) * z) / Float64(a - t)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - x), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -12.5], t$95$1, If[LessEqual[t, 6.1e-59], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 5.9e+79], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right) \cdot 1\\
\mathbf{if}\;t \leq -12.5:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6.1 \cdot 10^{-59}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{elif}\;t \leq 5.9 \cdot 10^{+79}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -12.5 or 5.9e79 < t Initial program 68.4%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-divN/A
lower-*.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
Taylor expanded in t around inf
Applied rewrites19.2%
if -12.5 < t < 6.0999999999999996e-59Initial program 68.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lift--.f6448.0
Applied rewrites48.0%
if 6.0999999999999996e-59 < t < 5.9e79Initial program 68.4%
Taylor expanded in z around inf
sub-divN/A
associate-/l*N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift--.f64N/A
lift--.f6438.0
Applied rewrites38.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (* (- y x) 1.0)))) (if (<= t -12.5) t_1 (if (<= t 2.25e+107) (fma z (/ (- y x) a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - x) * 1.0);
double tmp;
if (t <= -12.5) {
tmp = t_1;
} else if (t <= 2.25e+107) {
tmp = fma(z, ((y - x) / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - x) * 1.0)) tmp = 0.0 if (t <= -12.5) tmp = t_1; elseif (t <= 2.25e+107) tmp = fma(z, Float64(Float64(y - x) / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - x), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -12.5], t$95$1, If[LessEqual[t, 2.25e+107], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right) \cdot 1\\
\mathbf{if}\;t \leq -12.5:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+107}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -12.5 or 2.25e107 < t Initial program 68.4%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-divN/A
lower-*.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
Taylor expanded in t around inf
Applied rewrites19.2%
if -12.5 < t < 2.25e107Initial program 68.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lift--.f6448.0
Applied rewrites48.0%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (+ x (* (- y x) 1.0)))) (if (<= t -12.5) t_1 (if (<= t 2.95e+103) (fma z (/ y a) x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - x) * 1.0);
double tmp;
if (t <= -12.5) {
tmp = t_1;
} else if (t <= 2.95e+103) {
tmp = fma(z, (y / a), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - x) * 1.0)) tmp = 0.0 if (t <= -12.5) tmp = t_1; elseif (t <= 2.95e+103) tmp = fma(z, Float64(y / a), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - x), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -12.5], t$95$1, If[LessEqual[t, 2.95e+103], N[(z * N[(y / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right) \cdot 1\\
\mathbf{if}\;t \leq -12.5:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{+103}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -12.5 or 2.9499999999999999e103 < t Initial program 68.4%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-divN/A
lower-*.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
Taylor expanded in t around inf
Applied rewrites19.2%
if -12.5 < t < 2.9499999999999999e103Initial program 68.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lift--.f6448.0
Applied rewrites48.0%
Taylor expanded in x around 0
lower-/.f6440.2
Applied rewrites40.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y x) 1.0))))
(if (<= t -10.8)
t_1
(if (<= t 4e-123) (* (- x) -1.0) (if (<= t 6.4e+78) (* y (/ z a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - x) * 1.0);
double tmp;
if (t <= -10.8) {
tmp = t_1;
} else if (t <= 4e-123) {
tmp = -x * -1.0;
} else if (t <= 6.4e+78) {
tmp = y * (z / a);
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - x) * 1.0d0)
if (t <= (-10.8d0)) then
tmp = t_1
else if (t <= 4d-123) then
tmp = -x * (-1.0d0)
else if (t <= 6.4d+78) then
tmp = y * (z / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - x) * 1.0);
double tmp;
if (t <= -10.8) {
tmp = t_1;
} else if (t <= 4e-123) {
tmp = -x * -1.0;
} else if (t <= 6.4e+78) {
tmp = y * (z / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - x) * 1.0) tmp = 0 if t <= -10.8: tmp = t_1 elif t <= 4e-123: tmp = -x * -1.0 elif t <= 6.4e+78: tmp = y * (z / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - x) * 1.0)) tmp = 0.0 if (t <= -10.8) tmp = t_1; elseif (t <= 4e-123) tmp = Float64(Float64(-x) * -1.0); elseif (t <= 6.4e+78) tmp = Float64(y * Float64(z / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - x) * 1.0); tmp = 0.0; if (t <= -10.8) tmp = t_1; elseif (t <= 4e-123) tmp = -x * -1.0; elseif (t <= 6.4e+78) tmp = y * (z / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - x), $MachinePrecision] * 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -10.8], t$95$1, If[LessEqual[t, 4e-123], N[((-x) * -1.0), $MachinePrecision], If[LessEqual[t, 6.4e+78], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - x\right) \cdot 1\\
\mathbf{if}\;t \leq -10.8:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-123}:\\
\;\;\;\;\left(-x\right) \cdot -1\\
\mathbf{elif}\;t \leq 6.4 \cdot 10^{+78}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -10.800000000000001 or 6.39999999999999989e78 < t Initial program 68.4%
lift--.f64N/A
lift-/.f64N/A
lift-*.f64N/A
lift--.f64N/A
lift--.f64N/A
associate-/l*N/A
sub-divN/A
lower-*.f64N/A
lift--.f64N/A
sub-divN/A
sub-negate-revN/A
sub-negate-revN/A
frac-2neg-revN/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6484.6
Applied rewrites84.6%
Taylor expanded in t around inf
Applied rewrites19.2%
if -10.800000000000001 < t < 4.0000000000000002e-123Initial program 68.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lift--.f6448.0
Applied rewrites48.0%
Taylor expanded in x around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f6436.9
Applied rewrites36.9%
Taylor expanded in z around 0
Applied rewrites25.5%
if 4.0000000000000002e-123 < t < 6.39999999999999989e78Initial program 68.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lift--.f6448.0
Applied rewrites48.0%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6416.4
Applied rewrites16.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f6418.8
Applied rewrites18.8%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* y (/ z a)))) (if (<= z -6.6e+35) t_1 (if (<= z 1.05e+107) (* (- x) -1.0) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / a);
double tmp;
if (z <= -6.6e+35) {
tmp = t_1;
} else if (z <= 1.05e+107) {
tmp = -x * -1.0;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z / a)
if (z <= (-6.6d+35)) then
tmp = t_1
else if (z <= 1.05d+107) then
tmp = -x * (-1.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / a);
double tmp;
if (z <= -6.6e+35) {
tmp = t_1;
} else if (z <= 1.05e+107) {
tmp = -x * -1.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / a) tmp = 0 if z <= -6.6e+35: tmp = t_1 elif z <= 1.05e+107: tmp = -x * -1.0 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / a)) tmp = 0.0 if (z <= -6.6e+35) tmp = t_1; elseif (z <= 1.05e+107) tmp = Float64(Float64(-x) * -1.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / a); tmp = 0.0; if (z <= -6.6e+35) tmp = t_1; elseif (z <= 1.05e+107) tmp = -x * -1.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e+35], t$95$1, If[LessEqual[z, 1.05e+107], N[((-x) * -1.0), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a}\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+107}:\\
\;\;\;\;\left(-x\right) \cdot -1\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.6000000000000003e35 or 1.05e107 < z Initial program 68.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lift--.f6448.0
Applied rewrites48.0%
Taylor expanded in x around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6416.4
Applied rewrites16.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f6418.8
Applied rewrites18.8%
if -6.6000000000000003e35 < z < 1.05e107Initial program 68.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lift--.f6448.0
Applied rewrites48.0%
Taylor expanded in x around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f6436.9
Applied rewrites36.9%
Taylor expanded in z around 0
Applied rewrites25.5%
(FPCore (x y z t a) :precision binary64 (* (- x) -1.0))
double code(double x, double y, double z, double t, double a) {
return -x * -1.0;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = -x * (-1.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
return -x * -1.0;
}
def code(x, y, z, t, a): return -x * -1.0
function code(x, y, z, t, a) return Float64(Float64(-x) * -1.0) end
function tmp = code(x, y, z, t, a) tmp = -x * -1.0; end
code[x_, y_, z_, t_, a_] := N[((-x) * -1.0), $MachinePrecision]
\begin{array}{l}
\\
\left(-x\right) \cdot -1
\end{array}
Initial program 68.4%
Taylor expanded in t around 0
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lift--.f6448.0
Applied rewrites48.0%
Taylor expanded in x around -inf
associate-*r*N/A
mul-1-negN/A
lower-*.f64N/A
lower-neg.f64N/A
lower--.f64N/A
lower-/.f6436.9
Applied rewrites36.9%
Taylor expanded in z around 0
Applied rewrites25.5%
herbie shell --seed 2025134
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
(+ x (/ (* (- y x) (- z t)) (- a t))))