#530: Failure of atan2 in jit core - ref TT #38
--------------------+-------------------------------------------------------
 Reporter:  mikehh  |        Type:  bug   
   Status:  new     |    Priority:  normal
Milestone:          |   Component:  none  
  Version:  trunk   |    Severity:  medium
 Keywords:          |        Lang:        
    Patch:          |    Platform:  linux 
--------------------+-------------------------------------------------------

Comment(by mikehh):

 I decided to have a look at this again:

 I reduced the test to just the first try (and repeated)
 {{{
 m...@mhk-desktop:~/parrot.t$ cat ../../mh/parrot.bu/tmp/test_atan_1.pasm
         set N0, 0.0
         set I0, 0
         set N1, 1.0
         set I1, 1
         set N2, 1.0
         set I2, 1
         set I3, -1
         set N3, -1.0

         print "N1 = "
         print N1
         print ", N2 = "
         print N2
         print ", N4 -> atan N4, N1, N2 = "
         atan N4, N1, N2
         print N4
         print "\n"

         print "do it again\n"
         print "N1 = "
         print N1
         print ", N2 = "
         print N2
         print ", N4 -> atan N4, N1, N2 = "
         atan N4, N1, N2
         print N4
         print "\n"

         end

 m...@mhk-desktop:~/parrot.t$ ./parrot -Rjit
 ../../mh/parrot.bu/tmp/test_atan_1.pasm
 N1 = 1, N2 = 1, N4 -> atan N4, N1, N2 = NaN
 do it again
 N1 = 1, N2 = 1, N4 -> atan N4, N1, N2 = 0.785398163397448

 }}}

 I then removed the unused registers and the Damned thing worked:
 {{{
 m...@mhk-desktop:~/parrot.t$ cat ../../mh/parrot.bu/tmp/test_atan_2.pasm
         set N1, 1.0
         set N2, 1.0

         print "N1 = "
         print N1
         print ", N2 = "
         print N2
         print ", N4 -> atan N4, N1, N2 = "
         atan N4, N1, N2
         print N4
         print "\n"

         print "do it again\n"
         print "N1 = "
         print N1
         print ", N2 = "
         print N2
         print ", N4 -> atan N4, N1, N2 = "
         atan N4, N1, N2
         print N4
         print "\n"

         end

 m...@mhk-desktop:~/parrot.t$ ./parrot -Rjit
 ../../mh/parrot.bu/tmp/test_atan_2.pasm
 N1 = 1, N2 = 1, N4 -> atan N4, N1, N2 = 0.785398163397448
 do it again
 N1 = 1, N2 = 1, N4 -> atan N4, N1, N2 = 0.785398163397448

 }}}


 This was at r38059

 Cheers, Michael (mikehh)

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/530#comment:4>
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