Coder Social home page Coder Social logo

Comments (6)

neteler avatar neteler commented on July 1, 2024

Not sure how relevant, but here are some similar cases/changes:

from grass-addons.

hellik avatar hellik commented on July 1, 2024

from https://trac.osgeo.org/grass/ticket/2343

Infinities are sufficiently rare that it probably doesn't matter how they're handled (e.g. r.mapcalc explicitly checks for division by zero, log(0) etc and returns null). If it's just a matter of writing float_to_string() and string_to_float() functions which deal with them correctly (and we know how to write them), it should be done.

from grass-addons.

metzm avatar metzm commented on July 1, 2024

In r.hants and r.series.lwr, the option range=0,inf is converted to fp numbers with atof() which behaves like strod(). From the strtod manual (man strtod): "An infinity is either "INF" or "INFINITY", disregarding case." and "CONFORMING TO: POSIX.1-2001, POSIX.1-2008, C99. strtod() was also described in C89." That is atof("inf") should return the fp representation of infinity as defined by IEEE standards.
I don't see a reason why range=0,inf should not work on MS Windows. A broken version of atof/strtod in the operating system?

from grass-addons.

marisn avatar marisn commented on July 1, 2024

I don't see a reason why range=0,inf should not work on MS Windows. A broken version of atof/strtod in the operating system?

There is a bug report for mingw: https://sourceforge.net/p/mingw-w64/bugs/501/

from grass-addons.

metzm avatar metzm commented on July 1, 2024

I don't see a reason why range=0,inf should not work on MS Windows. A broken version of atof/strtod in the operating system?

There is a bug report for mingw: https://sourceforge.net/p/mingw-w64/bugs/501/

Ah, that explains it.
As an alternative, using a very large number instead of inf should work, e.g. range=0,1.7e308.

from grass-addons.

lucadelu avatar lucadelu commented on July 1, 2024

Could we close this?
It seems not a problem related to the addons

from grass-addons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.