diff options
author | Uwe Kleine-König <[email protected]> | 2024-03-03 10:24:09 +0100 |
---|---|---|
committer | Andrew Morton <[email protected]> | 2024-03-12 13:09:22 -0700 |
commit | 8c86fb68ffcb0d8a5418e171c8d359d712912e9b (patch) | |
tree | 5d19b4a82cc54d1c036f9f855691fa7946bb56ca /tools/perf/util/trace-event-scripting.c | |
parent | 4bb7be96fc8871f37ff705e02443a0526fb4df8d (diff) |
mul_u64_u64_div_u64: increase precision by conditionally swapping a and b
As indicated in the added comment, the algorithm works better if b is big.
As multiplication is commutative, a and b can be swapped. Do this if a
is bigger than b.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Uwe Kleine-König <[email protected]>
Tested-by: Biju Das <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions