glibc/tests/Regression/expf-gives-infinity-where-result-finite/tc1.cpp
Sergey Kolosov ab4bc8a24e Extend the test coverage
Move some of the RHEL QE testcases upstream to Fedora.
2022-05-31 09:29:27 +02:00

16 lines
422 B
C++

#include <iostream>
#include <iomanip>
#include <cmath>
int main()
{
float x = 88.722f;
float d_exp_x = float(std::exp(double(x)));
float f_exp_x = std::exp(x);
std::cout << std::setprecision(60);
std::cout << " x is " << x << std::endl;
std::cout << " expf(x) is " << f_exp_x << std::endl;
std::cout << " exp(x) is " << d_exp_x << std::endl;
return (( f_exp_x == d_exp_x ) ? 0 : 1);
}