DLAISNAN(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

✨ NAME ✨

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/dlaisnan.f

okay so yes, the entire NAME field is literally just a file path πŸ’€ that's not me being lazy, that's what Doxygen put there, and we respect the source. this page lives in the Library Functions Manual, and it's all about one tiny little Fortran function that checks for NaNs. slay.


🌸 SYNOPSIS 🌸

Functions/Subroutines

logical function DLAISNAN (din1, din2)

DLAISNAN tests input for NaN by comparing two arguments for inequality. that's it. that's the whole vibe check πŸ¦‹


πŸ’– FUNCTION/SUBROUTINE DOCUMENTATION πŸ’–

logical function DLAISNAN (double precision, intent(in) din1, double precision, intent(in) din2)

DLAISNAN tests input for NaN by comparing two arguments for inequality. bestie it's a one-trick pony and the trick is iconic πŸ’…

Purpose

okay so real talk, this routine is not for general use. it exists solely to avoid over-optimization in DISNAN. that's the whole reason it's here, no cap.

DLAISNAN checks for NaNs by comparing its two arguments for inequality. and why does that work? because NaN is the only floating-point value where NaN != NaN returns .TRUE. β€” like, it literally won't even equal itself, main character energy tbh 😭. so to check for NaNs, you pass the same variable as both arguments.

and here's the clever part, the reason it's written this way: a compiler must assume that the two arguments are not the same variable, so the test will not be optimized away. 🧚

⚠️ but listen β€” interprocedural or whole-program optimization may delete this test. so don't be shocked if it vanishes under aggressive optimization. that's a real caveat, not me being dramatic (for once).

also, the ISNAN functions will be replaced by the correct Fortran 03 intrinsic once the intrinsic is widely available. future plans, iykyk. ⭐

Parameters

  • DIN1 β€” DIN1 is DOUBLE PRECISION ✨
  • DIN2 β€” DIN2 is DOUBLE PRECISION, and these are the two numbers to compare for inequality 🫢

Author

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Definition at line 73 of file dlaisnan.f. πŸ“


πŸŽ€ AUTHOR πŸŽ€

Generated automatically by Doxygen for LAPACK from the source code. πŸ€– (not a human, not a vibe, just a doc generator doing its thing)


and that's the whole page, bestie πŸ’– this little icon is LAPACK Version 3.12.0, and the footer's date slot is literally just /home/abui.../dlaisnan.f(3) again β€” the path said "i'm also the date now" and honestly? respect. πŸ‘‘πŸŒ·πŸ’œ

πŸ“¦ where this page comes from