float — Logtalk 3.100.1

object

# `float`

Floating point numbers data type predicates.

Availability:
`logtalk_load(types(loader))`
Author: Paulo Moura
Version: 1:7:0
Date: 2025-02-25
Compilation flags:
`static, context_switching_calls`
Extends:
`public` number
Remarks:
(none)
Inherited public predicates:
(<)/2 (=:=)/2 (=<)/2 (=\=)/2 =~= / 2 (>)/2 (>=)/2 approximately_equal/2 approximately_equal/3 check/1 depth/2 essentially_equal/3 ground/1 new/1 numbervars/1 numbervars/3 occurs/2 singletons/2 subsumes/2 subterm/2 tolerance_equal/4 valid/1 variables/2 variant/2 varnumbers/2 varnumbers/3

## Public predicates

### `between/4`

Enumerates by backtracking a sequence of `N` equally spaced floats in the interval `[Lower,Upper]`. Assumes `N > 0` and `Lower =< Upper`; fails otherwise.

Compilation flags:
`static`
Template:
`between(Lower,Upper,N,Float)`
Mode and number of proofs:
`between(+float,+float,+positive_integer,-float)` - `zero_or_more`

### `sequence/4`

Generates a list with the sequence of `N` equally spaced floats in the interval `[Lower,Upper]`. Assumes `N > 0` and `Lower =< Upper`; fails otherwise.

Compilation flags:
`static`
Template:
`sequence(Lower,Upper,N,List)`
Mode and number of proofs:
`sequence(+float,+float,+positive_integer,-list(float))` - `zero_or_one`

### `sequence/5`

Generates a list with the sequence of `Step` spaced floats in the interval `[Lower,Upper]`. Also returns the length of the list. Assumes `Lower =< Upper`; fails otherwise.

Compilation flags:
`static`
Template:
`sequence(Lower,Upper,Step,List,Length)`
Mode and number of proofs:
`sequence(+float,+float,+float,-list(float),-positive_integer)` - `zero_or_one`

## Protected predicates

(no local declarations; see entity ancestors if any)

## Private predicates

(no local declarations; see entity ancestors if any)

## Operators

(none)