Skip to content

Modern Finance Ceiling

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Finance › Finance › Ceiling

Ceiling

Returns the amount rounded up to a whole unit, towards positive infinity.

Syntax

Ceiling( ) as Currency

Notes

  • Towards positive infinity, so -12.34 becomes -12, not -13. Truncate is the towards-zero one.
  • Floor is the other direction and Round( digits ) the one that takes a precision.
  • Immutable.

Examples

#import "std/money"
using money

dim as Currency c = CurrencyFromDouble( 12.34 )
print c.Ceiling( ).ToString( )                '' 13.0000

'' Towards POSITIVE infinity, which is not the same as away from zero
dim as Currency n = CurrencyFromDouble( -12.34 )
print n.Ceiling( ).ToString( )                '' -12.0000
print n.Floor( ).ToString( )                  '' -13.0000
print n.Truncate( ).ToString( )               '' -12.0000

Library: Finance
Category: Finance
Documented under: Members

Clone this wiki locally