Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
[[tags: egg]] == fx-utils [[toc:]] == Documentation Additional fixnum routines. === Fixnum Computations ==== Usage <enscript language=scheme> (import fx-utils) </enscript> {{N N1 ... X1 ... Y1 ...}} below are {{fixnum}}. ==== fxrandom <procedure>(fxrandom [N]) -> fixnum</procedure> {{N}} {{fixnum}} limit. ==== fxlog2 <procedure>(fxlog2 N) -> fixnum</procedure> Returns index of highest bit set, so {{N}} is treated as unsigned. ==== fxpow2log2 <procedure>(fxpow2log2 N) -> fixnum</procedure> Returns {{fixnum}} {{2^N}}. ==== fxdistance <procedure>(fxdistance X1 Y1 X2 Y2) -> fixnum</procedure> Pythagorean distance between the points {{X1 Y1}} and {{X2 Y2}}. ==== fxdistance* <procedure>(fxdistance* X1 Y1 X2 Y2) -> fixnum</procedure> Pythagorean distance, inaccurate but useful for relative comparisons. ==== fxquo-and-mod <procedure>(fxquo-and-mod N D) -> (values fixnum fixnum)</procedure> Returns the quotient & remainder values for {{fixnum}}s {{D}} & {{D}}. ==== fxmax-and-min <procedure>(fxmax-and-min N ...) -> (values fixnum fixnum)</procedure> Returns the maximum & minimum values for the {{fixnum}}s {{N ...}}. === Fixnum Inlines ==== Usage <enscript language=scheme> (import fx-inlines) </enscript> {{N N1 ... X1 ... Y1 ...}} below are {{fixnum}}. ==== fxzero? <procedure>(fxzero? N) -> boolean</procedure> ==== fxpositive? <procedure>(fxpositive? N) -> boolean</procedure> ==== fxcardinal? <procedure>(fxcardinal? N) -> boolean</procedure> ==== fxnegative? <procedure>(fxnegative? N) -> boolean</procedure> ==== fxclosed-right? ==== fxclosedr? <procedure>(fxclosed-right? L N H) -> boolean</procedure> <procedure>(fxclosedr? L N H) -> boolean</procedure> Returns {{N}} in {{(L .. H]}}. {{N}}, {{L}} & {{H}} are {{fixnum}} low & high limits. ==== fxclosed? Returns {{N}} in {{[L .. H]}}. <procedure>(fxclosed? L N H) -> boolean</procedure> {{N}}, {{L}} & {{H}} are {{fixnum}} low & high limits. ==== fxclosed-left? ==== fxclosedl? Returns {{N}} in {{[L .. H)}}. <procedure>(fxclosed-left? L N H) -> boolean</procedure> <procedure>(fxclosedl? L N H) -> boolean</procedure> {{N}}, {{L}} & {{H}} are {{fixnum}} low & high limits. ==== fxadd1 <procedure>(fxadd1 N) -> fixnum</procedure> ==== fxsub1 <procedure>(fxsub1 N) -> fixnum</procedure> ==== fxabs <procedure>(fxabs N) -> fixnum</procedure> ==== fxsqr <procedure>(fxsqr N) -> fixnum</procedure> ==== fxcub <procedure>(fxcub N) -> fixnum</procedure> == Author [[/users/kon-lovett|Kon Lovett]] == Repository This egg is hosted on the CHICKEN Subversion repository: [[https://anonymous@code.call-cc.org/svn/chicken-eggs/release/5/fx-utils|https://anonymous@code.call-cc.org/svn/chicken-eggs/release/5/fx-utils]] If you want to check out the source code repository of this egg and you are not familiar with Subversion, see [[/egg-svn-checkout|this page]]. == Version history ; 4.0.0 : C5 port. == License This code is in the public domain.
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you add 3 to 21?