DSSSL Library Reference: Part of the Modular DocBook Stylesheet distribution
Prev |  | Next

# expt

## Name

expt -- Exponentiation

## Synopsis

    (expt b n)

## Description

Returns `b` raised to the `n`th power for integer `n` >= 0.

## Author

Norman Walsh, <ndw@nwalsh.com>

## Source Code

    (define (expt b n)
      ;; Exponentiation
      ;;
      (if (<= n 0)
          1
          (* b (expt b (- n 1)))))

Prev | Home | Next
component-list-child-number | Up | list-member-find