[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #51630] BIST test for log2 fails on Windows
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #51630] BIST test for log2 fails on Windows |
Date: |
Mon, 31 Jul 2017 15:08:07 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 |
Follow-up Comment #2, bug #51630 (project octave):
I really hate coding for Windows!
Odds are that this *is* related to the switch to using frexp from the std
library.
According to the reference you provide, while the exponent is implementation
dependent, the argument is not and should be Inf. This points to a potential
bug upstream in the C library on the platform you are using. Where is the C
library coming from? Do we ship that with MXE, is it coming from MingGW, or
is it provided by Microsoft?
The following C++ program can be compiled stand-alone to see what the C
library returns.
#include <cmath>
#include <iostream>
#include <limits>
int main ()
{
double x, y;
int n;
//x = 16.4;
x = std::numeric_limits<double>::infinity ();
y = std::frexp (x, &n);
std::cout << "frexp (" << x << ") = " << "(" << y << ", " << n << ")\n";
}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?51630>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/