- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I discovered that when usingcblas_sscal ( ) to scale an array to zero values, sometimes ( not every time) an entry of the array after scaling becomes nan. The command simply reads:cblas_sscal(L, 0.0, A, 1); where L is the length of the array A.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
cblas_sscal() requires a float constant. If you have a correct prototype in scope (by the supplied include files), the compiler would take care of cast from the double value you supplied.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If input the data type is no problem, it needs a test code that could show thi problem. Feel free to post here if you have.
Thanks,
Chao
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If your input array A contains NaNs, then scaling a NaN value with 0.0 will still give a NaN.

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