chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] [PATCH] more specialization rules for "expt" and "atan


From: Felix
Subject: [Chicken-hackers] [PATCH] more specialization rules for "expt" and "atan"
Date: Mon, 19 Sep 2011 13:12:02 +0200 (CEST)

Adds specialization rules for "expt" and "atan" with mixed
fixnum/float arguments. This patch is also available as
commit 0880ec1b in the "felix-pending" branch.
commit 0880ec1b83ed2fa5e472931597085b9daa9fcf14
Author: felix <address@hidden>
Date:   Mon Sep 19 12:46:06 2011 +0200

    Added specialization rules for "expt" and "atan" with mixed
    fixnum/float arguments.
    
    Squashed commit of the following:
    
    commit b70229f600e1097457451af40421a0101a2fa1c7
    Author: felix <address@hidden>
    Date:   Mon Sep 19 12:28:36 2011 +0200
    
        specialization for atan/2 in mixed fixnum/flonum case
    
    commit 25d48ad53502076d91dc09e35d14fbf0f0eb451b
    Author: felix <address@hidden>
    Date:   Mon Sep 19 09:19:32 2011 +0200
    
        specializations for expt in mixed flonum/fixnum case

diff --git a/types.db b/types.db
index a9f292d..de03b3c 100644
--- a/types.db
+++ b/types.db
@@ -429,7 +429,15 @@
 
 (expt (#(procedure #:clean #:enforce) expt (number number) number)
       ((float float) (float)
-       (##core#inline_allocate ("C_a_i_flonum_expt" 4) #(1) #(2))))
+       (##core#inline_allocate ("C_a_i_flonum_expt" 4) #(1) #(2)))
+      ((float fixnum) (float)
+       (##core#inline_allocate ("C_a_i_flonum_expt" 4) 
+                              #(1)
+                              (##core#inline_allocate ("C_a_i_fix_to_flo" 4) 
#(2))))
+      ((fixnum float) (float)
+       (##core#inline_allocate ("C_a_i_flonum_expt" 4)
+                              (##core#inline_allocate ("C_a_i_fix_to_flo" 4) 
#(1))
+                              #(2))))
 
 (sqrt (#(procedure #:clean #:enforce) sqrt (number) float)
       ((float) (##core#inline_allocate ("C_a_i_flonum_sqrt" 4) #(1))))
@@ -451,6 +459,14 @@
 
 (atan (#(procedure #:clean #:enforce) atan (number #!optional number) float)
       ((float) (##core#inline_allocate ("C_a_i_flonum_atan" 4) #(1)))
+      ((float fixnum)
+       (##core#inline_allocate ("C_a_i_flonum_atan2" 4) 
+                              #(1)
+                              (##core#inline_allocate ("C_a_i_fix_to_flo" 4) 
#(2))))
+      ((fixnum float)
+       (##core#inline_allocate ("C_a_i_flonum_atan2" 4) 
+                              (##core#inline_allocate ("C_a_i_fix_to_flo" 4) 
#(2))
+                              #(2)))
       ((float float) (##core#inline_allocate ("C_a_i_flonum_atan2" 4) #(1))))
 
 (number->string (#(procedure #:clean #:enforce) number->string (number 
#!optional number) string)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]