Coder Social home page Coder Social logo

Comments (3)

milancurcic avatar milancurcic commented on May 27, 2024 1

@zmiimz: I am in process of implementing the specific procedures for complex numbers (real32, real64, and real128 kinds). While for most functions the implementation is trivial, for a few it is not because of different rules for complex arithemetic. Since I almost don't work at all with complex numbers, I do not know what kind of behavior is most expected, or "least astonishing" :). Specifically:

  1. Take a look at the complex implementations of arange in https://github.com/wavebitscientific/functional-fortran/blob/operators-and-complex-support/src/lib/mod_functional.f90. Because the increment is of type complex, one could define the resulting array to have length determined by the Re(increment) or Im(increment). Currently, it is implemented as to use Re(increment) to determine size when Re(increment) /= 0, and Im(increment) otherwise. Would this be the most expected behavior to you or there is something else you would recommend?

  2. How would you expect sort to work on complex numbers? Sort by Re(x), by Im(x), or by norm(x)?

from functional-fortran.

milancurcic avatar milancurcic commented on May 27, 2024 1

Hello @zmiinz, see PR #6 which adds full support for complex numbers, now merged into master.

from functional-fortran.

zmiimz avatar zmiimz commented on May 27, 2024

Dear Milan,
thanks for the update. The answer is as easy as it can be. Because there is no meaning of order for complex numbers ( with the exception Im(z) == 0) any choice will be just ok. ) Sure, the most proper way would be to make it modifiable (let the user to decide the ordering by Re, Im, Abs, or lexicographic) but I am afraid it will take too much time to implement. So this is entirely up to you if you want to do this.

from functional-fortran.

Related Issues (19)

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.