mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
document that * operator has has a higher precedence than <<
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -20,6 +20,10 @@ The following are the changes from calc version 2.14.1.5 to date:
|
|||||||
Fixed obsolete references to the atoq() in LIBRARY to use the
|
Fixed obsolete references to the atoq() in LIBRARY to use the
|
||||||
correct internal function name of str2q().
|
correct internal function name of str2q().
|
||||||
|
|
||||||
|
Document in help/unexpected that * operator has has a higher
|
||||||
|
precedence than << in calc, which differs from C. Thanks
|
||||||
|
goes to GitHub user @inguin for pointing put this difference.
|
||||||
|
|
||||||
|
|
||||||
The following are the changes from calc version 2.14.1.3 to 2.14.1.4:
|
The following are the changes from calc version 2.14.1.3 to 2.14.1.4:
|
||||||
|
|
||||||
|
@@ -556,8 +556,14 @@ Unexpected
|
|||||||
; print sin(d2r(30))
|
; print sin(d2r(30))
|
||||||
0.5
|
0.5
|
||||||
|
|
||||||
|
* operator has has a higher precedence than <<
|
||||||
|
==============================================
|
||||||
|
|
||||||
## Copyright (C) 1999-2007,2014,2017,2021 Landon Curt Noll
|
The * operator has has a higher precedence than <<, which differs from the C language.
|
||||||
|
So 3 << 2*5 evaluates to 3072 in C, whereas 3 << 2*5 evaluates to 60 in calc.
|
||||||
|
|
||||||
|
|
||||||
|
## Copyright (C) 1999-2007,2014,2017,2021,2023 Landon Curt Noll
|
||||||
##
|
##
|
||||||
## Calc is open software; you can redistribute it and/or modify it under
|
## Calc is open software; you can redistribute it and/or modify it under
|
||||||
## the terms of the version 2.1 of the GNU Lesser General Public License
|
## the terms of the version 2.1 of the GNU Lesser General Public License
|
||||||
|
Reference in New Issue
Block a user