Skip to content

std::pow gcem::pow divergence #51

@andrewkcorcoran

Description

@andrewkcorcoran

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions