Libraryless. Click here for Pure Java version (2488L/16K).
svoid test_roundUpToPowerOfTen() { for (double exp = -1; exp <= log10(Int.MAX_VALUE-100); exp += 0.1) { int n = iround(exp10(exp)); long answer = roundUpToPowerOfTen_double(n); long toCheck = roundUpToPowerOfTen(n); assertEqualsVerbose(str(n), answer, toCheck); } }
Began life as a copy of #1029060
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1029062 |
Snippet name: | test_roundUpToPowerOfTen (OK) |
Eternal ID of this version: | #1029062/9 |
Text MD5: | 71068b65b7db5ecc11444a7363c66110 |
Transpilation MD5: | f9c7906c73afc84531a2a4c399d9dd74 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-18 18:40:20 |
Source code size: | 292 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 189 / 288 |
Version history: | 8 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |