Numeric.Log:$cexpm1 from log-domain-0.10.2.1, B

Percentage Accurate: 100.0% → 100.0%
Time: 1.7s
Alternatives: 6
Speedup: 1.1×

Specification

?
\[\left(x \cdot y + x\right) + y \]
(FPCore (x y) :precision binary64 (+ (+ (* x y) x) y))
double code(double x, double y) {
	return ((x * y) + x) + y;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((x * y) + x) + y
end function
public static double code(double x, double y) {
	return ((x * y) + x) + y;
}
def code(x, y):
	return ((x * y) + x) + y
function code(x, y)
	return Float64(Float64(Float64(x * y) + x) + y)
end
function tmp = code(x, y)
	tmp = ((x * y) + x) + y;
end
code[x_, y_] := N[(N[(N[(x * y), $MachinePrecision] + x), $MachinePrecision] + y), $MachinePrecision]
\left(x \cdot y + x\right) + y

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 6 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 100.0% accurate, 1.0× speedup?

\[\left(x \cdot y + x\right) + y \]
(FPCore (x y) :precision binary64 (+ (+ (* x y) x) y))
double code(double x, double y) {
	return ((x * y) + x) + y;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((x * y) + x) + y
end function
public static double code(double x, double y) {
	return ((x * y) + x) + y;
}
def code(x, y):
	return ((x * y) + x) + y
function code(x, y)
	return Float64(Float64(Float64(x * y) + x) + y)
end
function tmp = code(x, y)
	tmp = ((x * y) + x) + y;
end
code[x_, y_] := N[(N[(N[(x * y), $MachinePrecision] + x), $MachinePrecision] + y), $MachinePrecision]
\left(x \cdot y + x\right) + y

Alternative 1: 100.0% accurate, 1.1× speedup?

\[\mathsf{fma}\left(x - -1, y, x\right) \]
(FPCore (x y) :precision binary64 (fma (- x -1.0) y x))
double code(double x, double y) {
	return fma((x - -1.0), y, x);
}
function code(x, y)
	return fma(Float64(x - -1.0), y, x)
end
code[x_, y_] := N[(N[(x - -1.0), $MachinePrecision] * y + x), $MachinePrecision]
\mathsf{fma}\left(x - -1, y, x\right)
Derivation
  1. Initial program 100.0%

    \[\left(x \cdot y + x\right) + y \]
  2. Step-by-step derivation
    1. lift-+.f64N/A

      \[\leadsto \color{blue}{\left(x \cdot y + x\right) + y} \]
    2. +-commutativeN/A

      \[\leadsto \color{blue}{y + \left(x \cdot y + x\right)} \]
    3. lift-+.f64N/A

      \[\leadsto y + \color{blue}{\left(x \cdot y + x\right)} \]
    4. associate-+l+N/A

      \[\leadsto \color{blue}{\left(y + x \cdot y\right) + x} \]
    5. lift-*.f64N/A

      \[\leadsto \left(y + \color{blue}{x \cdot y}\right) + x \]
    6. distribute-rgt1-inN/A

      \[\leadsto \color{blue}{\left(x + 1\right) \cdot y} + x \]
    7. lower-fma.f64N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(x + 1, y, x\right)} \]
    8. add-flipN/A

      \[\leadsto \mathsf{fma}\left(\color{blue}{x - \left(\mathsf{neg}\left(1\right)\right)}, y, x\right) \]
    9. lower--.f64N/A

      \[\leadsto \mathsf{fma}\left(\color{blue}{x - \left(\mathsf{neg}\left(1\right)\right)}, y, x\right) \]
    10. metadata-eval100.0%

      \[\leadsto \mathsf{fma}\left(x - \color{blue}{-1}, y, x\right) \]
  3. Applied rewrites100.0%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x - -1, y, x\right)} \]
  4. Add Preprocessing

Alternative 2: 98.2% accurate, 0.2× speedup?

\[\begin{array}{l} \mathbf{if}\;\left(\mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\right) + \mathsf{max}\left(x, y\right) \leq -1 \cdot 10^{-258}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{max}\left(x, y\right), \mathsf{min}\left(x, y\right), \mathsf{min}\left(x, y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{max}\left(x, y\right), \mathsf{min}\left(x, y\right), \mathsf{max}\left(x, y\right)\right)\\ \end{array} \]
(FPCore (x y)
 :precision binary64
 (if (<= (+ (+ (* (fmin x y) (fmax x y)) (fmin x y)) (fmax x y)) -1e-258)
   (fma (fmax x y) (fmin x y) (fmin x y))
   (fma (fmax x y) (fmin x y) (fmax x y))))
double code(double x, double y) {
	double tmp;
	if ((((fmin(x, y) * fmax(x, y)) + fmin(x, y)) + fmax(x, y)) <= -1e-258) {
		tmp = fma(fmax(x, y), fmin(x, y), fmin(x, y));
	} else {
		tmp = fma(fmax(x, y), fmin(x, y), fmax(x, y));
	}
	return tmp;
}
function code(x, y)
	tmp = 0.0
	if (Float64(Float64(Float64(fmin(x, y) * fmax(x, y)) + fmin(x, y)) + fmax(x, y)) <= -1e-258)
		tmp = fma(fmax(x, y), fmin(x, y), fmin(x, y));
	else
		tmp = fma(fmax(x, y), fmin(x, y), fmax(x, y));
	end
	return tmp
