From 6264b34caf8791cd873c03eec5527f43a418edf5 Mon Sep 17 00:00:00 2001 From: Kierre Date: Wed, 28 Jan 2026 12:05:35 -0500 Subject: [PATCH] clarify exponential notation and add canonical JSON note --- content/rooms/fragments/v1-floaty-power-levels.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/rooms/fragments/v1-floaty-power-levels.md b/content/rooms/fragments/v1-floaty-power-levels.md index 52a198f6..abd4f50a 100644 --- a/content/rooms/fragments/v1-floaty-power-levels.md +++ b/content/rooms/fragments/v1-floaty-power-levels.md @@ -32,3 +32,9 @@ For example, this is a valid `m.room.power_levels` event in this room version: In this example, both `@bob:localhost` and `@alice:localhost` have the same effective power level of `50`, even though the values are technically different. + +When a float written in exponential notation is unpacked, the decimal portion is removed +afterward; for example, `5.114698E4` becomes `51146.98`, which is then truncated to `51146`. + +Note that, since this room version does not enforce that events comply with the requirements +of [Canonical JSON](/appendices#canonical-json), power levels can be formatted as floats.