Open liss-h opened 1 month ago
it's documented here, https://docs.rs/faer/latest/faer/complex_native/index.html
Yeah, I saw that page. It took me quite a while to find it so I think it would be good to feature it more prominently. That page also doesn't really explain 1 & 2
the stack overflow is due to the stack size on windows being relatively small. faer uses a lot of abstraction layers which ends up being quite costly in non optimized builds. i recommend setting opt-level = 3
in your Cargo.toml
if you still want debug assertions
as for 2, i can't return a reference to Complex<_>
because the real and imaginary parts are stored separately, which native rust references don't really support
the stack overflow is due to the stack size on windows being relatively small. faer uses a lot of abstraction layers which ends up being quite costly in non optimized builds. i recommend setting
opt-level = 3
in yourCargo.toml
if you still want debug assertions
ok thx
as for 2, i can't return a reference to
Complex<_>
because the real and imaginary parts are stored separately, which native rust references don't really support
Ah, right sorry, I totally forgot that Index
has to return a reference
Could you still document (some of) these things? I think it would be beneficial for new users of faer
if they don't have to figure this out on their own. Mainly talking about the limitations on windows and featuring the complex_native
page more prominently or maybe adding an example for complex numbers in the repo (which links to the page). I think that would be very helpful
sure, im currently in the middle of a refactor/possible redesign phase, so this might take a while
Describe the bug Hi :), I was fiddling around with
faer
and found the support around complex numbers really confusing & slightly buggy.Stack overflow on windows. The following code causes a stack overflow on windows (only in
dev
builds,release
works)Additionally, for an unknown (to me) reason there is apparently no way to index a
Mat<Complex<f64>>
. The following code does not compile:At least to me it is not at all apparent why this doesn't work. I haven't found anything in the documentation about it.
It took me a very long time to figure out that you are supposed to use
c64
instead ofComplex<f64>
. Adding an example or some more documentation how to use complex numbers would be appreciated.Thx :)