mojira.dev
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

Comments 0

No comments.

intsuc

(Unassigned)

Confirmed

Platform

Low

Commands

1.20.2 Pre-release 2, 1.20.2, 23w41a, 23w42a, 23w43a, ..., 24w33a, 1.21.4, 25w04a, 1.21.5, 25w16a

Retrieved