Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Math.SetBit

Sets a bit in a 64-bit number.

Component Version macOS Windows Linux Server iOS SDK
Math 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Math.SetBit"; Value; Bit )   More

Parameters

Parameter Description Example
Value The current value. 0
Bit The bit number to set.
From 0 to 63.
0

Result

Returns number or error.

Description

Sets a bit in a 64-bit number.

Examples

Set first bit:

MBS( "Math.SetBit"; 0; 0 )

Example result: 1

Set last bit:

MBS( "Math.SetBit"; 0; 63 )

Example result: 9223372036854775808

See also

Release notes

  • Version 15.3
    • Added Math.SetBit, Math.ClearBit and Math.GetBit functions.

Blog Entries

This function is free to use.

Created 21st May 2025, last changed 21st May 2025


Math.Reciprocal - Math.StandardDeviation