Logarithmic Transform

Percentage Accurate: 41.5% → 93.1%
Time: 20.7s
Alternatives: 7
Speedup: 19.8×

Specification

?
\[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
(FPCore (c x y)
  :precision binary64
  (* c (log (+ 1 (* (- (pow E x) 1) 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 + N[(N[(N[Power[E, x], $MachinePrecision] - 1), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
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 7 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.5% accurate, 1.0× speedup?

\[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
(FPCore (c x y)
  :precision binary64
  (* c (log (+ 1 (* (- (pow E x) 1) 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 + N[(N[(N[Power[E, x], $MachinePrecision] - 1), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right)

Alternative 1: 93.1% accurate, 0.9× speedup?

\[\begin{array}{l} \mathbf{if}\;{e}^{x} - 1 \leq \frac{-5764607523034235}{1152921504606846976}:\\ \;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(1 - e^{x}\right) \cdot y\right)\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(\left(\left(\frac{1}{6} \cdot x - \frac{-1}{2}\right) \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\ \end{array} \]
(FPCore (c x y)
  :precision binary64
  (if (<= (- (pow E x) 1) -5764607523034235/1152921504606846976)
  (* (30-log1z0 (* (- 1 (exp x)) y)) c)
  (* (30-log1z0 (* (* (- (* (- (* 1/6 x) -1/2) x) -1) x) (- y))) c)))
\begin{array}{l}
\mathbf{if}\;{e}^{x} - 1 \leq \frac{-5764607523034235}{1152921504606846976}:\\
\;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(1 - e^{x}\right) \cdot y\right)\right) \cdot c\\

\mathbf{else}:\\
\;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(\left(\left(\frac{1}{6} \cdot x - \frac{-1}{2}\right) \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (pow.f64 (E.f64) x) #s(literal 1 binary64)) < -0.0050000000000000001

    1. Initial program 41.5%

      \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \color{blue}{\log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \cdot c} \]
      3. lower-*.f6441.5%

        \[\leadsto \color{blue}{\log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \cdot c} \]
    3. Applied rewrites56.4%

      \[\leadsto \color{blue}{\mathsf{30\_log1z0}\left(\left(\left(1 - e^{x}\right) \cdot y\right)\right) \cdot c} \]

    if -0.0050000000000000001 < (-.f64 (pow.f64 (E.f64) x) #s(literal 1 binary64))

    1. Initial program 41.5%

      \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto c \cdot \log \left(1 + \color{blue}{\left({e}^{x} - 1\right)} \cdot y\right) \]
      2. flip3--N/A

        \[\leadsto c \cdot \log \left(1 + \color{blue}{\frac{{\left({e}^{x}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)}} \cdot y\right) \]
      3. lower-unsound-/.f64N/A

        \[\leadsto c \cdot \log \left(1 + \color{blue}{\frac{{\left({e}^{x}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)}} \cdot y\right) \]
      4. lower-unsound--.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{\color{blue}{{\left({e}^{x}\right)}^{3} - {1}^{3}}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      5. lower-unsound-pow.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{\color{blue}{{\left({e}^{x}\right)}^{3}} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      6. lift-pow.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\color{blue}{\left({e}^{x}\right)}}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      7. lift-E.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\left({\color{blue}{\mathsf{E}\left(\right)}}^{x}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      8. e-exp-1N/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\left({\color{blue}{\left(e^{1}\right)}}^{x}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      9. pow-expN/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\color{blue}{\left(e^{1 \cdot x}\right)}}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      10. *-lft-identityN/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\left(e^{\color{blue}{x}}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      11. lower-exp.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\color{blue}{\left(e^{x}\right)}}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      12. lower-unsound-pow.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\left(e^{x}\right)}^{3} - \color{blue}{{1}^{3}}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      13. lower-unsound-+.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\left(e^{x}\right)}^{3} - {1}^{3}}{\color{blue}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)}} \cdot y\right) \]
    3. Applied rewrites41.4%

      \[\leadsto c \cdot \log \left(1 + \color{blue}{\frac{{\left(e^{x}\right)}^{3} - {1}^{3}}{e^{x} \cdot e^{x} + \left(1 \cdot 1 + e^{x} \cdot 1\right)}} \cdot y\right) \]
    4. Taylor expanded in x around 0

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

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \color{blue}{\left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right)}\right) \cdot y\right) \]
      2. lower-+.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(1 + \color{blue}{x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)}\right)\right) \cdot y\right) \]
      3. lower-*.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(1 + x \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{6} \cdot x\right)}\right)\right) \cdot y\right) \]
      4. lower-+.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \color{blue}{\frac{1}{6} \cdot x}\right)\right)\right) \cdot y\right) \]
      5. lower-*.f6437.3%

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot \color{blue}{x}\right)\right)\right) \cdot y\right) \]
    6. Applied rewrites37.3%

      \[\leadsto c \cdot \log \left(1 + \color{blue}{\left(x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right)\right)} \cdot y\right) \]
    7. Applied rewrites64.5%

      \[\leadsto \color{blue}{\mathsf{30\_log1z0}\left(\left(\left(\left(\left(\frac{1}{6} \cdot x - \frac{-1}{2}\right) \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 83.5% accurate, 1.0× speedup?

\[\begin{array}{l} \mathbf{if}\;{e}^{x} - 1 \leq \frac{-5764607523034235}{1152921504606846976}:\\ \;\;\;\;\left(e^{x} - 1\right) \cdot \left(y \cdot c\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(\left(\left(\frac{1}{6} \cdot x - \frac{-1}{2}\right) \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\ \end{array} \]
(FPCore (c x y)
  :precision binary64
  (if (<= (- (pow E x) 1) -5764607523034235/1152921504606846976)
  (* (- (exp x) 1) (* y c))
  (* (30-log1z0 (* (* (- (* (- (* 1/6 x) -1/2) x) -1) x) (- y))) c)))
\begin{array}{l}
\mathbf{if}\;{e}^{x} - 1 \leq \frac{-5764607523034235}{1152921504606846976}:\\
\;\;\;\;\left(e^{x} - 1\right) \cdot \left(y \cdot c\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(\left(\left(\frac{1}{6} \cdot x - \frac{-1}{2}\right) \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (pow.f64 (E.f64) x) #s(literal 1 binary64)) < -0.0050000000000000001

    1. Initial program 41.5%

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

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

        \[\leadsto c \cdot \color{blue}{\left(y \cdot \left({\mathsf{E}\left(\right)}^{x} - 1\right)\right)} \]
      2. lower-*.f64N/A

        \[\leadsto c \cdot \left(y \cdot \color{blue}{\left({\mathsf{E}\left(\right)}^{x} - 1\right)}\right) \]
      3. lower--.f64N/A

        \[\leadsto c \cdot \left(y \cdot \left({\mathsf{E}\left(\right)}^{x} - \color{blue}{1}\right)\right) \]
      4. lower-pow.f64N/A

        \[\leadsto c \cdot \left(y \cdot \left({\mathsf{E}\left(\right)}^{x} - 1\right)\right) \]
      5. lower-E.f6446.1%

        \[\leadsto c \cdot \left(y \cdot \left({e}^{x} - 1\right)\right) \]
    4. Applied rewrites46.1%

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

        \[\leadsto c \cdot \color{blue}{\left(y \cdot \left({e}^{x} - 1\right)\right)} \]
      2. lift-*.f64N/A

        \[\leadsto c \cdot \left(y \cdot \color{blue}{\left({e}^{x} - 1\right)}\right) \]
      3. associate-*r*N/A

        \[\leadsto \left(c \cdot y\right) \cdot \color{blue}{\left({e}^{x} - 1\right)} \]
      4. *-commutativeN/A

        \[\leadsto \left({e}^{x} - 1\right) \cdot \color{blue}{\left(c \cdot y\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \left({e}^{x} - 1\right) \cdot \color{blue}{\left(c \cdot y\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \left({e}^{x} - 1\right) \cdot \left(c \cdot y\right) \]
      7. lift-E.f64N/A

        \[\leadsto \left({\mathsf{E}\left(\right)}^{x} - 1\right) \cdot \left(c \cdot y\right) \]
      8. e-exp-1N/A

        \[\leadsto \left({\left(e^{1}\right)}^{x} - 1\right) \cdot \left(c \cdot y\right) \]
      9. pow-expN/A

        \[\leadsto \left(e^{1 \cdot x} - 1\right) \cdot \left(c \cdot y\right) \]
      10. *-lft-identityN/A

        \[\leadsto \left(e^{x} - 1\right) \cdot \left(c \cdot y\right) \]
      11. lift-exp.f64N/A

        \[\leadsto \left(e^{x} - 1\right) \cdot \left(c \cdot y\right) \]
      12. *-commutativeN/A

        \[\leadsto \left(e^{x} - 1\right) \cdot \left(y \cdot \color{blue}{c}\right) \]
      13. lower-*.f6445.9%

        \[\leadsto \left(e^{x} - 1\right) \cdot \left(y \cdot \color{blue}{c}\right) \]
    6. Applied rewrites45.9%

      \[\leadsto \left(e^{x} - 1\right) \cdot \color{blue}{\left(y \cdot c\right)} \]

    if -0.0050000000000000001 < (-.f64 (pow.f64 (E.f64) x) #s(literal 1 binary64))

    1. Initial program 41.5%

      \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto c \cdot \log \left(1 + \color{blue}{\left({e}^{x} - 1\right)} \cdot y\right) \]
      2. flip3--N/A

        \[\leadsto c \cdot \log \left(1 + \color{blue}{\frac{{\left({e}^{x}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)}} \cdot y\right) \]
      3. lower-unsound-/.f64N/A

        \[\leadsto c \cdot \log \left(1 + \color{blue}{\frac{{\left({e}^{x}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)}} \cdot y\right) \]
      4. lower-unsound--.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{\color{blue}{{\left({e}^{x}\right)}^{3} - {1}^{3}}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      5. lower-unsound-pow.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{\color{blue}{{\left({e}^{x}\right)}^{3}} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      6. lift-pow.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\color{blue}{\left({e}^{x}\right)}}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      7. lift-E.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\left({\color{blue}{\mathsf{E}\left(\right)}}^{x}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      8. e-exp-1N/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\left({\color{blue}{\left(e^{1}\right)}}^{x}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      9. pow-expN/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\color{blue}{\left(e^{1 \cdot x}\right)}}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      10. *-lft-identityN/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\left(e^{\color{blue}{x}}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      11. lower-exp.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\color{blue}{\left(e^{x}\right)}}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      12. lower-unsound-pow.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\left(e^{x}\right)}^{3} - \color{blue}{{1}^{3}}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
      13. lower-unsound-+.f64N/A

        \[\leadsto c \cdot \log \left(1 + \frac{{\left(e^{x}\right)}^{3} - {1}^{3}}{\color{blue}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)}} \cdot y\right) \]
    3. Applied rewrites41.4%

      \[\leadsto c \cdot \log \left(1 + \color{blue}{\frac{{\left(e^{x}\right)}^{3} - {1}^{3}}{e^{x} \cdot e^{x} + \left(1 \cdot 1 + e^{x} \cdot 1\right)}} \cdot y\right) \]
    4. Taylor expanded in x around 0

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

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \color{blue}{\left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right)}\right) \cdot y\right) \]
      2. lower-+.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(1 + \color{blue}{x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)}\right)\right) \cdot y\right) \]
      3. lower-*.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(1 + x \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{6} \cdot x\right)}\right)\right) \cdot y\right) \]
      4. lower-+.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \color{blue}{\frac{1}{6} \cdot x}\right)\right)\right) \cdot y\right) \]
      5. lower-*.f6437.3%

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot \color{blue}{x}\right)\right)\right) \cdot y\right) \]
    6. Applied rewrites37.3%

      \[\leadsto c \cdot \log \left(1 + \color{blue}{\left(x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right)\right)} \cdot y\right) \]
    7. Applied rewrites64.5%

      \[\leadsto \color{blue}{\mathsf{30\_log1z0}\left(\left(\left(\left(\left(\frac{1}{6} \cdot x - \frac{-1}{2}\right) \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 3: 74.2% accurate, 3.5× speedup?

\[\begin{array}{l} \mathbf{if}\;y \leq \frac{-5767152963771295}{22181357552966518876627313473144669627491496603006532601363836644916970462445004984319795248833116624779129687691228574631793262592}:\\ \;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(1 \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\ \mathbf{elif}\;y \leq \frac{3916911482881289}{100433627766186892221372630771322662657637687111424552206336}:\\ \;\;\;\;\left(y \cdot c\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(\left(\left(\frac{1}{6} \cdot x - \frac{-1}{2}\right) \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\ \end{array} \]
(FPCore (c x y)
  :precision binary64
  (if (<=
     y
     -5767152963771295/22181357552966518876627313473144669627491496603006532601363836644916970462445004984319795248833116624779129687691228574631793262592)
  (* (30-log1z0 (* (* 1 x) (- y))) c)
  (if (<=
       y
       3916911482881289/100433627766186892221372630771322662657637687111424552206336)
    (* (* y c) x)
    (*
     (30-log1z0 (* (* (- (* (- (* 1/6 x) -1/2) x) -1) x) (- y)))
     c))))
\begin{array}{l}
\mathbf{if}\;y \leq \frac{-5767152963771295}{22181357552966518876627313473144669627491496603006532601363836644916970462445004984319795248833116624779129687691228574631793262592}:\\
\;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(1 \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\

\mathbf{elif}\;y \leq \frac{3916911482881289}{100433627766186892221372630771322662657637687111424552206336}:\\
\;\;\;\;\left(y \cdot c\right) \cdot x\\

\mathbf{else}:\\
\;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(\left(\left(\frac{1}{6} \cdot x - \frac{-1}{2}\right) \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.6e-115

    1. Initial program 41.5%

      \[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 + \color{blue}{\left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right)} \cdot y\right) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \color{blue}{\left(\log \mathsf{E}\left(\right) + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)}\right) \cdot y\right) \]
      2. lower-+.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log \mathsf{E}\left(\right) + \color{blue}{\frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)}\right)\right) \cdot y\right) \]
      3. lower-log.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log \mathsf{E}\left(\right) + \color{blue}{\frac{1}{2}} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)\right) \cdot y\right) \]
      4. lower-E.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)\right) \cdot y\right) \]
      5. lower-*.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \color{blue}{\left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)}\right)\right) \cdot y\right) \]
      6. lower-*.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot \color{blue}{{\log \mathsf{E}\left(\right)}^{2}}\right)\right)\right) \cdot y\right) \]
      7. lower-pow.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{\color{blue}{2}}\right)\right)\right) \cdot y\right) \]
      8. lower-log.f64N/A

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)\right) \cdot y\right) \]
      9. lower-E.f6436.8%

        \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right) \cdot y\right) \]
    4. Applied rewrites36.8%

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

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

        \[\leadsto \color{blue}{\log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right) \cdot y\right) \cdot c} \]
      3. lower-*.f6436.8%

        \[\leadsto \color{blue}{\log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right) \cdot y\right) \cdot c} \]
    6. Applied rewrites64.1%

      \[\leadsto \color{blue}{\mathsf{30\_log1z0}\left(\left(\left(\left(\frac{1}{2} \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c} \]
    7. Taylor expanded in x around 0

      \[\leadsto \mathsf{30\_log1z0}\left(\left(\left(1 \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c \]
    8. Step-by-step derivation
      1. Applied rewrites66.1%

        \[\leadsto \mathsf{30\_log1z0}\left(\left(\left(1 \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c \]

      if -2.6e-115 < y < 3.9000000000000002e-44

      1. Initial program 41.5%

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

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

          \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right)\right)} \]
        2. lower-*.f64N/A

          \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y \cdot \log \mathsf{E}\left(\right)\right)}\right) \]
        3. lower-*.f64N/A

          \[\leadsto c \cdot \left(x \cdot \left(y \cdot \color{blue}{\log \mathsf{E}\left(\right)}\right)\right) \]
        4. lower-log.f64N/A

          \[\leadsto c \cdot \left(x \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right)\right) \]
        5. lower-E.f6456.4%

          \[\leadsto c \cdot \left(x \cdot \left(y \cdot \log e\right)\right) \]
      4. Applied rewrites56.4%

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

          \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y \cdot \log e\right)\right)} \]
        2. lift-*.f64N/A

          \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y \cdot \log e\right)}\right) \]
        3. *-commutativeN/A

          \[\leadsto c \cdot \left(\left(y \cdot \log e\right) \cdot \color{blue}{x}\right) \]
        4. lift-*.f64N/A

          \[\leadsto c \cdot \left(\left(y \cdot \log e\right) \cdot x\right) \]
        5. lift-log.f64N/A

          \[\leadsto c \cdot \left(\left(y \cdot \log e\right) \cdot x\right) \]
        6. lift-E.f64N/A

          \[\leadsto c \cdot \left(\left(y \cdot \log \mathsf{E}\left(\right)\right) \cdot x\right) \]
        7. log-EN/A

          \[\leadsto c \cdot \left(\left(y \cdot 1\right) \cdot x\right) \]
        8. *-rgt-identityN/A

          \[\leadsto c \cdot \left(y \cdot x\right) \]
        9. associate-*r*N/A

          \[\leadsto \left(c \cdot y\right) \cdot \color{blue}{x} \]
        10. lower-*.f64N/A

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

          \[\leadsto \left(y \cdot c\right) \cdot x \]
        12. lower-*.f6461.9%

          \[\leadsto \left(y \cdot c\right) \cdot x \]
      6. Applied rewrites61.9%

        \[\leadsto \left(y \cdot c\right) \cdot \color{blue}{x} \]

      if 3.9000000000000002e-44 < y

      1. Initial program 41.5%

        \[c \cdot \log \left(1 + \left({e}^{x} - 1\right) \cdot y\right) \]
      2. Step-by-step derivation
        1. lift--.f64N/A

          \[\leadsto c \cdot \log \left(1 + \color{blue}{\left({e}^{x} - 1\right)} \cdot y\right) \]
        2. flip3--N/A

          \[\leadsto c \cdot \log \left(1 + \color{blue}{\frac{{\left({e}^{x}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)}} \cdot y\right) \]
        3. lower-unsound-/.f64N/A

          \[\leadsto c \cdot \log \left(1 + \color{blue}{\frac{{\left({e}^{x}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)}} \cdot y\right) \]
        4. lower-unsound--.f64N/A

          \[\leadsto c \cdot \log \left(1 + \frac{\color{blue}{{\left({e}^{x}\right)}^{3} - {1}^{3}}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
        5. lower-unsound-pow.f64N/A

          \[\leadsto c \cdot \log \left(1 + \frac{\color{blue}{{\left({e}^{x}\right)}^{3}} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
        6. lift-pow.f64N/A

          \[\leadsto c \cdot \log \left(1 + \frac{{\color{blue}{\left({e}^{x}\right)}}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
        7. lift-E.f64N/A

          \[\leadsto c \cdot \log \left(1 + \frac{{\left({\color{blue}{\mathsf{E}\left(\right)}}^{x}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
        8. e-exp-1N/A

          \[\leadsto c \cdot \log \left(1 + \frac{{\left({\color{blue}{\left(e^{1}\right)}}^{x}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
        9. pow-expN/A

          \[\leadsto c \cdot \log \left(1 + \frac{{\color{blue}{\left(e^{1 \cdot x}\right)}}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
        10. *-lft-identityN/A

          \[\leadsto c \cdot \log \left(1 + \frac{{\left(e^{\color{blue}{x}}\right)}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
        11. lower-exp.f64N/A

          \[\leadsto c \cdot \log \left(1 + \frac{{\color{blue}{\left(e^{x}\right)}}^{3} - {1}^{3}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
        12. lower-unsound-pow.f64N/A

          \[\leadsto c \cdot \log \left(1 + \frac{{\left(e^{x}\right)}^{3} - \color{blue}{{1}^{3}}}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)} \cdot y\right) \]
        13. lower-unsound-+.f64N/A

          \[\leadsto c \cdot \log \left(1 + \frac{{\left(e^{x}\right)}^{3} - {1}^{3}}{\color{blue}{{e}^{x} \cdot {e}^{x} + \left(1 \cdot 1 + {e}^{x} \cdot 1\right)}} \cdot y\right) \]
      3. Applied rewrites41.4%

        \[\leadsto c \cdot \log \left(1 + \color{blue}{\frac{{\left(e^{x}\right)}^{3} - {1}^{3}}{e^{x} \cdot e^{x} + \left(1 \cdot 1 + e^{x} \cdot 1\right)}} \cdot y\right) \]
      4. Taylor expanded in x around 0

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

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \color{blue}{\left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right)}\right) \cdot y\right) \]
        2. lower-+.f64N/A

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(1 + \color{blue}{x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)}\right)\right) \cdot y\right) \]
        3. lower-*.f64N/A

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(1 + x \cdot \color{blue}{\left(\frac{1}{2} + \frac{1}{6} \cdot x\right)}\right)\right) \cdot y\right) \]
        4. lower-+.f64N/A

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \color{blue}{\frac{1}{6} \cdot x}\right)\right)\right) \cdot y\right) \]
        5. lower-*.f6437.3%

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot \color{blue}{x}\right)\right)\right) \cdot y\right) \]
      6. Applied rewrites37.3%

        \[\leadsto c \cdot \log \left(1 + \color{blue}{\left(x \cdot \left(1 + x \cdot \left(\frac{1}{2} + \frac{1}{6} \cdot x\right)\right)\right)} \cdot y\right) \]
      7. Applied rewrites64.5%

        \[\leadsto \color{blue}{\mathsf{30\_log1z0}\left(\left(\left(\left(\left(\frac{1}{6} \cdot x - \frac{-1}{2}\right) \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c} \]
    9. Recombined 3 regimes into one program.
    10. Add Preprocessing

    Alternative 4: 74.2% accurate, 4.1× speedup?

    \[\begin{array}{l} \mathbf{if}\;y \leq \frac{-5767152963771295}{22181357552966518876627313473144669627491496603006532601363836644916970462445004984319795248833116624779129687691228574631793262592}:\\ \;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(1 \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\ \mathbf{elif}\;y \leq \frac{4097692012860425}{803469022129495137770981046170581301261101496891396417650688}:\\ \;\;\;\;\left(y \cdot c\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(\left(\frac{1}{2} \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\ \end{array} \]
    (FPCore (c x y)
      :precision binary64
      (if (<=
         y
         -5767152963771295/22181357552966518876627313473144669627491496603006532601363836644916970462445004984319795248833116624779129687691228574631793262592)
      (* (30-log1z0 (* (* 1 x) (- y))) c)
      (if (<=
           y
           4097692012860425/803469022129495137770981046170581301261101496891396417650688)
        (* (* y c) x)
        (* (30-log1z0 (* (* (- (* 1/2 x) -1) x) (- y))) c))))
    \begin{array}{l}
    \mathbf{if}\;y \leq \frac{-5767152963771295}{22181357552966518876627313473144669627491496603006532601363836644916970462445004984319795248833116624779129687691228574631793262592}:\\
    \;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(1 \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\
    
    \mathbf{elif}\;y \leq \frac{4097692012860425}{803469022129495137770981046170581301261101496891396417650688}:\\
    \;\;\;\;\left(y \cdot c\right) \cdot x\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{30\_log1z0}\left(\left(\left(\left(\frac{1}{2} \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if y < -2.6e-115

      1. Initial program 41.5%

        \[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 + \color{blue}{\left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right)} \cdot y\right) \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \color{blue}{\left(\log \mathsf{E}\left(\right) + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)}\right) \cdot y\right) \]
        2. lower-+.f64N/A

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log \mathsf{E}\left(\right) + \color{blue}{\frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)}\right)\right) \cdot y\right) \]
        3. lower-log.f64N/A

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log \mathsf{E}\left(\right) + \color{blue}{\frac{1}{2}} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)\right) \cdot y\right) \]
        4. lower-E.f64N/A

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)\right) \cdot y\right) \]
        5. lower-*.f64N/A

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \color{blue}{\left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)}\right)\right) \cdot y\right) \]
        6. lower-*.f64N/A

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot \color{blue}{{\log \mathsf{E}\left(\right)}^{2}}\right)\right)\right) \cdot y\right) \]
        7. lower-pow.f64N/A

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{\color{blue}{2}}\right)\right)\right) \cdot y\right) \]
        8. lower-log.f64N/A

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)\right) \cdot y\right) \]
        9. lower-E.f6436.8%

          \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right) \cdot y\right) \]
      4. Applied rewrites36.8%

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

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

          \[\leadsto \color{blue}{\log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right) \cdot y\right) \cdot c} \]
        3. lower-*.f6436.8%

          \[\leadsto \color{blue}{\log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right) \cdot y\right) \cdot c} \]
      6. Applied rewrites64.1%

        \[\leadsto \color{blue}{\mathsf{30\_log1z0}\left(\left(\left(\left(\frac{1}{2} \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c} \]
      7. Taylor expanded in x around 0

        \[\leadsto \mathsf{30\_log1z0}\left(\left(\left(1 \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c \]
      8. Step-by-step derivation
        1. Applied rewrites66.1%

          \[\leadsto \mathsf{30\_log1z0}\left(\left(\left(1 \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c \]

        if -2.6e-115 < y < 5.0999999999999997e-45

        1. Initial program 41.5%

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

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

            \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right)\right)} \]
          2. lower-*.f64N/A

            \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y \cdot \log \mathsf{E}\left(\right)\right)}\right) \]
          3. lower-*.f64N/A

            \[\leadsto c \cdot \left(x \cdot \left(y \cdot \color{blue}{\log \mathsf{E}\left(\right)}\right)\right) \]
          4. lower-log.f64N/A

            \[\leadsto c \cdot \left(x \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right)\right) \]
          5. lower-E.f6456.4%

            \[\leadsto c \cdot \left(x \cdot \left(y \cdot \log e\right)\right) \]
        4. Applied rewrites56.4%

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

            \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y \cdot \log e\right)\right)} \]
          2. lift-*.f64N/A

            \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y \cdot \log e\right)}\right) \]
          3. *-commutativeN/A

            \[\leadsto c \cdot \left(\left(y \cdot \log e\right) \cdot \color{blue}{x}\right) \]
          4. lift-*.f64N/A

            \[\leadsto c \cdot \left(\left(y \cdot \log e\right) \cdot x\right) \]
          5. lift-log.f64N/A

            \[\leadsto c \cdot \left(\left(y \cdot \log e\right) \cdot x\right) \]
          6. lift-E.f64N/A

            \[\leadsto c \cdot \left(\left(y \cdot \log \mathsf{E}\left(\right)\right) \cdot x\right) \]
          7. log-EN/A

            \[\leadsto c \cdot \left(\left(y \cdot 1\right) \cdot x\right) \]
          8. *-rgt-identityN/A

            \[\leadsto c \cdot \left(y \cdot x\right) \]
          9. associate-*r*N/A

            \[\leadsto \left(c \cdot y\right) \cdot \color{blue}{x} \]
          10. lower-*.f64N/A

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

            \[\leadsto \left(y \cdot c\right) \cdot x \]
          12. lower-*.f6461.9%

            \[\leadsto \left(y \cdot c\right) \cdot x \]
        6. Applied rewrites61.9%

          \[\leadsto \left(y \cdot c\right) \cdot \color{blue}{x} \]

        if 5.0999999999999997e-45 < y

        1. Initial program 41.5%

          \[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 + \color{blue}{\left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right)} \cdot y\right) \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \color{blue}{\left(\log \mathsf{E}\left(\right) + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)}\right) \cdot y\right) \]
          2. lower-+.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log \mathsf{E}\left(\right) + \color{blue}{\frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)}\right)\right) \cdot y\right) \]
          3. lower-log.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log \mathsf{E}\left(\right) + \color{blue}{\frac{1}{2}} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)\right) \cdot y\right) \]
          4. lower-E.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)\right) \cdot y\right) \]
          5. lower-*.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \color{blue}{\left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)}\right)\right) \cdot y\right) \]
          6. lower-*.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot \color{blue}{{\log \mathsf{E}\left(\right)}^{2}}\right)\right)\right) \cdot y\right) \]
          7. lower-pow.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{\color{blue}{2}}\right)\right)\right) \cdot y\right) \]
          8. lower-log.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)\right) \cdot y\right) \]
          9. lower-E.f6436.8%

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right) \cdot y\right) \]
        4. Applied rewrites36.8%

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

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

            \[\leadsto \color{blue}{\log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right) \cdot y\right) \cdot c} \]
          3. lower-*.f6436.8%

            \[\leadsto \color{blue}{\log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right) \cdot y\right) \cdot c} \]
        6. Applied rewrites64.1%

          \[\leadsto \color{blue}{\mathsf{30\_log1z0}\left(\left(\left(\left(\frac{1}{2} \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c} \]
      9. Recombined 3 regimes into one program.
      10. Add Preprocessing

      Alternative 5: 74.2% accurate, 4.8× speedup?

      \[\begin{array}{l} t_0 := \mathsf{30\_log1z0}\left(\left(\left(1 \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\ \mathbf{if}\;y \leq \frac{-5767152963771295}{22181357552966518876627313473144669627491496603006532601363836644916970462445004984319795248833116624779129687691228574631793262592}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 210000000000000000:\\ \;\;\;\;\left(y \cdot c\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
      (FPCore (c x y)
        :precision binary64
        (let* ((t_0 (* (30-log1z0 (* (* 1 x) (- y))) c)))
        (if (<=
             y
             -5767152963771295/22181357552966518876627313473144669627491496603006532601363836644916970462445004984319795248833116624779129687691228574631793262592)
          t_0
          (if (<= y 210000000000000000) (* (* y c) x) t_0))))
      \begin{array}{l}
      t_0 := \mathsf{30\_log1z0}\left(\left(\left(1 \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c\\
      \mathbf{if}\;y \leq \frac{-5767152963771295}{22181357552966518876627313473144669627491496603006532601363836644916970462445004984319795248833116624779129687691228574631793262592}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;y \leq 210000000000000000:\\
      \;\;\;\;\left(y \cdot c\right) \cdot x\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -2.6e-115 or 2.1e17 < y

        1. Initial program 41.5%

          \[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 + \color{blue}{\left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right)} \cdot y\right) \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \color{blue}{\left(\log \mathsf{E}\left(\right) + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)}\right) \cdot y\right) \]
          2. lower-+.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log \mathsf{E}\left(\right) + \color{blue}{\frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)}\right)\right) \cdot y\right) \]
          3. lower-log.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log \mathsf{E}\left(\right) + \color{blue}{\frac{1}{2}} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)\right) \cdot y\right) \]
          4. lower-E.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)\right) \cdot y\right) \]
          5. lower-*.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \color{blue}{\left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)}\right)\right) \cdot y\right) \]
          6. lower-*.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot \color{blue}{{\log \mathsf{E}\left(\right)}^{2}}\right)\right)\right) \cdot y\right) \]
          7. lower-pow.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{\color{blue}{2}}\right)\right)\right) \cdot y\right) \]
          8. lower-log.f64N/A

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log \mathsf{E}\left(\right)}^{2}\right)\right)\right) \cdot y\right) \]
          9. lower-E.f6436.8%

            \[\leadsto c \cdot \log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right) \cdot y\right) \]
        4. Applied rewrites36.8%

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

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

            \[\leadsto \color{blue}{\log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right) \cdot y\right) \cdot c} \]
          3. lower-*.f6436.8%

            \[\leadsto \color{blue}{\log \left(1 + \left(x \cdot \left(\log e + \frac{1}{2} \cdot \left(x \cdot {\log e}^{2}\right)\right)\right) \cdot y\right) \cdot c} \]
        6. Applied rewrites64.1%

          \[\leadsto \color{blue}{\mathsf{30\_log1z0}\left(\left(\left(\left(\frac{1}{2} \cdot x - -1\right) \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c} \]
        7. Taylor expanded in x around 0

          \[\leadsto \mathsf{30\_log1z0}\left(\left(\left(1 \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c \]
        8. Step-by-step derivation
          1. Applied rewrites66.1%

            \[\leadsto \mathsf{30\_log1z0}\left(\left(\left(1 \cdot x\right) \cdot \left(-y\right)\right)\right) \cdot c \]

          if -2.6e-115 < y < 2.1e17

          1. Initial program 41.5%

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

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

              \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right)\right)} \]
            2. lower-*.f64N/A

              \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y \cdot \log \mathsf{E}\left(\right)\right)}\right) \]
            3. lower-*.f64N/A

              \[\leadsto c \cdot \left(x \cdot \left(y \cdot \color{blue}{\log \mathsf{E}\left(\right)}\right)\right) \]
            4. lower-log.f64N/A

              \[\leadsto c \cdot \left(x \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right)\right) \]
            5. lower-E.f6456.4%

              \[\leadsto c \cdot \left(x \cdot \left(y \cdot \log e\right)\right) \]
          4. Applied rewrites56.4%

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

              \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y \cdot \log e\right)\right)} \]
            2. lift-*.f64N/A

              \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y \cdot \log e\right)}\right) \]
            3. *-commutativeN/A

              \[\leadsto c \cdot \left(\left(y \cdot \log e\right) \cdot \color{blue}{x}\right) \]
            4. lift-*.f64N/A

              \[\leadsto c \cdot \left(\left(y \cdot \log e\right) \cdot x\right) \]
            5. lift-log.f64N/A

              \[\leadsto c \cdot \left(\left(y \cdot \log e\right) \cdot x\right) \]
            6. lift-E.f64N/A

              \[\leadsto c \cdot \left(\left(y \cdot \log \mathsf{E}\left(\right)\right) \cdot x\right) \]
            7. log-EN/A

              \[\leadsto c \cdot \left(\left(y \cdot 1\right) \cdot x\right) \]
            8. *-rgt-identityN/A

              \[\leadsto c \cdot \left(y \cdot x\right) \]
            9. associate-*r*N/A

              \[\leadsto \left(c \cdot y\right) \cdot \color{blue}{x} \]
            10. lower-*.f64N/A

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

              \[\leadsto \left(y \cdot c\right) \cdot x \]
            12. lower-*.f6461.9%

              \[\leadsto \left(y \cdot c\right) \cdot x \]
          6. Applied rewrites61.9%

            \[\leadsto \left(y \cdot c\right) \cdot \color{blue}{x} \]
        9. Recombined 2 regimes into one program.
        10. Add Preprocessing

        Alternative 6: 64.5% accurate, 1.7× speedup?

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

          1. Initial program 41.5%

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

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

              \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right)\right)} \]
            2. lower-*.f64N/A

              \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y \cdot \log \mathsf{E}\left(\right)\right)}\right) \]
            3. lower-*.f64N/A

              \[\leadsto c \cdot \left(x \cdot \left(y \cdot \color{blue}{\log \mathsf{E}\left(\right)}\right)\right) \]
            4. lower-log.f64N/A

              \[\leadsto c \cdot \left(x \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right)\right) \]
            5. lower-E.f6456.4%

              \[\leadsto c \cdot \left(x \cdot \left(y \cdot \log e\right)\right) \]
          4. Applied rewrites56.4%

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

              \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y \cdot \log e\right)\right)} \]
            2. lift-*.f64N/A

              \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y \cdot \log e\right)}\right) \]
            3. *-commutativeN/A

              \[\leadsto c \cdot \left(\left(y \cdot \log e\right) \cdot \color{blue}{x}\right) \]
            4. lift-*.f64N/A

              \[\leadsto c \cdot \left(\left(y \cdot \log e\right) \cdot x\right) \]
            5. lift-log.f64N/A

              \[\leadsto c \cdot \left(\left(y \cdot \log e\right) \cdot x\right) \]
            6. lift-E.f64N/A

              \[\leadsto c \cdot \left(\left(y \cdot \log \mathsf{E}\left(\right)\right) \cdot x\right) \]
            7. log-EN/A

              \[\leadsto c \cdot \left(\left(y \cdot 1\right) \cdot x\right) \]
            8. *-rgt-identityN/A

              \[\leadsto c \cdot \left(y \cdot x\right) \]
            9. associate-*r*N/A

              \[\leadsto \left(c \cdot y\right) \cdot \color{blue}{x} \]
            10. lower-*.f64N/A

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

              \[\leadsto \left(y \cdot c\right) \cdot x \]
            12. lower-*.f6461.9%

              \[\leadsto \left(y \cdot c\right) \cdot x \]
          6. Applied rewrites61.9%

            \[\leadsto \left(y \cdot c\right) \cdot \color{blue}{x} \]

          if 1.2e-77 < c

          1. Initial program 41.5%

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

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

              \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right)\right)} \]
            2. lower-*.f64N/A

              \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y \cdot \log \mathsf{E}\left(\right)\right)}\right) \]
            3. lower-*.f64N/A

              \[\leadsto c \cdot \left(x \cdot \left(y \cdot \color{blue}{\log \mathsf{E}\left(\right)}\right)\right) \]
            4. lower-log.f64N/A

              \[\leadsto c \cdot \left(x \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right)\right) \]
            5. lower-E.f6456.4%

              \[\leadsto c \cdot \left(x \cdot \left(y \cdot \log e\right)\right) \]
          4. Applied rewrites56.4%

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

              \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y \cdot \log e\right)\right)} \]
            2. lift-*.f64N/A

              \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y \cdot \log e\right)}\right) \]
            3. associate-*r*N/A

              \[\leadsto \left(c \cdot x\right) \cdot \color{blue}{\left(y \cdot \log e\right)} \]
            4. lift-*.f64N/A

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

              \[\leadsto \left(c \cdot x\right) \cdot \left(y \cdot \log e\right) \]
            6. lift-E.f64N/A

              \[\leadsto \left(c \cdot x\right) \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right) \]
            7. log-EN/A

              \[\leadsto \left(c \cdot x\right) \cdot \left(y \cdot 1\right) \]
            8. *-rgt-identityN/A

              \[\leadsto \left(c \cdot x\right) \cdot y \]
            9. lower-*.f64N/A

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

              \[\leadsto \left(x \cdot c\right) \cdot y \]
            11. lower-*.f6459.6%

              \[\leadsto \left(x \cdot c\right) \cdot y \]
          6. Applied rewrites59.6%

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

        Alternative 7: 59.6% accurate, 19.8× speedup?

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

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

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

            \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right)\right)} \]
          2. lower-*.f64N/A

            \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y \cdot \log \mathsf{E}\left(\right)\right)}\right) \]
          3. lower-*.f64N/A

            \[\leadsto c \cdot \left(x \cdot \left(y \cdot \color{blue}{\log \mathsf{E}\left(\right)}\right)\right) \]
          4. lower-log.f64N/A

            \[\leadsto c \cdot \left(x \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right)\right) \]
          5. lower-E.f6456.4%

            \[\leadsto c \cdot \left(x \cdot \left(y \cdot \log e\right)\right) \]
        4. Applied rewrites56.4%

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

            \[\leadsto c \cdot \color{blue}{\left(x \cdot \left(y \cdot \log e\right)\right)} \]
          2. lift-*.f64N/A

            \[\leadsto c \cdot \left(x \cdot \color{blue}{\left(y \cdot \log e\right)}\right) \]
          3. associate-*r*N/A

            \[\leadsto \left(c \cdot x\right) \cdot \color{blue}{\left(y \cdot \log e\right)} \]
          4. lift-*.f64N/A

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

            \[\leadsto \left(c \cdot x\right) \cdot \left(y \cdot \log e\right) \]
          6. lift-E.f64N/A

            \[\leadsto \left(c \cdot x\right) \cdot \left(y \cdot \log \mathsf{E}\left(\right)\right) \]
          7. log-EN/A

            \[\leadsto \left(c \cdot x\right) \cdot \left(y \cdot 1\right) \]
          8. *-rgt-identityN/A

            \[\leadsto \left(c \cdot x\right) \cdot y \]
          9. lower-*.f64N/A

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

            \[\leadsto \left(x \cdot c\right) \cdot y \]
          11. lower-*.f6459.6%

            \[\leadsto \left(x \cdot c\right) \cdot y \]
        6. Applied rewrites59.6%

          \[\leadsto \left(x \cdot c\right) \cdot \color{blue}{y} \]
        7. Add Preprocessing

        Reproduce

        ?
        herbie shell --seed 2025271 -o generate:evaluate
        (FPCore (c x y)
          :name "Logarithmic Transform"
          :precision binary64
          (* c (log (+ 1 (* (- (pow E x) 1) y)))))