# Do not use IGRAPH\_NAN in the docs

**URL:** <https://igraph.discourse.group/t/do-not-use-igraph-nan-in-the-docs/123>\
**Category:** Development\
**Created:** [1 March 2020 10:28 UTC](https://igraph.discourse.group/t/do-not-use-igraph-nan-in-the-docs/123 "2020-03-01T10:28:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![szhorvat](https://yyz2.discourse-cdn.com/free1/user_avatar/igraph.discourse.group/szhorvat/32/3_2.png) [@szhorvat](https://igraph.discourse.group/u/szhorvat)\
**Post date:** [1 March 2020 10:28 UTC](https://igraph.discourse.group/t/do-not-use-igraph-nan-in-the-docs/123/1 "2020-03-01T10:28:50Z")

</div>

A suggestion: let us not say things like "`IGRAPH_NAN` is returned" in the documentation. This may mislead some users into thinking that they can test the return value using `if (x == IGRAPH_NAN) ...`. That is not possible, `isnan()` needs to be used instead.

Thus, let us say “NaN is returned” instead.

I’ll fix instances of `IGRAPH_NAN` in the docs.
