Libraryless. Click here for Pure Java version (2488L/16K).
1 | svoid test_roundUpToPowerOfTen() { |
2 | for (double exp = -1; exp <= log10(Int.MAX_VALUE-100); exp += 0.1) { |
3 | int n = iround(exp10(exp)); |
4 | long answer = roundUpToPowerOfTen_double(n); |
5 | long toCheck = roundUpToPowerOfTen(n); |
6 | assertEqualsVerbose(str(n), answer, toCheck); |
7 | } |
8 | } |
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: | 188 / 287 |
Version history: | 8 change(s) |
Referenced in: | [show references] |