Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Floating point modulus
On 01/11/2015 12:25 PM, Peter Stephenson wrote:
I'll leave that to you, but instead of an explicit rounding you could
do basically the same calculation but assigned to a variable declared
as an integer and output that.xs pws remainder=$1
Ignore this question if it can't be explained simply, since
I don't have the knowledge probably to even understand the
answer, but why is it more complicated than (for example) this:
while [[ $remainder > $2 ]]; do
let remainder=$remainder-$2
done
... can't that sorta be attached to " % " without dozens of lines of
changed code? Seems not :(
And:
/* 25 */ BOOL|OP_A2IO, LR|OP_A2IO, RL|OP_OP, RL|OP_OP, RL|OP_E2,
-/* 30 */ RL|OP_E2, RL|OP_E2, RL|OP_E2, RL|OP_E2, RL|OP_E2IO,
... are those 'metas'? IOW, is that the internal representation of
some command syntax? Metafied? Tokenized? ...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author