Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: forcing float arithmetic.



On Wed, Mar 24, 2021 at 2:54 PM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> The behavior of zsh in this regard is consistent with C and all languages inspired by it (C++, Java, C# and many, many others). This is really working as intended.

Proof:

#include <stdio.h>
void main() {
 int x = 3, y = 7;
 float z = (x/y);
 printf("%g\n", z);
}




Messages sorted by: Reverse Date, Date, Thread, Author