
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (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) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (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) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma y (/ (fma -1.0 a z) t) x)))
(if (<= t -7.5e+174)
t_1
(if (<= t 7e+168) (- (+ y x) (* (- z t) (/ y (- a t)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, (fma(-1.0, a, z) / t), x);
double tmp;
if (t <= -7.5e+174) {
tmp = t_1;
} else if (t <= 7e+168) {
tmp = (y + x) - ((z - t) * (y / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(fma(-1.0, a, z) / t), x) tmp = 0.0 if (t <= -7.5e+174) tmp = t_1; elseif (t <= 7e+168) tmp = Float64(Float64(y + x) - Float64(Float64(z - t) * Float64(y / Float64(a - t)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(-1.0 * a + z), $MachinePrecision] / t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -7.5e+174], t$95$1, If[LessEqual[t, 7e+168], N[(N[(y + x), $MachinePrecision] - N[(N[(z - t), $MachinePrecision] * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(-1, a, z\right)}{t}, x\right)\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+168}:\\
\;\;\;\;\left(y + x\right) - \left(z - t\right) \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.5000000000000004e174 or 7.0000000000000004e168 < t Initial program 49.4%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6449.4
lift--.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6462.4
Applied rewrites62.4%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6441.3
Applied rewrites41.3%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f6442.3
Applied rewrites42.3%
Taylor expanded in t around inf
Applied rewrites92.3%
if -7.5000000000000004e174 < t < 7.0000000000000004e168Initial program 84.7%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6484.7
lift--.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6488.6
Applied rewrites88.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma y (/ (fma -1.0 a z) t) x)))
(if (<= t -7.4e+174)
t_1
(if (<= t 4.5e+144) (- (+ x y) (/ (* (- z t) y) (- a t))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, (fma(-1.0, a, z) / t), x);
double tmp;
if (t <= -7.4e+174) {
tmp = t_1;
} else if (t <= 4.5e+144) {
tmp = (x + y) - (((z - t) * y) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(fma(-1.0, a, z) / t), x) tmp = 0.0 if (t <= -7.4e+174) tmp = t_1; elseif (t <= 4.5e+144) tmp = Float64(Float64(x + y) - 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[(y * N[(N[(-1.0 * a + z), $MachinePrecision] / t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -7.4e+174], t$95$1, If[LessEqual[t, 4.5e+144], N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(-1, a, z\right)}{t}, x\right)\\
\mathbf{if}\;t \leq -7.4 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+144}:\\
\;\;\;\;\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.4000000000000004e174 or 4.49999999999999967e144 < t Initial program 50.9%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6450.9
lift--.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6463.6
Applied rewrites63.6%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6442.2
Applied rewrites42.2%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f6443.3
Applied rewrites43.3%
Taylor expanded in t around inf
Applied rewrites91.4%
if -7.4000000000000004e174 < t < 4.49999999999999967e144Initial program 85.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- y) (/ z a))))
(if (<= z -8.6e+257)
t_1
(if (<= z 3e+153) (+ y x) (if (<= z 1.4e+219) (* (/ z t) y) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -y * (z / a);
double tmp;
if (z <= -8.6e+257) {
tmp = t_1;
} else if (z <= 3e+153) {
tmp = y + x;
} else if (z <= 1.4e+219) {
tmp = (z / t) * y;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
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 <= (-8.6d+257)) then
tmp = t_1
else if (z <= 3d+153) then
tmp = y + x
else if (z <= 1.4d+219) then
tmp = (z / t) * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -y * (z / a);
double tmp;
if (z <= -8.6e+257) {
tmp = t_1;
} else if (z <= 3e+153) {
tmp = y + x;
} else if (z <= 1.4e+219) {
tmp = (z / t) * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -y * (z / a) tmp = 0 if z <= -8.6e+257: tmp = t_1 elif z <= 3e+153: tmp = y + x elif z <= 1.4e+219: tmp = (z / t) * y else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-y) * Float64(z / a)) tmp = 0.0 if (z <= -8.6e+257) tmp = t_1; elseif (z <= 3e+153) tmp = Float64(y + x); elseif (z <= 1.4e+219) tmp = Float64(Float64(z / t) * y); 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 <= -8.6e+257) tmp = t_1; elseif (z <= 3e+153) tmp = y + x; elseif (z <= 1.4e+219) tmp = (z / t) * y; 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, -8.6e+257], t$95$1, If[LessEqual[z, 3e+153], N[(y + x), $MachinePrecision], If[LessEqual[z, 1.4e+219], N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot \frac{z}{a}\\
\mathbf{if}\;z \leq -8.6 \cdot 10^{+257}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+153}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+219}:\\
\;\;\;\;\frac{z}{t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.5999999999999996e257 or 1.40000000000000008e219 < z Initial program 77.7%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift--.f6450.8
Applied rewrites50.8%
Taylor expanded in t around 0
Applied rewrites31.0%
lift-/.f64N/A
lift-neg.f64N/A
mul-1-negN/A
lower-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-/.f6434.5
Applied rewrites34.5%
if -8.5999999999999996e257 < z < 3.00000000000000019e153Initial program 76.8%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6465.2
Applied rewrites65.2%
if 3.00000000000000019e153 < z < 1.40000000000000008e219Initial program 79.3%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift--.f6443.9
Applied rewrites43.9%
Taylor expanded in t around inf
associate-*r/N/A
*-commutativeN/A
lower-*.f64N/A
lift-/.f6433.5
Applied rewrites33.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma y (/ (fma -1.0 a z) t) x)))
(if (<= t -7.4e+174)
t_1
(if (<= t 7.8e+22) (- (+ y x) (* z (/ y a))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(y, (fma(-1.0, a, z) / t), x);
double tmp;
if (t <= -7.4e+174) {
tmp = t_1;
} else if (t <= 7.8e+22) {
tmp = (y + x) - (z * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(y, Float64(fma(-1.0, a, z) / t), x) tmp = 0.0 if (t <= -7.4e+174) tmp = t_1; elseif (t <= 7.8e+22) tmp = Float64(Float64(y + x) - Float64(z * Float64(y / a))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(-1.0 * a + z), $MachinePrecision] / t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -7.4e+174], t$95$1, If[LessEqual[t, 7.8e+22], N[(N[(y + x), $MachinePrecision] - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, \frac{\mathsf{fma}\left(-1, a, z\right)}{t}, x\right)\\
\mathbf{if}\;t \leq -7.4 \cdot 10^{+174}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+22}:\\
\;\;\;\;\left(y + x\right) - z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.4000000000000004e174 or 7.80000000000000042e22 < t Initial program 56.9%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6456.9
lift--.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6468.1
Applied rewrites68.1%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6446.0
Applied rewrites46.0%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f6447.5
Applied rewrites47.5%
Taylor expanded in t around inf
Applied rewrites87.2%
if -7.4000000000000004e174 < t < 7.80000000000000042e22Initial program 87.3%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6487.3
lift--.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6490.4
Applied rewrites90.4%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6474.0
Applied rewrites74.0%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f6475.8
Applied rewrites75.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -9.5e-245) (- (+ y x) (* z (/ y a))) (if (<= t 2.3e+135) (- (+ x y) (/ (* z y) a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.5e-245) {
tmp = (y + x) - (z * (y / a));
} else if (t <= 2.3e+135) {
tmp = (x + y) - ((z * y) / a);
} else {
tmp = x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-9.5d-245)) then
tmp = (y + x) - (z * (y / a))
else if (t <= 2.3d+135) then
tmp = (x + y) - ((z * y) / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.5e-245) {
tmp = (y + x) - (z * (y / a));
} else if (t <= 2.3e+135) {
tmp = (x + y) - ((z * y) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9.5e-245: tmp = (y + x) - (z * (y / a)) elif t <= 2.3e+135: tmp = (x + y) - ((z * y) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.5e-245) tmp = Float64(Float64(y + x) - Float64(z * Float64(y / a))); elseif (t <= 2.3e+135) tmp = Float64(Float64(x + y) - Float64(Float64(z * y) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9.5e-245) tmp = (y + x) - (z * (y / a)); elseif (t <= 2.3e+135) tmp = (x + y) - ((z * y) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.5e-245], N[(N[(y + x), $MachinePrecision] - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e+135], N[(N[(x + y), $MachinePrecision] - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{-245}:\\
\;\;\;\;\left(y + x\right) - z \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+135}:\\
\;\;\;\;\left(x + y\right) - \frac{z \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -9.5000000000000002e-245Initial program 74.8%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6474.8
lift--.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6481.8
Applied rewrites81.8%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6461.1
Applied rewrites61.1%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f6463.0
Applied rewrites63.0%
if -9.5000000000000002e-245 < t < 2.3000000000000001e135Initial program 87.5%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f6475.7
Applied rewrites75.7%
if 2.3000000000000001e135 < t Initial program 52.6%
Taylor expanded in x around inf
Applied rewrites67.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -8.5e+94) (- y (* z (/ y (- a t)))) (if (<= z 1.85e+151) (+ y x) (* (- y) (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e+94) {
tmp = y - (z * (y / (a - t)));
} else if (z <= 1.85e+151) {
tmp = y + x;
} else {
tmp = -y * (z / (a - t));
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.5d+94)) then
tmp = y - (z * (y / (a - t)))
else if (z <= 1.85d+151) then
tmp = y + x
else
tmp = -y * (z / (a - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.5e+94) {
tmp = y - (z * (y / (a - t)));
} else if (z <= 1.85e+151) {
tmp = y + x;
} else {
tmp = -y * (z / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.5e+94: tmp = y - (z * (y / (a - t))) elif z <= 1.85e+151: tmp = y + x else: tmp = -y * (z / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.5e+94) tmp = Float64(y - Float64(z * Float64(y / Float64(a - t)))); elseif (z <= 1.85e+151) tmp = Float64(y + x); else tmp = Float64(Float64(-y) * Float64(z / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.5e+94) tmp = y - (z * (y / (a - t))); elseif (z <= 1.85e+151) tmp = y + x; else tmp = -y * (z / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.5e+94], N[(y - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e+151], N[(y + x), $MachinePrecision], N[((-y) * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+94}:\\
\;\;\;\;y - z \cdot \frac{y}{a - t}\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+151}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;\left(-y\right) \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if z < -8.50000000000000054e94Initial program 79.4%
Taylor expanded in x around 0
*-commutativeN/A
lower--.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6455.8
Applied rewrites55.8%
Taylor expanded in z around inf
Applied rewrites55.1%
if -8.50000000000000054e94 < z < 1.8499999999999999e151Initial program 76.2%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6468.2
Applied rewrites68.2%
if 1.8499999999999999e151 < z Initial program 78.0%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift--.f6447.4
Applied rewrites47.4%
lift--.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
distribute-lft-neg-outN/A
mul-1-negN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-/.f64N/A
lift--.f6456.1
Applied rewrites56.1%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (* (- y) (/ z (- a t))))) (if (<= z -1.45e+172) t_1 (if (<= z 1.85e+151) (+ y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -y * (z / (a - t));
double tmp;
if (z <= -1.45e+172) {
tmp = t_1;
} else if (z <= 1.85e+151) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = -y * (z / (a - t))
if (z <= (-1.45d+172)) then
tmp = t_1
else if (z <= 1.85d+151) then
tmp = y + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -y * (z / (a - t));
double tmp;
if (z <= -1.45e+172) {
tmp = t_1;
} else if (z <= 1.85e+151) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -y * (z / (a - t)) tmp = 0 if z <= -1.45e+172: tmp = t_1 elif z <= 1.85e+151: tmp = y + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-y) * Float64(z / Float64(a - t))) tmp = 0.0 if (z <= -1.45e+172) tmp = t_1; elseif (z <= 1.85e+151) tmp = Float64(y + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -y * (z / (a - t)); tmp = 0.0; if (z <= -1.45e+172) tmp = t_1; elseif (z <= 1.85e+151) tmp = y + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-y) * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+172], t$95$1, If[LessEqual[z, 1.85e+151], N[(y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot \frac{z}{a - t}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+151}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.45e172 or 1.8499999999999999e151 < z Initial program 79.1%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift--.f6448.2
Applied rewrites48.2%
lift--.f64N/A
lift-/.f64N/A
lift-neg.f64N/A
lift-*.f64N/A
distribute-lft-neg-outN/A
mul-1-negN/A
associate-*r*N/A
associate-/l*N/A
lower-*.f64N/A
mul-1-negN/A
lift-neg.f64N/A
lower-/.f64N/A
lift--.f6456.3
Applied rewrites56.3%
if -1.45e172 < z < 1.8499999999999999e151Initial program 76.3%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6467.2
Applied rewrites67.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -7e+172) (- x (* z (/ y a))) (if (<= z 2.8e+117) (+ y x) (- x (/ (* z y) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7e+172) {
tmp = x - (z * (y / a));
} else if (z <= 2.8e+117) {
tmp = y + x;
} else {
tmp = x - ((z * y) / 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) :: tmp
if (z <= (-7d+172)) then
tmp = x - (z * (y / a))
else if (z <= 2.8d+117) then
tmp = y + x
else
tmp = x - ((z * y) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7e+172) {
tmp = x - (z * (y / a));
} else if (z <= 2.8e+117) {
tmp = y + x;
} else {
tmp = x - ((z * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7e+172: tmp = x - (z * (y / a)) elif z <= 2.8e+117: tmp = y + x else: tmp = x - ((z * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7e+172) tmp = Float64(x - Float64(z * Float64(y / a))); elseif (z <= 2.8e+117) tmp = Float64(y + x); else tmp = Float64(x - Float64(Float64(z * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7e+172) tmp = x - (z * (y / a)); elseif (z <= 2.8e+117) tmp = y + x; else tmp = x - ((z * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7e+172], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e+117], N[(y + x), $MachinePrecision], N[(x - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+172}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+117}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z \cdot y}{a}\\
\end{array}
\end{array}
if z < -6.99999999999999955e172Initial program 80.5%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6480.5
lift--.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6492.6
Applied rewrites92.6%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6453.1
Applied rewrites53.1%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f6460.1
Applied rewrites60.1%
Taylor expanded in x around inf
Applied rewrites54.4%
if -6.99999999999999955e172 < z < 2.79999999999999997e117Initial program 76.3%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6467.9
Applied rewrites67.9%
if 2.79999999999999997e117 < z Initial program 77.9%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6477.9
lift--.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6491.5
Applied rewrites91.5%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6452.7
Applied rewrites52.7%
Taylor expanded in x around inf
Applied rewrites49.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (- x (* z (/ y a))))) (if (<= z -7e+172) t_1 (if (<= z 2.8e+117) (+ y x) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (z * (y / a));
double tmp;
if (z <= -7e+172) {
tmp = t_1;
} else if (z <= 2.8e+117) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (z * (y / a))
if (z <= (-7d+172)) then
tmp = t_1
else if (z <= 2.8d+117) then
tmp = y + x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (z * (y / a));
double tmp;
if (z <= -7e+172) {
tmp = t_1;
} else if (z <= 2.8e+117) {
tmp = y + x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (z * (y / a)) tmp = 0 if z <= -7e+172: tmp = t_1 elif z <= 2.8e+117: tmp = y + x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(z * Float64(y / a))) tmp = 0.0 if (z <= -7e+172) tmp = t_1; elseif (z <= 2.8e+117) tmp = Float64(y + x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (z * (y / a)); tmp = 0.0; if (z <= -7e+172) tmp = t_1; elseif (z <= 2.8e+117) tmp = y + x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7e+172], t$95$1, If[LessEqual[z, 2.8e+117], N[(y + x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - z \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -7 \cdot 10^{+172}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+117}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.99999999999999955e172 or 2.79999999999999997e117 < z Initial program 79.0%
lift-+.f64N/A
+-commutativeN/A
lower-+.f6479.0
lift--.f64N/A
lift-/.f64N/A
lift--.f64N/A
lift-*.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6491.9
Applied rewrites91.9%
Taylor expanded in t around 0
associate-*r/N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f6452.9
Applied rewrites52.9%
lift-*.f64N/A
lift-/.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift-/.f6460.1
Applied rewrites60.1%
Taylor expanded in x around inf
Applied rewrites54.1%
if -6.99999999999999955e172 < z < 2.79999999999999997e117Initial program 76.3%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6467.9
Applied rewrites67.9%
(FPCore (x y z t a) :precision binary64 (if (<= z 3e+153) (+ y x) (* (/ z t) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 3e+153) {
tmp = y + x;
} else {
tmp = (z / t) * 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) :: tmp
if (z <= 3d+153) then
tmp = y + x
else
tmp = (z / t) * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 3e+153) {
tmp = y + x;
} else {
tmp = (z / t) * y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 3e+153: tmp = y + x else: tmp = (z / t) * y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 3e+153) tmp = Float64(y + x); else tmp = Float64(Float64(z / t) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 3e+153) tmp = y + x; else tmp = (z / t) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 3e+153], N[(y + x), $MachinePrecision], N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 3 \cdot 10^{+153}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{t} \cdot y\\
\end{array}
\end{array}
if z < 3.00000000000000019e153Initial program 76.9%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6463.7
Applied rewrites63.7%
if 3.00000000000000019e153 < z Initial program 78.0%
Taylor expanded in z around inf
associate-*r/N/A
lower-/.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lift--.f6447.3
Applied rewrites47.3%
Taylor expanded in t around inf
associate-*r/N/A
*-commutativeN/A
lower-*.f64N/A
lift-/.f6438.2
Applied rewrites38.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -5.1e+185) y (if (<= y 7.5e+84) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.1e+185) {
tmp = y;
} else if (y <= 7.5e+84) {
tmp = x;
} else {
tmp = 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) :: tmp
if (y <= (-5.1d+185)) then
tmp = y
else if (y <= 7.5d+84) then
tmp = x
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5.1e+185) {
tmp = y;
} else if (y <= 7.5e+84) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5.1e+185: tmp = y elif y <= 7.5e+84: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5.1e+185) tmp = y; elseif (y <= 7.5e+84) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5.1e+185) tmp = y; elseif (y <= 7.5e+84) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.1e+185], y, If[LessEqual[y, 7.5e+84], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{+185}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+84}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -5.09999999999999996e185 or 7.5000000000000001e84 < y Initial program 56.6%
Taylor expanded in x around 0
*-commutativeN/A
lower--.f64N/A
associate-/l*N/A
lower-*.f64N/A
lift--.f64N/A
lower-/.f64N/A
lift--.f6461.2
Applied rewrites61.2%
Taylor expanded in a around inf
Applied rewrites30.9%
if -5.09999999999999996e185 < y < 7.5000000000000001e84Initial program 85.1%
Taylor expanded in x around inf
Applied rewrites63.1%
(FPCore (x y z t a) :precision binary64 (if (<= t 8.5e+182) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 8.5e+182) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 8.5d+182) then
tmp = y + x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 8.5e+182) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 8.5e+182: tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 8.5e+182) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 8.5e+182) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 8.5e+182], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.5 \cdot 10^{+182}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < 8.5e182Initial program 80.2%
Taylor expanded in a around inf
+-commutativeN/A
lower-+.f6461.5
Applied rewrites61.5%
if 8.5e182 < t Initial program 47.8%
Taylor expanded in x around inf
Applied rewrites69.4%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
module fmin_fmax_functions
implicit none
private
public fmax
public fmin
interface fmax
module procedure fmax88
module procedure fmax44
module procedure fmax84
module procedure fmax48
end interface
interface fmin
module procedure fmin88
module procedure fmin44
module procedure fmin84
module procedure fmin48
end interface
contains
real(8) function fmax88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(4) function fmax44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, max(x, y), y /= y), x /= x)
end function
real(8) function fmax84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmax48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
end function
real(8) function fmin88(x, y) result (res)
real(8), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(4) function fmin44(x, y) result (res)
real(4), intent (in) :: x
real(4), intent (in) :: y
res = merge(y, merge(x, min(x, y), y /= y), x /= x)
end function
real(8) function fmin84(x, y) result(res)
real(8), intent (in) :: x
real(4), intent (in) :: y
res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
end function
real(8) function fmin48(x, y) result(res)
real(4), intent (in) :: x
real(8), intent (in) :: y
res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
end function
end module
real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 77.0%
Taylor expanded in x around inf
Applied rewrites50.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (< t_2 -1.3664970889390727e-7)
t_1
(if (< t_2 1.4754293444577233e-239)
(/ (- (* y (- a z)) (* x t)) (- a t))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} 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 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 < (-1.3664970889390727d-7)) then
tmp = t_1
else if (t_2 < 1.4754293444577233d-239) then
tmp = ((y * (a - z)) - (x * t)) / (a - t)
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 + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 < -1.3664970889390727e-7: tmp = t_1 elif t_2 < 1.4754293444577233e-239: tmp = ((y * (a - z)) - (x * t)) / (a - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = ((y * (a - z)) - (x * t)) / (a - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t\_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2025093
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -13664970889390727/100000000000000000000000) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 14754293444577233/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)))))
(- (+ x y) (/ (* (- z t) y) (- a t))))