mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Initial file
This commit is contained in:
parent
317a3cc984
commit
54470aa395
1 changed files with 162 additions and 0 deletions
162
docs/api/srfi/143.md
Normal file
162
docs/api/srfi/143.md
Normal file
|
@ -0,0 +1,162 @@
|
|||
---
|
||||
layout: main
|
||||
title: API
|
||||
---
|
||||
|
||||
# SRFI 143 - Fixnums
|
||||
|
||||
This SRFI describes arithmetic procedures applicable to a limited range of exact integers only. These procedures are semantically similar to the corresponding generic-arithmetic procedures, but allow more efficient implementations.
|
||||
|
||||
See the [SRFI document](http://srfi.schemers.org/srfi-143/srfi-143.html) for more information.
|
||||
|
||||
## Constants
|
||||
[`fx-width`](#fx-width)
|
||||
[`fx-greatest`](#fx-greatest)
|
||||
[`fx-least`](#fx-least)
|
||||
|
||||
## Predicates
|
||||
[`fixnum`](#fixnum?)
|
||||
[`fx=?`](#fx)
|
||||
[`fx<?`](#fx-1)
|
||||
[`fx>?`](#fx-2)
|
||||
[`fx<=?`](#fx-3)
|
||||
[`fx>=?`](#fx-4)
|
||||
[`fxzero?`](#fxzero)
|
||||
[`fxpositive?`](#fxpositive)
|
||||
[`fxnegative?`](#fxnegative)
|
||||
[`fxodd?`](#fxodd)
|
||||
[`fxeven?`](#fxeven)
|
||||
[`fxmax`](#fxmax)
|
||||
[`fxmin`](#fxmin)
|
||||
|
||||
## Basic arithmetic
|
||||
[`fx+`](#fx-5)
|
||||
[`fx-`](#fx-)
|
||||
[`fx*`](#fx-6)
|
||||
[`fxneg`](#fxneg)
|
||||
[`fxquotient`](#fxquotient)
|
||||
[`fxremainder`](#fxremainder)
|
||||
[`fxabs`](#fxabs)
|
||||
[`fxsquare`](#fxsquare)
|
||||
[`fxsqrt`](#fxsqrt)
|
||||
|
||||
# Bitwise operations
|
||||
[`fxnot`](#fxnot)
|
||||
[`fxand`](#fxand)
|
||||
[`fxior`](#fxior)
|
||||
[`fxxor`](#fxxor)
|
||||
[`fxarithmetic-shift`](#fxarithmetic-shift)
|
||||
[`fxarithmetic-shift-left`](#fxarithmetic-shift-left)
|
||||
[`fxarithmetic-shift-right`](#fxarithmetic-shift-right)
|
||||
[`fxbit-count`](#fxbit-count)
|
||||
[`fxlength`](#fxlength)
|
||||
[`fxif`](#fxif)
|
||||
[`fxbit-set?`](#fxbit-set)
|
||||
[`fxcopy-bit`](#fxcopy-bit)
|
||||
[`fxfirst-set-bit`](#fxfirst-set-bit)
|
||||
[`fxbit-field`](#fxbit-field)
|
||||
[`fxbit-field-rotate`](#fxbit-field-rotate)
|
||||
[`fxbit-field-reverse`](#fxbit-field-reverse)
|
||||
|
||||
# fx-width
|
||||
|
||||
(fx-width)
|
||||
|
||||
Bound to the value `w` that specifies the implementation-defined fixnum integer range.
|
||||
|
||||
# fx-greatest
|
||||
|
||||
(fx-greatest)
|
||||
|
||||
Returns value of the largest representable fixnum.
|
||||
|
||||
# fx-least
|
||||
|
||||
(fx-least)
|
||||
|
||||
Returns value of the smallest representable fixnum.
|
||||
|
||||
# fixnum?
|
||||
|
||||
(fixnum? obj)
|
||||
|
||||
Returns `#t` if `obj` is an exact integer within the fixnum range, and `#f` otherwise.
|
||||
|
||||
# fx=?
|
||||
|
||||
(fx=? i j)
|
||||
|
||||
Semantically equivalent to `=`.
|
||||
|
||||
# fx<?
|
||||
|
||||
# fx>?
|
||||
|
||||
# fx<=?
|
||||
|
||||
# fx>=?
|
||||
|
||||
# fxzero?
|
||||
|
||||
# fxpositive?
|
||||
|
||||
# fxnegative?
|
||||
|
||||
# fxodd?
|
||||
|
||||
# fxeven?
|
||||
|
||||
# fxmax
|
||||
|
||||
# fxmin
|
||||
|
||||
# fx+
|
||||
|
||||
# fx-
|
||||
|
||||
# fx*
|
||||
|
||||
# fxneg
|
||||
|
||||
# fxquotient
|
||||
|
||||
# fxremainder
|
||||
|
||||
# fxabs
|
||||
|
||||
# fxsquare
|
||||
|
||||
# fxsqrt
|
||||
|
||||
# fxnot
|
||||
|
||||
# fxand
|
||||
|
||||
# fxior
|
||||
|
||||
# fxxor
|
||||
|
||||
# fxarithmetic-shift
|
||||
|
||||
# fxarithmetic-shift-left
|
||||
|
||||
# fxarithmetic-shift-right
|
||||
|
||||
# fxbit-count
|
||||
|
||||
# fxlength
|
||||
|
||||
# fxif
|
||||
|
||||
# fxbit-set?
|
||||
|
||||
# fxcopy-bit
|
||||
|
||||
# fxfirst-set-bit
|
||||
|
||||
# fxbit-field
|
||||
|
||||
# fxbit-field-rotate
|
||||
|
||||
# fxbit-field-reverse
|
||||
|
Loading…
Add table
Reference in a new issue