victorsenam / caderno

10 stars 3 forks source link

Is structure dbl a good idea? #2

Closed victorsenam closed 7 years ago

victorsenam commented 7 years ago

This can be confusing to use or too complex. Is there a better solution?

Also, the following may happen

dbl x = 2.; 
return (0 < x);

which will work apparently alright, but will compare 0 and 2 without eps (with double compare, instead of dbl compare). This is hard to see and debug, might be a problem.