Comments (3)
@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:
-
Take a look at the
complex
implementations ofarange
in https://github.com/wavebitscientific/functional-fortran/blob/operators-and-complex-support/src/lib/mod_functional.f90. Because theincrement
is of typecomplex
, one could define the resulting array to have length determined by theRe(increment)
orIm(increment)
. Currently, it is implemented as to useRe(increment)
to determine size whenRe(increment) /= 0
, andIm(increment)
otherwise. Would this be the most expected behavior to you or there is something else you would recommend? -
How would you expect
sort
to work oncomplex
numbers? Sort byRe(x)
, byIm(x)
, or bynorm(x)
?
from functional-fortran.
Hello @zmiinz, see PR #6 which adds full support for complex numbers, now merged into master.
from functional-fortran.
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)
- Build and test on Cray and IBM platforms HOT 6
- Add support for character arrays HOT 4
- functional-fortran HOT 6
- Regarding Understanding the Fortran code HOT 1
- low contrast HOT 1
- Enhancement: Provide contiguous variants HOT 2
- functional-fortran as an fpm package HOT 1
- test_map fails for the complex32 case with gfortran-10 with -O3 HOT 10
- Time complexity
- Travis build error HOT 1
- more concise version of even function HOT 1
- Allow subscripting the last index of the array HOT 3
- Roadmap to stable release HOT 4
- Build with FPM fails: <ERROR>*build_model*:Error: One or more duplicate module names found HOT 1
- Specific procedures for derived types HOT 1
- test map, real128 fails on ppc HOT 1
- Releases HOT 3
- Implement ones, zeros, and empty functions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from functional-fortran.