Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std::pow gcem::pow divergence #51

Open
andrewkcorcoran opened this issue Nov 26, 2024 · 0 comments
Open

std::pow gcem::pow divergence #51

andrewkcorcoran opened this issue Nov 26, 2024 · 0 comments

Comments

@andrewkcorcoran
Copy link

andrewkcorcoran commented Nov 26, 2024

Hi,

See below an example of difference in behaviour between std::pow and gcem::pow, this behaviour seems to continue for all pow(10, exponents <= -306

#include <gcem.hpp>
#include <cmath>
#include "fmt/format.h"

int main()
{
    fmt::print("{}\n{}\n", gcem::pow(10.0, -306), std::pow(10.0, -306));
}
Program stdout
9.999999999999994e-307
1e-306

https://godbolt.org/z/PsK4E1eMT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant