Softanza
StartFrançais
Softanza
The library documents itself · Numeric & optimization

stzNumber

337 own methods · 170 forms written with extensions, listed under their method

also named: stzDecimalNumber

the source: base/number/stzNumber.ring(opens in a new tab) · All classes · The area reference: Numeric & optimization

Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean

Examples: 29 come from the library's tests; 200 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzNumber(12). 108 methods have none yet. Examples run on 2026-10-03 20:34 inside the library at commit 0e72e2e2c.

Method
Explanation, as the source carries it
init
Build the number from a number, a number-in-string, or another stzNumber.no extension
The number as it is held: a STRING (use NumericValue for the number). 2 examples run
o1 = new stzNumber(12500)
? o1 / 500
? o1.Content()
#--> 25
#--> 12500
library testQCSXTZZZIBWU
InitialContent
The value the number was created with.no extension
Copy
A new stzNumber with the same content.no extension
ReturnType
Whether values are returned as :Number or :String.
composed example
o1 = new stzNumber(12)
? o1.ReturnType()
#--> number
composed from the signature, run for this page
no extension
SetReturnType
Choose whether values are returned as :Number or :String.no extension
SetReturnTypeTo
Choose whether values come back as :Number or :String.no extension
SetReturnTypeAs
Choose whether values come back as :Number or :String.no extension
ReturnNumber
Make values come back as :Number (the return-type dial).no extension
NumberWithSign
The number as a string with its explicit sign (+ or -).
composed example
o1 = new stzNumber(12)
? o1.NumberWithSign()
#--> +12
composed from the signature, run for this page
no extension
The number as a Haro number. 4 examples runalso written: Value · Number · NumbericValue
o1 = new stzNumber("5")
? ring_type(o1.Number())
#--> NUMBER
library testQCSXTZZZIBWU
The number as a string (rendered with its round). 2 examples runalso written: ToCode · ToString · Stringified · DeepStringified
StzDecimals(3) # Change the program round and memorises it
o1 = new stzNumber([ 981.123456701, :round = 5 ])
? o1.Round()
? o1.NumericValue() # Sensitive to current on the program round, 3.
? o1.StringValue() # Rounded to the what is specified at the object level, 5.
#--> 5
#--> 981.123
#--> 981.12346
library testQCSXTZZZIBWU
IsChar
checking if the number is a charalso written: IsAChar
composed example
o1 = new stzNumber(12)
? o1.IsChar()
#--> 1
composed from the signature, run for this page
no extension
Update
Replace the content with the given number (mutating; the single update point).
composed example
o1 = new stzNumber(12)
o1.Update(3)
? o1.Value()
#--> 3
composed from the signature, run for this page
QCSXTZZZIBWU
UpdateWith
Same as Update: replace the content with the given number (mutating).
composed example
o1 = new stzNumber(12)
o1.UpdateWith(3)
? o1.Value()
#--> 3
composed from the signature, run for this page
QCSXTZZZIBWU
UpdateBy
Same as Update: replace the content with the given number (mutating).
composed example
o1 = new stzNumber(12)
o1.UpdateBy(3)
? o1.Value()
#--> 3
composed from the signature, run for this page
QCSXTZZZIBWU
UpdateUsing
Same as Update: replace the content with the given number (mutating).
composed example
o1 = new stzNumber(12)
o1.UpdateUsing(3)
? o1.Value()
#--> 3
composed from the signature, run for this page
QCSXTZZZIBWU
Updated
The value the number would be updated to (passive twin of Update).also written: UpdatedBy · UpdatedWith · UpdatedUsing
composed example
o1 = new stzNumber(12)
? o1.Updated(3)
#--> 3
composed from the signature, run for this page
no extension
Unicode
getting the unicode (code point) of the numberno extension
Unicodes
Chars(), not ToChars(): StringValueQ() hands back an stzString, and ToChars() lives on stzStringUnicodeList -- so this raised R14 for every caller until 2026-08-02.
composed example
o1 = new stzNumber(12)
? @@( o1.Unicodes() )
#--> [ 49, 50 ]
composed from the signature, run for this page
no extension
IsADigit
checking if the number is digitalso written: IsDigit
composed example
o1 = new stzNumber(12)
? o1.IsDigit()
#--> 0
composed from the signature, run for this page · written IsADigit() in the library today: the host language already holds IsDigit(), and Haro removes the detour
no extension
(no comment in the source: the name reads as a sentence) is multiple of 1 examples runalso written: IsAMultipleOf · IsTheMultipleOfin the section checking if the number is multiple of a given number
composed example
o1 = new stzNumber(12)
? o1.IsMultipleOf(2)
#--> 1
composed from the signature, run for this page
no extension
IsDoubleOf
(no comment in the source: the name reads as a sentence) is double ofalso written: IsADoubleOf · IsTheDoubleOfin the section checking if the number is multiple of a given number
composed example
o1 = new stzNumber(12)
? o1.IsDoubleOf(2)
#--> 0
composed from the signature, run for this page
no extension
IsTripleOf
(no comment in the source: the name reads as a sentence) is triple ofalso written: IsAtripleOf · IsTheTripleOfin the section checking if the number is multiple of a given number
composed example
o1 = new stzNumber(12)
? o1.IsTripleOf(2)
#--> 0
composed from the signature, run for this page
no extension
IsQuadrupleOf
(no comment in the source: the name reads as a sentence) is quadruple ofalso written: IsAQuadrupleOf · IsTheQuadrupleOfin the section checking if the number is multiple of a given number
composed example
o1 = new stzNumber(12)
? o1.IsQuadrupleOf(2)
#--> 0
composed from the signature, run for this page
no extension
IsQuintupleOf
(no comment in the source: the name reads as a sentence) is quintuple ofalso written: IsAQuintupleOf · IsTheQuintupleOfin the section checking if the number is multiple of a given number
composed example
o1 = new stzNumber(12)
? o1.IsQuintupleOf(2)
#--> 0
composed from the signature, run for this page
no extension
IsSextupleOf
(no comment in the source: the name reads as a sentence) is sextuple ofalso written: IsASextupleOf · IsTheSextupleOfin the section checking if the number is multiple of a given number
composed example
o1 = new stzNumber(12)
? o1.IsSextupleOf(2)
#--> 1
composed from the signature, run for this page
no extension
IsOctupleOf
(no comment in the source: the name reads as a sentence) is octuple ofalso written: IsAnOctupleOf · IsTheOctupleOfin the section checking if the number is multiple of a given number
composed example
o1 = new stzNumber(12)
? o1.IsOctupleOf(2)
#--> 0
composed from the signature, run for this page
no extension
IsNonupleOf
(no comment in the source: the name reads as a sentence) is nonuple ofalso written: IsANonupleOf · IsTheNonupleOfin the section checking if the number is multiple of a given number
composed example
o1 = new stzNumber(12)
? o1.IsNonupleOf(2)
#--> 0
composed from the signature, run for this page
no extension
IsDecupleOf
(no comment in the source: the name reads as a sentence) is decuple ofalso written: IsADecupleOf · IsTheDecupleOfin the section checking if the number is multiple of a given number
composed example
o1 = new stzNumber(12)
? o1.IsDecupleOf(2)
#--> 0
composed from the signature, run for this page
no extension
IsBoundedBy
TRUE if the number lies between n1 and n2.
composed example
o1 = new stzNumber(12)
? o1.IsBoundedBy(2, 5)
#--> 0
composed from the signature, run for this page
no extension
IsInteger
TRUE if the number has no fractional part.
composed example
o1 = new stzNumber(12)
? o1.IsInteger()
#--> 1
composed from the signature, run for this page
no extension
IsPositiveInteger
TRUE if the number is an integer greater than zero.
composed example
o1 = new stzNumber(12)
? o1.IsPositiveInteger()
#--> 1
composed from the signature, run for this page
no extension
IsNegativeInteger
TRUE if the number is an integer less than zero.
composed example
o1 = new stzNumber(12)
? o1.IsNegativeInteger()
#--> 0
composed from the signature, run for this page
no extension
IsReal
TRUE if the number has a fractional part.also written: IsRealNumber
composed example
o1 = new stzNumber(12)
? o1.IsReal()
#--> 0
composed from the signature, run for this page
no extension
IsBigNumber
TRUE if the number has more digits than the configured maximum.
composed example
o1 = new stzNumber(12)
? o1.IsBigNumber()
#--> 0
composed from the signature, run for this page
no extension
TRUE if the number is a single-digit integer. 1 examples run
o1 = new stzNumber("4")
? o1.IsOneDigit()
#--> 1
library testno extension
TRUE if the number is odd. 1 examples runalso named: not divisible by two odd number
composed example
o1 = new stzNumber(12)
? o1.IsOdd()
#--> 0
composed from the signature, run for this page
no extension
Same as IsOdd: TRUE if the number is odd. 1 examples run
? Q(12).IsZawji()	# or IsEven()
? Q(13).IsFardi()	# or IsOdd()
#--> 1
#--> 1
library testno extension
IsNotOdd
TRUE if the number is even.
composed example
o1 = new stzNumber(12)
? o1.IsNotOdd()
#--> 1
composed from the signature, run for this page
no extension
TRUE if the number is even. 2 examples runalso named: divisible by two even number
# a number
? Q(2).IsNumber()
# even
? Q(2).IsEven()
# positive
? Q(2).IsPositive()
#--> 1
#--> 1
#--> 1
library test · written IsANumber() in the library today: the host language already holds IsNumber(), and Haro removes the detourno extension
Same as IsEven: TRUE if the number is even. 1 examples run
? Q(12).IsZawji()	# or IsEven()
? Q(13).IsFardi()	# or IsOdd()
#--> 1
#--> 1
library testno extension
IsNotEven
TRUE if the number is odd.
composed example
o1 = new stzNumber(12)
? o1.IsNotEven()
#--> 0
composed from the signature, run for this page
no extension
IsOddOrEven
:Odd or :Even, whichever the number is.also written: IsEvenOrOdd
composed example
o1 = new stzNumber(12)
? o1.IsOddOrEven()
#--> even
composed from the signature, run for this page
no extension
IsZawjiOrFardi
Two alternatives (in arabic) made because I always get confused in distniguishing Odd fro Even! --> PX, or Programmer Experiencealso written: IsFardiOrZawji
composed example
o1 = new stzNumber(12)
? o1.IsZawjiOrFardi()
#--> zawji
composed from the signature, run for this page
no extension
TRUE if the number is prime. 2 examples runalso named: prime number only divisible by one and itselfalso written: IsAPrime · IsPrimeNumber · IsAPrimeNumber
composed example
o1 = new stzNumber(12)
? o1.IsPrime()
#--> 0
composed from the signature, run for this page
no extension
isWeiferich
TRUE if the number is a Wieferich prime.no extension
IsBoolean
TRUE if the number is 0 or 1.
composed example
o1 = new stzNumber(12)
? o1.IsBoolean()
#--> 0
composed from the signature, run for this page
no extension
IsTrue
TRUE if the number is 1.
composed example
o1 = new stzNumber(12)
? o1.IsTrue()
#--> 0
composed from the signature, run for this page
no extension
IsFalse
TRUE if the number is 0.
composed example
o1 = new stzNumber(12)
? o1.IsFalse()
#--> 0
composed from the signature, run for this page
no extension
IsZero
null, positive or negative
composed example
o1 = new stzNumber(12)
? o1.IsZero()
#--> 0
composed from the signature, run for this page
no extension
IsNegative
null, positive or negativealso named: below zero less than zero minus negative sign
composed example
o1 = new stzNumber(12)
? o1.IsNegative()
#--> 0
composed from the signature, run for this page
no extension
IsStrictlyNegative
null, positive or negative
composed example
o1 = new stzNumber(12)
? o1.IsStrictlyNegative()
#--> 0
composed from the signature, run for this page
no extension
null, positive or negative 1 examples runalso named: above zero greater than zero plus positive sign
# a number
? Q(2).IsNumber()
# even
? Q(2).IsEven()
# positive
? Q(2).IsPositive()
#--> 1
#--> 1
#--> 1
library test · written IsANumber() in the library today: the host language already holds IsNumber(), and Haro removes the detourno extension
IsStrictlyPositive
null, positive or negative
composed example
o1 = new stzNumber(12)
? o1.IsStrictlyPositive()
#--> 1
composed from the signature, run for this page
no extension
The sign of the number: "+", "-" or "" for zero. 1 examples runno extension
RemoveSign
Drop the sign from the number (mutating).QCSXTZZZIBWU
SignRemoved
A copy without the sign; the original is unchanged.
composed example
o1 = new stzNumber(12)
? o1.SignRemoved()
#--> 12
composed from the signature, run for this page
no extension
IsSigned
TRUE if the number carries an explicit sign.also written: HasSign · HasASign · ContainsSign · ContainsASign
composed example
o1 = new stzNumber(12)
? o1.IsSigned()
#--> 0
composed from the signature, run for this page
no extension
IsNotSigned
TRUE if the number carries no explicit sign.
composed example
o1 = new stzNumber(12)
? o1.IsNotSigned()
#--> 1
composed from the signature, run for this page
no extension
IsUnsigned
TRUE if the number carries no explicit sign.
composed example
o1 = new stzNumber(12)
? o1.IsUnsigned()
#--> 1
composed from the signature, run for this page
no extension
TRUE if the number equals the given one (case dial for string forms). (case-sensitive by default) 2 examples runalso written: IsEqualtTo
? Q(5.12).IsEqualTo(5.1200000000000001)
? Q(5.12).IsEqualTo("5.1200000000000001")
? Q(5.12).IsEqualTo([ 5.1200000000000001, :Round = 16 ])
#--> 1
#--> 1
#--> 0
library testQCSXTZZZIBWU
Same as IsEqualTo: TRUE if the number equals the given one (case dial for string forms). (case-sensitive by default) (case-sensitive by default) 1 examples runalso written: Equals · EqualTo
o1 = new stzNumber("12.872")
? o1.IsEqual(12.872)
? o1.IsBetween(12, "13")
#--> 1
#--> 1
library testQCSXTZZZIBWU
IsNotEqualTo
TRUE if the number differs from the given one.also written: IsDifferentOf · IsDifferentTo · IsDifferentFrom
composed example
o1 = new stzNumber(12)
? o1.IsNotEqualTo(3)
#--> 1
composed from the signature, run for this page
QCSXTZZZIBWU
IsNeither
===== TRUE if the number equals NEITHER of the two given numbers.also written: IsNeitherEqualTo
composed example
o1 = new stzNumber(12)
? o1.IsNeither(2, 5)
#--> 1
composed from the signature, run for this page
no extension
IsLess
TRUE if the number is less than or equal to the given one.also written: IsLessThan · IsSmallerThqn · IsLessOrEqualTo · IsEqualOrLessThan · IsSmallerOrEqualTo · IsEqualOrSmallerThan
composed example
o1 = new stzNumber(12)
? o1.IsLess(3)
#--> 0
composed from the signature, run for this page
no extension
FIXED 2026-07-25: the canonical method was spelled IsStriclyLess (missing a "t") while all SIX of its alternative forms below called the correct IsStrictlyLess -- so every one of them raised R14. Canonical name corrected; the misspelling is kept as an alias. 1 examples runalso written: IsStriclyLess · IsStrictlyLessThan · IsStrictlySmallerThqn · IsStrictlyLessOrEqualTo · IsStrictlyEqualOrLessThan · IsStrictlySmallerOrEqualTo · IsStrictlyEqualOrSmallerThan
composed example
o1 = new stzNumber(12)
? o1.IsStrictlyLess(3)
#--> 0
composed from the signature, run for this page
no extension
IsGreater
TRUE if the number is greater than or equal to the given one.also written: IsBigger · IsBiggerThan · IsGreaterThan · IsEqualOrBigger · IsEqualOrGreater · IsEqualOrBiggerThan · IsEqualOrGreaterThan · IsStrictlyEqualOrGreaterThan
composed example
o1 = new stzNumber(12)
? o1.IsGreater(3)
#--> 1
composed from the signature, run for this page
no extension
IsStrictlyGreater
TRUE if the number is strictly greater than the given one.also written: IsStrictlyBigger · IsStrictlyBiggerThan · IsStrictlyGreaterThan · IsStrictlyEqualOrBigger · IsStrictlyEqualOrGreater · IsStrictlyEqualOrBiggerThan
composed example
o1 = new stzNumber(12)
? o1.IsStrictlyGreater(3)
#--> 1
composed from the signature, run for this page
no extension
TRUE if the number lies between the two given numbers (bounds included). 3 examples run
? Q(5).IsBetween(2, 7)
#--> 1
library testQCSXTZZZIBWU
IsStrictlyBetween
TRUE if the number lies strictly between the two given numbers (bounds excluded).
composed example
o1 = new stzNumber(12)
? o1.IsStrictlyBetween(2, 2)
#--> 0
composed from the signature, run for this page
no extension
IsQuietEqualTo
Quiet equality: TRUE if the values match, tolerating number/string form.also written: IsQuietEqual · IsApproximativelyEqual · IsApproximativelyEqualTono extension
NumberOfDigits
(no comment in the source: the name reads as a sentence) number of digitsalso written: NumberOfDigitsTheNumberActuallyContainsin the section integer & fractional parts (called also decimal parts)
composed example
o1 = new stzNumber(12)
? o1.NumberOfDigits()
#--> 2
composed from the signature, run for this page
no extension
(no comment in the source: the name reads as a sentence) integer part 1 examples runalso written: IntergerPart · IntegerPartStringValue · IntergerPartStringValuein the section integer & fractional parts (called also decimal parts)
composed example
o1 = new stzNumber(12)
? o1.IntegerPart()
#--> 12
composed from the signature, run for this page
QCSXTZZZIBWU
the historical misspelling, kept so existing callers keep working 1 examples runno extension
IntegerPartWithoutSign
(no comment in the source: the name reads as a sentence) integer part without signalso written: IntegerPartStringValueWithoutSignin the section integer & fractional parts (called also decimal parts)
composed example
o1 = new stzNumber(12)
? o1.IntegerPartWithoutSign()
#--> 12
composed from the signature, run for this page
QCSXTZZZIBWU
NumberOfDigitsInIntegerPart
(no comment in the source: the name reads as a sentence) number of digits in integer partalso written: NumberOfIntegersin the section integer & fractional parts (called also decimal parts)
composed example
o1 = new stzNumber(12)
? o1.NumberOfDigitsInIntegerPart()
#--> 2
composed from the signature, run for this page
no extension
HasFractionalPart
(no comment in the source: the name reads as a sentence) has fractional partalso written: HasDecimalPart · HasADecimalPart · HasAFractionalPart · ContainsDecimalPart · ContainsADecimalPart · ContainsFractionalPart · ContainsAFractionalPartin the section integer & fractional parts (called also decimal parts)
composed example
o1 = new stzNumber(12)
? o1.HasFractionalPart()
#--> 0
composed from the signature, run for this page
no extension
FractionalPart
(no comment in the source: the name reads as a sentence) fractional partalso written: DecimalPart · DecimalPartStringValue · FractionalPartStringValuein the section integer & fractional parts (called also decimal parts)QCSXTZZZIBWU
FractionalPartWithoutZeroDot
(no comment in the source: the name reads as a sentence) fractional part without zero dotalso written: DecimalPartWithoutDot · DecimalPartwihtoutDot · FractionalPartWithoutDot · FractionalPartwihtoutDot · DecimalPartWithoutZeroDot · DecimalPartwihtoutZeroDot · FractionalPartwihtoutZeroDotin the section integer & fractional parts (called also decimal parts)QCSXTZZZIBWU
(no comment in the source: the name reads as a sentence) number of decimals 1 examples runin the section integer & fractional parts (called also decimal parts)
composed example
o1 = new stzNumber(12)
? o1.NumberOfDecimals()
#--> 0
composed from the signature, run for this page
no extension
NumberOfDigitsInFractionalPart
(no comment in the source: the name reads as a sentence) number of digits in fractional partalso written: NumberOfDigitsInDecimalPartin the section integer & fractional parts (called also decimal parts)
composed example
o1 = new stzNumber(12)
? o1.NumberOfDigitsInFractionalPart()
#--> 0
composed from the signature, run for this page
no extension
MaxNumberOfDigits
(no comment in the source: the name reads as a sentence) max number of digitsalso written: MaxNumberOfDigitsTheNumberCanContainin the section integer & fractional parts (called also decimal parts)
composed example
o1 = new stzNumber(12)
? o1.MaxNumberOfDigits()
#--> 15
composed from the signature, run for this page
no extension
IsIntegerOrReal
(no comment in the source: the name reads as a sentence) is integer or realalso written: IsIntergerOrRealin the section integer & fractional parts (called also decimal parts)
composed example
o1 = new stzNumber(12)
? o1.IsIntegerOrReal()
#--> INTEGER
composed from the signature, run for this page
no extension
(no comment in the source: the name reads as a sentence) integers 1 examples runalso written: Intergersin the section integer & fractional parts (called also decimal parts)
composed example
o1 = new stzNumber(12)
? @@( o1.Integers() )
#--> [ 1, 2 ]
composed from the signature, run for this page
QCSXTZZZIBWUQRT
(no comment in the source: the name reads as a sentence) decimals 1 examples runin the section integer & fractional parts (called also decimal parts)QCSXTZZZIBWUQRT
SumOfIntegers
(no comment in the source: the name reads as a sentence) sum of integersin the section integer & fractional parts (called also decimal parts)
composed example
o1 = new stzNumber(12)
? o1.SumOfIntegers()
#--> 3
composed from the signature, run for this page
no extension
SumOfDecimals
(no comment in the source: the name reads as a sentence) sum of decimalsin the section integer & fractional parts (called also decimal parts)
composed example
o1 = new stzNumber(12)
? o1.SumOfDecimals()
#--> 0
composed from the signature, run for this page
no extension
MaxRound
The largest round (decimals) this number can still carry.
composed example
o1 = new stzNumber(12)
? o1.MaxRound()
#--> 17
composed from the signature, run for this page
no extension
NumberOfRoundsWeCanAddBeforeMaxRoundIsReached
How many more decimals can be added before the max round.
composed example
o1 = new stzNumber(12)
? o1.NumberOfRoundsWeCanAddBeforeMaxRoundIsReached()
#--> 13
composed from the signature, run for this page
no extension
SetRegime
Round the number to the nearest integer (mutating). -- THE REGIME (numeric foundation phase 2)also named: round to nearest nearest whole number round offno extension
(no comment in the source: the name reads as a sentence) regime 1 examples runalso named: what kind of quantity which regime money or exactin the section rounds
composed example
o1 = new stzNumber(12)
? o1.Regime()
#--> machine
composed from the signature, run for this page
no extension
RegimePlaces
(no comment in the source: the name reads as a sentence) regime placesin the section rounds
composed example
o1 = new stzNumber(12)
? o1.RegimePlaces()
#--> 0
composed from the signature, run for this page
no extension
(no comment in the source: the name reads as a sentence) is money 1 examples runin the section rounds
composed example
o1 = new stzNumber(12)
? o1.IsMoney()
#--> 0
composed from the signature, run for this page
no extension
IsMeasured
(no comment in the source: the name reads as a sentence) is measuredin the section rounds
composed example
o1 = new stzNumber(12)
? o1.IsMeasured()
#--> 0
composed from the signature, run for this page
no extension
IsExactRegime
(no comment in the source: the name reads as a sentence) is exact regimein the section rounds
composed example
o1 = new stzNumber(12)
? o1.IsExactRegime()
#--> 0
composed from the signature, run for this page
no extension
RoundedTo() keeps its historical half-up behaviour, so nothing existing moves; the mode is something you ASK for. 5 examples runalso named: banker's rounding round half to even accounting rounding
composed example
o1 = new stzNumber(12)
? o1.RoundedToHalfEven(2)
#--> 12.00
composed from the signature, run for this page
QCSXTZZZIBWU
RoundToHalfEven
(no comment in the source: the name reads as a sentence) round to half evenin the section roundsQCSXTZZZIBWU
(no comment in the source: the name reads as a sentence) rounded to half up 5 examples runalso named: round half away from zero commercial roundingin the section rounds
composed example
o1 = new stzNumber(12)
? o1.RoundedToHalfUp(2)
#--> 12.00
composed from the signature, run for this page
QCSXTZZZIBWU
RoundToHalfUp
(no comment in the source: the name reads as a sentence) round to half upin the section roundsQCSXTZZZIBWU
Promotion is automatic and upward only: adding 1 to a 2^53 integer yields a :bigInteger, and nothing silently demotes. :rational and :complex are named in the plan and not built yet, so they are not reported -- a ladder that claims rungs it does not have is worse than a short one. 7 examples runalso named: which representation what kind of number integer or decimal
oS = StzNumberQ("0.1")
oS.Add("0.2")
? oS.Content()
? oS.IsExact()
? oS.Representation()
#--> 0.3
#--> 1
#--> decimal
library testno extension
(no comment in the source: the name reads as a sentence) is big integer 1 examples runin the section rounds
composed example
o1 = new stzNumber(12)
? o1.IsBigInteger()
#--> 0
composed from the signature, run for this page
no extension
(no comment in the source: the name reads as a sentence) is decimal number 1 examples runin the section rounds
composed example
o1 = new stzNumber(12)
? o1.IsDecimalNumber()
#--> 0
composed from the signature, run for this page
no extension
(no comment in the source: the name reads as a sentence) is rational 1 examples runin the section rounds
composed example
o1 = new stzNumber(12)
? o1.IsRational()
#--> 0
composed from the signature, run for this page
no extension
Numeric surprise is almost always about a frame the caller could not see: a rounding, a binary-float representation, a division that does not terminate. So the number carries that fact rather than making you deduce it -- the same habit as the natural layer's evidential register. 10 examples runalso named: is it exact was anything lost is this precise
oT = StzNumberQ("1")
oT.Divide("3")
? oT.Content()
? oT.IsExact()
? oT.WhyNotExact()
#--> 0.333333
#--> 0
#--> the division does not terminate in 6 decimal place(s)
library testno extension
(no comment in the source: the name reads as a sentence) is approximate 1 examples runin the section rounds
composed example
o1 = new stzNumber(12)
? o1.IsApproximate()
#--> 0
composed from the signature, run for this page
no extension
Empty when the value is exact; otherwise a plain sentence saying what was lost and where. 3 examples runalso named: why not exact what was lost explain the precisionalso written: Why
oT = StzNumberQ("1")
oT.Divide("3")
? oT.Content()
? oT.IsExact()
? oT.WhyNotExact()
#--> 0.333333
#--> 0
#--> the division does not terminate in 6 decimal place(s)
library testno extension
(no comment in the source: the name reads as a sentence) exactness 1 examples runin the section rounds
composed example
o1 = new stzNumber(12)
? o1.Exactness()
#--> exact
composed from the signature, run for this page
no extension
MATHEMATICAL equality, as opposed to Haro's `=` on the rendered strings. "1.50" and "1.5" are the same number; "0.1" and 0.1 are not the same BITS. 4 examples runalso named: same number equal in value numerically equalalso written: IsSameAs
oQ = StzNumberQ("1/3")
? oQ.Representation()
? oQ.IsExact()
oQ.Add("2/3")
? oQ.Content()
? oQ.Same(1)
#--> rational
#--> 1
#--> 1
#--> 1
library testno extension
These alternatives are provided to the user if he wants to avoid semantic confustion the global function Round(). This function is made to enable external code in other languages. 4 examples runalso written: GetRound · NumberRoundin the section rounds
StzDecimals(3) # Change the program round and memorises it
o1 = new stzNumber([ 981.123456701, :round = 5 ])
? o1.Round()
? o1.NumericValue() # Sensitive to current on the program round, 3.
? o1.StringValue() # Rounded to the what is specified at the object level, 5.
#--> 5
#--> 981.123
#--> 981.12346
library testno extension
RoundTo
Round the number to the given number of decimals (mutating).also named: decimals precision digits after the pointQCSXTZZZIBWU
SetRound
Set how many decimals (the round) this number renders with.QCSXTZZZIBWU
A copy rounded to the given number of decimals; the original is unchanged. 4 examples run
# RoundedTo still rounds half-up
? (new stzNumber("2.5")).RoundedTo(0)
# ...and still tidies trailing zeros
? (new stzNumber("12.456")).RoundedTo(4)
# ...and still gets 100.4 right
? (new stzNumber("100.4")).RoundedTo(0)
#--> 3
#--> 12.456
#--> 100
library testQCSXTZZZIBWU
RoundToMax
Round to the maximum round available (mutating).QCSXTZZZIBWU
RoundedToMax
A copy rounded to the maximum round available.QCSXTZZZIBWU
RoundUp
The number rounded UP (toward the next integer).no extension
RoundDown
The number rounded DOWN (toward the previous integer).no extension
RoundToSameRoundAs
Round to the same number of decimals as the given number (mutating).no extension
RoundIsGreaterThanRoundOf
TRUE if this number carries more decimals than the given one.no extension
RoundIsLessThanRoundOf
TRUE if this number carries fewer decimals than the given one.no extension
TRUE if both numbers carry the same number of decimals. 1 examples run
composed example
o1 = new stzNumber(12)
? o1.RoundIsSameAsRoundOf(3)
#--> 0
composed from the signature, run for this page
no extension
CompareRoundsWith
Compare the rounds: :Greater, :Less or :Same.no extension
Add the given number to this one (mutating). For a copy, use Added. 11 examples runalso named: plus sum increase increment
oS = StzNumberQ("0.1")
oS.Add("0.2")
? oS.Content()
? oS.IsExact()
? oS.Representation()
#--> 0.3
#--> 1
#--> decimal
library testQCSXTZZZIBWUMany
Added
@FunctionPassiveForm The sum with the given number, as data; the original is unchanged.
composed example
o1 = new stzNumber(12)
? o1.Added(3)
#--> 15
composed from the signature, run for this page
QCSXTZZZIBWUMany
AddThese
Same as AddMany: Add each of the given numbers to this number (mutating).
composed example
o1 = new stzNumber(12)
o1.AddThese([ 2, 3 ])
? o1.Value()
#--> 17
composed from the signature, run for this page
QCSXTZZZIBWU
ManyAdded
Same as AddedMany: @FunctionPassiveForm The sum with all the given numbers, as data; the original is unchanged.no extension
TheseAdded
Same as ManyAdded: Same as AddedMany: @FunctionPassiveForm The sum with all the given numbers, as data; the original is unchanged.no extension
AddManyWithIntermediateResults
AddMany returning every intermediate sum along the way.
composed example
o1 = new stzNumber(12)
? @@( o1.AddManyWithIntermediateResults([ 2, 3 ]) )
#--> [ "14", "17" ]
composed from the signature, run for this page
QCSXTZZZIBWU
AddTheseWithIntermediateResults
Same as AddManyWithIntermediateResults: AddMany returning every intermediate sum along the way.
composed example
o1 = new stzNumber(12)
o1.AddTheseWithIntermediateResults([ 2, 3 ])
? o1.Value()
#--> 17
composed from the signature, run for this page
QCSXTZZZIBWU
SubStruct
Subtract the given number from this one (mutating).also named: subtract minus decrease take awayQCSXTZZZIBWUMany
Retrieve
Subtract the given number from this one (same as SubStruct).QCSXTZZZIBWUMany
Substract
Same as SubStruct: Subtract the given number from this one (mutating).QCSXTZZZIBWUMany
Same as SubStruct: Subtract the given number from this one (mutating). 2 examples runQCSXTZZZIBWUMany
Subtruct
Same as SubStruct: Subtract the given number from this one (mutating).QCSXTZZZIBWUMany
Substructed
The difference after subtracting the given number, as data.also written: Retrieved · Subtracted · Subtructed · Substracted
composed example
o1 = new stzNumber(12)
? o1.Substructed(3)
#--> 9
composed from the signature, run for this page
QCSXTZZZIBWUMany
ADDED 2026-07-25. The operator() hook has always answered "++" and "--" with these, but they did not exist. They RETURN rather than mutate, because that hook returns the result of the operation -- Increment()/Decrement() just below are the mutating pair. 1 examples run
composed example
o1 = new stzNumber(12)
? o1.NextNumber()
#--> 13
composed from the signature, run for this page
QCSXTZZZIBWU
incrmenet / decrement the number (by 1) 1 examples run
composed example
o1 = new stzNumber(12)
? o1.PreviousNumber()
#--> 11
composed from the signature, run for this page
QCSXTZZZIBWU
Same as Add: Add the given number to this one (mutating). For a copy, use Added. 1 examples run
composed example
o1 = new stzNumber(12)
o1.Increment()
? o1.Value()
#--> 13
composed from the signature, run for this page
QCSXTZZZIBWU
Incremented
incrmenet / decrement the number (by 1)no extension
Same as Substract: Same as SubStruct: Subtract the given number from this one (mutating). 1 examples run
composed example
o1 = new stzNumber(12)
o1.Decrement()
? o1.Value()
#--> 11
composed from the signature, run for this page
QCSXTZZZIBWU
Decremented
incrmenet / decrement the number (by 1)no extension
multiplying the number by an other number 8 examples run
oM = StzNumberQ("0.1")
oM.MultiplyBy("3")
? oM.Content()
? oM.IsExact()
? 0.1 * 3 = 0.3
#--> 0.3
#--> 1
#--> 0
library testQCSXTZZZIBWUMany
Multiply
multiplying the number by an other numberno extension
multiplying the number by an other number 1 examples runalso written: Times · Multiplied
o1 = new stzNumber(11)
? o1.RepeatedNTimes(3)
? o1.Times(3)
? o1.Times([2, 3])
#--> 11
#--> 11
#--> 11
#--> 33
#--> ...
library testQCSXTZZZIBWUMany
Divide this number by the given one (mutating). 3 examples run
oT = StzNumberQ("1")
oT.Divide("3")
? oT.Content()
? oT.IsExact()
? oT.WhyNotExact()
#--> 0.333333
#--> 0
#--> the division does not terminate in 6 decimal place(s)
library testQCSXTZZZIBWU
Divided
The quotient by the given number, as data; the original is unchanged.
composed example
o1 = new stzNumber(12)
? o1.Divided(3)
#--> 4
composed from the signature, run for this page
no extension
DivideBy
Divide this number by the given one (mutating).also named: over quotient split by dividedQCSXTZZZIBWUMany
DividedBy
The quotient by the given number, as data.
composed example
o1 = new stzNumber(12)
? o1.DividedBy(3)
#--> 4
composed from the signature, run for this page
QCSXTZZZIBWUMany
Modulo
MODULO The remainder of the division by the given number.also named: remainder mod leftover of division
composed example
o1 = new stzNumber(12)
? o1.Modulo(3)
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWU
Power
POWER Raise the number to the given power (mutating).also named: to the power of exponent raised to power
composed example
o1 = new stzNumber(12)
? o1.Power(3)
#--> 1728
composed from the signature, run for this page
QCSXTZZZIBWU
SINE The sine of the number (mutating: the number becomes it). 2 examples run
o1 = new stzNumber([ 55993400908134, :Round = 5 ])
? o1.Round()
? o1.Sine()
? o1.Cosine()
? o1.Tangent()
? o1.Cotangent()
#--> 5
#--> -0.99986
#--> -0.01644
#--> 60.82558
#--> ...
library testQCSXTZZZIBWU
COSINE The cosine of the number (mutating). 1 examples run
o1 = new stzNumber([ 55993400908134, :Round = 5 ])
? o1.Round()
? o1.Sine()
? o1.Cosine()
? o1.Tangent()
? o1.Cotangent()
#--> 5
#--> -0.99986
#--> -0.01644
#--> 60.82558
#--> ...
library testQCSXTZZZIBWU
TANGENT The tangent of the number (mutating). 1 examples run
o1 = new stzNumber([ 55993400908134, :Round = 5 ])
? o1.Round()
? o1.Sine()
? o1.Cosine()
? o1.Tangent()
? o1.Cotangent()
#--> 5
#--> -0.99986
#--> -0.01644
#--> 60.82558
#--> ...
library testQCSXTZZZIBWU
COTANGENT The cotangent of the number (mutating). 1 examples run
o1 = new stzNumber([ 55993400908134, :Round = 5 ])
? o1.Round()
? o1.Sine()
? o1.Cosine()
? o1.Tangent()
? o1.Cotangent()
#--> 5
#--> -0.99986
#--> -0.01644
#--> 60.82558
#--> ...
library testQCSXTZZZIBWU
ArcSine
ARCSINE The arc sine of the number (mutating).QCSXTZZZIBWU
ArcCosine
ARCCOSINE The arc cosine of the number (mutating).QCSXTZZZIBWU
ArcTangent
ARCTANGENT The arc tangent of the number (mutating).QCSXTZZZIBWU
ArcTangent2
ARCTANGENT2 The two-argument arc tangent (atan2) of the number (mutating).QCSXTZZZIBWU
HyperbolicSine
SINH The hyperbolic sine of the number (mutating).QCSXTZZZIBWU
HyperbolicCosine
COSH The hyperbolic cosine of the number (mutating).QCSXTZZZIBWU
HyperbolicTangent
TANH The hyperbolic tangent of the number (mutating).QCSXTZZZIBWU
Exponential
EXP e raised to the number (mutating).QCSXTZZZIBWU
NaturalLogarithm
LOG The natural logarithm (base e) of the number (mutating).QCSXTZZZIBWU
CommonLogarithm
LOG10 The common logarithm (base 10) of the number (mutating).QCSXTZZZIBWU
ABS The absolute value of the number (mutating). 1 examples runalso named: abs magnitude positive value without signalso written: Abs
? StzNumberQ("-5.23456").Absolute()
#--> 5.23456
library testQCSXTZZZIBWU
SQRT The square root of the number (mutating). 1 examples runalso named: square root sqrt root of the numberQCSXTZZZIBWU
FACT The factorial of the (integer) number (mutating). 1 examples runalso named: factorial of n bang product of integers up to
composed example
o1 = new stzNumber(12)
? o1.Factorial()
#--> 479001600
composed from the signature, run for this page
QCSXTZZZIBWU
InPercentage
PERCENT The number as a percentage string.
composed example
o1 = new stzNumber(12)
? o1.InPercentage()
#--> 1.2%
composed from the signature, run for this page
no extension
Sigmoid
SIGMOID The sigmoid of the number (mutating).QCSXTZZZIBWU
Derivative
The derivative via the engine calculator (reserved form).QCSXTZZZIBWU
DerivativeSigmoid
DERIVATIVE SIGMOID The sigmoid derivative of the number (mutating).QCSXTZZZIBWU
The least common multiple with the given number. 3 examples runalso written: LCM
composed example
o1 = new stzNumber(12)
? o1.LeastCommonMultiple(3)
#--> 12
composed from the signature, run for this page
QCSXTZZZIBWU
LeastCommonMultipleOfManyNumbers
ADDED 2026-07-25. LeastCommonMultiple() has always branched here for a list argument, but the method did not exist -- so stzListOfNumbers([4,6,8]).LeastCommonMultiple(), which routes through it, silently answered 0 instead of 24. lcm is associative, so folding pairwise is the whole implementation.also written: LCMOfManyNumbersQCSXTZZZIBWU
The greatest common divisor with the given number. 2 examples runalso written: GCD · CommonGreatestDividor
composed example
o1 = new stzNumber(12)
? o1.GreatestCommonDividor(3)
#--> 3
composed from the signature, run for this page
QCSXTZZZIBWU
Inverse
INVERSE The multiplicative inverse (1/n) of the number (mutating).QCSXTZZZIBWU
FACTORS The factors (divisors) of the integer number, as a list. 2 examples runalso written: Dividors · Divirdos · Divisors
composed example
o1 = new stzNumber(12)
? @@( o1.Factors() )
#--> [ 1, 2, 3, 4, 6, 12 ]
composed from the signature, run for this page
QCSXTZZZIBWUQRT
FactorsXRQ
The factors, in the requested return type (variant form).no extension
The prime factors of the number, as a list. 2 examples runalso written: PrimeDividors · PrimeDivirdos · PrimeDivisors
composed example
o1 = new stzNumber(12)
? @@( o1.PrimeFactors() )
#--> [ 2, 3 ]
composed from the signature, run for this page
QCSXTZZZIBWUQRT
PrimeFactorsXRQ
The prime factors, in the requested return type (variant form).no extension
MostSquareLikeFactors
The factor pair closest to a square (rows x cols).also written: MSLFno extension
NumberOfMultiples
MULTIPLES UNTIL How many multiples of the given number divide into this one.no extension
NumberOfMultiplesUntil
How many multiples fit up to the given limit.also written: NumberOfMultiplesUpTono extension
Multiples
The multiples of the number up to the given count.no extension
The multiples of the number up to the given limit. 1 examples runalso written: MultiplesUpTo · MultiplesUnderQCSXTZZZIBWUQRT
DIVIDABILITY TRUE if the number divides evenly by n. 1 examples runalso written: IsDivisibleBy · CanBeDividedBy
composed example
o1 = new stzNumber(12)
? o1.IsDividableBy(2)
#--> 1
composed from the signature, run for this page
no extension
IsDividorOf
TRUE if the number divides evenly INTO n.
composed example
o1 = new stzNumber(12)
? o1.IsDividorOf(2)
#--> 0
composed from the signature, run for this page
no extension
IntegerPartValue
The integer part, as a number.also written: IntegerPartNumericValueno extension
FractionalPartValue
The fractional part, as a number.also written: DecimalPartValue · DecimalPartNumericValue · FractionalPartNumericValue
composed example
o1 = new stzNumber(12)
? o1.FractionalPartValue()
#--> 0
composed from the signature, run for this page
no extension
ToStzString
The number wrapped as a stzString object.no extension
ToHexForm
Converting decimal to hex form
composed example
o1 = new stzNumber(12)
? o1.ToHexForm()
#--> 0xC
composed from the signature, run for this page
QCSXTZZZIBWU
ToHex
The number in hexadecimal form.also named: hexadecimal hex base 16
composed example
o1 = new stzNumber(12)
? o1.ToHex()
#--> 0xC
composed from the signature, run for this page
QCSXTZZZIBWU
ToHexNumber
The number wrapped as a stzHexNumber object.no extension
ToUnicodeHexForm
The number in Unicode hex form (U+0041).
composed example
o1 = new stzNumber(12)
? o1.ToUnicodeHexForm()
#--> U+C
composed from the signature, run for this page
no extension
ToUnicodeHex
The number in Unicode hex form (U+0041).
composed example
o1 = new stzNumber(12)
? o1.ToUnicodeHex()
#--> U+C
composed from the signature, run for this page
no extension
ToHexUnicode
The number in Unicode hex form (U+0041).
composed example
o1 = new stzNumber(12)
? o1.ToHexUnicode()
#--> U+C
composed from the signature, run for this page
no extension
ToHexFormWithoutPrefix
The hexadecimal form without the 0x prefix.also written: ToHexWithoutPrefix
composed example
o1 = new stzNumber(12)
? o1.ToHexFormWithoutPrefix()
#--> C
composed from the signature, run for this page
no extension
IntegerPartToHexForm
The integer part in hexadecimal form.
composed example
o1 = new stzNumber(12)
? o1.IntegerPartToHexForm()
#--> C
composed from the signature, run for this page
no extension
FractionalPartToHexForm
The fractional part in hexadecimal form.also written: DecimalPartToHexFormno extension
ToBinaryForm
Converting decimal to binary formalso written: ToBinary
composed example
o1 = new stzNumber(12)
? o1.ToBinaryForm()
#--> 0b1100
composed from the signature, run for this page
QCSXTZZZIBWU
ToBinaryNumber
The number wrapped as a stzBinaryNumber object.no extension
ToBinaryFormWithoutPrefix
Variant that strips the "0b" prefix from the binary form, for callers that just want the raw bit-string.also written: ToBinaryNoPrefix · ToBinaryFormNoPrefix · ToBinaryWithoutPrefix
composed example
o1 = new stzNumber(12)
? o1.ToBinaryFormWithoutPrefix()
#--> 1100
composed from the signature, run for this page
no extension
Converting decimal to octal form 1 examples run
composed example
o1 = new stzNumber(12)
? o1.IntegerPartToOctalForm()
#--> 14
composed from the signature, run for this page
no extension
A fraction is converted by repeatedly multiplying by 8 and taking the integer part as the next digit. Unlike the integer side this can run forever (1/3 in octal is 0.2525...), so it is bounded by the number's own round -- the digits the caller asked to keep -- and stops early when the fraction reaches zero. 1 examples runno extension
ToOctalForm
The number in octal form (with prefix).also written: ToOctal
composed example
o1 = new stzNumber(12)
? o1.ToOctalForm()
#--> 0o14
composed from the signature, run for this page
QCSXTZZZIBWU
ToOctalNumber
The number wrapped as a stzOctalNumber object.no extension
The octal form without the prefix. 1 examples run
composed example
o1 = new stzNumber(12)
? o1.ToOctalFormWithoutPrefix()
#--> 14
composed from the signature, run for this page
no extension
IntegerPartToBaseNForm
The integer part written in base n (2..36).
composed example
o1 = new stzNumber(12)
? o1.IntegerPartToBaseNForm(2)
#--> 1100
composed from the signature, run for this page
no extension
ToBytes
Converting decimal number to bytesno extension
FromBinaryForm
Because Haro uses double C type to represent numbers internallyno extension
FromBinary
Same as FromBinaryForm: Because Haro uses double C type to represent numbers internallyno extension
FromOctalForm
Set the number from the given octal form (mutating).no extension
FromOctal
Same as FromOctalForm: Set the number from the given octal form (mutating).no extension
FromHexForm
Set the number from the given hex form (mutating).no extension
FromHex
Same as FromHexForm: Set the number from the given hex form (mutating).no extension
Structure
units, hundreds, thousands, millions, and billions
composed example
o1 = new stzNumber(12)
? @@( o1.Structure() )
#--> [ [ "ctrillions", "" ], [ "cbillions", "" ], [ "cmillions", "" ], [ "cthousands", "" ], [ "chundreds", "12" ] ]
composed from the signature, run for this page
QCSXTZZZIBWU
The hundreds part of the number's structure. 4 examples run
composed example
o1 = new stzNumber(12)
? o1.Hundreds()
#--> 12
composed from the signature, run for this page
QCSXTZZZIBWU
The units digit inside the number's hundreds. 1 examples runalso written: Units
composed example
o1 = new stzNumber(12)
? o1.UnitsInHundreds()
#--> 2
composed from the signature, run for this page
no extension
The dozens digit inside the number's hundreds. 1 examples runalso written: Dozens
composed example
o1 = new stzNumber(12)
? o1.DozensInHundreds()
#--> 1
composed from the signature, run for this page
no extension
The hundreds digit inside the number's hundreds. 1 examples run
composed example
o1 = new stzNumber(12)
? o1.HundredsInHundreds()
#--> 0
composed from the signature, run for this page
no extension
HasHundreds
TRUE if the number reaches the hundreds.also written: ContainsHundreds
composed example
o1 = new stzNumber(12)
? o1.HasHundreds()
#--> 1
composed from the signature, run for this page
no extension
The thousands part of the number's structure. 4 examples runQCSXTZZZIBWU
The units digit inside the number's thousands. 1 examples run
composed example
o1 = new stzNumber(12)
? o1.UnitsInThousands()
#--> 0
composed from the signature, run for this page
no extension
The dozens digit inside the number's thousands. 1 examples run
composed example
o1 = new stzNumber(12)
? o1.DozensInThousands()
#--> 0
composed from the signature, run for this page
no extension
The hundreds digit inside the number's thousands. 1 examples run
composed example
o1 = new stzNumber(12)
? o1.HundredsInThousands()
#--> 0
composed from the signature, run for this page
no extension
HasThousands
TRUE if the number reaches the thousands.also written: ContainsThousands
composed example
o1 = new stzNumber(12)
? o1.HasThousands()
#--> 0
composed from the signature, run for this page
no extension
The millions part of the number's structure. 2 examples runQCSXTZZZIBWU
UnitsInMillions
The units digit inside the number's millions.
composed example
o1 = new stzNumber(12)
? o1.UnitsInMillions()
#--> 0
composed from the signature, run for this page
no extension
DozensInMillions
The dozens digit inside the number's millions.
composed example
o1 = new stzNumber(12)
? o1.DozensInMillions()
#--> 0
composed from the signature, run for this page
no extension
HundredsInMillions
The hundreds digit inside the number's millions.
composed example
o1 = new stzNumber(12)
? o1.HundredsInMillions()
#--> 0
composed from the signature, run for this page
no extension
HasMillions
TRUE if the number reaches the millions.also written: ContainsMillions · HasThousandsOfThousands · ContainsThousandsOfThousands
composed example
o1 = new stzNumber(12)
? o1.HasMillions()
#--> 0
composed from the signature, run for this page
no extension
The billions part of the number's structure. 1 examples runQCSXTZZZIBWU
UnitsInBillions
The units digit inside the number's billions.
composed example
o1 = new stzNumber(12)
? o1.UnitsInBillions()
#--> 0
composed from the signature, run for this page
no extension
DozensInBillions
The dozens digit inside the number's billions.
composed example
o1 = new stzNumber(12)
? o1.DozensInBillions()
#--> 0
composed from the signature, run for this page
no extension
HundredsInBillions
The hundreds digit inside the number's billions.
composed example
o1 = new stzNumber(12)
? o1.HundredsInBillions()
#--> 0
composed from the signature, run for this page
no extension
HasBillions
TRUE if the number reaches the billions.also written: ContainsBillions · HasThousandsOfMillions
composed example
o1 = new stzNumber(12)
? o1.HasBillions()
#--> 0
composed from the signature, run for this page
no extension
The trillions part of the number's structure. 1 examples runQCSXTZZZIBWU
UnitsInTrillions
The units digit inside the number's trillions.
composed example
o1 = new stzNumber(12)
? o1.UnitsInTrillions()
#--> 0
composed from the signature, run for this page
no extension
DozensInTrillions
The dozens digit inside the number's trillions.
composed example
o1 = new stzNumber(12)
? o1.DozensInTrillions()
#--> 0
composed from the signature, run for this page
no extension
HundredsInTrillions
The hundreds digit inside the number's trillions.
composed example
o1 = new stzNumber(12)
? o1.HundredsInTrillions()
#--> 0
composed from the signature, run for this page
no extension
HasTrillions
TRUE if the number reaches the trillions.also written: ContainsTrillions
composed example
o1 = new stzNumber(12)
? o1.HasTrillions()
#--> 0
composed from the signature, run for this page
no extension
AllUnits
The units digit at every scale level, as a hash.
composed example
o1 = new stzNumber(12)
? @@( o1.AllUnits() )
#--> [ [ "inhundreds", "2" ], [ "inthousands", "0" ], [ "inmillions", "0" ], [ "inbillions", "0" ], [ "intrillions", "0" ] ]
composed from the signature, run for this page
no extension
AllDozens
The dozens digit at every scale level, as a hash.
composed example
o1 = new stzNumber(12)
? @@( o1.AllDozens() )
#--> [ [ "inhundreds", "1" ], [ "inthousands", "0" ], [ "inmillions", "0" ], [ "inbillions", "0" ], [ "intrillions", "0" ] ]
composed from the signature, run for this page
no extension
AllHundreds
The hundreds digit at every scale level, as a hash.
composed example
o1 = new stzNumber(12)
? @@( o1.AllHundreds() )
#--> [ [ "inhundreds", "0" ], [ "inthousands", "0" ], [ "inmillions", "0" ], [ "inbillions", "0" ], [ "intrillions", "0" ] ]
composed from the signature, run for this page
no extension
ContainsDigits
Always TRUE: a number is made of digits.
composed example
o1 = new stzNumber(12)
? o1.ContainsDigits()
#--> 1
composed from the signature, run for this page
no extension
Contains
TRUE if the number contains the given digit.
composed example
o1 = new stzNumber(12)
? o1.Contains("a")
#--> 0
composed from the signature, run for this page
QCSXTZZZIBWUMany
ExistsIn
TRUE if the number occurs in the given list.
composed example
o1 = new stzNumber(12)
? o1.ExistsIn([ 2, 3 ])
#--> 0
composed from the signature, run for this page
no extension
Same as ExistsIn: TRUE if the number occurs in the given list. 1 examples run
? Q(5).Inn([ 2, 3, 5, 7 ])
#--> 1
library testno extension
ContainsZeros
TRUE if the number contains the digit 0.also written: HasZeros
composed example
o1 = new stzNumber(12)
? o1.ContainsZeros()
#--> 0
composed from the signature, run for this page
no extension
ContainsOnes
TRUE if the number contains the digit 1.also written: HasOnes
composed example
o1 = new stzNumber(12)
? o1.ContainsOnes()
#--> 1
composed from the signature, run for this page
no extension
ContainsSeveral
TRUE if the given digit occurs more than once.also written: HasMany · HasSeveral
composed example
o1 = new stzNumber(12)
? o1.ContainsSeveral("a")
#--> 0
composed from the signature, run for this page
no extension
ContainsSeveralZeros
TRUE if the digit 0 occurs more than once.also written: HasManyZeros · HasSeveralZeros · ContainsManyZeros
composed example
o1 = new stzNumber(12)
? o1.ContainsSeveralZeros()
#--> 0
composed from the signature, run for this page
no extension
ContainsSeveralOnes
TRUE if the digit 1 occurs more than once.also written: HasManyOnes · HasSeveralOnes · ContainsManyOnes
composed example
o1 = new stzNumber(12)
? o1.ContainsSeveralOnes()
#--> 0
composed from the signature, run for this page
no extension
ContainsDozens
TRUE if the number is at least 10.also written: ContainsManyDozens · ContainsSeveralDozens
composed example
o1 = new stzNumber(12)
? o1.ContainsDozens()
#--> 1
composed from the signature, run for this page
no extension
ContainsSeveralHundreds
TRUE if the number is at least 200 (several hundreds).also written: HasManyHundreds · HasSeveralHundreds · ContainsManyHundreds
composed example
o1 = new stzNumber(12)
? o1.ContainsSeveralHundreds()
#--> 0
composed from the signature, run for this page
no extension
ContainsSeveralThousands
TRUE if the number is at least 2000 (several thousands).also written: HasManyThousands · HasSeveralThousands · ContainsManyThousands
composed example
o1 = new stzNumber(12)
? o1.ContainsSeveralThousands()
#--> 0
composed from the signature, run for this page
no extension
ContainsTensOfThousands
TRUE if the number is at least 10 000.also written: HasTensOfThousands · HasManyTensOfThousands · HasSeveralTensOfThousands · ContainsManyTensOfThousands · ContainsSeveralTensOfThousands
composed example
o1 = new stzNumber(12)
? o1.ContainsTensOfThousands()
#--> 0
composed from the signature, run for this page
no extension
ContainsHundredsOfThousands
TRUE if the number is at least 100 000.also written: HasHundredsOfThousands · HasManyHundredsOfThousands · HasSeveralHundredsOfThousands · ContainsManyHundredsOfThousands · ContainsSeveralHundredsOfThousands
composed example
o1 = new stzNumber(12)
? o1.ContainsHundredsOfThousands()
#--> 0
composed from the signature, run for this page
no extension
ContainsSeveralMillions
TRUE if the number is at least 2 000 000.also written: HsManyMillions · HasSeveralMilllions · ContainsManyMillions · HasManyThousandsOfThousands · HasSeveralThousandsOfThousands · ContainsManyThousandsOfThousands · ContainsSeveralThousandsOfThousands
composed example
o1 = new stzNumber(12)
? o1.ContainsSeveralMillions()
#--> 0
composed from the signature, run for this page
no extension
ContainsTensOfMillions
TRUE if the number is at least 10 000 000.also written: HasTensOfMillions · HasMayTensOfMillions · HasSeveralTensOfMillions · ContainsManyTensOfMillions · ContainsSeveralTensOfMillions
composed example
o1 = new stzNumber(12)
? o1.ContainsTensOfMillions()
#--> 0
composed from the signature, run for this page
no extension
ContainsHundredsOfMillions
TRUE if the number is at least 100 000 000.also written: HasHundredsOfMillions · HasManyHundredsOfMillions · HasSeveralHundredsOfMillions · ContainsManyHundredsOfMillions · ContainsSeveralHundredsOfMillions
composed example
o1 = new stzNumber(12)
? o1.ContainsHundredsOfMillions()
#--> 0
composed from the signature, run for this page
no extension
TRUE if the number is at least 2 000 000 000. 1 examples runalso written: HasManyBillions · HasSeveralBillions · ContainsManyBillions · HasManyThousandsOfMillions · ContainsThousandsOfMillions · HasSeveralThousandsOfMillions · ContainsManyThousandsOfMillions · ContainsSeveralThousandsOfMillions
composed example
o1 = new stzNumber(12)
? o1.ContainsSeveralBillions()
#--> 0
composed from the signature, run for this page
no extension
ContainsTensOfBillions
TRUE if the number is at least 10 billion.also written: HasTensOfBillions · ContainsManyTensOfBillions · ContainsSeveralTensOfBillions
composed example
o1 = new stzNumber(12)
? o1.ContainsTensOfBillions()
#--> 0
composed from the signature, run for this page
no extension
HasManyTensOfBillions
TRUE if the number is at least 20 billion.also written: HasSeveralTensOfBillionsno extension
ContainsHundredsOfBillions
TRUE if the number is at least 100 billion.also written: HasHundredsOfBillions · HasManyHundredsOfBillions · HasSeveralHundredsOfBillions · ContainsManyHundredsOfBillions · ContainsSeveralHundredsOfBillions
composed example
o1 = new stzNumber(12)
? o1.ContainsHundredsOfBillions()
#--> 0
composed from the signature, run for this page
no extension
ContainsSeveralTrillions
TRUE if the number is at least 2 trillion.also written: HasManyTrillions · HasSeveralTrillions · ContainsManyTrillions
composed example
o1 = new stzNumber(12)
? o1.ContainsSeveralTrillions()
#--> 0
composed from the signature, run for this page
no extension
ContainsTensOfTrillions
TRUE if the number is at least 10 trillion.also written: HasTensOfTrillions · HasManyTensOfTrillions · HasSeveralTensOfTrillions · ContainsManyTensOfTrillions · ContainsSeveralTensOfTrillions
composed example
o1 = new stzNumber(12)
? o1.ContainsTensOfTrillions()
#--> 0
composed from the signature, run for this page
no extension
ContainsHundredsOfTrillions
TRUE if the number is at least 100 trillion.also written: HasHundredsOfTrillions · HasManyHundredsOfTrillions · HasSeveralHundredsOfTrillions · ContainsManyHundredsOfTrillions · ContainsSeveralHundredsOfTrillions
composed example
o1 = new stzNumber(12)
? o1.ContainsHundredsOfTrillions()
#--> 0
composed from the signature, run for this page
no extension
RemoveSpaces
(no comment in the source: the name reads as a sentence) remove spacesin the section removing spaces from numberQCSXTZZZIBWU
SpacesRemoved
(no comment in the source: the name reads as a sentence) spaces removedin the section removing spaces from number
composed example
o1 = new stzNumber(12)
? o1.SpacesRemoved()
#--> 12
composed from the signature, run for this page
no extension
RemoveLeadingSpaces
(no comment in the source: the name reads as a sentence) remove leading spacesin the section removing spaces from numberQCSXTZZZIBWU
LeadingSpacesRemoved
(no comment in the source: the name reads as a sentence) leading spaces removedin the section removing spaces from numberno extension
RemoveTrailingSpaces
(no comment in the source: the name reads as a sentence) remove trailing spacesin the section removing spaces from numberQCSXTZZZIBWU
TrailingSpacesRemoved
(no comment in the source: the name reads as a sentence) trailing spaces removedin the section removing spaces from numberno extension
They are now expressed directly on the digits. The right-hand strip stays guarded by IsReal(): trailing zeros of an INTEGER are significant, and turning 100 into 1 would be a catastrophe rather than a tidy-up. "007" -> "7", "00.5" -> "0.5". A single leading zero before the point is kept. 1 examples runQCSXTZZZIBWU
"1.500" -> "1.5". Only for a real number, and only in the fractional part. 1 examples runQCSXTZZZIBWU
both ends: "007.500" -> "7.5" 1 examples runno extension
ZerosRemoved
removing zeros from numberno extension
Apply the default number format (mutating). 2 examples run
composed example
o1 = new stzNumber(12)
? o1.ApplyFormat()
#--> +12
composed from the signature, run for this page
QCSXTZZZIBWU
Format
Format the number with the default options (mutating).
composed example
o1 = new stzNumber(12)
? o1.Format()
#--> +12
composed from the signature, run for this page
QCSXTZZZIBWU
The billion boundary was wrong too -- `> 1_000_000_000` let EXACTLY one billion fall through to the same empty answer, where every other boundary in the chain is inclusive. 1 examples runalso written: ToCompactForm
composed example
o1 = new stzNumber(12)
? o1.CompactForm()
#--> 12
composed from the signature, run for this page
no extension
KForm
The number in K (thousands) form.also written: ToKForm
composed example
o1 = new stzNumber(12)
? o1.KForm()
#--> 12
composed from the signature, run for this page
no extension
MForm
The number in M (millions) form.also written: ToMForm
composed example
o1 = new stzNumber(12)
? o1.MForm()
#--> 12
composed from the signature, run for this page
no extension
BForm
The number in B (billions) form.also written: ToBForm
composed example
o1 = new stzNumber(12)
? o1.BForm()
#--> 12
composed from the signature, run for this page
no extension
SetDefaultFormat
Default-format setting (unsupported in this version: raises).no extension
ApplyLocale
Locale application (unsupported in this version: raises).no extension
operator
Because it causes semantic conflict with feature in stzExtCode (see CREATE_TABLE sql function)no extension
IsStzNumber
Always TRUE: the object IS a stzNumber.
composed example
o1 = new stzNumber(12)
? o1.IsStzNumber()
#--> 1
composed from the signature, run for this page
no extension
stzType
The Softanza type symbol: :stzNumber.
composed example
o1 = new stzNumber(12)
? o1.stzType()
#--> stznumber
composed from the signature, run for this page
no extension
IsItem
Always TRUE: a number can be a list item.
composed example
o1 = new stzNumber(12)
? o1.IsItem()
#--> 1
composed from the signature, run for this page
no extension
TRUE if the number occurs in the given list. 1 examples runalso written: IsItemIn · AsAnItemOf · IsAnItemIn · IsNumberIn · IsNumberOf · IsANumberIn · IsANumberOf · IsOneOfThese
? StzListQ([ 3, 2, 5 ]).FindFirstOccurrence("2")
? StzListQ([ 3, 2, 5 ]).FindFirstOccurrence([ 2 ])
? StzListQ([ 3, 2, 5 ]).FindFirstOccurrence( 2 )
? Q(2).IsOneOfThese([ 3, 2, 5 ])
? Q("2").IsOneOfThese([ 3, 2, 5 ])
? Q([2]).IsOneOfThese([ 3, 2, 5 ])
#--> 0
#--> 0
#--> 2
#--> 1
#--> ...
library testno extension
IsMember
Always TRUE: a number can be a member.
composed example
o1 = new stzNumber(12)
? o1.IsMember()
#--> 1
composed from the signature, run for this page
no extension
IsMemberOf
TRUE if the number (as held) occurs in the given list.also written: IsMemberIn · AsAMemberOf · IsAMemberIn
composed example
o1 = new stzNumber(12)
? o1.IsMemberOf([ 2, 3 ])
#--> 0
composed from the signature, run for this page
no extension
Always TRUE: the object holds a number. 1 examples run
# a number
? Q(2).IsNumber()
# even
? Q(2).IsEven()
# positive
? Q(2).IsPositive()
#--> 1
#--> 1
#--> 1
library test · written IsANumber() in the library today: the host language already holds IsNumber(), and Haro removes the detourno extension
IsNotANumber
Always FALSE: it IS a number.
composed example
o1 = new stzNumber(12)
? o1.IsNotANumber()
#--> 0
composed from the signature, run for this page
no extension
IsAString
Always FALSE: a number is not a string.
composed example
o1 = new stzNumber(12)
? o1.IsString()
#--> 0
composed from the signature, run for this page · written IsAString() in the library today: the host language already holds IsString(), and Haro removes the detour
no extension
IsNotAString
Always TRUE: a number is not a string.
composed example
o1 = new stzNumber(12)
? o1.IsNotAString()
#--> 1
composed from the signature, run for this page
no extension
IsAList
Always FALSE: a number is not a list.
composed example
o1 = new stzNumber(12)
? o1.IsList()
#--> 0
composed from the signature, run for this page · written IsAList() in the library today: the host language already holds IsList(), and Haro removes the detour
no extension
IsNotAList
Always TRUE: a number is not a list.
composed example
o1 = new stzNumber(12)
? o1.IsNotAList()
#--> 1
composed from the signature, run for this page
no extension
IsAnObject
Always TRUE: the wrapper is an object.
composed example
o1 = new stzNumber(12)
? o1.IsObject()
#--> 1
composed from the signature, run for this page · written IsAnObject() in the library today: the host language already holds IsObject(), and Haro removes the detour
no extension
IsAObject
Always TRUE: the wrapper is an object.
composed example
o1 = new stzNumber(12)
? o1.IsObject()
#--> 1
composed from the signature, run for this page · written IsAObject() in the library today: the host language already holds IsObject(), and Haro removes the detour
no extension
IsNotAnObject
Always FALSE: the wrapper is an object.
composed example
o1 = new stzNumber(12)
? o1.IsNotAnObject()
#--> 1
composed from the signature, run for this page
no extension
IsNotOneOfThese
TRUE if the number occurs in NONE of the given values.
composed example
o1 = new stzNumber(12)
? o1.IsNotOneOfThese([ 2, 3 ])
#--> 1
composed from the signature, run for this page
no extension
IsLetter
Always FALSE: a number is not a letter.
composed example
o1 = new stzNumber(12)
? o1.IsLetter()
#--> 0
composed from the signature, run for this page
no extension
IsALetter
Always FALSE: a number is not a letter.
composed example
o1 = new stzNumber(12)
? o1.IsALetter()
#--> 0
composed from the signature, run for this page
no extension
IsLetterOf
Always FALSE: a number is not a letter.no extension
IsALetterOf
Always FALSE: a number is not a letter.
composed example
o1 = new stzNumber(12)
? o1.IsALetterOf("a")
#--> 0
composed from the signature, run for this page
no extension
IsLetterIn
Always FALSE: a number is not a letter.
composed example
o1 = new stzNumber(12)
? o1.IsLetterIn("a")
#--> 0
composed from the signature, run for this page
no extension
IsALetterIn
Always FALSE: a number is not a letter.
composed example
o1 = new stzNumber(12)
? o1.IsALetterIn("a")
#--> 0
composed from the signature, run for this page
no extension
IsCharOf
Always FALSE: a number is not a char.no extension
IsACharOf
Always FALSE: a number is not a char.
composed example
o1 = new stzNumber(12)
? o1.IsACharOf("a")
#--> 0
composed from the signature, run for this page
no extension
IsCharIn
Always FALSE: a number is not a char.
composed example
o1 = new stzNumber(12)
? o1.IsCharIn("a")
#--> 0
composed from the signature, run for this page
no extension
IsACharIn
Always FALSE: a number is not a char.
composed example
o1 = new stzNumber(12)
? o1.IsACharIn("a")
#--> 0
composed from the signature, run for this page
no extension
Stringify
stringify(), tostring(), and tocode()QCSXTZZZIBWU
DeepStringifiy
stringify(), tostring(), and tocode()no extension
DeepStringfyQ
Same as StringifyQ: Do nothing, the object is naturally stringified becauses it contains its value always as a stringno extension
IsRGBColor
TRUE if the number is a valid RGB color value.no extension
IsAnRGBColor
TRUE if the number is a valid RGB color value.no extension
HasSameTypeAs
TRUE if the given value is a number too.no extension
UpTo
The numbers from this one UP TO n, as a list.no extension
DownTo
The numbers from this one DOWN TO n, as a list.
composed example
o1 = new stzNumber(12)
? @@( o1.DownTo(2) )
#--> [ 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2 ]
composed from the signature, run for this page
no extension
SwapWith
Swapping the content of the stzNumber with an other stzNumberQCSXTZZZIBWU
SwapContentWith
Same as SwapWith: Swapping the content of the stzNumber with an other stzNumberQCSXTZZZIBWU
IsPerfect
TRUE if the integer is a perfect number (equals the sum of its divisors).also written: IsPerfectNumber
composed example
o1 = new stzNumber(12)
? o1.IsPerfect()
#--> 0
composed from the signature, run for this page
no extension
DigitCount
How many digits the integer has.also written: HowManyDigits
composed example
o1 = new stzNumber(12)
? o1.DigitCount()
#--> 2
composed from the signature, run for this page
no extension
DigitSum
The sum of the digits of the integer.also named: sum of the digits add the digits togetheralso written: SumOfDigits
composed example
o1 = new stzNumber(12)
? o1.DigitSum()
#--> 3
composed from the signature, run for this page
no extension
ReverseDigits
The digits of the integer, reversed.also written: ReversedDigits
composed example
o1 = new stzNumber(12)
? o1.ReverseDigits()
#--> 21
composed from the signature, run for this page
no extension
IsDigitPalindrome
TRUE if the digits read the same backward.also written: IsPalindromeNumber
composed example
o1 = new stzNumber(12)
? o1.IsDigitPalindrome()
#--> 0
composed from the signature, run for this page
no extension
The Fibonacci value for this integer. 1 examples run
composed example
o1 = new stzNumber(12)
? o1.Fibonacci()
#--> 144
composed from the signature, run for this page
QCSXTZZZIBWU
Methods
The methods of the object (Haro reflection).no extension
Attributes
The attributes of the object (Haro reflection).no extension
ClassName
The lowercase class name: "stznumber".also written: StzClass · StzClassName
composed example
o1 = new stzNumber(12)
? o1.ClassName()
#--> stznumber
composed from the signature, run for this page
no extension
IsNamedObject
Always FALSE: plain numbers carry no name.
composed example
o1 = new stzNumber(12)
? o1.IsNamedObject()
#--> 0
composed from the signature, run for this page
no extension
HowMany
How many times the given digit occurs in the number.
composed example
o1 = new stzNumber(12)
? o1.HowMany(2)
#--> 1
composed from the signature, run for this page
no extension
Digits
The digits of the number, as a list.
composed example
o1 = new stzNumber(12)
? @@( o1.Digits() )
#--> [ 1, 2 ]
composed from the signature, run for this page
QCSXTZZZIBWUQRT
Percent
The number as a percentage string.
composed example
o1 = new stzNumber(12)
? o1.Percent()
#--> 0.12
composed from the signature, run for this page
no extension
PercentOf
What percentage this number is OF the given one.
composed example
o1 = new stzNumber(12)
? o1.PercentOf(2)
#--> 0.24
composed from the signature, run for this page
no extension
pvtCalculate
internal kitchen of the classno extension