Showing results for

- Intel Community
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
- VML for safe evaluation of function

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
##

Dharma

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-20-2014
12:46 PM

9 Views

VML for safe evaluation of function

Hello,

I plan to use VML to evalaute the following functions:

y = x / (exp(x) - 1) and dy/dx = 1/(exp(x)-1) - x exp(x)/(exp(x)-1)^2

I have to make sure that, i do not get NAN or Infinity at x =0 or x << 1

Any suggestions on how to write the subroutine.

for y i use, expm1 and code works fine i.e, limit x->0 y = 1

using expm1 in dy/dx i am getting, infinity for small x say 1D-20.

Thanks

Reddy

1 Reply

Highlighted
##

Andrey_K_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-25-2014
10:03 PM

9 Views

Hello!

In case of rare small arguments we suggest using VML callback feature to catch INF or NaN results and rewrite them by any required values.

Currently we are thinkng about mathematical solution for this issue - still in process.

Thanks,

Andrey K.

For more complete information about compiler optimizations, see our Optimization Notice.