Changeset 35266 in project


Ignore:
Timestamp:
03/08/18 18:51:20 (7 months ago)
Author:
kon
Message:

rel 3.4.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/mathh

    r35123 r35266  
    3333==== bessel-yn
    3434
    35 <procedure>(bessel-j0 N) => real</procedure>
    36 <procedure>(bessel-j1 N) => real</procedure>
    37 <procedure>(bessel-jn O N) => real</procedure>
    38 <procedure>(bessel-y0 N) => real</procedure>
    39 <procedure>(bessel-y1 N) => real</procedure>
    40 <procedure>(bessel-yn O N) => real</procedure>
     35<procedure>(bessel-j0 N) -> real</procedure>
     36<procedure>(bessel-j1 N) -> real</procedure>
     37<procedure>(bessel-jn O N) -> real</procedure>
     38<procedure>(bessel-y0 N) -> real</procedure>
     39<procedure>(bessel-y1 N) -> real</procedure>
     40<procedure>(bessel-yn O N) -> real</procedure>
    4141
    4242==== cosh
     
    4747==== atanh
    4848
    49 <procedure>(cosh N) => real</procedure>
    50 <procedure>(sinh N) => real</procedure>
    51 <procedure>(tanh N) => real</procedure>
    52 <procedure>(acosh N) => real</procedure>
    53 <procedure>(asinh N) => real</procedure>
    54 <procedure>(atanh N) => real</procedure>
     49<procedure>(cosh N) -> real</procedure>
     50<procedure>(sinh N) -> real</procedure>
     51<procedure>(tanh N) -> real</procedure>
     52<procedure>(acosh N) -> real</procedure>
     53<procedure>(asinh N) -> real</procedure>
     54<procedure>(atanh N) -> real</procedure>
    5555
    5656==== hypot
    5757
    58 <procedure>(hypot N1 N2) => real</procedure>
     58<procedure>(hypot N1 N2) -> real</procedure>
    5959
    6060==== gamma
    6161==== lgamma
    6262
    63 <procedure>(gamma N) => real</procedure>
    64 <procedure>(lgamma N) => real</procedure>
     63<procedure>(gamma N) -> real</procedure>
     64<procedure>(lgamma N) -> real</procedure>
    6565
    6666==== erf
    6767==== erfc
    6868
    69 <procedure>(erf N) => real</procedure>
    70 <procedure>(erfc N) => real</procedure>
     69<procedure>(erf N) -> real</procedure>
     70<procedure>(erfc N) -> real</procedure>
    7171
    7272==== log10
     
    7474==== log1p
    7575
    76 <procedure>(log10 N) => real</procedure>
    77 <procedure>(log2 N) => real</procedure>
    78 <procedure>(log1p N) => real</procedure>
     76<procedure>(log10 N) -> real</procedure>
     77<procedure>(log2 N) -> real</procedure>
     78<procedure>(log1p N) -> real</procedure>
    7979
    8080==== log-with-base
    8181
    82 <procedure>(log-with-base N) => (procedure (real) real)</procedure>
     82<procedure>(log-with-base N) -> (procedure (real) real)</procedure>
    8383
    8484Returns a monadic function, the logarithm of base {{N}}.
     
    8787==== scalbn
    8888
    89 <procedure>(ldexp N P2) => real</procedure>
    90 <procedure>(scalbn N P2) => real</procedure>
     89<procedure>(ldexp N P2) -> real</procedure>
     90<procedure>(scalbn N P2) -> real</procedure>
    9191
    9292==== cbrt
    9393
    94 <procedure>(cbrt N) => real</procedure>
     94<procedure>(cbrt N) -> real</procedure>
    9595
    9696==== nextafter
    9797
    98 <procedure>(nextafter N M) => real</procedure>
     98<procedure>(nextafter N M) -> real</procedure>
    9999
    100100Returns the next {{N}} in the direction of {{M}}.
     
    102102==== fpmod
    103103
    104 <procedure>(fpmod N M) => real</procedure>
     104<procedure>(fpmod N M) -> real</procedure>
    105105
    106106Returns the modulus of {{N}} for {{M}}.
     
    108108==== modf
    109109
    110 <procedure>(modf N) => (values real integer)</procedure>
     110<procedure>(modf N) -> (values real integer)</procedure>
    111111
    112112Returns two values, the integral and fractional components of {{N}}.
     
    114114==== frexp
    115115
    116 <procedure>(frexp N) => (values real real)</procedure>
     116<procedure>(frexp N) -> (values real real)</procedure>
    117117
    118118Returns two values, the fraction and the exponent components of {{N}}.
     
    120120==== signbit
    121121
    122 <procedure>(signbit N) => boolean</procedure>
     122<procedure>(signbit N) -> boolean</procedure>
    123123
    124124Returns {{#t}} when negative, {{#f}} otherwise.
     
    126126==== copysign
    127127
    128 <procedure>(copysign N M) => real</procedure>
     128<procedure>(copysign N M) -> real</procedure>
    129129
    130130Returns {{N}} with same sign as {{M}}.
     
    132132==== fpclassify
    133133
    134 <procedure>(fpclassify N) => symbol</procedure>
     134<procedure>(fpclassify N) -> symbol</procedure>
    135135
    136136Returns a symbol denoting the floating-point kind of {{N}}.
     
    145145==== fpclass
    146146
    147 <procedure>(fpclass N) => symbol</procedure>
     147<procedure>(fpclass N) -> symbol</procedure>
    148148
    149149Returns a symbol denoting the floating-point kind of {{N}}.
     
    176176==== fprandom
    177177
    178 <procedure>(fprandom [N]) => flonum</procedure>
     178<procedure>(fprandom [N]) -> flonum</procedure>
    179179
    180180Returns {{flonum}} in {{[0 -1)}}.
     
    184184==== fpzero?
    185185
    186 <procedure>(fpzero? N) => boolean</procedure>
     186<procedure>(fpzero? N) -> boolean</procedure>
    187187
    188188==== fppositive?
    189189
    190 <procedure>(fppositive? N) => boolean</procedure>
     190<procedure>(fppositive? N) -> boolean</procedure>
     191
     192Note that {{-0.0}} is '''not''' positive, due to {{(fl<? -0.0 0.0)}}.
    191193
    192194==== fpcardinal?
    193195
    194 <procedure>(fpcardinal? N) => boolean</procedure>
     196<procedure>(fpcardinal? N) -> boolean</procedure>
     197
     198Note that {{-0.0}} is '''not''' cardinal, due to {{(fl<? -0.0 0.0)}}.
    195199
    196200==== fpnegative?
    197201
    198 <procedure>(fpnegative? N) => boolean</procedure>
     202<procedure>(fpnegative? N) -> boolean</procedure>
     203
     204Note that {{-0.0}} is '''not''' negative, due to {{(fl<? -0.0 0.0)}}.
    199205
    200206==== fpeven?
    201207
    202 <procedure>(fpeven? N) => boolean</procedure>
     208<procedure>(fpeven? N) -> boolean</procedure>
    203209
    204210==== fpodd?
    205211
    206 <procedure>(fpodd? N) => boolean</procedure>
     212<procedure>(fpodd? N) -> boolean</procedure>
    207213
    208214==== fpclosed-right?
    209215==== fpclosedr?
    210216
    211 <procedure>(fpclosed-right? L N H) => boolean</procedure>
    212 <procedure>(fpclosedr? L N H) => boolean</procedure>
     217<procedure>(fpclosed-right? L N H) -> boolean</procedure>
     218<procedure>(fpclosedr? L N H) -> boolean</procedure>
    213219
    214220Returns {{N}} in {{(L .. H]}}.
     
    220226Returns {{N}} in {{[L .. H]}}.
    221227
    222 <procedure>(fpclosed? L N H) => boolean</procedure>
     228<procedure>(fpclosed? L N H) -> boolean</procedure>
    223229
    224230{{N}}, {{L}} & {{H}} are {{flonum}} low & high limits.
     
    229235Returns {{N}} in {{[L .. H)}}.
    230236
    231 <procedure>(fpclosed-left? L N H) => boolean</procedure>
    232 <procedure>(fpclosedl? L N H) => boolean</procedure>
     237<procedure>(fpclosed-left? L N H) -> boolean</procedure>
     238<procedure>(fpclosedl? L N H) -> boolean</procedure>
    233239
    234240{{N}}, {{L}} & {{H}} are {{flonum}} low & high limits.
     
    236242==== fpadd1
    237243
    238 <procedure>(fpadd1 N) => flonum</procedure>
     244<procedure>(fpadd1 N) -> flonum</procedure>
    239245
    240246==== fpsub1
    241247
    242 <procedure>(fpsub1 N) => flonum</procedure>
     248<procedure>(fpsub1 N) -> flonum</procedure>
    243249
    244250==== fpmodulo
    245251
    246 <procedure>(fpmodulo N1 N2) => flonum</procedure>
     252<procedure>(fpmodulo N1 N2) -> flonum</procedure>
    247253
    248254==== fpquotient
    249255
    250 <procedure>(fpquotient N1 N2) => flonum</procedure>
     256<procedure>(fpquotient N1 N2) -> flonum</procedure>
    251257
    252258==== fpremainder
    253259
    254 <procedure>(fpremainder N1 N2) => flonum</procedure>
     260<procedure>(fpremainder N1 N2) -> flonum</procedure>
    255261
    256262==== fpfraction
    257263
    258 <procedure>(fpfraction N) => flonum</procedure>
     264<procedure>(fpfraction N) -> flonum</procedure>
    259265
    260266==== fptruncate/precision
    261267
    262 <procedure>(fptruncate/precision N [P 4]) => flonum</procedure>
     268<procedure>(fptruncate/precision N [P 4]) -> flonum</procedure>
    263269
    264270==== fpround/precision
    265271
    266 <procedure>(fpround/precision N [P 4]) => flonum</procedure>
     272<procedure>(fpround/precision N [P 4]) -> flonum</procedure>
    267273
    268274==== fpceiling/precision
    269275
    270 <procedure>(fpceiling/precision N [P 4]) => flonum</procedure>
     276<procedure>(fpceiling/precision N [P 4]) -> flonum</procedure>
    271277
    272278==== fpfloor/precision
    273279
    274 <procedure>(fpfloor/precision N [P 4]) => flonum</procedure>
     280<procedure>(fpfloor/precision N [P 4]) -> flonum</procedure>
    275281
    276282==== fp~=
    277283
    278 <procedure>(fp~= N1 N2 [EPS flonum-epsilon]) => flonum</procedure>
     284<procedure>(fp~= N1 N2 [EPS flonum-epsilon]) -> flonum</procedure>
    279285
    280286Compare floating-point values {{N1}} and {{N2}} within some {{flonum}} epsilon
     
    283289==== fp~<=
    284290
    285 <procedure>(fp~<= N) => boolean</procedure>
     291<procedure>(fp~<= N) -> boolean</procedure>
    286292
    287293==== fp~>=
    288294
    289 <procedure>(fp~>= N) => boolean</procedure>
     295<procedure>(fp~>= N) -> boolean</procedure>
    290296
    291297==== fpsqr
    292298
    293 <procedure>(fpsqr N) => flonum</procedure>
     299<procedure>(fpsqr N) -> flonum</procedure>
    294300
    295301==== fpcub
    296302
    297 <procedure>(fpcub N) => flonum</procedure>
     303<procedure>(fpcub N) -> flonum</procedure>
    298304
    299305==== fpdegree->radian
    300306
    301 <procedure>(fpdegree->radian N) => flonum</procedure>
     307<procedure>(fpdegree->radian N) -> flonum</procedure>
    302308
    303309==== fpradian->degree
    304310
    305 <procedure>(fpradian->degree N) => flonum</procedure>
     311<procedure>(fpradian->degree N) -> flonum</procedure>
    306312
    307313==== fpdistance
    308314
    309 <procedure>(fpdistance X1 Y1 X2 Y2) => flonum</procedure>
     315<procedure>(fpdistance X1 Y1 X2 Y2) -> flonum</procedure>
    310316
    311317Pythagorean distance between the points {{X1 Y1}} and {{X2 Y2}}.
     
    313319==== fpdistance*
    314320
    315 <procedure>(fpdistance* X1 Y1 X2 Y2) => flonum</procedure>
     321<procedure>(fpdistance* X1 Y1 X2 Y2) -> flonum</procedure>
    316322
    317323Pythagorean distance, inaccurate but useful for relative comparisons.
     
    319325==== fpmax-and-min
    320326
    321 <procedure>(fpmax-and-min N ...) => (values flonum flonum)</procedure>
     327<procedure>(fpmax-and-min N ...) -> (values flonum flonum)</procedure>
    322328
    323329Returns the maximum & minimum values for the {{flonum}}s {{N ...}}.
     
    325331==== fpprecision-factor
    326332
    327 <procedure>(fpprecision-factor P [BASE 10.0]) => flonum</procedure>
     333<procedure>(fpprecision-factor P [BASE 10.0]) -> flonum</procedure>
    328334
    329335Returns factor for {{P}} decimal digits precision.
     
    342348==== fxrandom
    343349
    344 <procedure>(fxrandom [N]) => fixnum</procedure>
     350<procedure>(fxrandom [N]) -> fixnum</procedure>
    345351
    346352{{N}} {{fixnum}} limit.
     
    348354==== fxzero?
    349355
    350 <procedure>(fxzero? N) => boolean</procedure>
     356<procedure>(fxzero? N) -> boolean</procedure>
    351357
    352358==== fxpositive?
    353359
    354 <procedure>(fxpositive? N) => boolean</procedure>
     360<procedure>(fxpositive? N) -> boolean</procedure>
    355361
    356362==== fxcardinal?
    357363
    358 <procedure>(fxcardinal? N) => boolean</procedure>
     364<procedure>(fxcardinal? N) -> boolean</procedure>
    359365
    360366==== fxnegative?
    361367
    362 <procedure>(fxnegative? N) => boolean</procedure>
     368<procedure>(fxnegative? N) -> boolean</procedure>
    363369
    364370==== fxclosed-right?
    365371==== fxclosedr?
    366372
    367 <procedure>(fxclosed-right? L N H) => boolean</procedure>
    368 <procedure>(fxclosedr? L N H) => boolean</procedure>
     373<procedure>(fxclosed-right? L N H) -> boolean</procedure>
     374<procedure>(fxclosedr? L N H) -> boolean</procedure>
    369375
    370376Returns {{N}} in {{(L .. H]}}.
     
    376382Returns {{N}} in {{[L .. H]}}.
    377383
    378 <procedure>(fxclosed? L N H) => boolean</procedure>
     384<procedure>(fxclosed? L N H) -> boolean</procedure>
    379385
    380386{{N}}, {{L}} & {{H}} are {{fixnum}} low & high limits.
     
    385391Returns {{N}} in {{[L .. H)}}.
    386392
    387 <procedure>(fxclosed-left? L N H) => boolean</procedure>
    388 <procedure>(fxclosedl? L N H) => boolean</procedure>
     393<procedure>(fxclosed-left? L N H) -> boolean</procedure>
     394<procedure>(fxclosedl? L N H) -> boolean</procedure>
    389395
    390396{{N}}, {{L}} & {{H}} are {{fixnum}} low & high limits.
     
    392398==== fxadd1
    393399
    394 <procedure>(fxadd1 N) => fixnum</procedure>
     400<procedure>(fxadd1 N) -> fixnum</procedure>
    395401
    396402==== fxsub1
    397403
    398 <procedure>(fxsub1 N) => fixnum</procedure>
     404<procedure>(fxsub1 N) -> fixnum</procedure>
    399405
    400406==== fxabs
    401407
    402 <procedure>(fxabs N) => fixnum</procedure>
     408<procedure>(fxabs N) -> fixnum</procedure>
    403409
    404410==== fxsqr
    405411
    406 <procedure>(fxsqr N) => fixnum</procedure>
     412<procedure>(fxsqr N) -> fixnum</procedure>
    407413
    408414==== fxcub
    409415
    410 <procedure>(fxcub N) => fixnum</procedure>
     416<procedure>(fxcub N) -> fixnum</procedure>
    411417
    412418==== fxlog2
    413419
    414 <procedure>(fxlog2 N) => fixnum</procedure>
     420<procedure>(fxlog2 N) -> fixnum</procedure>
    415421
    416422Returns index of highest bit set, so {{N}} is treated as unsigned.
     
    418424==== fxpow2log2
    419425
    420 <procedure>(fxpow2log2 N) => fixnum</procedure>
     426<procedure>(fxpow2log2 N) -> fixnum</procedure>
    421427
    422428Returns {{fixnum}} {{2^N}}.
     
    424430==== fxdistance
    425431
    426 <procedure>(fxdistance X1 Y1 X2 Y2) => fixnum</procedure>
     432<procedure>(fxdistance X1 Y1 X2 Y2) -> fixnum</procedure>
    427433
    428434Pythagorean distance between the points {{X1 Y1}} and {{X2 Y2}}.
     
    430436==== fxdistance*
    431437
    432 <procedure>(fxdistance* X1 Y1 X2 Y2) => fixnum</procedure>
     438<procedure>(fxdistance* X1 Y1 X2 Y2) -> fixnum</procedure>
    433439
    434440Pythagorean distance, inaccurate but useful for relative comparisons.
     
    436442==== fxmax-and-min
    437443
    438 <procedure>(fxmax-and-min N ...) => (values fixnum fixnum)</procedure>
     444<procedure>(fxmax-and-min N ...) -> (values fixnum fixnum)</procedure>
    439445
    440446Returns the maximum & minimum values for the {{fixnum}}s {{N ...}}.
     
    569575; yn : bessel-yn
    570576
     577
    571578== Bugs and Limitations
    572579
     
    578585number. Support for the full numeric tower is '''not''' provided.
    579586
    580 *  Windows does not provide library calls {{lgamma}}, {{gamma}}, {{acosh}},
    581 {{asinh}}, {{atanh}}, {{log2}}, {{log1p}}, {{erf}}, {{erfc}}, {{scalbn}},
    582 {{cbrt}} & {{signbit}}.
    583 
    584 Usable {{log2}}, {{log1p}}, {{erf}}, {{erfc}}, {{scalbn}} & {{signbit}} are
    585 supplied.
     587*  Windows library calls {{lgamma}}, {{gamma}}, {{acosh}}, {{asinh}},
     588{{atanh}}, {{cbrt}} & {{signbit}} are not provided.
    586589
    587590* FreeBSD does not provide the library call {{log2}}. A usable {{log2}} is
     
    601604== Version history
    602605
    603 ; 3.3.1 ; Rename internal C statics.
     606; 3.4.0 ; Fix {{fppositive?}}. {{fpnegative?}}, {{fpcardinal?}}, {{fpeven?}}, {{fpodd?}}.
     607; 3.3.3 ; Remove Windows {{log2}}, {{log1p}}, {{erf}}, {{erfc}}, {{scalbn}}.
     608; 3.3.2 ;
     609; 3.3.1 ;
    604610; 3.3.0 ; Add {{log-with-base}}. Deprecate {{make-log/base}}. Fix {{fprandom}} sign preservation.
    605611; 3.2.4 ; Add {{fxlog2}}, fix {{fxpow2log2}}.
Note: See TracChangeset for help on using the changeset viewer.