[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #47744] printf family of functions does not su
From: |
Mike Miller |
Subject: |
[Octave-bug-tracker] [bug #47744] printf family of functions does not support %b[ouxX] or %t[ouxX] conversions |
Date: |
Wed, 20 Apr 2016 21:26:04 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0 |
URL:
<http://savannah.gnu.org/bugs/?47744>
Summary: printf family of functions does not support %b[ouxX]
or %t[ouxX] conversions
Project: GNU Octave
Submitted by: mtmiller
Submitted on: Wed 20 Apr 2016 02:26:03 PM PDT
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Matlab Compatibility
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
For Matlab compatibility, the printf family of functions should support the
following conversion specifiers:
%bo, %bu, %bx, %bX - double-precision value representation in octal, decimal,
or hexadecimal
%to, %tu, %tx, %tX - single-precision value representation in octal, decimal,
or hexadecimal
I'm not completely sure, but I guess they mean it should interpret the
variable's storage location as if it were an integer and display the integer
value in the appropriate base.
They give these two examples:
sprintf('%bx', pi) → 400921fb54442d18
sprintf('%tx', pi) → 40490fdb
These are the same values that Octave gives for something like
dec2hex (typecast (double_value, "uint64"))
dec2hex (typecast (single_value, "uint32"))
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47744>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #47744] printf family of functions does not support %b[ouxX] or %t[ouxX] conversions,
Mike Miller <=