Scheme Programmer's Manual
* - multiplication
(import (rnrs)) ;R6RS
(import (rnrs base)) ;R6RS
(import (scheme r5rs)) ;R7RS
(import (scheme base)) ;R7RS
(* number ...)
This procedure returns the product of its arguments.
- Chez Scheme
An exact zero is returned when any of the arguments to
is an exact zero.
The return value is exact if all arguments are exact. If any
argument is inexact then the result is inexact, unless one of the
arguments is an exact zero, in which case the return value can
optionally be an exact zero.
In non-R6RS implementations
; Examples apply to R6RS. An R5RS/R7RS implementation
; might e.g. not provide rational or complex numbers.
(* 6 7) => 42
(* 2 1/3) => 2/3
(* 2 1.57) => 3.14
(* 5 1+2i) => 5+10i
; Examples from R6RS
(* 4) => 4
(*) => 1
(* 5 +inf.0) => +inf.0
(* -5 +inf.0) => -inf.0
(* +inf.0 +inf.0) => +inf.0
(* +inf.0 -inf.0) => -inf.0
(* 0 +inf.0) => 0 or +nan.0
(* 0 +nan.0) => 0 or +nan.0
(* 1.0 0) => 0 or 0.0
R6RS is the only report on Scheme to require a full implementation of
the numeric tower.
In R7RS code, the feature identifiers
should be consulted before performing arithmetic that requires
one of these features.
In R7RS, (* 0 +inf.0) may return 0, or +nan.0, or report that inexact
numbers are not supported, or report that non-rational real numbers
are not supported, or fail silently or noisily in other
This procedure can raise exceptions with the following condition types:
- &assertion (R6RS)
An argument was outside its domain.
- &implementation-restriction (R6RS)
May be raised when applied to mixed non-rational real and non-real
complex arguments. Otherwise an unspecified number object is returned.
The assertions described above are errors.
Implementations may signal an error, extend the procedure's
domain of definition to include such arguments,
or fail catastrophically.
This page is part of the
It includes materials from the RnRS documents.
More information can be found at
Return to Main Contents
- IMPLEMENTATION NOTES
- RETURN VALUES
- SEE ALSO