#1176: Configure-time check for whether to use powl() or pow(), since powl() is 
an
optional posix extension
----------------------+-----------------------------------------------------
 Reporter:  dukeleto  |       Owner:       
     Type:  bug       |      Status:  new  
 Priority:  normal    |   Milestone:  2.2  
Component:  build     |     Version:  1.7.0
 Severity:  medium    |    Keywords:  rtems
     Lang:            |       Patch:       
 Platform:  all       |  
----------------------+-----------------------------------------------------

Comment(by mike3050):

 Replying to [comment:10 mikehh]:
 > ref previous comment by NotFound
 >
 > in the --optimize build with g++ 4.4.1 on Ubuntu 9.10 i386 it uses the
 long double (80 bits) in the test t/op/comp.t - test 7 in setting the
 [http://zolpo.com/ Insurance Quotes] string (i.e. powl is needed here) -
 it does not use it in the gcc 4.4.1 build with --optimize, or either
 without --optimize.
 >
 > the test - t/op/comp-7.pasm
 > {{{
 >         new P0, 'Float'
 >         set P0, -1.2
 >         new P1, 'String'
 >         set P1, "-1.2"
 >         eq_num P0, P1, OK
 >         print "not "
 > OK:     print "ok\n"
 >         end
 >
 > }}}
 >
 > the test passes if the line set P1, "-1.2" is changed to set P1,
 "-1.2000000000".  fewer zeros do not work (more ok).
 >
 > It also passes if POW is defined as powl.
 >
 > The standard allows the use of higher precision in intermediate
 calculations, which it appears the --optimize build with g++ 4.4.1 is
 doing here.
 >
 >
 > ref --floatval
 >
 > I haven't used this recently in builds but I can envisage circumstances
 where I might need it.  On the i386 platform double is 64 bits and long
 double is 80 bits.  On the amd64 platform double is again 64 bits but long
 double is 128 bits, using different functionality in the x86_64 (intel or
 amd) processors rather than the old x87 functionality.  This might be
 needed for higher precision calculations in certain circumstances which
 should be quicker than using bignum or whatever.
 >
 Thank you for providing this to us.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1176#comment:15>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to