end
code[x_, y_] := If[LessEqual[N[(N[(N[(N[Min[x, y], $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision], -1e-258], N[(N[Max[x, y], $MachinePrecision] * N[Min[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision], N[(N[Max[x, y], $MachinePrecision] * N[Min[x, y], $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\left(\mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right) + \mathsf{min}\left(x, y\right)\right) + \mathsf{max}\left(x, y\right) \leq -1 \cdot 10^{-258}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{max}\left(x, y\right), \mathsf{min}\left(x, y\right), \mathsf{min}\left(x, y\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{max}\left(x, y\right), \mathsf{min}\left(x, y\right), \mathsf{max}\left(x, y\right)\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 (+.f64 (*.f64 x y) x) y) < -9.9999999999999995e-259

    1. Initial program 100.0%

      \[\left(x \cdot y + x\right) + y \]
    2. Taylor expanded in x around 0

      \[\leadsto \color{blue}{y} \]
    3. Step-by-step derivation
      1. Applied rewrites37.3%

        \[\leadsto \color{blue}{y} \]
      2. Taylor expanded in x around inf

        \[\leadsto \color{blue}{x \cdot \left(1 + y\right)} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(1 + y\right)} \]
        2. lower-+.f6464.1%

          \[\leadsto x \cdot \left(1 + \color{blue}{y}\right) \]
      4. Applied rewrites64.1%

        \[\leadsto \color{blue}{x \cdot \left(1 + y\right)} \]
      5. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(1 + y\right)} \]
        2. *-commutativeN/A

          \[\leadsto \left(1 + y\right) \cdot \color{blue}{x} \]
        3. lift-+.f64N/A

          \[\leadsto \left(1 + y\right) \cdot x \]
        4. +-commutativeN/A

          \[\leadsto \left(y + 1\right) \cdot x \]
        5. distribute-lft1-inN/A

          \[\leadsto y \cdot x + \color{blue}{x} \]
        6. lower-fma.f6464.1%

          \[\leadsto \mathsf{fma}\left(y, \color{blue}{x}, x\right) \]
      6. Applied rewrites64.1%

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{x}, x\right) \]

      if -9.9999999999999995e-259 < (+.f64 (+.f64 (*.f64 x y) x) y)

      1. Initial program 100.0%

        \[\left(x \cdot y + x\right) + y \]
      2. Taylor expanded in y around inf

        \[\leadsto \color{blue}{y \cdot \left(1 + x\right)} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto y \cdot \color{blue}{\left(1 + x\right)} \]
        2. lower-+.f6462.4%

          \[\leadsto y \cdot \left(1 + \color{blue}{x}\right) \]
      4. Applied rewrites62.4%

        \[\leadsto \color{blue}{y \cdot \left(1 + x\right)} \]
      5. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto y \cdot \color{blue}{\left(1 + x\right)} \]
        2. *-commutativeN/A

          \[\leadsto \left(1 + x\right) \cdot \color{blue}{y} \]
        3. lift-+.f64N/A

          \[\leadsto \left(1 + x\right) \cdot y \]
        4. +-commutativeN/A

          \[\leadsto \left(x + 1\right) \cdot y \]
        5. distribute-lft1-inN/A

          \[\leadsto x \cdot y + \color{blue}{y} \]
        6. add-flip-revN/A

          \[\leadsto x \cdot y - \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
        7. sub-flipN/A

          \[\leadsto x \cdot y + \color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)} \]
        8. mul-1-negN/A

          \[\leadsto x \cdot y + -1 \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)} \]
        9. *-commutativeN/A

          \[\leadsto x \cdot y + \left(\mathsf{neg}\left(y\right)\right) \cdot \color{blue}{-1} \]
        10. metadata-evalN/A

          \[\leadsto x \cdot y + \left(\mathsf{neg}\left(y\right)\right) \cdot \left(-1 + \color{blue}{0}\right) \]
        11. distribute-rgt-inN/A

          \[\leadsto x \cdot y + \left(-1 \cdot \left(\mathsf{neg}\left(y\right)\right) + \color{blue}{0 \cdot \left(\mathsf{neg}\left(y\right)\right)}\right) \]
        12. mul-1-negN/A

          \[\leadsto x \cdot y + \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + \color{blue}{0} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \]
        13. remove-double-negN/A

          \[\leadsto x \cdot y + \left(y + \color{blue}{0} \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \]
        14. metadata-evalN/A

          \[\leadsto x \cdot y + \left(y + \left(0 \cdot -1\right) \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \]
        15. associate-*r*N/A

          \[\leadsto x \cdot y + \left(y + 0 \cdot \color{blue}{\left(-1 \cdot \left(\mathsf{neg}\left(y\right)\right)\right)}\right) \]
        16. mul-1-negN/A

          \[\leadsto x \cdot y + \left(y + 0 \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)\right) \]
        17. remove-double-negN/A

          \[\leadsto x \cdot y + \left(y + 0 \cdot y\right) \]
        18. mul0-lftN/A

          \[\leadsto x \cdot y + \left(y + 0\right) \]
        19. remove-double-negN/A

          \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x \cdot y\right)\right)\right)\right) + \left(\color{blue}{y} + 0\right) \]
        20. distribute-lft-neg-outN/A

          \[\leadsto \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(x\right)\right) \cdot y\right)\right) + \left(y + 0\right) \]
        21. distribute-rgt-neg-outN/A

          \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot \left(\mathsf{neg}\left(y\right)\right) + \left(\color{blue}{y} + 0\right) \]
        22. mul-1-negN/A

          \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot \left(-1 \cdot y\right) + \left(y + 0\right) \]
        23. remove-double-negN/A

          \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot \left(-1 \cdot y\right) + \left(\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right) + 0\right) \]
        24. mul-1-negN/A

          \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot \left(-1 \cdot y\right) + \left(-1 \cdot \left(\mathsf{neg}\left(y\right)\right) + 0\right) \]
        25. mul0-lftN/A

          \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot \left(-1 \cdot y\right) + \left(-1 \cdot \left(\mathsf{neg}\left(y\right)\right) + 0 \cdot \color{blue}{y}\right) \]
        26. remove-double-negN/A

          \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot \left(-1 \cdot y\right) + \left(-1 \cdot \left(\mathsf{neg}\left(y\right)\right) + 0 \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)\right) \]
        27. mul-1-negN/A

          \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot \left(-1 \cdot y\right) + \left(-1 \cdot \left(\mathsf{neg}\left(y\right)\right) + 0 \cdot \left(-1 \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right)\right) \]
        28. associate-*r*N/A

          \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot \left(-1 \cdot y\right) + \left(-1 \cdot \left(\mathsf{neg}\left(y\right)\right) + \left(0 \cdot -1\right) \cdot \color{blue}{\left(\mathsf{neg}\left(y\right)\right)}\right) \]
        29. metadata-evalN/A

          \[\leadsto \left(\mathsf{neg}\left(x\right)\right) \cdot \left(-1 \cdot y\right) + \left(-1 \cdot \left(\mathsf{neg}\left(y\right)\right) + 0 \cdot \left(\mathsf{neg}\left(\color{blue}{y}\right)\right)\right) \]
      6. Applied rewrites62.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, x, y\right)} \]
    4. Recombined 2 regimes into one program.
    5. Add Preprocessing

    Alternative 3: 89.7% accurate, 0.2× speedup?

    \[\begin{array}{l} t_0 := \mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\\ t_1 := \left(t\_0 + \mathsf{min}\left(x, y\right)\right) + \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-258}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{max}\left(x, y\right), \mathsf{min}\left(x, y\right), \mathsf{min}\left(x, y\right)\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+270}:\\ \;\;\;\;\mathsf{max}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
    (FPCore (x y)
     :precision binary64
     (let* ((t_0 (* (fmin x y) (fmax x y)))
            (t_1 (+ (+ t_0 (fmin x y)) (fmax x y))))
       (if (<= t_1 -1e-258)
         (fma (fmax x y) (fmin x y) (fmin x y))
         (if (<= t_1 2e+270) (fmax x y) t_0))))
    double code(double x, double y) {
    	double t_0 = fmin(x, y) * fmax(x, y);
    	double t_1 = (t_0 + fmin(x, y)) + fmax(x, y);
    	double tmp;
    	if (t_1 <= -1e-258) {
    		tmp = fma(fmax(x, y), fmin(x, y), fmin(x, y));
    	} else if (t_1 <= 2e+270) {
    		tmp = fmax(x, y);
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    function code(x, y)
    	t_0 = Float64(fmin(x, y) * fmax(x, y))
    	t_1 = Float64(Float64(t_0 + fmin(x, y)) + fmax(x, y))
    	tmp = 0.0
    	if (t_1 <= -1e-258)
    		tmp = fma(fmax(x, y), fmin(x, y), fmin(x, y));
    	elseif (t_1 <= 2e+270)
    		tmp = fmax(x, y);
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    code[x_, y_] := Block[{t$95$0 = N[(N[Min[x, y], $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 + N[Min[x, y], $MachinePrecision]), $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-258], N[(N[Max[x, y], $MachinePrecision] * N[Min[x, y], $MachinePrecision] + N[Min[x, y], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+270], N[Max[x, y], $MachinePrecision], t$95$0]]]]
    
    \begin{array}{l}
    t_0 := \mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\\
    t_1 := \left(t\_0 + \mathsf{min}\left(x, y\right)\right) + \mathsf{max}\left(x, y\right)\\
    \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-258}:\\
    \;\;\;\;\mathsf{fma}\left(\mathsf{max}\left(x, y\right), \mathsf{min}\left(x, y\right), \mathsf{min}\left(x, y\right)\right)\\
    
    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+270}:\\
    \;\;\;\;\mathsf{max}\left(x, y\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (+.f64 (+.f64 (*.f64 x y) x) y) < -9.9999999999999995e-259

      1. Initial program 100.0%

        \[\left(x \cdot y + x\right) + y \]
      2. Taylor expanded in x around 0

        \[\leadsto \color{blue}{y} \]
      3. Step-by-step derivation
        1. Applied rewrites37.3%

          \[\leadsto \color{blue}{y} \]
        2. Taylor expanded in x around inf

          \[\leadsto \color{blue}{x \cdot \left(1 + y\right)} \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(1 + y\right)} \]
          2. lower-+.f6464.1%

            \[\leadsto x \cdot \left(1 + \color{blue}{y}\right) \]
        4. Applied rewrites64.1%

          \[\leadsto \color{blue}{x \cdot \left(1 + y\right)} \]
        5. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(1 + y\right)} \]
          2. *-commutativeN/A

            \[\leadsto \left(1 + y\right) \cdot \color{blue}{x} \]
          3. lift-+.f64N/A

            \[\leadsto \left(1 + y\right) \cdot x \]
          4. +-commutativeN/A

            \[\leadsto \left(y + 1\right) \cdot x \]
          5. distribute-lft1-inN/A

            \[\leadsto y \cdot x + \color{blue}{x} \]
          6. lower-fma.f6464.1%

            \[\leadsto \mathsf{fma}\left(y, \color{blue}{x}, x\right) \]
        6. Applied rewrites64.1%

          \[\leadsto \mathsf{fma}\left(y, \color{blue}{x}, x\right) \]

        if -9.9999999999999995e-259 < (+.f64 (+.f64 (*.f64 x y) x) y) < 2.0000000000000001e270

        1. Initial program 100.0%

          \[\left(x \cdot y + x\right) + y \]
        2. Taylor expanded in x around 0

          \[\leadsto \color{blue}{y} \]
        3. Step-by-step derivation
          1. Applied rewrites37.3%

            \[\leadsto \color{blue}{y} \]

          if 2.0000000000000001e270 < (+.f64 (+.f64 (*.f64 x y) x) y)

          1. Initial program 100.0%

            \[\left(x \cdot y + x\right) + y \]
          2. Taylor expanded in y around inf

            \[\leadsto \color{blue}{y \cdot \left(1 + x\right)} \]
          3. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto y \cdot \color{blue}{\left(1 + x\right)} \]
            2. lower-+.f6462.4%

              \[\leadsto y \cdot \left(1 + \color{blue}{x}\right) \]
          4. Applied rewrites62.4%

            \[\leadsto \color{blue}{y \cdot \left(1 + x\right)} \]
          5. Taylor expanded in x around inf

            \[\leadsto x \cdot \color{blue}{y} \]
          6. Step-by-step derivation
            1. lower-*.f6427.5%

              \[\leadsto x \cdot y \]
          7. Applied rewrites27.5%

            \[\leadsto x \cdot \color{blue}{y} \]
        4. Recombined 3 regimes into one program.
        5. Add Preprocessing

        Alternative 4: 83.6% accurate, 0.1× speedup?

        \[\begin{array}{l} t_0 := \mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\\ t_1 := \left(t\_0 + \mathsf{min}\left(x, y\right)\right) + \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+300}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-258}:\\ \;\;\;\;\mathsf{min}\left(x, y\right) \cdot 1\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+270}:\\ \;\;\;\;\mathsf{max}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
        (FPCore (x y)
         :precision binary64
         (let* ((t_0 (* (fmin x y) (fmax x y)))
                (t_1 (+ (+ t_0 (fmin x y)) (fmax x y))))
           (if (<= t_1 -2e+300)
             t_0
             (if (<= t_1 -1e-258)
               (* (fmin x y) 1.0)
               (if (<= t_1 2e+270) (fmax x y) t_0)))))
        double code(double x, double y) {
        	double t_0 = fmin(x, y) * fmax(x, y);
        	double t_1 = (t_0 + fmin(x, y)) + fmax(x, y);
        	double tmp;
        	if (t_1 <= -2e+300) {
        		tmp = t_0;
        	} else if (t_1 <= -1e-258) {
        		tmp = fmin(x, y) * 1.0;
        	} else if (t_1 <= 2e+270) {
        		tmp = fmax(x, y);
        	} else {
        		tmp = t_0;
        	}
        	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)
        use fmin_fmax_functions
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8) :: t_0
            real(8) :: t_1
            real(8) :: tmp
            t_0 = fmin(x, y) * fmax(x, y)
            t_1 = (t_0 + fmin(x, y)) + fmax(x, y)
            if (t_1 <= (-2d+300)) then
                tmp = t_0
            else if (t_1 <= (-1d-258)) then
                tmp = fmin(x, y) * 1.0d0
            else if (t_1 <= 2d+270) then
                tmp = fmax(x, y)
            else
                tmp = t_0
            end if
            code = tmp
        end function
        
        public static double code(double x, double y) {
        	double t_0 = fmin(x, y) * fmax(x, y);
        	double t_1 = (t_0 + fmin(x, y)) + fmax(x, y);
        	double tmp;
        	if (t_1 <= -2e+300) {
        		tmp = t_0;
        	} else if (t_1 <= -1e-258) {
        		tmp = fmin(x, y) * 1.0;
        	} else if (t_1 <= 2e+270) {
        		tmp = fmax(x, y);
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        def code(x, y):
        	t_0 = fmin(x, y) * fmax(x, y)
        	t_1 = (t_0 + fmin(x, y)) + fmax(x, y)
        	tmp = 0
        	if t_1 <= -2e+300:
        		tmp = t_0
        	elif t_1 <= -1e-258:
        		tmp = fmin(x, y) * 1.0
        	elif t_1 <= 2e+270:
        		tmp = fmax(x, y)
        	else:
        		tmp = t_0
        	return tmp
        
        function code(x, y)
        	t_0 = Float64(fmin(x, y) * fmax(x, y))
        	t_1 = Float64(Float64(t_0 + fmin(x, y)) + fmax(x, y))
        	tmp = 0.0
        	if (t_1 <= -2e+300)
        		tmp = t_0;
        	elseif (t_1 <= -1e-258)
        		tmp = Float64(fmin(x, y) * 1.0);
        	elseif (t_1 <= 2e+270)
        		tmp = fmax(x, y);
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y)
        	t_0 = min(x, y) * max(x, y);
        	t_1 = (t_0 + min(x, y)) + max(x, y);
        	tmp = 0.0;
        	if (t_1 <= -2e+300)
        		tmp = t_0;
        	elseif (t_1 <= -1e-258)
        		tmp = min(x, y) * 1.0;
        	elseif (t_1 <= 2e+270)
        		tmp = max(x, y);
        	else
        		tmp = t_0;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_] := Block[{t$95$0 = N[(N[Min[x, y], $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(t$95$0 + N[Min[x, y], $MachinePrecision]), $MachinePrecision] + N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+300], t$95$0, If[LessEqual[t$95$1, -1e-258], N[(N[Min[x, y], $MachinePrecision] * 1.0), $MachinePrecision], If[LessEqual[t$95$1, 2e+270], N[Max[x, y], $MachinePrecision], t$95$0]]]]]
        
        \begin{array}{l}
        t_0 := \mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\\
        t_1 := \left(t\_0 + \mathsf{min}\left(x, y\right)\right) + \mathsf{max}\left(x, y\right)\\
        \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+300}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-258}:\\
        \;\;\;\;\mathsf{min}\left(x, y\right) \cdot 1\\
        
        \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+270}:\\
        \;\;\;\;\mathsf{max}\left(x, y\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (+.f64 (+.f64 (*.f64 x y) x) y) < -2.0000000000000001e300 or 2.0000000000000001e270 < (+.f64 (+.f64 (*.f64 x y) x) y)

          1. Initial program 100.0%

            \[\left(x \cdot y + x\right) + y \]
          2. Taylor expanded in y around inf

            \[\leadsto \color{blue}{y \cdot \left(1 + x\right)} \]
          3. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto y \cdot \color{blue}{\left(1 + x\right)} \]
            2. lower-+.f6462.4%

              \[\leadsto y \cdot \left(1 + \color{blue}{x}\right) \]
          4. Applied rewrites62.4%

            \[\leadsto \color{blue}{y \cdot \left(1 + x\right)} \]
          5. Taylor expanded in x around inf

            \[\leadsto x \cdot \color{blue}{y} \]
          6. Step-by-step derivation
            1. lower-*.f6427.5%

              \[\leadsto x \cdot y \]
          7. Applied rewrites27.5%

            \[\leadsto x \cdot \color{blue}{y} \]

          if -2.0000000000000001e300 < (+.f64 (+.f64 (*.f64 x y) x) y) < -9.9999999999999995e-259

          1. Initial program 100.0%

            \[\left(x \cdot y + x\right) + y \]
          2. Taylor expanded in x around 0

            \[\leadsto \color{blue}{y} \]
          3. Step-by-step derivation
            1. Applied rewrites37.3%

              \[\leadsto \color{blue}{y} \]
            2. Taylor expanded in x around inf

              \[\leadsto \color{blue}{x \cdot \left(1 + y\right)} \]
            3. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto x \cdot \color{blue}{\left(1 + y\right)} \]
              2. lower-+.f6464.1%

                \[\leadsto x \cdot \left(1 + \color{blue}{y}\right) \]
            4. Applied rewrites64.1%

              \[\leadsto \color{blue}{x \cdot \left(1 + y\right)} \]
            5. Taylor expanded in y around 0

              \[\leadsto x \cdot 1 \]
            6. Step-by-step derivation
              1. Applied rewrites38.9%

                \[\leadsto x \cdot 1 \]

              if -9.9999999999999995e-259 < (+.f64 (+.f64 (*.f64 x y) x) y) < 2.0000000000000001e270

              1. Initial program 100.0%

                \[\left(x \cdot y + x\right) + y \]
              2. Taylor expanded in x around 0

                \[\leadsto \color{blue}{y} \]
              3. Step-by-step derivation
                1. Applied rewrites37.3%

                  \[\leadsto \color{blue}{y} \]
              4. Recombined 3 regimes into one program.
              5. Add Preprocessing

              Alternative 5: 62.0% accurate, 0.4× speedup?

              \[\begin{array}{l} t_0 := \mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;\mathsf{min}\left(x, y\right) \leq -2.6:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\mathsf{min}\left(x, y\right) \leq 26000000000:\\ \;\;\;\;\mathsf{max}\left(x, y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
              (FPCore (x y)
               :precision binary64
               (let* ((t_0 (* (fmin x y) (fmax x y))))
                 (if (<= (fmin x y) -2.6)
                   t_0
                   (if (<= (fmin x y) 26000000000.0) (fmax x y) t_0))))
              double code(double x, double y) {
              	double t_0 = fmin(x, y) * fmax(x, y);
              	double tmp;
              	if (fmin(x, y) <= -2.6) {
              		tmp = t_0;
              	} else if (fmin(x, y) <= 26000000000.0) {
              		tmp = fmax(x, y);
              	} else {
              		tmp = t_0;
              	}
              	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)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8) :: t_0
                  real(8) :: tmp
                  t_0 = fmin(x, y) * fmax(x, y)
                  if (fmin(x, y) <= (-2.6d0)) then
                      tmp = t_0
                  else if (fmin(x, y) <= 26000000000.0d0) then
                      tmp = fmax(x, y)
                  else
                      tmp = t_0
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y) {
              	double t_0 = fmin(x, y) * fmax(x, y);
              	double tmp;
              	if (fmin(x, y) <= -2.6) {
              		tmp = t_0;
              	} else if (fmin(x, y) <= 26000000000.0) {
              		tmp = fmax(x, y);
              	} else {
              		tmp = t_0;
              	}
              	return tmp;
              }
              
              def code(x, y):
              	t_0 = fmin(x, y) * fmax(x, y)
              	tmp = 0
              	if fmin(x, y) <= -2.6:
              		tmp = t_0
              	elif fmin(x, y) <= 26000000000.0:
              		tmp = fmax(x, y)
              	else:
              		tmp = t_0
              	return tmp
              
              function code(x, y)
              	t_0 = Float64(fmin(x, y) * fmax(x, y))
              	tmp = 0.0
              	if (fmin(x, y) <= -2.6)
              		tmp = t_0;
              	elseif (fmin(x, y) <= 26000000000.0)
              		tmp = fmax(x, y);
              	else
              		tmp = t_0;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y)
              	t_0 = min(x, y) * max(x, y);
              	tmp = 0.0;
              	if (min(x, y) <= -2.6)
              		tmp = t_0;
              	elseif (min(x, y) <= 26000000000.0)
              		tmp = max(x, y);
              	else
              		tmp = t_0;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_] := Block[{t$95$0 = N[(N[Min[x, y], $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Min[x, y], $MachinePrecision], -2.6], t$95$0, If[LessEqual[N[Min[x, y], $MachinePrecision], 26000000000.0], N[Max[x, y], $MachinePrecision], t$95$0]]]
              
              \begin{array}{l}
              t_0 := \mathsf{min}\left(x, y\right) \cdot \mathsf{max}\left(x, y\right)\\
              \mathbf{if}\;\mathsf{min}\left(x, y\right) \leq -2.6:\\
              \;\;\;\;t\_0\\
              
              \mathbf{elif}\;\mathsf{min}\left(x, y\right) \leq 26000000000:\\
              \;\;\;\;\mathsf{max}\left(x, y\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_0\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x < -2.6000000000000001 or 2.6e10 < x

                1. Initial program 100.0%

                  \[\left(x \cdot y + x\right) + y \]
                2. Taylor expanded in y around inf

                  \[\leadsto \color{blue}{y \cdot \left(1 + x\right)} \]
                3. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto y \cdot \color{blue}{\left(1 + x\right)} \]
                  2. lower-+.f6462.4%

                    \[\leadsto y \cdot \left(1 + \color{blue}{x}\right) \]
                4. Applied rewrites62.4%

                  \[\leadsto \color{blue}{y \cdot \left(1 + x\right)} \]
                5. Taylor expanded in x around inf

                  \[\leadsto x \cdot \color{blue}{y} \]
                6. Step-by-step derivation
                  1. lower-*.f6427.5%

                    \[\leadsto x \cdot y \]
                7. Applied rewrites27.5%

                  \[\leadsto x \cdot \color{blue}{y} \]

                if -2.6000000000000001 < x < 2.6e10

                1. Initial program 100.0%

                  \[\left(x \cdot y + x\right) + y \]
                2. Taylor expanded in x around 0

                  \[\leadsto \color{blue}{y} \]
                3. Step-by-step derivation
                  1. Applied rewrites37.3%

                    \[\leadsto \color{blue}{y} \]
                4. Recombined 2 regimes into one program.
                5. Add Preprocessing

                Alternative 6: 37.8% accurate, 2.4× speedup?

                \[\mathsf{max}\left(x, y\right) \]
                (FPCore (x y) :precision binary64 (fmax x y))
                double code(double x, double y) {
                	return fmax(x, y);
                }
                
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(x, y)
                use fmin_fmax_functions
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    code = fmax(x, y)
                end function
                
                public static double code(double x, double y) {
                	return fmax(x, y);
                }
                
                def code(x, y):
                	return fmax(x, y)
                
                function code(x, y)
                	return fmax(x, y)
                end
                
                function tmp = code(x, y)
                	tmp = max(x, y);
                end
                
                code[x_, y_] := N[Max[x, y], $MachinePrecision]
                
                \mathsf{max}\left(x, y\right)
                
                Derivation
                1. Initial program 100.0%

                  \[\left(x \cdot y + x\right) + y \]
                2. Taylor expanded in x around 0

                  \[\leadsto \color{blue}{y} \]
                3. Step-by-step derivation
                  1. Applied rewrites37.3%

                    \[\leadsto \color{blue}{y} \]
                  2. Add Preprocessing

                  Reproduce

                  ?
                  herbie shell --seed 2025192 
                  (FPCore (x y)
                    :name "Numeric.Log:$cexpm1 from log-domain-0.10.2.1, B"
                    :precision binary64
                    (+ (+ (* x y) x) y))