Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/webassembly/reference/numeric/max/index.md
6510 views
---
title: Max slug: WebAssembly/Reference/Numeric/Max
---

{{WebAssemblySidebar}}

The max instructions, are used for getting the higher of two numbers.

{{EmbedInteractiveExample("pages/wat/max.html", "tabbed-taller")}}

Syntax

;; load two numbers onto the stack f32.const 10 f32.const 3 ;; get higher number f32.max ;; the top item on the stack will now be 10
InstructionBinary opcode
f32.max0x97
f64.max0xa5