📄 base.dectest
字号:
basx346 toEng 10e-10 -> 1.0E-9
basx347 toSci 10e-11 -> 1.0E-10
basx348 toEng 10e-11 -> 100E-12
basx349 toSci 10e-12 -> 1.0E-11
basx350 toEng 10e-12 -> 10E-12
basx351 toSci 10e-13 -> 1.0E-12
basx352 toEng 10e-13 -> 1.0E-12
basx361 toSci 7E12 -> 7E+12
basx362 toEng 7E12 -> 7E+12
basx363 toSci 7E11 -> 7E+11
basx364 toEng 7E11 -> 700E+9
basx365 toSci 7E10 -> 7E+10
basx366 toEng 7E10 -> 70E+9
basx367 toSci 7E9 -> 7E+9
basx368 toEng 7E9 -> 7E+9
basx369 toSci 7E8 -> 7E+8
basx370 toEng 7E8 -> 700E+6
basx371 toSci 7E7 -> 7E+7
basx372 toEng 7E7 -> 70E+6
basx373 toSci 7E6 -> 7E+6
basx374 toEng 7E6 -> 7E+6
basx375 toSci 7E5 -> 7E+5
basx376 toEng 7E5 -> 700E+3
basx377 toSci 7E4 -> 7E+4
basx378 toEng 7E4 -> 70E+3
basx379 toSci 7E3 -> 7E+3
basx380 toEng 7E3 -> 7E+3
basx381 toSci 7E2 -> 7E+2
basx382 toEng 7E2 -> 700
basx383 toSci 7E1 -> 7E+1
basx384 toEng 7E1 -> 70
basx385 toSci 7E0 -> 7
basx386 toEng 7E0 -> 7
basx387 toSci 7E-1 -> 0.7
basx388 toEng 7E-1 -> 0.7
basx389 toSci 7E-2 -> 0.07
basx390 toEng 7E-2 -> 0.07
basx391 toSci 7E-3 -> 0.007
basx392 toEng 7E-3 -> 0.007
basx393 toSci 7E-4 -> 0.0007
basx394 toEng 7E-4 -> 0.0007
basx395 toSci 7E-5 -> 0.00007
basx396 toEng 7E-5 -> 0.00007
basx397 toSci 7E-6 -> 0.000007
basx398 toEng 7E-6 -> 0.000007
basx399 toSci 7E-7 -> 7E-7
basx400 toEng 7E-7 -> 700E-9
basx401 toSci 7E-8 -> 7E-8
basx402 toEng 7E-8 -> 70E-9
basx403 toSci 7E-9 -> 7E-9
basx404 toEng 7E-9 -> 7E-9
basx405 toSci 7E-10 -> 7E-10
basx406 toEng 7E-10 -> 700E-12
basx407 toSci 7E-11 -> 7E-11
basx408 toEng 7E-11 -> 70E-12
basx409 toSci 7E-12 -> 7E-12
basx410 toEng 7E-12 -> 7E-12
basx411 toSci 7E-13 -> 7E-13
basx412 toEng 7E-13 -> 700E-15
-- Exacts remain exact up to precision ..
precision: 9
basx420 toSci 100 -> 100
basx421 toEng 100 -> 100
basx422 toSci 1000 -> 1000
basx423 toEng 1000 -> 1000
basx424 toSci 999.9 -> 999.9
basx425 toEng 999.9 -> 999.9
basx426 toSci 1000.0 -> 1000.0
basx427 toEng 1000.0 -> 1000.0
basx428 toSci 1000.1 -> 1000.1
basx429 toEng 1000.1 -> 1000.1
basx430 toSci 10000 -> 10000
basx431 toEng 10000 -> 10000
basx432 toSci 100000 -> 100000
basx433 toEng 100000 -> 100000
basx434 toSci 1000000 -> 1000000
basx435 toEng 1000000 -> 1000000
basx436 toSci 10000000 -> 10000000
basx437 toEng 10000000 -> 10000000
basx438 toSci 100000000 -> 100000000
basx439 toEng 100000000 -> 100000000
basx440 toSci 1000000000 -> 1.00000000E+9 Rounded
basx441 toEng 1000000000 -> 1.00000000E+9 Rounded
basx442 toSci 1000000000 -> 1.00000000E+9 Rounded
basx443 toEng 1000000000 -> 1.00000000E+9 Rounded
basx444 toSci 1000000003 -> 1.00000000E+9 Rounded Inexact
basx445 toEng 1000000003 -> 1.00000000E+9 Rounded Inexact
basx446 toSci 1000000005 -> 1.00000001E+9 Rounded Inexact
basx447 toEng 1000000005 -> 1.00000001E+9 Rounded Inexact
basx448 toSci 10000000050 -> 1.00000001E+10 Rounded Inexact
basx449 toEng 10000000050 -> 10.0000001E+9 Rounded Inexact
basx450 toSci 1000000009 -> 1.00000001E+9 Rounded Inexact
basx451 toEng 1000000009 -> 1.00000001E+9 Rounded Inexact
basx452 toSci 10000000000 -> 1.00000000E+10 Rounded
basx453 toEng 10000000000 -> 10.0000000E+9 Rounded
basx454 toSci 10000000003 -> 1.00000000E+10 Rounded Inexact
basx455 toEng 10000000003 -> 10.0000000E+9 Rounded Inexact
basx456 toSci 10000000005 -> 1.00000000E+10 Rounded Inexact
basx457 toEng 10000000005 -> 10.0000000E+9 Rounded Inexact
basx458 toSci 10000000009 -> 1.00000000E+10 Rounded Inexact
basx459 toEng 10000000009 -> 10.0000000E+9 Rounded Inexact
basx460 toSci 100000000000 -> 1.00000000E+11 Rounded
basx461 toEng 100000000000 -> 100.000000E+9 Rounded
basx462 toSci 100000000300 -> 1.00000000E+11 Rounded Inexact
basx463 toEng 100000000300 -> 100.000000E+9 Rounded Inexact
basx464 toSci 100000000500 -> 1.00000001E+11 Rounded Inexact
basx465 toEng 100000000500 -> 100.000001E+9 Rounded Inexact
basx466 toSci 100000000900 -> 1.00000001E+11 Rounded Inexact
basx467 toEng 100000000900 -> 100.000001E+9 Rounded Inexact
basx468 toSci 1000000000000 -> 1.00000000E+12 Rounded
basx469 toEng 1000000000000 -> 1.00000000E+12 Rounded
basx470 toSci 1000000003000 -> 1.00000000E+12 Rounded Inexact
basx471 toEng 1000000003000 -> 1.00000000E+12 Rounded Inexact
basx472 toSci 1000000005000 -> 1.00000001E+12 Rounded Inexact
basx473 toEng 1000000005000 -> 1.00000001E+12 Rounded Inexact
basx474 toSci 1000000009000 -> 1.00000001E+12 Rounded Inexact
basx475 toEng 1000000009000 -> 1.00000001E+12 Rounded Inexact
-- check rounding modes heeded
precision: 5
rounding: ceiling
bsrx401 toSci 1.23450 -> 1.2345 Rounded
bsrx402 toSci 1.234549 -> 1.2346 Rounded Inexact
bsrx403 toSci 1.234550 -> 1.2346 Rounded Inexact
bsrx404 toSci 1.234551 -> 1.2346 Rounded Inexact
rounding: down
bsrx405 toSci 1.23450 -> 1.2345 Rounded
bsrx406 toSci 1.234549 -> 1.2345 Rounded Inexact
bsrx407 toSci 1.234550 -> 1.2345 Rounded Inexact
bsrx408 toSci 1.234551 -> 1.2345 Rounded Inexact
rounding: floor
bsrx410 toSci 1.23450 -> 1.2345 Rounded
bsrx411 toSci 1.234549 -> 1.2345 Rounded Inexact
bsrx412 toSci 1.234550 -> 1.2345 Rounded Inexact
bsrx413 toSci 1.234551 -> 1.2345 Rounded Inexact
rounding: half_down
bsrx415 toSci 1.23450 -> 1.2345 Rounded
bsrx416 toSci 1.234549 -> 1.2345 Rounded Inexact
bsrx417 toSci 1.234550 -> 1.2345 Rounded Inexact
bsrx418 toSci 1.234650 -> 1.2346 Rounded Inexact
bsrx419 toSci 1.234551 -> 1.2346 Rounded Inexact
rounding: half_even
bsrx421 toSci 1.23450 -> 1.2345 Rounded
bsrx422 toSci 1.234549 -> 1.2345 Rounded Inexact
bsrx423 toSci 1.234550 -> 1.2346 Rounded Inexact
bsrx424 toSci 1.234650 -> 1.2346 Rounded Inexact
bsrx425 toSci 1.234551 -> 1.2346 Rounded Inexact
rounding: down
bsrx426 toSci 1.23450 -> 1.2345 Rounded
bsrx427 toSci 1.234549 -> 1.2345 Rounded Inexact
bsrx428 toSci 1.234550 -> 1.2345 Rounded Inexact
bsrx429 toSci 1.234551 -> 1.2345 Rounded Inexact
rounding: half_up
bsrx431 toSci 1.23450 -> 1.2345 Rounded
bsrx432 toSci 1.234549 -> 1.2345 Rounded Inexact
bsrx433 toSci 1.234550 -> 1.2346 Rounded Inexact
bsrx434 toSci 1.234650 -> 1.2347 Rounded Inexact
bsrx435 toSci 1.234551 -> 1.2346 Rounded Inexact
-- negatives
rounding: ceiling
bsrx501 toSci -1.23450 -> -1.2345 Rounded
bsrx502 toSci -1.234549 -> -1.2345 Rounded Inexact
bsrx503 toSci -1.234550 -> -1.2345 Rounded Inexact
bsrx504 toSci -1.234551 -> -1.2345 Rounded Inexact
rounding: down
bsrx505 toSci -1.23450 -> -1.2345 Rounded
bsrx506 toSci -1.234549 -> -1.2345 Rounded Inexact
bsrx507 toSci -1.234550 -> -1.2345 Rounded Inexact
bsrx508 toSci -1.234551 -> -1.2345 Rounded Inexact
rounding: floor
bsrx510 toSci -1.23450 -> -1.2345 Rounded
bsrx511 toSci -1.234549 -> -1.2346 Rounded Inexact
bsrx512 toSci -1.234550 -> -1.2346 Rounded Inexact
bsrx513 toSci -1.234551 -> -1.2346 Rounded Inexact
rounding: half_down
bsrx515 toSci -1.23450 -> -1.2345 Rounded
bsrx516 toSci -1.234549 -> -1.2345 Rounded Inexact
bsrx517 toSci -1.234550 -> -1.2345 Rounded Inexact
bsrx518 toSci -1.234650 -> -1.2346 Rounded Inexact
bsrx519 toSci -1.234551 -> -1.2346 Rounded Inexact
rounding: half_even
bsrx521 toSci -1.23450 -> -1.2345 Rounded
bsrx522 toSci -1.234549 -> -1.2345 Rounded Inexact
bsrx523 toSci -1.234550 -> -1.2346 Rounded Inexact
bsrx524 toSci -1.234650 -> -1.2346 Rounded Inexact
bsrx525 toSci -1.234551 -> -1.2346 Rounded Inexact
rounding: down
bsrx526 toSci -1.23450 -> -1.2345 Rounded
bsrx527 toSci -1.234549 -> -1.2345 Rounded Inexact
bsrx528 toSci -1.234550 -> -1.2345 Rounded Inexact
bsrx529 toSci -1.234551 -> -1.2345 Rounded Inexact
rounding: half_up
bsrx531 toSci -1.23450 -> -1.2345 Rounded
bsrx532 toSci -1.234549 -> -1.2345 Rounded Inexact
bsrx533 toSci -1.234550 -> -1.2346 Rounded Inexact
bsrx534 toSci -1.234650 -> -1.2347 Rounded Inexact
bsrx535 toSci -1.234551 -> -1.2346 Rounded Inexact
rounding: half_up
precision: 9
-- The 'baddies' tests from DiagBigDecimal, plus some new ones
basx500 toSci '1..2' -> NaN Conversion_syntax
basx501 toSci '.' -> NaN Conversion_syntax
basx502 toSci '..' -> NaN Conversion_syntax
basx503 toSci '++1' -> NaN Conversion_syntax
basx504 toSci '--1' -> NaN Conversion_syntax
basx505 toSci '-+1' -> NaN Conversion_syntax
basx506 toSci '+-1' -> NaN Conversion_syntax
basx507 toSci '12e' -> NaN Conversion_syntax
basx508 toSci '12e++' -> NaN Conversion_syntax
basx509 toSci '12f4' -> NaN Conversion_syntax
basx510 toSci ' +1' -> NaN Conversion_syntax
basx511 toSci '+ 1' -> NaN Conversion_syntax
basx512 toSci '12 ' -> NaN Conversion_syntax
basx513 toSci ' + 1' -> NaN Conversion_syntax
basx514 toSci ' - 1 ' -> NaN Conversion_syntax
basx515 toSci 'x' -> NaN Conversion_syntax
basx516 toSci '-1-' -> NaN Conversion_syntax
basx517 toSci '12-' -> NaN Conversion_syntax
basx518 toSci '3+' -> NaN Conversion_syntax
basx519 toSci '' -> NaN Conversion_syntax
basx520 toSci '1e-' -> NaN Conversion_syntax
basx521 toSci '7e99999a' -> NaN Conversion_syntax
basx522 toSci '7e123567890x' -> NaN Conversion_syntax
basx523 toSci '7e12356789012x' -> NaN Conversion_syntax
basx524 toSci '' -> NaN Conversion_syntax
basx525 toSci 'e100' -> NaN Conversion_syntax
basx526 toSci '\u0e5a' -> NaN Conversion_syntax
basx527 toSci '\u0b65' -> NaN Conversion_syntax
basx528 toSci '123,65' -> NaN Conversion_syntax
basx529 toSci '1.34.5' -> NaN Conversion_syntax
basx530 toSci '.123.5' -> NaN Conversion_syntax
basx531 toSci '01.35.' -> NaN Conversion_syntax
basx532 toSci '01.35-' -> NaN Conversion_syntax
basx533 toSci '0000..' -> NaN Conversion_syntax
basx534 toSci '.0000.' -> NaN Conversion_syntax
basx535 toSci '00..00' -> NaN Conversion_syntax
basx536 toSci '111e*123' -> NaN Conversion_syntax
basx537 toSci '111e123-' -> NaN Conversion_syntax
basx538 toSci '111e+12+' -> NaN Conversion_syntax
basx539 toSci '111e1-3-' -> NaN Conversion_syntax
basx540 toSci '111e1*23' -> NaN Conversion_syntax
basx541 toSci '111e1e+3' -> NaN Conversion_syntax
basx542 toSci '1e1.0' -> NaN Conversion_syntax
basx543 toSci '1e123e' -> NaN Conversion_syntax
basx544 toSci 'ten' -> NaN Conversion_syntax
basx545 toSci 'ONE' -> NaN Conversion_syntax
basx546 toSci '1e.1' -> NaN Conversion_syntax
basx547 toSci '1e1.' -> NaN Conversion_syntax
basx548 toSci '1ee' -> NaN Conversion_syntax
basx549 toSci 'e+1' -> NaN Conversion_syntax
basx550 toSci '1.23.4' -> NaN Conversion_syntax
basx551 toSci '1.2.1' -> NaN Conversion_syntax
basx552 toSci '1E+1.2' -> NaN Conversion_syntax
basx553 toSci '1E+1.2.3' -> NaN Conversion_syntax
basx554 toSci '1E++1' -> NaN Conversion_syntax
basx555 toSci '1E--1' -> NaN Conversion_syntax
basx556 toSci '1E+-1' -> NaN Conversion_syntax
basx557 toSci '1E-+1' -> NaN Conversion_syntax
basx558 toSci '1E''1' -> NaN Conversion_syntax
basx559 toSci "1E""1" -> NaN Conversion_syntax
basx560 toSci "1E""""" -> NaN Conversion_syntax
-- Near-specials
basx561 toSci "qNaN" -> NaN Conversion_syntax
basx562 toSci "NaNq" -> NaN Conversion_syntax
basx563 toSci "NaNs" -> NaN Conversion_syntax
basx564 toSci "Infi" -> NaN Conversion_syntax
basx565 toSci "Infin" -> NaN Conversion_syntax
basx566 toSci "Infini" -> NaN Conversion_syntax
basx567 toSci "Infinit" -> NaN Conversion_syntax
basx568 toSci "-Infinit" -> NaN Conversion_syntax
basx569 toSci "-sNa" -> NaN Conversion_syntax
-- subnormals and overflows
basx570 toSci '99e999999999' -> Infinity Overflow Inexact Rounded
basx571 toSci '999e999999999' -> Infinity Overflow Inexact Rounded
basx572 toSci '0.9e-999999999' -> 9E-1000000000 Subnormal
basx573 toSci '0.09e-999999999' -> 9E-1000000001 Subnormal
basx574 toSci '0.1e1000000000' -> 1E+999999999
basx575 toSci '10e-1000000000' -> 1.0E-999999999
basx576 toSci '0.9e9999999999' -> Infinity Overflow Inexact Rounded
basx577 toSci '99e-9999999999' -> 0E-1000000007 Underflow Subnormal Inexact Rounded
basx578 toSci '111e9999999999' -> Infinity Overflow Inexact Rounded
basx579 toSci '1111e-9999999999' -> 0E-1000000007 Underflow Subnormal Inexact Rounded
basx580 toSci '1111e-99999999999' -> 0E-1000000007 Underflow Subnormal Inexact Rounded
basx581 toSci '7e1000000000' -> Infinity Overflow Inexact Rounded
-- negatives the same
basx582 toSci '-99e999999999' -> -Infinity Overflow Inexact Rounded
basx583 toSci '-999e999999999' -> -Infinity Overflow Inexact Rounded
basx584 toSci '-0.9e-999999999' -> -9E-1000000000 Subnormal
basx585 toSci '-0.09e-999999999' -> -9E-1000000001 Subnormal
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -