|(require racket/flonum)||package: base|
The racket/flonum library provides operations like fl+ that consume and produce only flonums. Flonum-specific operations can provide better performance when used consistently, and they are as safe as generic operations like +.
A flvector is like a vector, but it holds only inexact real numbers. This representation can be more compact, and unsafe operations on flvectors (see racket/unsafe/ops) can execute more efficiently than unsafe operations on vectors of inexact reals.
An f64vector as provided by ffi/vector stores the same kinds of values as a flvector, but with extra indirections that make f64vectors more convenient for working with foreign libraries. The lack of indirections makes unsafe flvector access more efficient.
vec : flvector? pos : exact-nonnegative-integer? x : flonum?
vec : flvector? start : exact-nonnegative-integer? = 0 end : exact-nonnegative-integer? = (vector-length v)
vec : flvector? start : exact-nonnegative-integer? = 0 stop : (or/c exact-integer? #f) = #f step : (and/c exact-integer? (not/c zero?)) = 1
The optional arguments start, stop, and step are as in in-vector.
(for/flvector maybe-length (for-clause ...) body ...)
(for*/flvector maybe-length (for-clause ...) body ...)
| #:length length-expr | #:length length-expr #:fill fill-expr
length-expr : exact-nonnegative-integer?
fill-expr : flonum?
size : exact-nonnegative-integer? x : flonum? = 0.0