Skip to content

expm1(x) is not folded at the compilation time when x is constant #123761

Open
@k-arrows

Description

@k-arrows

Consider the following C++ example. The function exp(x) is folded, but expm1(x) is not. I still don't have a good idea of how to list these kinds of issues exhaustively.
https://godbolt.org/z/ravEhEEqh

#include <cmath>

double f1() {
  return std::exp(0.)-1.;
}

double f2() {
  return std::expm1(0.);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions