
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
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(u, v, t1)
use fmin_fmax_functions
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (u v t1) :precision binary64 (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))
double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
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(u, v, t1)
use fmin_fmax_functions
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = (-t1 * v) / ((t1 + u) * (t1 + u))
end function
public static double code(double u, double v, double t1) {
return (-t1 * v) / ((t1 + u) * (t1 + u));
}
def code(u, v, t1): return (-t1 * v) / ((t1 + u) * (t1 + u))
function code(u, v, t1) return Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))) end
function tmp = code(u, v, t1) tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end
code[u_, v_, t1_] := N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}
\end{array}
(FPCore (u v t1) :precision binary64 (/ (* (/ t1 (- u t1)) v) (+ (- u) t1)))
double code(double u, double v, double t1) {
return ((t1 / (u - t1)) * v) / (-u + t1);
}
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(u, v, t1)
use fmin_fmax_functions
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = ((t1 / (u - t1)) * v) / (-u + t1)
end function
public static double code(double u, double v, double t1) {
return ((t1 / (u - t1)) * v) / (-u + t1);
}
def code(u, v, t1): return ((t1 / (u - t1)) * v) / (-u + t1)
function code(u, v, t1) return Float64(Float64(Float64(t1 / Float64(u - t1)) * v) / Float64(Float64(-u) + t1)) end
function tmp = code(u, v, t1) tmp = ((t1 / (u - t1)) * v) / (-u + t1); end
code[u_, v_, t1_] := N[(N[(N[(t1 / N[(u - t1), $MachinePrecision]), $MachinePrecision] * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{t1}{u - t1} \cdot v}{\left(-u\right) + t1}
\end{array}
Initial program 71.0%
Applied rewrites96.6%
Final simplification96.6%
(FPCore (u v t1)
:precision binary64
(let* ((t_1 (/ (* -1.0 v) (+ (- u) t1))))
(if (<= t1 -1.02e+102)
t_1
(if (<= t1 -1.1e-162)
(* (/ (- v) (fma (fma 2.0 t1 u) u (* t1 t1))) t1)
(if (<= t1 4.3e+48) (/ (* (- t1) v) (* (+ t1 u) (+ t1 u))) t_1)))))
double code(double u, double v, double t1) {
double t_1 = (-1.0 * v) / (-u + t1);
double tmp;
if (t1 <= -1.02e+102) {
tmp = t_1;
} else if (t1 <= -1.1e-162) {
tmp = (-v / fma(fma(2.0, t1, u), u, (t1 * t1))) * t1;
} else if (t1 <= 4.3e+48) {
tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
} else {
tmp = t_1;
}
return tmp;
}
function code(u, v, t1) t_1 = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1)) tmp = 0.0 if (t1 <= -1.02e+102) tmp = t_1; elseif (t1 <= -1.1e-162) tmp = Float64(Float64(Float64(-v) / fma(fma(2.0, t1, u), u, Float64(t1 * t1))) * t1); elseif (t1 <= 4.3e+48) tmp = Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))); else tmp = t_1; end return tmp end
code[u_, v_, t1_] := Block[{t$95$1 = N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t1, -1.02e+102], t$95$1, If[LessEqual[t1, -1.1e-162], N[(N[((-v) / N[(N[(2.0 * t1 + u), $MachinePrecision] * u + N[(t1 * t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t1), $MachinePrecision], If[LessEqual[t1, 4.3e+48], N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-1 \cdot v}{\left(-u\right) + t1}\\
\mathbf{if}\;t1 \leq -1.02 \cdot 10^{+102}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t1 \leq -1.1 \cdot 10^{-162}:\\
\;\;\;\;\frac{-v}{\mathsf{fma}\left(\mathsf{fma}\left(2, t1, u\right), u, t1 \cdot t1\right)} \cdot t1\\
\mathbf{elif}\;t1 \leq 4.3 \cdot 10^{+48}:\\
\;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t1 < -1.01999999999999999e102 or 4.29999999999999978e48 < t1 Initial program 51.2%
Applied rewrites98.6%
Taylor expanded in u around 0
Applied rewrites92.3%
if -1.01999999999999999e102 < t1 < -1.1e-162Initial program 81.5%
Taylor expanded in u around 0
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-fma.f64N/A
unpow2N/A
lower-*.f6481.5
Applied rewrites81.5%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f6489.3
Applied rewrites89.3%
if -1.1e-162 < t1 < 4.29999999999999978e48Initial program 83.7%
Final simplification88.2%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -4.4e+109) (not (<= t1 4.3e+48))) (/ (* -1.0 v) (+ (- u) t1)) (/ (* (- t1) v) (* (+ t1 u) (+ t1 u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.4e+109) || !(t1 <= 4.3e+48)) {
tmp = (-1.0 * v) / (-u + t1);
} else {
tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
}
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(u, v, t1)
use fmin_fmax_functions
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-4.4d+109)) .or. (.not. (t1 <= 4.3d+48))) then
tmp = ((-1.0d0) * v) / (-u + t1)
else
tmp = (-t1 * v) / ((t1 + u) * (t1 + u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -4.4e+109) || !(t1 <= 4.3e+48)) {
tmp = (-1.0 * v) / (-u + t1);
} else {
tmp = (-t1 * v) / ((t1 + u) * (t1 + u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -4.4e+109) or not (t1 <= 4.3e+48): tmp = (-1.0 * v) / (-u + t1) else: tmp = (-t1 * v) / ((t1 + u) * (t1 + u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -4.4e+109) || !(t1 <= 4.3e+48)) tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1)); else tmp = Float64(Float64(Float64(-t1) * v) / Float64(Float64(t1 + u) * Float64(t1 + u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -4.4e+109) || ~((t1 <= 4.3e+48))) tmp = (-1.0 * v) / (-u + t1); else tmp = (-t1 * v) / ((t1 + u) * (t1 + u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -4.4e+109], N[Not[LessEqual[t1, 4.3e+48]], $MachinePrecision]], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], N[(N[((-t1) * v), $MachinePrecision] / N[(N[(t1 + u), $MachinePrecision] * N[(t1 + u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -4.4 \cdot 10^{+109} \lor \neg \left(t1 \leq 4.3 \cdot 10^{+48}\right):\\
\;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(-t1\right) \cdot v}{\left(t1 + u\right) \cdot \left(t1 + u\right)}\\
\end{array}
\end{array}
if t1 < -4.3999999999999998e109 or 4.29999999999999978e48 < t1 Initial program 50.2%
Applied rewrites98.6%
Taylor expanded in u around 0
Applied rewrites92.2%
if -4.3999999999999998e109 < t1 < 4.29999999999999978e48Initial program 83.1%
Final simplification86.4%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.2e-15) (not (<= t1 5.2e-76))) (/ (* -1.0 v) (+ (- u) t1)) (/ (* (/ t1 u) v) (- u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.2e-15) || !(t1 <= 5.2e-76)) {
tmp = (-1.0 * v) / (-u + t1);
} else {
tmp = ((t1 / u) * v) / -u;
}
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(u, v, t1)
use fmin_fmax_functions
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-3.2d-15)) .or. (.not. (t1 <= 5.2d-76))) then
tmp = ((-1.0d0) * v) / (-u + t1)
else
tmp = ((t1 / u) * v) / -u
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.2e-15) || !(t1 <= 5.2e-76)) {
tmp = (-1.0 * v) / (-u + t1);
} else {
tmp = ((t1 / u) * v) / -u;
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.2e-15) or not (t1 <= 5.2e-76): tmp = (-1.0 * v) / (-u + t1) else: tmp = ((t1 / u) * v) / -u return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.2e-15) || !(t1 <= 5.2e-76)) tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1)); else tmp = Float64(Float64(Float64(t1 / u) * v) / Float64(-u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3.2e-15) || ~((t1 <= 5.2e-76))) tmp = (-1.0 * v) / (-u + t1); else tmp = ((t1 / u) * v) / -u; end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.2e-15], N[Not[LessEqual[t1, 5.2e-76]], $MachinePrecision]], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t1 / u), $MachinePrecision] * v), $MachinePrecision] / (-u)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.2 \cdot 10^{-15} \lor \neg \left(t1 \leq 5.2 \cdot 10^{-76}\right):\\
\;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t1}{u} \cdot v}{-u}\\
\end{array}
\end{array}
if t1 < -3.1999999999999999e-15 or 5.1999999999999999e-76 < t1 Initial program 61.3%
Applied rewrites98.5%
Taylor expanded in u around 0
Applied rewrites84.9%
if -3.1999999999999999e-15 < t1 < 5.1999999999999999e-76Initial program 82.4%
Taylor expanded in u around inf
mul-1-negN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-frac-negN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6480.5
Applied rewrites80.5%
Applied rewrites82.5%
Final simplification83.8%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.2e-15) (not (<= t1 5.2e-76))) (/ (* -1.0 v) (+ (- u) t1)) (* (/ v u) (/ (- t1) u))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.2e-15) || !(t1 <= 5.2e-76)) {
tmp = (-1.0 * v) / (-u + t1);
} else {
tmp = (v / u) * (-t1 / u);
}
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(u, v, t1)
use fmin_fmax_functions
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-3.2d-15)) .or. (.not. (t1 <= 5.2d-76))) then
tmp = ((-1.0d0) * v) / (-u + t1)
else
tmp = (v / u) * (-t1 / u)
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.2e-15) || !(t1 <= 5.2e-76)) {
tmp = (-1.0 * v) / (-u + t1);
} else {
tmp = (v / u) * (-t1 / u);
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.2e-15) or not (t1 <= 5.2e-76): tmp = (-1.0 * v) / (-u + t1) else: tmp = (v / u) * (-t1 / u) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.2e-15) || !(t1 <= 5.2e-76)) tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1)); else tmp = Float64(Float64(v / u) * Float64(Float64(-t1) / u)); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3.2e-15) || ~((t1 <= 5.2e-76))) tmp = (-1.0 * v) / (-u + t1); else tmp = (v / u) * (-t1 / u); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.2e-15], N[Not[LessEqual[t1, 5.2e-76]], $MachinePrecision]], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], N[(N[(v / u), $MachinePrecision] * N[((-t1) / u), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.2 \cdot 10^{-15} \lor \neg \left(t1 \leq 5.2 \cdot 10^{-76}\right):\\
\;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
\mathbf{else}:\\
\;\;\;\;\frac{v}{u} \cdot \frac{-t1}{u}\\
\end{array}
\end{array}
if t1 < -3.1999999999999999e-15 or 5.1999999999999999e-76 < t1 Initial program 61.3%
Applied rewrites98.5%
Taylor expanded in u around 0
Applied rewrites84.9%
if -3.1999999999999999e-15 < t1 < 5.1999999999999999e-76Initial program 82.4%
Taylor expanded in u around inf
mul-1-negN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-frac-negN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6480.5
Applied rewrites80.5%
Final simplification82.9%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.2e-15) (not (<= t1 5.2e-76))) (/ (* -1.0 v) (+ (- u) t1)) (* (- v) (/ t1 (* u u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.2e-15) || !(t1 <= 5.2e-76)) {
tmp = (-1.0 * v) / (-u + t1);
} else {
tmp = -v * (t1 / (u * u));
}
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(u, v, t1)
use fmin_fmax_functions
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-3.2d-15)) .or. (.not. (t1 <= 5.2d-76))) then
tmp = ((-1.0d0) * v) / (-u + t1)
else
tmp = -v * (t1 / (u * u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.2e-15) || !(t1 <= 5.2e-76)) {
tmp = (-1.0 * v) / (-u + t1);
} else {
tmp = -v * (t1 / (u * u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.2e-15) or not (t1 <= 5.2e-76): tmp = (-1.0 * v) / (-u + t1) else: tmp = -v * (t1 / (u * u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.2e-15) || !(t1 <= 5.2e-76)) tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1)); else tmp = Float64(Float64(-v) * Float64(t1 / Float64(u * u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3.2e-15) || ~((t1 <= 5.2e-76))) tmp = (-1.0 * v) / (-u + t1); else tmp = -v * (t1 / (u * u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.2e-15], N[Not[LessEqual[t1, 5.2e-76]], $MachinePrecision]], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], N[((-v) * N[(t1 / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.2 \cdot 10^{-15} \lor \neg \left(t1 \leq 5.2 \cdot 10^{-76}\right):\\
\;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
\mathbf{else}:\\
\;\;\;\;\left(-v\right) \cdot \frac{t1}{u \cdot u}\\
\end{array}
\end{array}
if t1 < -3.1999999999999999e-15 or 5.1999999999999999e-76 < t1 Initial program 61.3%
Applied rewrites98.5%
Taylor expanded in u around 0
Applied rewrites84.9%
if -3.1999999999999999e-15 < t1 < 5.1999999999999999e-76Initial program 82.4%
Taylor expanded in u around inf
mul-1-negN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-frac-negN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6480.5
Applied rewrites80.5%
Applied rewrites79.6%
Final simplification82.5%
(FPCore (u v t1) :precision binary64 (if (or (<= t1 -3.2e-15) (not (<= t1 5.2e-76))) (/ (* -1.0 v) (+ (- u) t1)) (* (- t1) (/ v (* u u)))))
double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.2e-15) || !(t1 <= 5.2e-76)) {
tmp = (-1.0 * v) / (-u + t1);
} else {
tmp = -t1 * (v / (u * u));
}
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(u, v, t1)
use fmin_fmax_functions
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
real(8) :: tmp
if ((t1 <= (-3.2d-15)) .or. (.not. (t1 <= 5.2d-76))) then
tmp = ((-1.0d0) * v) / (-u + t1)
else
tmp = -t1 * (v / (u * u))
end if
code = tmp
end function
public static double code(double u, double v, double t1) {
double tmp;
if ((t1 <= -3.2e-15) || !(t1 <= 5.2e-76)) {
tmp = (-1.0 * v) / (-u + t1);
} else {
tmp = -t1 * (v / (u * u));
}
return tmp;
}
def code(u, v, t1): tmp = 0 if (t1 <= -3.2e-15) or not (t1 <= 5.2e-76): tmp = (-1.0 * v) / (-u + t1) else: tmp = -t1 * (v / (u * u)) return tmp
function code(u, v, t1) tmp = 0.0 if ((t1 <= -3.2e-15) || !(t1 <= 5.2e-76)) tmp = Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1)); else tmp = Float64(Float64(-t1) * Float64(v / Float64(u * u))); end return tmp end
function tmp_2 = code(u, v, t1) tmp = 0.0; if ((t1 <= -3.2e-15) || ~((t1 <= 5.2e-76))) tmp = (-1.0 * v) / (-u + t1); else tmp = -t1 * (v / (u * u)); end tmp_2 = tmp; end
code[u_, v_, t1_] := If[Or[LessEqual[t1, -3.2e-15], N[Not[LessEqual[t1, 5.2e-76]], $MachinePrecision]], N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision], N[((-t1) * N[(v / N[(u * u), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t1 \leq -3.2 \cdot 10^{-15} \lor \neg \left(t1 \leq 5.2 \cdot 10^{-76}\right):\\
\;\;\;\;\frac{-1 \cdot v}{\left(-u\right) + t1}\\
\mathbf{else}:\\
\;\;\;\;\left(-t1\right) \cdot \frac{v}{u \cdot u}\\
\end{array}
\end{array}
if t1 < -3.1999999999999999e-15 or 5.1999999999999999e-76 < t1 Initial program 61.3%
Applied rewrites98.5%
Taylor expanded in u around 0
Applied rewrites84.9%
if -3.1999999999999999e-15 < t1 < 5.1999999999999999e-76Initial program 82.4%
Taylor expanded in u around inf
mul-1-negN/A
*-commutativeN/A
unpow2N/A
times-fracN/A
distribute-lft-neg-inN/A
lower-*.f64N/A
distribute-frac-negN/A
mul-1-negN/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-/.f6480.5
Applied rewrites80.5%
Taylor expanded in u around 0
Applied rewrites76.4%
Taylor expanded in u around 0
Applied rewrites72.3%
Final simplification79.1%
(FPCore (u v t1) :precision binary64 (/ (* -1.0 v) (+ (- u) t1)))
double code(double u, double v, double t1) {
return (-1.0 * v) / (-u + t1);
}
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(u, v, t1)
use fmin_fmax_functions
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = ((-1.0d0) * v) / (-u + t1)
end function
public static double code(double u, double v, double t1) {
return (-1.0 * v) / (-u + t1);
}
def code(u, v, t1): return (-1.0 * v) / (-u + t1)
function code(u, v, t1) return Float64(Float64(-1.0 * v) / Float64(Float64(-u) + t1)) end
function tmp = code(u, v, t1) tmp = (-1.0 * v) / (-u + t1); end
code[u_, v_, t1_] := N[(N[(-1.0 * v), $MachinePrecision] / N[((-u) + t1), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{-1 \cdot v}{\left(-u\right) + t1}
\end{array}
Initial program 71.0%
Applied rewrites96.6%
Taylor expanded in u around 0
Applied rewrites64.6%
Final simplification64.6%
(FPCore (u v t1) :precision binary64 (* (- v) (/ -1.0 (- u t1))))
double code(double u, double v, double t1) {
return -v * (-1.0 / (u - t1));
}
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(u, v, t1)
use fmin_fmax_functions
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = -v * ((-1.0d0) / (u - t1))
end function
public static double code(double u, double v, double t1) {
return -v * (-1.0 / (u - t1));
}
def code(u, v, t1): return -v * (-1.0 / (u - t1))
function code(u, v, t1) return Float64(Float64(-v) * Float64(-1.0 / Float64(u - t1))) end
function tmp = code(u, v, t1) tmp = -v * (-1.0 / (u - t1)); end
code[u_, v_, t1_] := N[((-v) * N[(-1.0 / N[(u - t1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-v\right) \cdot \frac{-1}{u - t1}
\end{array}
Initial program 71.0%
Applied rewrites96.6%
Taylor expanded in u around 0
Applied rewrites64.6%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6464.5
Applied rewrites64.5%
(FPCore (u v t1) :precision binary64 (/ (- v) t1))
double code(double u, double v, double t1) {
return -v / t1;
}
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(u, v, t1)
use fmin_fmax_functions
real(8), intent (in) :: u
real(8), intent (in) :: v
real(8), intent (in) :: t1
code = -v / t1
end function
public static double code(double u, double v, double t1) {
return -v / t1;
}
def code(u, v, t1): return -v / t1
function code(u, v, t1) return Float64(Float64(-v) / t1) end
function tmp = code(u, v, t1) tmp = -v / t1; end
code[u_, v_, t1_] := N[((-v) / t1), $MachinePrecision]
\begin{array}{l}
\\
\frac{-v}{t1}
\end{array}
Initial program 71.0%
Taylor expanded in u around 0
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f6455.8
Applied rewrites55.8%
herbie shell --seed 2024359
(FPCore (u v t1)
:name "Rosa's DopplerBench"
:precision binary64
(/ (* (- t1) v) (* (+ t1 u) (+ t1 u))))