> Duplicating the discussion from the V8 user group: > > https://groups.google.com/forum/#!topic/v8-users/qRorKvYNq24 > > On Fri, Dec 4, 2015 at 3:26 PM, Wilfried Gösgens <doth...@gmail.com> > wrote: > > Hi everyone > > Using the regular d8 shell: > > > > # ./d8 > > V8 version 4.8.271.5 > > d8> Math.pow(0, 0.1); > > 0 > > d8> > > > > gives proper results. > > But using d8 in valgrind gives: > > > > /usr/bin/valgrind.bin --log-file=/tmp/valgrindlog.%p > > --show-reachable=yes --leak-check=full ./d8 > > Math.pow(0, 0.1); > > V8 version 4.8.271.5 > > d8> NaN > > d8>
> Does valgrind replace mathematical functions? No, but valgrind forces round-to-nearest 64-bit result for every floating-point operation: no extra precision nor exponent range for 80-bit extended opcodes, and no directed rounding (truncate, ceil, floor). This is well documented. Thus if the user code relies on 80-bit mode or rounding other than round-to-nearest, then "bad results" may ensue. The bug is in V8 not diagnosing the actual environment before proceeding. Never run a laboratory experiment for quantitative results without first calibrating the instruments. ------------------------------------------------------------------------------ Go from Idea to Many App Stores Faster with Intel(R) XDK Give your users amazing mobile app experiences with Intel(R) XDK. Use one codebase in this all-in-one HTML5 development environment. Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs. http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users