mirror of
https://github.com/byteworksinc/ORCALib.git
synced 2024-05-27 23:48:24 +00:00
printf: print inf/nan rather than INF/NAN when using f and a formats.
This works in conjunction with SysFloat commit e409ecd4717, and at least that version of SysFloat is now required.
This commit is contained in:
parent
b21a51ba33
commit
614af65c68
|
@ -3868,10 +3868,9 @@ in1 ldy #8 load exponent/sign word
|
||||||
bne sn1 if number is an infinity or NaN
|
bne sn1 if number is an infinity or NaN
|
||||||
lda #' ' do not use '0' padding
|
lda #' ' do not use '0' padding
|
||||||
sta ~paddChar
|
sta ~paddChar
|
||||||
; Always format like %e for now, because %E code messes up padding for INF/NAN.
|
lda ~orVal if doing %A format
|
||||||
; lda ~orVal if doing %A format
|
bne in2
|
||||||
; bne in2
|
brl ~Format_E format like %E
|
||||||
; brl ~Format_E format like %E
|
|
||||||
in2 brl ~Format_e else format like %e
|
in2 brl ~Format_e else format like %e
|
||||||
;
|
;
|
||||||
; Determine sign
|
; Determine sign
|
||||||
|
@ -5217,7 +5216,7 @@ fList dc c'%',a'~Format_Percent' %
|
||||||
dc c'a',a'~Format_a' a
|
dc c'a',a'~Format_a' a
|
||||||
dc c'A',a'~Format_A' A
|
dc c'A',a'~Format_A' A
|
||||||
dc c'f',a'~Format_f' f
|
dc c'f',a'~Format_f' f
|
||||||
dc c'F',a'~Format_f' F
|
dc c'F',a'~Format_F' F
|
||||||
dc c'e',a'~Format_e' e
|
dc c'e',a'~Format_e' e
|
||||||
dc c'E',a'~Format_E' E
|
dc c'E',a'~Format_E' E
|
||||||
dc c'g',a'~Format_g' g
|
dc c'g',a'~Format_g' g
|
||||||
|
|
Loading…
Reference in New Issue
Block a user