question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

double.NaN leads to errors

See original GitHub issue

Steps to reproduce:

Hello together 😃 When adding double.NaN or 0.0/0.0 anywhere in the I my Code (target framework 4.7.2) I get the error message below. I tried checking and unchecking the “Single + Double inf”- and “-nan(ind)” checkboxes in the DllExport GUI but it did not help. I can get it to compile by using your IL assembler but when doing this I loose the ability to debug my code (no breakpoints are working anymore). The same issue appears for ±Inf too. Can you please help me how to fix this? Thanks!

  • DllExport -version: 1.7.3
  • Used Visual Studio 2019 v16.7.5

Information from Data tab or log data:

1>C:\test\packages\DllExport.1.7.3\tools\net.r_eg.DllExport.targets(76,5): error : C:\test\test_project\test.cs(123) : error : syntax error at token ‘-’ in: IL_0029: ldc.r8 -nan(ind)

Demo Project files / Samples / etc.:

. . .


Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
kcl93commented, Dec 28, 2020

Hello @3F I have tested your fix as requested and my project now compiles perfectly fine. Thank you very much! I hope, that you had some nice christmas celebration and are going to have a good start in a better year 2021 😃

1reaction
kcl93commented, Oct 22, 2020

Hello @3F, thanks for the quick reply! Sadly I can not use your IL assembler as this prevents me from debugging my code (breakpoints do not trigger). However I will try your suggestion to use an exported function that creates NaN values or stay with my current workaround where I just use -666.6 instead of NaN as this will suit me fine to visually see invalid values. Don’t hurry and get well soon! 😃 Thanks for this great piece of software! I do not know how I could create my programs without it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Why does Double.NaN==Double.NaN return false?
As has already been described, NaN is unordered, so a numeric comparison operation involving one or two NaNs returns false and any !=...
Read more >
V3076. Comparison with 'double.NaN' is meaningless. Use ...
The analyzer detected that a variable of type float or double is compared with a float. NaN or double. NaN value. As stated...
Read more >
Why Double.parseDouble("ABC") not returns Double.NaN?
Because ABC is not a valid format of number and it matches the behavior of the other boxed classes' parse* methods. – ratchet...
Read more >
NaN in Java
Java defines NaN constants of both float and double types as Float.NaN and Double.NaN: “A constant holding a Not-a-Number (NaN) value of ...
Read more >
double.NaN is exported wrong
Hi,. I have a grid with a cell value of double.NaN, showing as "n. def" (german locale). Thats correct and works as expected....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found