
Discussion BoardsOpen MenuDiscussion Boards Open Menu
 Welcome to the Community
 1 categories, 7 boards
 Live with HP Experts
 1 boards
 Converged Systems
 1 categories, 1 boards
 Desktops and Workstations
 1 categories, 12 boards
 Mobile
 7 boards
 Networking
 6 categories, 22 boards
 Operating Systems
 7 categories, 77 boards
 Printing and Digital Imaging
 1 categories, 18 boards

BlogsOpen MenuBlogs Open Menu

Community Knowledge BaseOpen MenuCommunity Knowledge Base Open Menu

EnglishOpen Menu
 Community Home
 >
 Operating Systems
 >
 HPUX
 >
 Languages and Scripting
 >
 Bessel function yn appears only singleprecision o...
 Subscribe
 Mark Topic as New
 Mark Topic as Read
 Float this Topic to the Top
 Bookmark
 Subscribe
 Printer Friendly Page
Bessel function yn appears only singleprecision on IA64
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
02222005 10:53 AM
yn( 2, 0.98726577450859631657 )
I get the following:
PA32 => 1.68339139976380280000
IA64 => 1.68339139819686622879
which differ starting at the 9th decimal. So is the IA64 call only running float precision and not double precision?
Thanks.

Bob
Re: Bessel function yn appears only singleprecision on IA64
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
02232005 06:48 AM
seems to indicate that those digits
are beyond PA's precision. IA64
supports the Intel 80bit floating type;
perhaps libm uses it internally. For
comparison, running your program on
IA32 (Win2k/Cygwin/gcc) gives
1.68339139976380280928, which has the same
# of digits as your IA64 result but which
is closer in value to your PA result.
Also, perhaps PHSS_32066 (Math Library
Cumulative Patch) will help.
Re: Bessel function yn appears only singleprecision on IA64
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
02232005 07:08 AM
Re: Bessel function yn appears only singleprecision on IA64
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
02232005 07:47 AM
Re: Bessel function yn appears only singleprecision on IA64
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
02232005 10:02 AM

Bob
Re: Bessel function yn appears only singleprecision on IA64
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
02232005 08:27 PM
#include
int main()
{
double d = 1.2345678910111213141516;
float f = 1.2345678910111213141516;
printf("%.20f\n", d);
printf("%.20f\n", f);
return(0);
}
When I run compile (using gcc) and run (PARISC 11.11) this, I get
1.23456789101112130000
1.23456788063049320000
Which indicates I'm getting around 16 digits of precision for double and around 8 for float.
Re: Bessel function yn appears only singleprecision on IA64
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
02242005 03:14 AM
BTW, I also get similar problems with the y1 function.

Bob
Re: Bessel function yn appears only singleprecision on IA64
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
02242005 08:53 AM
IA64 shows that they both get the same
internal bit patterns for 0.987265... (so
it's not a compiler parsing or type
conversion problem), and the value
generated by yn() is indeed a different
bit pattern (so it's not a printf()
problem). Curious.
Re: Bessel function yn appears only singleprecision on IA64
 Mark as New
 Bookmark
 Subscribe
 Subscribe to RSS Feed
 Highlight
 Email to a Friend
 Report Inappropriate Content
12282011 04:10 AM
>which differ starting at the 9th decimal. So is the IA64 call only running float precision and not double precision?
If it was float, it would differ in the 7th decimal place.
It looks like you found a known problem:
PHSS_33276: s700_800 11.23 Math Library Cumulative Patch
JAGaf55860: Bessel functions have precision problems
The corrected values:
1.68339139976380275131 long double
1.68339139976380280928 double
1.68339145183563232422 float
>IA64 supports the Intel 80bit floating type; perhaps libm uses it internally.
Naturally, the Integrity Math Lib was rewritten to be faster and more accurate.
>perhaps PHSS_32066 (Math Library Cumulative Patch) will help.
Unfortunately not until PHSS_33276.
Most math function are accurate to .5 ULP. But Bessel and a few other functions don't meet this: