Inform 7 Home Page / Documentation


§10.11. Mathematics

It is uncommon, but not absolutely unheard-of, to need to do detailed mathematical calculations in interactive fiction.

The Fibonacci Sequence demonstrates the calculation of a series of numbers; Sieve of Eratosthenes shows off how to calculate the prime numbers within a certain range.

Number Study demonstrates conditional relations between numbers.


arrow-up.png Start of Chapter 10: Physics: Substances, Ropes, Energy and Weight
arrow-left.png Back to §10.10. Magic (Breaking the Laws of Physics)
arrow-right.png Onward to Chapter 11: Out Of World Actions and Effects: §11.1. Start-Up Features

*ExampleNumber Study
The parity and joint magnitude relations explored.

*ExampleThe Fibonacci Sequence
The modest Leonardo Fibonacci of Pisa will be only too happy to construct his sequence on request, using an array.

*ExampleSieve of Eratosthenes
The haughty Eratosthenes of Cyrene will nevertheless consent to sieve prime numbers on request.