Changeset 07142f3 in sasmodels for sasmodels/models/lib


Ignore:
Timestamp:
Mar 17, 2016 7:10:38 AM (8 years ago)
Author:
wojciech
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
38daeec
Parents:
16afd49
Message:

ifdef corrected in bessel functions

Location:
sasmodels/models/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/lib/j0d.c

    r0a9d219 r07142f3  
    9999 
    100100//Cephes single precission 
    101 if ( FLOAT_SIZE>4 ) { 
     101#if FLOAT_SIZE>4 
    102102    double w, z, p, q, xn; 
    103103 
     
    222222 
    223223    return( p * SQ2OPI / sqrt(x) ); 
    224 } 
    225224//Cephes single precission 
    226 else { 
     225#else 
    227226    double xx, w, z, p, q, xn; 
    228227 
     
    299298    p = p * cosf(xn + xx); 
    300299    return(p); 
     300#endif 
     301 
    301302} 
    302 } 
    303  
    304  
     303 
     304 
  • sasmodels/models/lib/j1d.c

    r0a9d219 r07142f3  
    8181 
    8282//Cephes double pression function 
    83 if (FLOAT_SIZE>4) { 
     83#if FLOAT_SIZE>4 
    8484 
    8585    double w, z, p, q, xn; 
     
    183183    return( p * SQ2OPI / sqrt(x) ); 
    184184 
    185 } 
     185 
    186186//Single precission version of cephes 
    187 else { 
     187#else 
    188188    double xx, w, z, p, q, xn; 
    189189 
     
    245245 
    246246    return(p); 
     247#endif 
    247248} 
    248 } 
    249  
     249 
  • sasmodels/models/lib/jnd.c

    r0a9d219 r07142f3  
    8282            return( 0.0 ); 
    8383 
    84     if (FLOAT_SIZE > 4) 
     84    #if FLOAT_SIZE > 4 
    8585        k = 53; 
    86     else 
     86    #else 
    8787        k = 24; 
     88    #endif 
    8889 
    8990    pk = 2 * (n + k); 
     
    100101    pk = 1.0; 
    101102 
    102     if (FLOAT_SIZE > 4) { 
     103    #if FLOAT_SIZE > 4 
    103104        ans = x/ans; 
    104105        pkm1 = 1.0/ans; 
     
    120121 
    121122            return( sign * ans ); 
    122         } 
    123     else { 
     123 
     124    #else 
    124125        xinv = 1.0/x; 
    125126        pkm1 = ans * xinv; 
     
    147148                ans = sign * j0(x)/pkm1; 
    148149        return( ans ); 
    149     } 
     150    #endif 
    150151} 
    151152 
Note: See TracChangeset for help on using the changeset viewer.