[Webkit-unassigned] [Bug 198106] New: pow functions returns 0 when exponent 1.0 or -1.0
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 22 04:37:14 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=198106
Bug ID: 198106
Summary: pow functions returns 0 when exponent 1.0 or -1.0
Product: WebKit
Version: Safari 12
Hardware: iPhone / iPad
OS: iOS 12
Status: NEW
Severity: Major
Priority: P2
Component: WebAssembly
Assignee: webkit-unassigned at lists.webkit.org
Reporter: philipp.gloor at gmail.com
This issue occured when we updated from Emscripten 1.38.6 to 1.38.30 (might appear before) but it only showed up on iOS 12.2/12.3/12.4 Beta. That's why I'm posting this here.
This code has unexpected behaviour when the exponent is 1.0 or -1.0, i.e. the function returns 0.
The code in C++ is:
// wasm_bug.cpp
#include <emscripten/bind.h>
#include <cstdio>
void pow_test(double exp) {
printf("pow(10, %f): %f\n", exp, pow(10.0, exp));
}
EMSCRIPTEN_BINDINGS() {
emscripten::function("pow_test", &pow_test);
}
compiled with: emcc --bind -O2 wasm_bug.cpp -o out.js
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190522/0c882521/attachment.html>
More information about the webkit-unassigned
mailing list