Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-22-2021 07:26 AM
Hi everyone,
I just updated my database to 4.2.7. When running my software I encountered a weird problem with multiplication of numbers which is probably best explained in pictures:
So, apparently there is something wrong with float values and multiplication, since the error does not come up when only adding two floats or multiplying two floats (e.g. 1.0+2.0 or 1.0*2.0).
06-22-2021 08:20 AM
Confirmed in 4.2.8 too
06-22-2021 06:19 PM
@elena.kohlwey
as you updated my database to 4.2.7
I presume this was successfully working on a prior version?
my testing is such that I get the following results when run via cypher-shell
Neo4j Version Response
4.0.3 1.0
4.1.6 1.0
4.2.8 / 4.3.1 Invalid input '(': expected "+" or "-" (line 1, column 10 (offset: 9))
"return 2*(2.0-1.5);"
further investigating the change in behavior
06-23-2021 12:26 AM
Thanks for reporting, seems the new parser handles unary / binary -
incorrectly.
Only happens for negative floating point numbers in a subtraction, i.e. return 0-1.0
You can work around while it's being fixed by inserting a space after the minus, e.g. return 0- 1.0
Thank you @dana.canzano for reporting back!
06-23-2021 01:32 AM
Thanks for the workaround, Michael. This will help me continue for now.
06-23-2021 01:31 AM
Yes, this was working before.
All the sessions of the conference are now available online