Operating system: Windows 10 Pro
Graphics card: Geforce GTX 960
Broken: 2.93.0 Beta fa8d566c3b12
Worked: none, saw the problem in the three latest 2.93 Alpha versions I tested, as well
Short description of error
The modulo function of the "Attribute-Math"-node leads to incorrect results when applied to a non-rounded division result - even when the division result doesn't have a fractional part. This behaviour only occurs, when one or both float-sockets of the preceding "Attribut-Math-Divide"-node are connected to "Input-Value"-nodes.
Example: (0.004[from value node] / 0.1) mod 2.000 = 2.000 (very wrong!)
Exact steps for others to reproduce the error
Create a simple geometry node tree on an empty mesh:
- Mesh-Primitives: Line with just one point
- Input-Value-Node: set the Value to 0.400
- Attribute Math: Divide (Input Value) / 0.100 => "divRes"
- Attribute Math: Modulo "divRes" mod 2.000 => "mod"
The spreadsheet shows the attribute "mod" having the value "2.000". It should be 0.000.
If you insert an "Attribute-Math-Round"-node to round "divRes", the modulo value changes to the correct result.
If you disconnect the "Input-Value"-node and enter the value "0.400" directly, the result is also correct.
Screenshot with and without rounding: