Project

General

Profile

Actions

Bug #3979

closed

format() の '%a' 指定子で、零と非零での印字形式が異なる

Added by tadf (tadayoshi funaba) over 13 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3dev (2010-10-24 trunk 29583) [i686-linux]
Backport:

Description

=begin
format() の '%a' 指定子で、零と非零での印字形式が異なる。

format('%20.3a', 0) #=> " 0x0p+0"
format('%20.3a', 1) #=> " 0x1.000p+0"

%e や %f ではそのような事はありません。

format('%20.3e', 0) #=> " 0.000e+00"
format('%20.3e', 1) #=> " 1.000e+00"

format('%20.3f', 0) #=> " 0.000"
format('%20.3f', 1) #=> " 1.000"
=end

Actions #1

Updated by nobu (Nobuyoshi Nakada) over 13 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r29587.
tadayoshi, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0