bench: fix NaN check to use imaginary part
#22685
run_affected_tests.yml
on: push
Run affected tests
2m 4s
NaN check to use imaginary part
#22685