Bug 259703 - parseFloat() and console.log("%f") disagree
Summary: parseFloat() and console.log("%f") disagree
Status: RESOLVED DUPLICATE of bug 259146
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-01 13:28 PDT by Dominic Farolino
Modified: 2023-08-01 13:36 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominic Farolino 2023-08-01 13:28:18 PDT
Per the Console Standard, `console.log("%f", ...)` should delegate to ECMAScript's %parseFloat()%. All browsers agree that `parseFloat(23)` prints "23", however in WebKit, `console.log("%f", 23)` prints "23.000000" (i.e., including an unnecessary number of zeros). If `console.log(%f)` were truly delegating to `parseFloat()`, then their outputs should be the same.
Comment 1 Devin Rousso 2023-08-01 13:36:31 PDT
i think this was also fixed by 266020@main

*** This bug has been marked as a duplicate of bug 259146 ***