WebAssembly numeric instructions

WebAssembly numeric instructions.

Constants

Const

Declare a constant numbers.

Comparison

Equal

Check if two numbers are equal.

Not equal

Check if two numbers are not equal.

Greater than

Check if a number is greater than another number.

Less than

Check if a number is less than another number.

Greater or equal

Check if a number is greater than or equal to another number.

Less or equal

Check if a number is less than or equal to another number.

Arithmetic

Addition

Add up two numbers.

Subtraction

Subtract one number from another number.

Multiplication

Multiply one number by another number.

Division

Divide one number by another number.

Remainder

Calculate the remainder left over when one integer is divided by another integer.

Floating point specific instructions

Min

Get the lower of two numbers.

Max

Get the higher of two numbers.

Nearest

Round a number to the nearest integer.

Ceil

Round up a number.

Floor

Round down a number.

Truncate

Discard the fractional part of a number.

Absolute

Get the absolute value of a number.

Negate

Negate a number.

Square root

Get the square root of a number.

Copy sign

Copy just the sign bit from one number to another.

Bitwise