Logarithmic Transform

Percentage Accurate: 41.0% → 99.3%
Time: 5.3s
Alternatives: 13
Speedup: 5.0×

Specification

?
\[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
(FPCore (c x y)
  :precision binary64
  :pre TRUE
  (* c (log (+ 1.0 (* (- (pow E x) 1.0) y)))))
double code(double c, double x, double y) {
	return c * log((1.0 + ((pow(((double) M_E), x) - 1.0) * y)));
}
public static double code(double c, double x, double y) {
	return c * Math.log((1.0 + ((Math.pow(Math.E, x) - 1.0) * y)));
}
def code(c, x, y):
	return c * math.log((1.0 + ((math.pow(math.e, x) - 1.0) * y)))
function code(c, x, y)
	return Float64(c * log(Float64(1.0 + Float64(Float64((exp(1) ^ x) - 1.0) * y))))
end
function tmp = code(c, x, y)
	tmp = c * log((1.0 + (((2.71828182845904523536 ^ x) - 1.0) * y)));
end
code[c_, x_, y_] := N[(c * N[Log[N[(1.0 + N[(N[(N[Power[E, x], $MachinePrecision] - 1.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
f(c, x, y):
	c in [-inf, +inf],
	x in [-inf, +inf],
	y in [-inf, +inf]
code: THEORY
BEGIN
f(c, x, y: real): real =
	c * (ln(((1) + (((exp(1) ^ x) - (1)) * y))))
END code
c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right)

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 13 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: 41.0% accurate, 1.0× speedup?

\[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
(FPCore (c x y)
  :precision binary64
  :pre TRUE
  (* c (log (+ 1.0 (* (- (pow E x) 1.0) y)))))
double code(double c, double x, double y) {
	return c * log((1.0 + ((pow(((double) M_E), x) - 1.0) * y)));
}
public static double code(double c, double x, double y) {
	return c * Math.log((1.0 + ((Math.pow(Math.E, x) - 1.0) * y)));
}
def code(c, x, y):
	return c * math.log((1.0 + ((math.pow(math.e, x) - 1.0) * y)))
function code(c, x, y)
	return Float64(c * log(Float64(1.0 + Float64(Float64((exp(1) ^ x) - 1.0) * y))))
end
function tmp = code(c, x, y)
	tmp = c * log((1.0 + (((2.71828182845904523536 ^ x) - 1.0) * y)));
end
code[c_, x_, y_] := N[(c * N[Log[N[(1.0 + N[(N[(N[Power[E, x], $MachinePrecision] - 1.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
f(c, x, y):
	c in [-inf, +inf],
	x in [-inf, +inf],
	y in [-inf, +inf]
code: THEORY
BEGIN
f(c, x, y: real): real =
	c * (ln(((1) + (((exp(1) ^ x) - (1)) * y))))
END code
c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right)

Alternative 1: 99.3% accurate, 1.1× speedup?

\[\begin{array}{l} t_0 := c \cdot \mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(x\right)\right)\\ \mathbf{if}\;y \leq -1.048616635278871 \cdot 10^{-28}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 2.4520640965510156 \cdot 10^{-27}:\\ \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
(FPCore (c x y)
  :precision binary64
  :pre TRUE
  (let* ((t_0 (* c (log1p (* y (expm1 x))))))
  (if (<= y -1.048616635278871e-28)
    t_0
    (if (<= y 2.4520640965510156e-27) (* (expm1 x) (* y c)) t_0))))
double code(double c, double x, double y) {
	double t_0 = c * log1p((y * expm1(x)));
	double tmp;
	if (y <= -1.048616635278871e-28) {
		tmp = t_0;
	} else if (y <= 2.4520640965510156e-27) {
		tmp = expm1(x) * (y * c);
	} else {
		tmp = t_0;
	}
	return tmp;
}
public static double code(double c, double x, double y) {
	double t_0 = c * Math.log1p((y * Math.expm1(x)));
	double tmp;
	if (y <= -1.048616635278871e-28) {
		tmp = t_0;
	} else if (y <= 2.4520640965510156e-27) {
		tmp = Math.expm1(x) * (y * c);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(c, x, y):
	t_0 = c * math.log1p((y * math.expm1(x)))
	tmp = 0
	if y <= -1.048616635278871e-28:
		tmp = t_0
	elif y <= 2.4520640965510156e-27:
		tmp = math.expm1(x) * (y * c)
	else:
		tmp = t_0
	return tmp
function code(c, x, y)
	t_0 = Float64(c * log1p(Float64(y * expm1(x))))
	tmp = 0.0
	if (y <= -1.048616635278871e-28)
		tmp = t_0;
	elseif (y <= 2.4520640965510156e-27)
		tmp = Float64(expm1(x) * Float64(y * c));
	else
		tmp = t_0;
	end
	return tmp
end
code[c_, x_, y_] := Block[{t$95$0 = N[(c * N[Log[1 + N[(y * N[(Exp[x] - 1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.048616635278871e-28], t$95$0, If[LessEqual[y, 2.4520640965510156e-27], N[(N[(Exp[x] - 1), $MachinePrecision] * N[(y * c), $MachinePrecision]), $MachinePrecision], t$95$0]]]
f(c, x, y):
	c in [-inf, +inf],
	x in [-inf, +inf],
	y in [-inf, +inf]
code: THEORY
BEGIN
f(c, x, y: real): real =
	LET t_0 = (c * (ln(((y * ((exp(x)) - (1))) + (1))))) IN
		LET tmp_1 = IF (y <= (245206409655101562430941493959943172426255612604679907674416304549911186337618484998301937594078481197357177734375e-140)) THEN (((exp(x)) - (1)) * (y * c)) ELSE t_0 ENDIF IN
		LET tmp = IF (y <= (-10486166352788709956328927053122569613359305365757206269481419355865418007421607793361317817470990121364593505859375e-143)) THEN t_0 ELSE tmp_1 ENDIF IN
	tmp
END code
\begin{array}{l}
t_0 := c \cdot \mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(x\right)\right)\\
\mathbf{if}\;y \leq -1.048616635278871 \cdot 10^{-28}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;y \leq 2.4520640965510156 \cdot 10^{-27}:\\
\;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.048616635278871e-28 or 2.4520640965510156e-27 < y

    1. Initial program 41.0%

      \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
    2. Step-by-step derivation
      1. Applied rewrites93.2%

        \[\leadsto c \cdot \mathsf{log1p}\left(y \cdot \mathsf{expm1}\left(x\right)\right) \]

      if -1.048616635278871e-28 < y < 2.4520640965510156e-27

      1. Initial program 41.0%

        \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
      2. Taylor expanded in y around 0

        \[\leadsto c \cdot \left(y \cdot \left(e^{x} - 1\right)\right) \]
      3. Step-by-step derivation
        1. Applied rewrites73.9%

          \[\leadsto c \cdot \left(y \cdot \mathsf{expm1}\left(x\right)\right) \]
        2. Step-by-step derivation
          1. Applied rewrites77.3%

            \[\leadsto \mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right) \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 2: 91.6% accurate, 1.4× speedup?

        \[\begin{array}{l} \mathbf{if}\;y \leq -3.841611067012462 \cdot 10^{+52}:\\ \;\;\;\;c \cdot \log \left(\mathsf{fma}\left(y, \mathsf{expm1}\left(x\right), 1\right)\right)\\ \mathbf{elif}\;y \leq 99.55376154833478:\\ \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \mathsf{log1p}\left(y \cdot x\right)\\ \end{array} \]
        (FPCore (c x y)
          :precision binary64
          :pre TRUE
          (if (<= y -3.841611067012462e+52)
          (* c (log (fma y (expm1 x) 1.0)))
          (if (<= y 99.55376154833478)
            (* (expm1 x) (* y c))
            (* c (log1p (* y x))))))
        double code(double c, double x, double y) {
        	double tmp;
        	if (y <= -3.841611067012462e+52) {
        		tmp = c * log(fma(y, expm1(x), 1.0));
        	} else if (y <= 99.55376154833478) {
        		tmp = expm1(x) * (y * c);
        	} else {
        		tmp = c * log1p((y * x));
        	}
        	return tmp;
        }
        
        function code(c, x, y)
        	tmp = 0.0
        	if (y <= -3.841611067012462e+52)
        		tmp = Float64(c * log(fma(y, expm1(x), 1.0)));
        	elseif (y <= 99.55376154833478)
        		tmp = Float64(expm1(x) * Float64(y * c));
        	else
        		tmp = Float64(c * log1p(Float64(y * x)));
        	end
        	return tmp
        end
        
        code[c_, x_, y_] := If[LessEqual[y, -3.841611067012462e+52], N[(c * N[Log[N[(y * N[(Exp[x] - 1), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 99.55376154833478], N[(N[(Exp[x] - 1), $MachinePrecision] * N[(y * c), $MachinePrecision]), $MachinePrecision], N[(c * N[Log[1 + N[(y * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
        
        f(c, x, y):
        	c in [-inf, +inf],
        	x in [-inf, +inf],
        	y in [-inf, +inf]
        code: THEORY
        BEGIN
        f(c, x, y: real): real =
        	LET tmp_1 = IF (y <= (995537615483347764211430330760776996612548828125e-46)) THEN (((exp(x)) - (1)) * (y * c)) ELSE (c * (ln(((y * x) + (1))))) ENDIF IN
        	LET tmp = IF (y <= (-38416110670124621050889811552578715003109317791449088)) THEN (c * (ln(((y * ((exp(x)) - (1))) + (1))))) ELSE tmp_1 ENDIF IN
        	tmp
        END code
        \begin{array}{l}
        \mathbf{if}\;y \leq -3.841611067012462 \cdot 10^{+52}:\\
        \;\;\;\;c \cdot \log \left(\mathsf{fma}\left(y, \mathsf{expm1}\left(x\right), 1\right)\right)\\
        
        \mathbf{elif}\;y \leq 99.55376154833478:\\
        \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;c \cdot \mathsf{log1p}\left(y \cdot x\right)\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y < -3.8416110670124621e52

          1. Initial program 41.0%

            \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
          2. Step-by-step derivation
            1. Applied rewrites50.5%

              \[\leadsto c \cdot \log \left(\mathsf{fma}\left(y, \mathsf{expm1}\left(x\right), 1\right)\right) \]

            if -3.8416110670124621e52 < y < 99.553761548334776

            1. Initial program 41.0%

              \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
            2. Taylor expanded in y around 0

              \[\leadsto c \cdot \left(y \cdot \left(e^{x} - 1\right)\right) \]
            3. Step-by-step derivation
              1. Applied rewrites73.9%

                \[\leadsto c \cdot \left(y \cdot \mathsf{expm1}\left(x\right)\right) \]
              2. Step-by-step derivation
                1. Applied rewrites77.3%

                  \[\leadsto \mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right) \]

                if 99.553761548334776 < y

                1. Initial program 41.0%

                  \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                2. Taylor expanded in x around 0

                  \[\leadsto c \cdot \log \left(1 + x \cdot y\right) \]
                3. Step-by-step derivation
                  1. Applied rewrites39.1%

                    \[\leadsto c \cdot \log \left(1 + x \cdot y\right) \]
                  2. Step-by-step derivation
                    1. Applied rewrites66.1%

                      \[\leadsto c \cdot \mathsf{log1p}\left(y \cdot x\right) \]
                  3. Recombined 3 regimes into one program.
                  4. Add Preprocessing

                  Alternative 3: 90.1% accurate, 1.4× speedup?

                  \[\begin{array}{l} \mathbf{if}\;y \leq -1.702178233584973 \cdot 10^{+54}:\\ \;\;\;\;c \cdot \log \left(\mathsf{expm1}\left(x\right) \cdot y\right)\\ \mathbf{elif}\;y \leq 99.55376154833478:\\ \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \mathsf{log1p}\left(y \cdot x\right)\\ \end{array} \]
                  (FPCore (c x y)
                    :precision binary64
                    :pre TRUE
                    (if (<= y -1.702178233584973e+54)
                    (* c (log (* (expm1 x) y)))
                    (if (<= y 99.55376154833478)
                      (* (expm1 x) (* y c))
                      (* c (log1p (* y x))))))
                  double code(double c, double x, double y) {
                  	double tmp;
                  	if (y <= -1.702178233584973e+54) {
                  		tmp = c * log((expm1(x) * y));
                  	} else if (y <= 99.55376154833478) {
                  		tmp = expm1(x) * (y * c);
                  	} else {
                  		tmp = c * log1p((y * x));
                  	}
                  	return tmp;
                  }
                  
                  public static double code(double c, double x, double y) {
                  	double tmp;
                  	if (y <= -1.702178233584973e+54) {
                  		tmp = c * Math.log((Math.expm1(x) * y));
                  	} else if (y <= 99.55376154833478) {
                  		tmp = Math.expm1(x) * (y * c);
                  	} else {
                  		tmp = c * Math.log1p((y * x));
                  	}
                  	return tmp;
                  }
                  
                  def code(c, x, y):
                  	tmp = 0
                  	if y <= -1.702178233584973e+54:
                  		tmp = c * math.log((math.expm1(x) * y))
                  	elif y <= 99.55376154833478:
                  		tmp = math.expm1(x) * (y * c)
                  	else:
                  		tmp = c * math.log1p((y * x))
                  	return tmp
                  
                  function code(c, x, y)
                  	tmp = 0.0
                  	if (y <= -1.702178233584973e+54)
                  		tmp = Float64(c * log(Float64(expm1(x) * y)));
                  	elseif (y <= 99.55376154833478)
                  		tmp = Float64(expm1(x) * Float64(y * c));
                  	else
                  		tmp = Float64(c * log1p(Float64(y * x)));
                  	end
                  	return tmp
                  end
                  
                  code[c_, x_, y_] := If[LessEqual[y, -1.702178233584973e+54], N[(c * N[Log[N[(N[(Exp[x] - 1), $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 99.55376154833478], N[(N[(Exp[x] - 1), $MachinePrecision] * N[(y * c), $MachinePrecision]), $MachinePrecision], N[(c * N[Log[1 + N[(y * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
                  
                  f(c, x, y):
                  	c in [-inf, +inf],
                  	x in [-inf, +inf],
                  	y in [-inf, +inf]
                  code: THEORY
                  BEGIN
                  f(c, x, y: real): real =
                  	LET tmp_1 = IF (y <= (995537615483347764211430330760776996612548828125e-46)) THEN (((exp(x)) - (1)) * (y * c)) ELSE (c * (ln(((y * x) + (1))))) ENDIF IN
                  	LET tmp = IF (y <= (-1702178233584973081484216886645222720931570583538237440)) THEN (c * (ln((((exp(x)) - (1)) * y)))) ELSE tmp_1 ENDIF IN
                  	tmp
                  END code
                  \begin{array}{l}
                  \mathbf{if}\;y \leq -1.702178233584973 \cdot 10^{+54}:\\
                  \;\;\;\;c \cdot \log \left(\mathsf{expm1}\left(x\right) \cdot y\right)\\
                  
                  \mathbf{elif}\;y \leq 99.55376154833478:\\
                  \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;c \cdot \mathsf{log1p}\left(y \cdot x\right)\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if y < -1.7021782335849731e54

                    1. Initial program 41.0%

                      \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                    2. Taylor expanded in y around -inf

                      \[\leadsto c \cdot \left(\log \left(-1 \cdot \left(e^{x} - 1\right)\right) + -1 \cdot \log \left(\frac{-1}{y}\right)\right) \]
                    3. Step-by-step derivation
                      1. Applied rewrites14.9%

                        \[\leadsto c \cdot \left(\log \left(-1 \cdot \mathsf{expm1}\left(x\right)\right) + -1 \cdot \log \left(\frac{-1}{y}\right)\right) \]
                      2. Applied rewrites20.2%

                        \[\leadsto c \cdot \log \left(\mathsf{expm1}\left(x\right) \cdot y\right) \]

                      if -1.7021782335849731e54 < y < 99.553761548334776

                      1. Initial program 41.0%

                        \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                      2. Taylor expanded in y around 0

                        \[\leadsto c \cdot \left(y \cdot \left(e^{x} - 1\right)\right) \]
                      3. Step-by-step derivation
                        1. Applied rewrites73.9%

                          \[\leadsto c \cdot \left(y \cdot \mathsf{expm1}\left(x\right)\right) \]
                        2. Step-by-step derivation
                          1. Applied rewrites77.3%

                            \[\leadsto \mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right) \]

                          if 99.553761548334776 < y

                          1. Initial program 41.0%

                            \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                          2. Taylor expanded in x around 0

                            \[\leadsto c \cdot \log \left(1 + x \cdot y\right) \]
                          3. Step-by-step derivation
                            1. Applied rewrites39.1%

                              \[\leadsto c \cdot \log \left(1 + x \cdot y\right) \]
                            2. Step-by-step derivation
                              1. Applied rewrites66.1%

                                \[\leadsto c \cdot \mathsf{log1p}\left(y \cdot x\right) \]
                            3. Recombined 3 regimes into one program.
                            4. Add Preprocessing

                            Alternative 4: 89.7% accurate, 1.4× speedup?

                            \[\begin{array}{l} t_0 := c \cdot \mathsf{log1p}\left(y \cdot x\right)\\ \mathbf{if}\;y \leq -7.393422949122487 \cdot 10^{+43}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 99.55376154833478:\\ \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                            (FPCore (c x y)
                              :precision binary64
                              :pre TRUE
                              (let* ((t_0 (* c (log1p (* y x)))))
                              (if (<= y -7.393422949122487e+43)
                                t_0
                                (if (<= y 99.55376154833478) (* (expm1 x) (* y c)) t_0))))
                            double code(double c, double x, double y) {
                            	double t_0 = c * log1p((y * x));
                            	double tmp;
                            	if (y <= -7.393422949122487e+43) {
                            		tmp = t_0;
                            	} else if (y <= 99.55376154833478) {
                            		tmp = expm1(x) * (y * c);
                            	} else {
                            		tmp = t_0;
                            	}
                            	return tmp;
                            }
                            
                            public static double code(double c, double x, double y) {
                            	double t_0 = c * Math.log1p((y * x));
                            	double tmp;
                            	if (y <= -7.393422949122487e+43) {
                            		tmp = t_0;
                            	} else if (y <= 99.55376154833478) {
                            		tmp = Math.expm1(x) * (y * c);
                            	} else {
                            		tmp = t_0;
                            	}
                            	return tmp;
                            }
                            
                            def code(c, x, y):
                            	t_0 = c * math.log1p((y * x))
                            	tmp = 0
                            	if y <= -7.393422949122487e+43:
                            		tmp = t_0
                            	elif y <= 99.55376154833478:
                            		tmp = math.expm1(x) * (y * c)
                            	else:
                            		tmp = t_0
                            	return tmp
                            
                            function code(c, x, y)
                            	t_0 = Float64(c * log1p(Float64(y * x)))
                            	tmp = 0.0
                            	if (y <= -7.393422949122487e+43)
                            		tmp = t_0;
                            	elseif (y <= 99.55376154833478)
                            		tmp = Float64(expm1(x) * Float64(y * c));
                            	else
                            		tmp = t_0;
                            	end
                            	return tmp
                            end
                            
                            code[c_, x_, y_] := Block[{t$95$0 = N[(c * N[Log[1 + N[(y * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.393422949122487e+43], t$95$0, If[LessEqual[y, 99.55376154833478], N[(N[(Exp[x] - 1), $MachinePrecision] * N[(y * c), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                            
                            f(c, x, y):
                            	c in [-inf, +inf],
                            	x in [-inf, +inf],
                            	y in [-inf, +inf]
                            code: THEORY
                            BEGIN
                            f(c, x, y: real): real =
                            	LET t_0 = (c * (ln(((y * x) + (1))))) IN
                            		LET tmp_1 = IF (y <= (995537615483347764211430330760776996612548828125e-46)) THEN (((exp(x)) - (1)) * (y * c)) ELSE t_0 ENDIF IN
                            		LET tmp = IF (y <= (-73934229491224872077948044753781179279212544)) THEN t_0 ELSE tmp_1 ENDIF IN
                            	tmp
                            END code
                            \begin{array}{l}
                            t_0 := c \cdot \mathsf{log1p}\left(y \cdot x\right)\\
                            \mathbf{if}\;y \leq -7.393422949122487 \cdot 10^{+43}:\\
                            \;\;\;\;t\_0\\
                            
                            \mathbf{elif}\;y \leq 99.55376154833478:\\
                            \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_0\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if y < -7.3934229491224872e43 or 99.553761548334776 < y

                              1. Initial program 41.0%

                                \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                              2. Taylor expanded in x around 0

                                \[\leadsto c \cdot \log \left(1 + x \cdot y\right) \]
                              3. Step-by-step derivation
                                1. Applied rewrites39.1%

                                  \[\leadsto c \cdot \log \left(1 + x \cdot y\right) \]
                                2. Step-by-step derivation
                                  1. Applied rewrites66.1%

                                    \[\leadsto c \cdot \mathsf{log1p}\left(y \cdot x\right) \]

                                  if -7.3934229491224872e43 < y < 99.553761548334776

                                  1. Initial program 41.0%

                                    \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                  2. Taylor expanded in y around 0

                                    \[\leadsto c \cdot \left(y \cdot \left(e^{x} - 1\right)\right) \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites73.9%

                                      \[\leadsto c \cdot \left(y \cdot \mathsf{expm1}\left(x\right)\right) \]
                                    2. Step-by-step derivation
                                      1. Applied rewrites77.3%

                                        \[\leadsto \mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right) \]
                                    3. Recombined 2 regimes into one program.
                                    4. Add Preprocessing

                                    Alternative 5: 81.9% accurate, 1.2× speedup?

                                    \[\begin{array}{l} t_0 := c \cdot \log \left(\mathsf{fma}\left(y, x, 1\right)\right)\\ \mathbf{if}\;y \leq -3.841611067012462 \cdot 10^{+52}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 1.0328160200308696 \cdot 10^{-7}:\\ \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\ \mathbf{elif}\;y \leq 2.160478424677013 \cdot 10^{+222}:\\ \;\;\;\;c \cdot \frac{1}{\frac{1}{x \cdot y} + 0.5}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                    (FPCore (c x y)
                                      :precision binary64
                                      :pre TRUE
                                      (let* ((t_0 (* c (log (fma y x 1.0)))))
                                      (if (<= y -3.841611067012462e+52)
                                        t_0
                                        (if (<= y 1.0328160200308696e-7)
                                          (* (expm1 x) (* y c))
                                          (if (<= y 2.160478424677013e+222)
                                            (* c (/ 1.0 (+ (/ 1.0 (* x y)) 0.5)))
                                            t_0)))))
                                    double code(double c, double x, double y) {
                                    	double t_0 = c * log(fma(y, x, 1.0));
                                    	double tmp;
                                    	if (y <= -3.841611067012462e+52) {
                                    		tmp = t_0;
                                    	} else if (y <= 1.0328160200308696e-7) {
                                    		tmp = expm1(x) * (y * c);
                                    	} else if (y <= 2.160478424677013e+222) {
                                    		tmp = c * (1.0 / ((1.0 / (x * y)) + 0.5));
                                    	} else {
                                    		tmp = t_0;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(c, x, y)
                                    	t_0 = Float64(c * log(fma(y, x, 1.0)))
                                    	tmp = 0.0
                                    	if (y <= -3.841611067012462e+52)
                                    		tmp = t_0;
                                    	elseif (y <= 1.0328160200308696e-7)
                                    		tmp = Float64(expm1(x) * Float64(y * c));
                                    	elseif (y <= 2.160478424677013e+222)
                                    		tmp = Float64(c * Float64(1.0 / Float64(Float64(1.0 / Float64(x * y)) + 0.5)));
                                    	else
                                    		tmp = t_0;
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[c_, x_, y_] := Block[{t$95$0 = N[(c * N[Log[N[(y * x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.841611067012462e+52], t$95$0, If[LessEqual[y, 1.0328160200308696e-7], N[(N[(Exp[x] - 1), $MachinePrecision] * N[(y * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.160478424677013e+222], N[(c * N[(1.0 / N[(N[(1.0 / N[(x * y), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
                                    
                                    f(c, x, y):
                                    	c in [-inf, +inf],
                                    	x in [-inf, +inf],
                                    	y in [-inf, +inf]
                                    code: THEORY
                                    BEGIN
                                    f(c, x, y: real): real =
                                    	LET t_0 = (c * (ln(((y * x) + (1))))) IN
                                    		LET tmp_2 = IF (y <= (2160478424677012846016742697099393352274972871161688613699057620255834107666802404002579458789716541521724638036479113449945799823899942166468080351632740731200320379640256799779719631904874743434200681136401303357437771776)) THEN (c * ((1) / (((1) / (x * y)) + (5e-1)))) ELSE t_0 ENDIF IN
                                    		LET tmp_1 = IF (y <= (10328160200308695549376047408129952742683599353767931461334228515625e-74)) THEN (((exp(x)) - (1)) * (y * c)) ELSE tmp_2 ENDIF IN
                                    		LET tmp = IF (y <= (-38416110670124621050889811552578715003109317791449088)) THEN t_0 ELSE tmp_1 ENDIF IN
                                    	tmp
                                    END code
                                    \begin{array}{l}
                                    t_0 := c \cdot \log \left(\mathsf{fma}\left(y, x, 1\right)\right)\\
                                    \mathbf{if}\;y \leq -3.841611067012462 \cdot 10^{+52}:\\
                                    \;\;\;\;t\_0\\
                                    
                                    \mathbf{elif}\;y \leq 1.0328160200308696 \cdot 10^{-7}:\\
                                    \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\
                                    
                                    \mathbf{elif}\;y \leq 2.160478424677013 \cdot 10^{+222}:\\
                                    \;\;\;\;c \cdot \frac{1}{\frac{1}{x \cdot y} + 0.5}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;t\_0\\
                                    
                                    
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if y < -3.8416110670124621e52 or 2.1604784246770128e222 < y

                                      1. Initial program 41.0%

                                        \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                      2. Applied rewrites50.5%

                                        \[\leadsto c \cdot \frac{1}{\frac{2}{2 \cdot \log \left(\mathsf{fma}\left(y, \mathsf{expm1}\left(x\right), 1\right)\right)}} \]
                                      3. Taylor expanded in x around 0

                                        \[\leadsto c \cdot \frac{1}{\frac{2}{2 \cdot \log \left(1 + x \cdot y\right)}} \]
                                      4. Step-by-step derivation
                                        1. Applied rewrites39.1%

                                          \[\leadsto c \cdot \frac{1}{\frac{2}{2 \cdot \log \left(1 + x \cdot y\right)}} \]
                                        2. Step-by-step derivation
                                          1. Applied rewrites39.1%

                                            \[\leadsto c \cdot \log \left(\mathsf{fma}\left(y, x, 1\right)\right) \]

                                          if -3.8416110670124621e52 < y < 1.0328160200308696e-7

                                          1. Initial program 41.0%

                                            \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                          2. Taylor expanded in y around 0

                                            \[\leadsto c \cdot \left(y \cdot \left(e^{x} - 1\right)\right) \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites73.9%

                                              \[\leadsto c \cdot \left(y \cdot \mathsf{expm1}\left(x\right)\right) \]
                                            2. Step-by-step derivation
                                              1. Applied rewrites77.3%

                                                \[\leadsto \mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right) \]

                                              if 1.0328160200308696e-7 < y < 2.1604784246770128e222

                                              1. Initial program 41.0%

                                                \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                              2. Applied rewrites50.5%

                                                \[\leadsto c \cdot \frac{1}{\frac{2}{2 \cdot \log \left(\mathsf{fma}\left(y, \mathsf{expm1}\left(x\right), 1\right)\right)}} \]
                                              3. Taylor expanded in y around 0

                                                \[\leadsto c \cdot \frac{1}{\frac{\frac{1}{2} \cdot y + \frac{1}{e^{x} - 1}}{y}} \]
                                              4. Step-by-step derivation
                                                1. Applied rewrites75.5%

                                                  \[\leadsto c \cdot \frac{1}{\frac{\mathsf{fma}\left(0.5, y, \frac{1}{\mathsf{expm1}\left(x\right)}\right)}{y}} \]
                                                2. Step-by-step derivation
                                                  1. Applied rewrites75.5%

                                                    \[\leadsto c \cdot \frac{1}{\frac{1}{\mathsf{expm1}\left(x\right) \cdot y} + 0.5} \]
                                                  2. Taylor expanded in x around 0

                                                    \[\leadsto c \cdot \frac{1}{\frac{1}{x \cdot y} + 0.5} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites57.6%

                                                      \[\leadsto c \cdot \frac{1}{\frac{1}{x \cdot y} + 0.5} \]
                                                  4. Recombined 3 regimes into one program.
                                                  5. Add Preprocessing

                                                  Alternative 6: 81.6% accurate, 1.3× speedup?

                                                  \[\begin{array}{l} t_0 := c \cdot \log \left(\mathsf{fma}\left(y, x, 1\right)\right)\\ \mathbf{if}\;y \leq -3.841611067012462 \cdot 10^{+52}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 2.1727156459338237 \cdot 10^{+31}:\\ \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\ \mathbf{elif}\;y \leq 2.160478424677013 \cdot 10^{+222}:\\ \;\;\;\;\frac{c}{\frac{1}{x \cdot y} + 0.5}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                                  (FPCore (c x y)
                                                    :precision binary64
                                                    :pre TRUE
                                                    (let* ((t_0 (* c (log (fma y x 1.0)))))
                                                    (if (<= y -3.841611067012462e+52)
                                                      t_0
                                                      (if (<= y 2.1727156459338237e+31)
                                                        (* (expm1 x) (* y c))
                                                        (if (<= y 2.160478424677013e+222)
                                                          (/ c (+ (/ 1.0 (* x y)) 0.5))
                                                          t_0)))))
                                                  double code(double c, double x, double y) {
                                                  	double t_0 = c * log(fma(y, x, 1.0));
                                                  	double tmp;
                                                  	if (y <= -3.841611067012462e+52) {
                                                  		tmp = t_0;
                                                  	} else if (y <= 2.1727156459338237e+31) {
                                                  		tmp = expm1(x) * (y * c);
                                                  	} else if (y <= 2.160478424677013e+222) {
                                                  		tmp = c / ((1.0 / (x * y)) + 0.5);
                                                  	} else {
                                                  		tmp = t_0;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  function code(c, x, y)
                                                  	t_0 = Float64(c * log(fma(y, x, 1.0)))
                                                  	tmp = 0.0
                                                  	if (y <= -3.841611067012462e+52)
                                                  		tmp = t_0;
                                                  	elseif (y <= 2.1727156459338237e+31)
                                                  		tmp = Float64(expm1(x) * Float64(y * c));
                                                  	elseif (y <= 2.160478424677013e+222)
                                                  		tmp = Float64(c / Float64(Float64(1.0 / Float64(x * y)) + 0.5));
                                                  	else
                                                  		tmp = t_0;
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  code[c_, x_, y_] := Block[{t$95$0 = N[(c * N[Log[N[(y * x + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.841611067012462e+52], t$95$0, If[LessEqual[y, 2.1727156459338237e+31], N[(N[(Exp[x] - 1), $MachinePrecision] * N[(y * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.160478424677013e+222], N[(c / N[(N[(1.0 / N[(x * y), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision], t$95$0]]]]
                                                  
                                                  f(c, x, y):
                                                  	c in [-inf, +inf],
                                                  	x in [-inf, +inf],
                                                  	y in [-inf, +inf]
                                                  code: THEORY
                                                  BEGIN
                                                  f(c, x, y: real): real =
                                                  	LET t_0 = (c * (ln(((y * x) + (1))))) IN
                                                  		LET tmp_2 = IF (y <= (2160478424677012846016742697099393352274972871161688613699057620255834107666802404002579458789716541521724638036479113449945799823899942166468080351632740731200320379640256799779719631904874743434200681136401303357437771776)) THEN (c / (((1) / (x * y)) + (5e-1))) ELSE t_0 ENDIF IN
                                                  		LET tmp_1 = IF (y <= (21727156459338237462671414788096)) THEN (((exp(x)) - (1)) * (y * c)) ELSE tmp_2 ENDIF IN
                                                  		LET tmp = IF (y <= (-38416110670124621050889811552578715003109317791449088)) THEN t_0 ELSE tmp_1 ENDIF IN
                                                  	tmp
                                                  END code
                                                  \begin{array}{l}
                                                  t_0 := c \cdot \log \left(\mathsf{fma}\left(y, x, 1\right)\right)\\
                                                  \mathbf{if}\;y \leq -3.841611067012462 \cdot 10^{+52}:\\
                                                  \;\;\;\;t\_0\\
                                                  
                                                  \mathbf{elif}\;y \leq 2.1727156459338237 \cdot 10^{+31}:\\
                                                  \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\
                                                  
                                                  \mathbf{elif}\;y \leq 2.160478424677013 \cdot 10^{+222}:\\
                                                  \;\;\;\;\frac{c}{\frac{1}{x \cdot y} + 0.5}\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;t\_0\\
                                                  
                                                  
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 3 regimes
                                                  2. if y < -3.8416110670124621e52 or 2.1604784246770128e222 < y

                                                    1. Initial program 41.0%

                                                      \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                    2. Applied rewrites50.5%

                                                      \[\leadsto c \cdot \frac{1}{\frac{2}{2 \cdot \log \left(\mathsf{fma}\left(y, \mathsf{expm1}\left(x\right), 1\right)\right)}} \]
                                                    3. Taylor expanded in x around 0

                                                      \[\leadsto c \cdot \frac{1}{\frac{2}{2 \cdot \log \left(1 + x \cdot y\right)}} \]
                                                    4. Step-by-step derivation
                                                      1. Applied rewrites39.1%

                                                        \[\leadsto c \cdot \frac{1}{\frac{2}{2 \cdot \log \left(1 + x \cdot y\right)}} \]
                                                      2. Step-by-step derivation
                                                        1. Applied rewrites39.1%

                                                          \[\leadsto c \cdot \log \left(\mathsf{fma}\left(y, x, 1\right)\right) \]

                                                        if -3.8416110670124621e52 < y < 2.1727156459338237e31

                                                        1. Initial program 41.0%

                                                          \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                        2. Taylor expanded in y around 0

                                                          \[\leadsto c \cdot \left(y \cdot \left(e^{x} - 1\right)\right) \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites73.9%

                                                            \[\leadsto c \cdot \left(y \cdot \mathsf{expm1}\left(x\right)\right) \]
                                                          2. Step-by-step derivation
                                                            1. Applied rewrites77.3%

                                                              \[\leadsto \mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right) \]

                                                            if 2.1727156459338237e31 < y < 2.1604784246770128e222

                                                            1. Initial program 41.0%

                                                              \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                            2. Applied rewrites50.5%

                                                              \[\leadsto c \cdot \frac{1}{\frac{2}{2 \cdot \log \left(\mathsf{fma}\left(y, \mathsf{expm1}\left(x\right), 1\right)\right)}} \]
                                                            3. Taylor expanded in y around 0

                                                              \[\leadsto c \cdot \frac{1}{\frac{\frac{1}{2} \cdot y + \frac{1}{e^{x} - 1}}{y}} \]
                                                            4. Step-by-step derivation
                                                              1. Applied rewrites75.5%

                                                                \[\leadsto c \cdot \frac{1}{\frac{\mathsf{fma}\left(0.5, y, \frac{1}{\mathsf{expm1}\left(x\right)}\right)}{y}} \]
                                                              2. Step-by-step derivation
                                                                1. Applied rewrites75.5%

                                                                  \[\leadsto \frac{c}{\frac{1}{\mathsf{expm1}\left(x\right) \cdot y} + 0.5} \]
                                                                2. Taylor expanded in x around 0

                                                                  \[\leadsto \frac{c}{\frac{1}{x \cdot y} + 0.5} \]
                                                                3. Step-by-step derivation
                                                                  1. Applied rewrites57.6%

                                                                    \[\leadsto \frac{c}{\frac{1}{x \cdot y} + 0.5} \]
                                                                4. Recombined 3 regimes into one program.
                                                                5. Add Preprocessing

                                                                Alternative 7: 81.5% accurate, 1.6× speedup?

                                                                \[\begin{array}{l} t_0 := \frac{c}{\frac{1}{x \cdot y} + 0.5}\\ \mathbf{if}\;y \leq -936934.8727253214:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 2.1727156459338237 \cdot 10^{+31}:\\ \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                                                (FPCore (c x y)
                                                                  :precision binary64
                                                                  :pre TRUE
                                                                  (let* ((t_0 (/ c (+ (/ 1.0 (* x y)) 0.5))))
                                                                  (if (<= y -936934.8727253214)
                                                                    t_0
                                                                    (if (<= y 2.1727156459338237e+31) (* (expm1 x) (* y c)) t_0))))
                                                                double code(double c, double x, double y) {
                                                                	double t_0 = c / ((1.0 / (x * y)) + 0.5);
                                                                	double tmp;
                                                                	if (y <= -936934.8727253214) {
                                                                		tmp = t_0;
                                                                	} else if (y <= 2.1727156459338237e+31) {
                                                                		tmp = expm1(x) * (y * c);
                                                                	} else {
                                                                		tmp = t_0;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                public static double code(double c, double x, double y) {
                                                                	double t_0 = c / ((1.0 / (x * y)) + 0.5);
                                                                	double tmp;
                                                                	if (y <= -936934.8727253214) {
                                                                		tmp = t_0;
                                                                	} else if (y <= 2.1727156459338237e+31) {
                                                                		tmp = Math.expm1(x) * (y * c);
                                                                	} else {
                                                                		tmp = t_0;
                                                                	}
                                                                	return tmp;
                                                                }
                                                                
                                                                def code(c, x, y):
                                                                	t_0 = c / ((1.0 / (x * y)) + 0.5)
                                                                	tmp = 0
                                                                	if y <= -936934.8727253214:
                                                                		tmp = t_0
                                                                	elif y <= 2.1727156459338237e+31:
                                                                		tmp = math.expm1(x) * (y * c)
                                                                	else:
                                                                		tmp = t_0
                                                                	return tmp
                                                                
                                                                function code(c, x, y)
                                                                	t_0 = Float64(c / Float64(Float64(1.0 / Float64(x * y)) + 0.5))
                                                                	tmp = 0.0
                                                                	if (y <= -936934.8727253214)
                                                                		tmp = t_0;
                                                                	elseif (y <= 2.1727156459338237e+31)
                                                                		tmp = Float64(expm1(x) * Float64(y * c));
                                                                	else
                                                                		tmp = t_0;
                                                                	end
                                                                	return tmp
                                                                end
                                                                
                                                                code[c_, x_, y_] := Block[{t$95$0 = N[(c / N[(N[(1.0 / N[(x * y), $MachinePrecision]), $MachinePrecision] + 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -936934.8727253214], t$95$0, If[LessEqual[y, 2.1727156459338237e+31], N[(N[(Exp[x] - 1), $MachinePrecision] * N[(y * c), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                                                                
                                                                f(c, x, y):
                                                                	c in [-inf, +inf],
                                                                	x in [-inf, +inf],
                                                                	y in [-inf, +inf]
                                                                code: THEORY
                                                                BEGIN
                                                                f(c, x, y: real): real =
                                                                	LET t_0 = (c / (((1) / (x * y)) + (5e-1))) IN
                                                                		LET tmp_1 = IF (y <= (21727156459338237462671414788096)) THEN (((exp(x)) - (1)) * (y * c)) ELSE t_0 ENDIF IN
                                                                		LET tmp = IF (y <= (-9369348727253214456140995025634765625e-31)) THEN t_0 ELSE tmp_1 ENDIF IN
                                                                	tmp
                                                                END code
                                                                \begin{array}{l}
                                                                t_0 := \frac{c}{\frac{1}{x \cdot y} + 0.5}\\
                                                                \mathbf{if}\;y \leq -936934.8727253214:\\
                                                                \;\;\;\;t\_0\\
                                                                
                                                                \mathbf{elif}\;y \leq 2.1727156459338237 \cdot 10^{+31}:\\
                                                                \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\
                                                                
                                                                \mathbf{else}:\\
                                                                \;\;\;\;t\_0\\
                                                                
                                                                
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Split input into 2 regimes
                                                                2. if y < -936934.87272532145 or 2.1727156459338237e31 < y

                                                                  1. Initial program 41.0%

                                                                    \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                                  2. Applied rewrites50.5%

                                                                    \[\leadsto c \cdot \frac{1}{\frac{2}{2 \cdot \log \left(\mathsf{fma}\left(y, \mathsf{expm1}\left(x\right), 1\right)\right)}} \]
                                                                  3. Taylor expanded in y around 0

                                                                    \[\leadsto c \cdot \frac{1}{\frac{\frac{1}{2} \cdot y + \frac{1}{e^{x} - 1}}{y}} \]
                                                                  4. Step-by-step derivation
                                                                    1. Applied rewrites75.5%

                                                                      \[\leadsto c \cdot \frac{1}{\frac{\mathsf{fma}\left(0.5, y, \frac{1}{\mathsf{expm1}\left(x\right)}\right)}{y}} \]
                                                                    2. Step-by-step derivation
                                                                      1. Applied rewrites75.5%

                                                                        \[\leadsto \frac{c}{\frac{1}{\mathsf{expm1}\left(x\right) \cdot y} + 0.5} \]
                                                                      2. Taylor expanded in x around 0

                                                                        \[\leadsto \frac{c}{\frac{1}{x \cdot y} + 0.5} \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites57.6%

                                                                          \[\leadsto \frac{c}{\frac{1}{x \cdot y} + 0.5} \]

                                                                        if -936934.87272532145 < y < 2.1727156459338237e31

                                                                        1. Initial program 41.0%

                                                                          \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                                        2. Taylor expanded in y around 0

                                                                          \[\leadsto c \cdot \left(y \cdot \left(e^{x} - 1\right)\right) \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites73.9%

                                                                            \[\leadsto c \cdot \left(y \cdot \mathsf{expm1}\left(x\right)\right) \]
                                                                          2. Step-by-step derivation
                                                                            1. Applied rewrites77.3%

                                                                              \[\leadsto \mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right) \]
                                                                          3. Recombined 2 regimes into one program.
                                                                          4. Add Preprocessing

                                                                          Alternative 8: 78.5% accurate, 2.0× speedup?

                                                                          \[\begin{array}{l} \mathbf{if}\;y \leq 99.55376154833478:\\ \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(x \cdot y\right)\\ \end{array} \]
                                                                          (FPCore (c x y)
                                                                            :precision binary64
                                                                            :pre TRUE
                                                                            (if (<= y 99.55376154833478) (* (expm1 x) (* y c)) (* c (* x y))))
                                                                          double code(double c, double x, double y) {
                                                                          	double tmp;
                                                                          	if (y <= 99.55376154833478) {
                                                                          		tmp = expm1(x) * (y * c);
                                                                          	} else {
                                                                          		tmp = c * (x * y);
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          public static double code(double c, double x, double y) {
                                                                          	double tmp;
                                                                          	if (y <= 99.55376154833478) {
                                                                          		tmp = Math.expm1(x) * (y * c);
                                                                          	} else {
                                                                          		tmp = c * (x * y);
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          def code(c, x, y):
                                                                          	tmp = 0
                                                                          	if y <= 99.55376154833478:
                                                                          		tmp = math.expm1(x) * (y * c)
                                                                          	else:
                                                                          		tmp = c * (x * y)
                                                                          	return tmp
                                                                          
                                                                          function code(c, x, y)
                                                                          	tmp = 0.0
                                                                          	if (y <= 99.55376154833478)
                                                                          		tmp = Float64(expm1(x) * Float64(y * c));
                                                                          	else
                                                                          		tmp = Float64(c * Float64(x * y));
                                                                          	end
                                                                          	return tmp
                                                                          end
                                                                          
                                                                          code[c_, x_, y_] := If[LessEqual[y, 99.55376154833478], N[(N[(Exp[x] - 1), $MachinePrecision] * N[(y * c), $MachinePrecision]), $MachinePrecision], N[(c * N[(x * y), $MachinePrecision]), $MachinePrecision]]
                                                                          
                                                                          f(c, x, y):
                                                                          	c in [-inf, +inf],
                                                                          	x in [-inf, +inf],
                                                                          	y in [-inf, +inf]
                                                                          code: THEORY
                                                                          BEGIN
                                                                          f(c, x, y: real): real =
                                                                          	LET tmp = IF (y <= (995537615483347764211430330760776996612548828125e-46)) THEN (((exp(x)) - (1)) * (y * c)) ELSE (c * (x * y)) ENDIF IN
                                                                          	tmp
                                                                          END code
                                                                          \begin{array}{l}
                                                                          \mathbf{if}\;y \leq 99.55376154833478:\\
                                                                          \;\;\;\;\mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right)\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;c \cdot \left(x \cdot y\right)\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 2 regimes
                                                                          2. if y < 99.553761548334776

                                                                            1. Initial program 41.0%

                                                                              \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                                            2. Taylor expanded in y around 0

                                                                              \[\leadsto c \cdot \left(y \cdot \left(e^{x} - 1\right)\right) \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites73.9%

                                                                                \[\leadsto c \cdot \left(y \cdot \mathsf{expm1}\left(x\right)\right) \]
                                                                              2. Step-by-step derivation
                                                                                1. Applied rewrites77.3%

                                                                                  \[\leadsto \mathsf{expm1}\left(x\right) \cdot \left(y \cdot c\right) \]

                                                                                if 99.553761548334776 < y

                                                                                1. Initial program 41.0%

                                                                                  \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                                                2. Taylor expanded in x around 0

                                                                                  \[\leadsto c \cdot \left(x \cdot y\right) \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites56.1%

                                                                                    \[\leadsto c \cdot \left(x \cdot y\right) \]
                                                                                4. Recombined 2 regimes into one program.
                                                                                5. Add Preprocessing

                                                                                Alternative 9: 73.9% accurate, 2.5× speedup?

                                                                                \[c \cdot \left(y \cdot \mathsf{expm1}\left(x\right)\right) \]
                                                                                (FPCore (c x y)
                                                                                  :precision binary64
                                                                                  :pre TRUE
                                                                                  (* c (* y (expm1 x))))
                                                                                double code(double c, double x, double y) {
                                                                                	return c * (y * expm1(x));
                                                                                }
                                                                                
                                                                                public static double code(double c, double x, double y) {
                                                                                	return c * (y * Math.expm1(x));
                                                                                }
                                                                                
                                                                                def code(c, x, y):
                                                                                	return c * (y * math.expm1(x))
                                                                                
                                                                                function code(c, x, y)
                                                                                	return Float64(c * Float64(y * expm1(x)))
                                                                                end
                                                                                
                                                                                code[c_, x_, y_] := N[(c * N[(y * N[(Exp[x] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                                                
                                                                                f(c, x, y):
                                                                                	c in [-inf, +inf],
                                                                                	x in [-inf, +inf],
                                                                                	y in [-inf, +inf]
                                                                                code: THEORY
                                                                                BEGIN
                                                                                f(c, x, y: real): real =
                                                                                	c * (y * ((exp(x)) - (1)))
                                                                                END code
                                                                                c \cdot \left(y \cdot \mathsf{expm1}\left(x\right)\right)
                                                                                
                                                                                Derivation
                                                                                1. Initial program 41.0%

                                                                                  \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                                                2. Taylor expanded in y around 0

                                                                                  \[\leadsto c \cdot \left(y \cdot \left(e^{x} - 1\right)\right) \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites73.9%

                                                                                    \[\leadsto c \cdot \left(y \cdot \mathsf{expm1}\left(x\right)\right) \]
                                                                                  2. Add Preprocessing

                                                                                  Alternative 10: 64.9% accurate, 1.9× speedup?

                                                                                  \[\mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l} \mathbf{if}\;\left|c\right| \leq 9.39689729946558 \cdot 10^{+89}:\\ \;\;\;\;x \cdot \left(y \cdot \left|c\right|\right)\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(x \cdot \left|c\right|\right)\\ \end{array} \]
                                                                                  (FPCore (c x y)
                                                                                    :precision binary64
                                                                                    :pre TRUE
                                                                                    (*
                                                                                   (copysign 1.0 c)
                                                                                   (if (<= (fabs c) 9.39689729946558e+89)
                                                                                     (* x (* y (fabs c)))
                                                                                     (* y (* x (fabs c))))))
                                                                                  double code(double c, double x, double y) {
                                                                                  	double tmp;
                                                                                  	if (fabs(c) <= 9.39689729946558e+89) {
                                                                                  		tmp = x * (y * fabs(c));
                                                                                  	} else {
                                                                                  		tmp = y * (x * fabs(c));
                                                                                  	}
                                                                                  	return copysign(1.0, c) * tmp;
                                                                                  }
                                                                                  
                                                                                  public static double code(double c, double x, double y) {
                                                                                  	double tmp;
                                                                                  	if (Math.abs(c) <= 9.39689729946558e+89) {
                                                                                  		tmp = x * (y * Math.abs(c));
                                                                                  	} else {
                                                                                  		tmp = y * (x * Math.abs(c));
                                                                                  	}
                                                                                  	return Math.copySign(1.0, c) * tmp;
                                                                                  }
                                                                                  
                                                                                  def code(c, x, y):
                                                                                  	tmp = 0
                                                                                  	if math.fabs(c) <= 9.39689729946558e+89:
                                                                                  		tmp = x * (y * math.fabs(c))
                                                                                  	else:
                                                                                  		tmp = y * (x * math.fabs(c))
                                                                                  	return math.copysign(1.0, c) * tmp
                                                                                  
                                                                                  function code(c, x, y)
                                                                                  	tmp = 0.0
                                                                                  	if (abs(c) <= 9.39689729946558e+89)
                                                                                  		tmp = Float64(x * Float64(y * abs(c)));
                                                                                  	else
                                                                                  		tmp = Float64(y * Float64(x * abs(c)));
                                                                                  	end
                                                                                  	return Float64(copysign(1.0, c) * tmp)
                                                                                  end
                                                                                  
                                                                                  function tmp_2 = code(c, x, y)
                                                                                  	tmp = 0.0;
                                                                                  	if (abs(c) <= 9.39689729946558e+89)
                                                                                  		tmp = x * (y * abs(c));
                                                                                  	else
                                                                                  		tmp = y * (x * abs(c));
                                                                                  	end
                                                                                  	tmp_2 = (sign(c) * abs(1.0)) * tmp;
                                                                                  end
                                                                                  
                                                                                  code[c_, x_, y_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[c], $MachinePrecision], 9.39689729946558e+89], N[(x * N[(y * N[Abs[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * N[Abs[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                  
                                                                                  \mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l}
                                                                                  \mathbf{if}\;\left|c\right| \leq 9.39689729946558 \cdot 10^{+89}:\\
                                                                                  \;\;\;\;x \cdot \left(y \cdot \left|c\right|\right)\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;y \cdot \left(x \cdot \left|c\right|\right)\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 2 regimes
                                                                                  2. if c < 9.3968972994655796e89

                                                                                    1. Initial program 41.0%

                                                                                      \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                                                    2. Taylor expanded in x around 0

                                                                                      \[\leadsto c \cdot \left(x \cdot y\right) \]
                                                                                    3. Step-by-step derivation
                                                                                      1. Applied rewrites56.1%

                                                                                        \[\leadsto c \cdot \left(x \cdot y\right) \]
                                                                                      2. Step-by-step derivation
                                                                                        1. Applied rewrites62.2%

                                                                                          \[\leadsto x \cdot \left(y \cdot c\right) \]

                                                                                        if 9.3968972994655796e89 < c

                                                                                        1. Initial program 41.0%

                                                                                          \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                                                        2. Taylor expanded in x around 0

                                                                                          \[\leadsto c \cdot \left(x \cdot y\right) \]
                                                                                        3. Step-by-step derivation
                                                                                          1. Applied rewrites56.1%

                                                                                            \[\leadsto c \cdot \left(x \cdot y\right) \]
                                                                                          2. Step-by-step derivation
                                                                                            1. Applied rewrites59.3%

                                                                                              \[\leadsto y \cdot \left(x \cdot c\right) \]
                                                                                          3. Recombined 2 regimes into one program.
                                                                                          4. Add Preprocessing

                                                                                          Alternative 11: 63.5% accurate, 3.3× speedup?

                                                                                          \[\begin{array}{l} \mathbf{if}\;y \leq 2.4520640965510156 \cdot 10^{-27}:\\ \;\;\;\;x \cdot \left(y \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;c \cdot \left(x \cdot y\right)\\ \end{array} \]
                                                                                          (FPCore (c x y)
                                                                                            :precision binary64
                                                                                            :pre TRUE
                                                                                            (if (<= y 2.4520640965510156e-27) (* x (* y c)) (* c (* x y))))
                                                                                          double code(double c, double x, double y) {
                                                                                          	double tmp;
                                                                                          	if (y <= 2.4520640965510156e-27) {
                                                                                          		tmp = x * (y * c);
                                                                                          	} else {
                                                                                          		tmp = c * (x * y);
                                                                                          	}
                                                                                          	return tmp;
                                                                                          }
                                                                                          
                                                                                          real(8) function code(c, x, y)
                                                                                          use fmin_fmax_functions
                                                                                              real(8), intent (in) :: c
                                                                                              real(8), intent (in) :: x
                                                                                              real(8), intent (in) :: y
                                                                                              real(8) :: tmp
                                                                                              if (y <= 2.4520640965510156d-27) then
                                                                                                  tmp = x * (y * c)
                                                                                              else
                                                                                                  tmp = c * (x * y)
                                                                                              end if
                                                                                              code = tmp
                                                                                          end function
                                                                                          
                                                                                          public static double code(double c, double x, double y) {
                                                                                          	double tmp;
                                                                                          	if (y <= 2.4520640965510156e-27) {
                                                                                          		tmp = x * (y * c);
                                                                                          	} else {
                                                                                          		tmp = c * (x * y);
                                                                                          	}
                                                                                          	return tmp;
                                                                                          }
                                                                                          
                                                                                          def code(c, x, y):
                                                                                          	tmp = 0
                                                                                          	if y <= 2.4520640965510156e-27:
                                                                                          		tmp = x * (y * c)
                                                                                          	else:
                                                                                          		tmp = c * (x * y)
                                                                                          	return tmp
                                                                                          
                                                                                          function code(c, x, y)
                                                                                          	tmp = 0.0
                                                                                          	if (y <= 2.4520640965510156e-27)
                                                                                          		tmp = Float64(x * Float64(y * c));
                                                                                          	else
                                                                                          		tmp = Float64(c * Float64(x * y));
                                                                                          	end
                                                                                          	return tmp
                                                                                          end
                                                                                          
                                                                                          function tmp_2 = code(c, x, y)
                                                                                          	tmp = 0.0;
                                                                                          	if (y <= 2.4520640965510156e-27)
                                                                                          		tmp = x * (y * c);
                                                                                          	else
                                                                                          		tmp = c * (x * y);
                                                                                          	end
                                                                                          	tmp_2 = tmp;
                                                                                          end
                                                                                          
                                                                                          code[c_, x_, y_] := If[LessEqual[y, 2.4520640965510156e-27], N[(x * N[(y * c), $MachinePrecision]), $MachinePrecision], N[(c * N[(x * y), $MachinePrecision]), $MachinePrecision]]
                                                                                          
                                                                                          f(c, x, y):
                                                                                          	c in [-inf, +inf],
                                                                                          	x in [-inf, +inf],
                                                                                          	y in [-inf, +inf]
                                                                                          code: THEORY
                                                                                          BEGIN
                                                                                          f(c, x, y: real): real =
                                                                                          	LET tmp = IF (y <= (245206409655101562430941493959943172426255612604679907674416304549911186337618484998301937594078481197357177734375e-140)) THEN (x * (y * c)) ELSE (c * (x * y)) ENDIF IN
                                                                                          	tmp
                                                                                          END code
                                                                                          \begin{array}{l}
                                                                                          \mathbf{if}\;y \leq 2.4520640965510156 \cdot 10^{-27}:\\
                                                                                          \;\;\;\;x \cdot \left(y \cdot c\right)\\
                                                                                          
                                                                                          \mathbf{else}:\\
                                                                                          \;\;\;\;c \cdot \left(x \cdot y\right)\\
                                                                                          
                                                                                          
                                                                                          \end{array}
                                                                                          
                                                                                          Derivation
                                                                                          1. Split input into 2 regimes
                                                                                          2. if y < 2.4520640965510156e-27

                                                                                            1. Initial program 41.0%

                                                                                              \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                                                            2. Taylor expanded in x around 0

                                                                                              \[\leadsto c \cdot \left(x \cdot y\right) \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites56.1%

                                                                                                \[\leadsto c \cdot \left(x \cdot y\right) \]
                                                                                              2. Step-by-step derivation
                                                                                                1. Applied rewrites62.2%

                                                                                                  \[\leadsto x \cdot \left(y \cdot c\right) \]

                                                                                                if 2.4520640965510156e-27 < y

                                                                                                1. Initial program 41.0%

                                                                                                  \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                                                                2. Taylor expanded in x around 0

                                                                                                  \[\leadsto c \cdot \left(x \cdot y\right) \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites56.1%

                                                                                                    \[\leadsto c \cdot \left(x \cdot y\right) \]
                                                                                                4. Recombined 2 regimes into one program.
                                                                                                5. Add Preprocessing

                                                                                                Alternative 12: 56.1% accurate, 5.0× speedup?

                                                                                                \[c \cdot \left(x \cdot y\right) \]
                                                                                                (FPCore (c x y)
                                                                                                  :precision binary64
                                                                                                  :pre TRUE
                                                                                                  (* c (* x y)))
                                                                                                double code(double c, double x, double y) {
                                                                                                	return c * (x * y);
                                                                                                }
                                                                                                
                                                                                                real(8) function code(c, x, y)
                                                                                                use fmin_fmax_functions
                                                                                                    real(8), intent (in) :: c
                                                                                                    real(8), intent (in) :: x
                                                                                                    real(8), intent (in) :: y
                                                                                                    code = c * (x * y)
                                                                                                end function
                                                                                                
                                                                                                public static double code(double c, double x, double y) {
                                                                                                	return c * (x * y);
                                                                                                }
                                                                                                
                                                                                                def code(c, x, y):
                                                                                                	return c * (x * y)
                                                                                                
                                                                                                function code(c, x, y)
                                                                                                	return Float64(c * Float64(x * y))
                                                                                                end
                                                                                                
                                                                                                function tmp = code(c, x, y)
                                                                                                	tmp = c * (x * y);
                                                                                                end
                                                                                                
                                                                                                code[c_, x_, y_] := N[(c * N[(x * y), $MachinePrecision]), $MachinePrecision]
                                                                                                
                                                                                                f(c, x, y):
                                                                                                	c in [-inf, +inf],
                                                                                                	x in [-inf, +inf],
                                                                                                	y in [-inf, +inf]
                                                                                                code: THEORY
                                                                                                BEGIN
                                                                                                f(c, x, y: real): real =
                                                                                                	c * (x * y)
                                                                                                END code
                                                                                                c \cdot \left(x \cdot y\right)
                                                                                                
                                                                                                Derivation
                                                                                                1. Initial program 41.0%

                                                                                                  \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                                                                2. Taylor expanded in x around 0

                                                                                                  \[\leadsto c \cdot \left(x \cdot y\right) \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites56.1%

                                                                                                    \[\leadsto c \cdot \left(x \cdot y\right) \]
                                                                                                  2. Add Preprocessing

                                                                                                  Alternative 13: 6.3% accurate, 7.3× speedup?

                                                                                                  \[\frac{c}{0.5} \]
                                                                                                  (FPCore (c x y)
                                                                                                    :precision binary64
                                                                                                    :pre TRUE
                                                                                                    (/ c 0.5))
                                                                                                  double code(double c, double x, double y) {
                                                                                                  	return c / 0.5;
                                                                                                  }
                                                                                                  
                                                                                                  real(8) function code(c, x, y)
                                                                                                  use fmin_fmax_functions
                                                                                                      real(8), intent (in) :: c
                                                                                                      real(8), intent (in) :: x
                                                                                                      real(8), intent (in) :: y
                                                                                                      code = c / 0.5d0
                                                                                                  end function
                                                                                                  
                                                                                                  public static double code(double c, double x, double y) {
                                                                                                  	return c / 0.5;
                                                                                                  }
                                                                                                  
                                                                                                  def code(c, x, y):
                                                                                                  	return c / 0.5
                                                                                                  
                                                                                                  function code(c, x, y)
                                                                                                  	return Float64(c / 0.5)
                                                                                                  end
                                                                                                  
                                                                                                  function tmp = code(c, x, y)
                                                                                                  	tmp = c / 0.5;
                                                                                                  end
                                                                                                  
                                                                                                  code[c_, x_, y_] := N[(c / 0.5), $MachinePrecision]
                                                                                                  
                                                                                                  f(c, x, y):
                                                                                                  	c in [-inf, +inf],
                                                                                                  	x in [-inf, +inf],
                                                                                                  	y in [-inf, +inf]
                                                                                                  code: THEORY
                                                                                                  BEGIN
                                                                                                  f(c, x, y: real): real =
                                                                                                  	c / (5e-1)
                                                                                                  END code
                                                                                                  \frac{c}{0.5}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Initial program 41.0%

                                                                                                    \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
                                                                                                  2. Applied rewrites50.5%

                                                                                                    \[\leadsto c \cdot \frac{1}{\frac{2}{2 \cdot \log \left(\mathsf{fma}\left(y, \mathsf{expm1}\left(x\right), 1\right)\right)}} \]
                                                                                                  3. Taylor expanded in y around 0

                                                                                                    \[\leadsto c \cdot \frac{1}{\frac{\frac{1}{2} \cdot y + \frac{1}{e^{x} - 1}}{y}} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. Applied rewrites75.5%

                                                                                                      \[\leadsto c \cdot \frac{1}{\frac{\mathsf{fma}\left(0.5, y, \frac{1}{\mathsf{expm1}\left(x\right)}\right)}{y}} \]
                                                                                                    2. Step-by-step derivation
                                                                                                      1. Applied rewrites75.5%

                                                                                                        \[\leadsto \frac{c}{\frac{1}{\mathsf{expm1}\left(x\right) \cdot y} + 0.5} \]
                                                                                                      2. Taylor expanded in y around inf

                                                                                                        \[\leadsto \frac{c}{\frac{1}{2}} \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites6.3%

                                                                                                          \[\leadsto \frac{c}{0.5} \]
                                                                                                        2. Add Preprocessing

                                                                                                        Developer Target 1: 93.2% accurate, 1.4× speedup?

                                                                                                        \[c \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(x\right) \cdot y\right) \]
                                                                                                        (FPCore (c x y)
                                                                                                          :precision binary64
                                                                                                          :pre TRUE
                                                                                                          (* c (log1p (* (expm1 x) y))))
                                                                                                        double code(double c, double x, double y) {
                                                                                                        	return c * log1p((expm1(x) * y));
                                                                                                        }
                                                                                                        
                                                                                                        public static double code(double c, double x, double y) {
                                                                                                        	return c * Math.log1p((Math.expm1(x) * y));
                                                                                                        }
                                                                                                        
                                                                                                        def code(c, x, y):
                                                                                                        	return c * math.log1p((math.expm1(x) * y))
                                                                                                        
                                                                                                        function code(c, x, y)
                                                                                                        	return Float64(c * log1p(Float64(expm1(x) * y)))
                                                                                                        end
                                                                                                        
                                                                                                        code[c_, x_, y_] := N[(c * N[Log[1 + N[(N[(Exp[x] - 1), $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
                                                                                                        
                                                                                                        f(c, x, y):
                                                                                                        	c in [-inf, +inf],
                                                                                                        	x in [-inf, +inf],
                                                                                                        	y in [-inf, +inf]
                                                                                                        code: THEORY
                                                                                                        BEGIN
                                                                                                        f(c, x, y: real): real =
                                                                                                        	c * (ln(((((exp(x)) - (1)) * y) + (1))))
                                                                                                        END code
                                                                                                        c \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(x\right) \cdot y\right)
                                                                                                        

                                                                                                        Reproduce

                                                                                                        ?
                                                                                                        herbie shell --seed 2026084 
                                                                                                        (FPCore (c x y)
                                                                                                          :name "Logarithmic Transform"
                                                                                                          :precision binary64
                                                                                                        
                                                                                                          :alt
                                                                                                          (* c (log1p (* (expm1 x) y)))
                                                                                                        
                                                                                                          (* c (log (+ 1.0 (* (- (pow E x) 1.0) y)))))