Commit eb7a1123 authored by Allard van Mossel's avatar Allard van Mossel Committed by Guolin Ke
Browse files

Fixed compilation error on OSX with GNU 6.2.0 (#59)

`error: 'exp' is not a member of 'std'
     rec[i] = std::exp(rec[i] - wmax);`
parent 3e285d7d
......@@ -9,6 +9,7 @@
#include <sstream>
#include <cstdint>
#include <algorithm>
#include <cmath>
namespace LightGBM {
......@@ -165,7 +166,7 @@ inline static const char* Atof(const char* p, float* out) {
*out = sign * (frac ? (value / scale) : (value * scale));
} else {
size_t cnt = 0;
while (*(p + cnt) != '\0' && *(p + cnt) != ' '
while (*(p + cnt) != '\0' && *(p + cnt) != ' '
&& *(p + cnt) != '\t' && *(p + cnt) != ','
&& *(p + cnt) != '\n' && *(p + cnt) != '\r'
&& *(p + cnt) != ':') {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment