Project

General

Profile

Actions

Bug #14194

open

C++11 requires integral sqrt()

Added by Rich Lowe about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
lib - userland libraries
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

C++11 adds support for sqrt() of integrals, returning double. We need it in the math library to have C++11 support.

https://en.cppreference.com/w/cpp/numeric/math/sqrt

Actions #1

Updated by Robert Mustacchi about 1 month ago

Is this just a manner of passing through the right things into the namespace given that we have the C99 sqrt, sqrtf, and sqrtl functions? Sorry, I misread entirely and missed the integral part. So I guess it's figuring out that bit.

Actions #2

Updated by Robert Mustacchi about 1 month ago

The following test program can reproduce this:

#include <cmath>
#include <iostream>

int
main(void)
{
    int a = 4;
    double d = sqrt(a);
    std::cout << "sqrt(a) = " << std::sqrt(a) << '\n';    
    return (0);
}
>
Actions

Also available in: Atom PDF