Path: blob/main/files/en-us/webassembly/reference/numeric/negate/index.md
6519 views
------{{WebAssemblySidebar}}
The neg instructions, short for negate, are used to negate a number. That is, turn a positive number into a negative number and a negative number into a positive number.
{{EmbedInteractiveExample("pages/wat/neg.html", "tabbed-standard")}}
Syntax
| Instruction | Binary opcode |
|---|---|
f32.neg | 0x8c |
f64.neg | 0x9a |