Quantcast
Channel: Intel® Software - Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 3005

VML Rounding Functions v?Modf v?Round questions

$
0
0

MKL reference Manual says
   'Halfway values, such as 0.5, -1.5, are rounded off towards even values. An inexact result exception is raised for each changed value.' for v?Modf (VML) function.

I tried it (input=x) and get results(y and z) as follows:
  vdModf( 4, x, y, z ): // No vmlSetMode( mode ) is called before.
      x     y     z
   1.5  1.0  0.5
   0.5  0.0  0.5
  -0.5  0.0 -0.5
  -1.5 -1.0 -0.5

Seems 'Halfway values' are rounded off towards zero ?
And what the 'each changed value' mean?

The manual also says  'f(0.5) = 1, for rounding modes set to plus infinity.' etc for vmdRound( n, a, y, mode ).
Which mode value listed in 'Values of the mode Parameter' I can set for the rounding ?


Viewing all articles
Browse latest Browse all 3005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>