Mojira Archive
MC-265288

Not all float/double tags in macro arguments are uniquely stringified

The bug

Not all float/double macro arguments are uniquely (in a way that can be distinguished at least from other values) stringified because the maximum number of fraction digits is limited to 15. This could result in multiple float/double tags being converted to the same string representation.

How to reproduce

a.mcfunction
$say $(a)

Float tags

Run

function a {a: 1.4E-45f}
Expected behavior

Unique representation like 0.000000000000000000000000000000000000000000001401298464324817

Actual behavior

0

Double tags

Run

function a {a: 4.9E-324d}
Expected behavior

Unique representation like 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000049

Actual behavior

0

Unresolved

intsuc

2023-09-07, 02:20 PM

2025-01-24, 04:17 PM

10

7

Confirmed

Low

Platform

Commands

1.20.2 Pre-release 2 - 25w04a1.20.2 Pre-release 2, 1.20.2, 23w41a, 23w42a, 23w43a, 23w45a, 1.20.3 Release Candidate 1, 1.20.4, 24w04a, 24w14a, 1.21, 24w33a, 1.21.1, 1.21.4, 25w04a

-