[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ast-users
Subject:    Re: [ast-users] ksh suffices f, F, l, and L for floating point constants not working
From:       Tina Harriott <tina.harriott.math () gmail ! com>
Date:       2013-11-18 22:44:28
Message-ID: CAH5-_XOOUqf0093WFe1vXnj99D-bxhOs7GC8ZD3cNB+M6cMAZw () mail ! gmail ! com
[Download RAW message or body]

On 23 October 2013 03:05, Tina Harriott <tina.harriott.math@gmail.com> wrote:
> On 23 October 2013 00:53, Tina Harriott <tina.harriott.math@gmail.com> wrote:
>> ast-ksh 2013-10-10 introduced suffices for floating point constants:
>> 13-10-08  The shell arithmetic now recognized suffices f,F, l, and L for
>>           floating point constants.
>>
>> However, they do not work:
>> ./arch/linux.i386-64/bin/ksh -c 'print $((1.1f))'
>> ./arch/linux.i386-64/bin/ksh: 1.1f: arithmetic syntax error
>> ./arch/linux.i386-64/bin/ksh -c 'print $((x=1.1f))'
>> ./arch/linux.i386-64/bin/ksh: x=1.1f: arithmetic syntax error
>> ./arch/linux.i386-64/bin/ksh -c 'float x ; print $((x=1.1f))'
>> ./arch/linux.i386-64/bin/ksh: x=1.1f: arithmetic syntax error
>> ./arch/linux.i386-64/bin/ksh -c 'float x ; print $((x=1.1F))'
>> ./arch/linux.i386-64/bin/ksh: x=1.1F: arithmetic syntax error
>> ./arch/linux.i386-64/bin/ksh -c 'float x ; print $((x=1.1l))'
>> ./arch/linux.i386-64/bin/ksh: x=1.1l: arithmetic syntax error
>> ./arch/linux.i386-64/bin/ksh -c 'float x ; ((x=1.1l))'
>> ./arch/linux.i386-64/bin/ksh: x=1.1l: arithmetic syntax error
>>
>> If possible, can ksh please get the same kind of suffices for integer
>> constants, to have parity?
>
> Math suffices do not work in printf either:
>
> ksh -c 'builtin printf ; printf "%f\n" 1.1f;:'
> /home/thm/bin/ksh: printf: 1.1f: arithmetic syntax error
> /home/thm/bin/ksh: printf: 1.1f: arithmetic syntax error
> /home/thm/bin/ksh: printf: warning: invalid argument of type f
> 1.100000
>
> Tina

Is this going to be fixed in the next alpha?

Tina
-- 
Tina Harriott  - Women in Mathematics
Contact: tina.harriott.math@gmail.com
_______________________________________________
ast-users mailing list
ast-users@lists.research.att.com
http://lists.research.att.com/mailman/listinfo/ast-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic