I'm having problems with the function node which is not subtracting correctly, ie the below code gives the result of: 2.1899999999999977
msg.payload=26.54-24.35;
return msg;
Any help appreciated.
This is the flow:
[{"id":"a617c53a.3aac1","type":"inject","z":"bc64dfd3.f61d1","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":700,"y":1740,"wires":[["47b21e34.380cb8"]]},{"id":"47b21e34.380cb8","type":"function","z":"bc64dfd3.f61d1","name":"","func":"msg.payload=26.54-24.35;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":900,"y":1740,"wires":[["34ee6374.ca611c"]]},{"id":"34ee6374.ca611c","type":"debug","z":"bc64dfd3.f61d1","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1100,"y":1740,"wires":}]