Skip to content

Make std::complex<DualNumber> work #66

@dschwen

Description

@dschwen

We're looking into using the Eigen library to obtain eigen decompositions of matrices of dual numbers. This is of course because LAPACK precludes us from using dual numbers entirely while Eigen is beautifully templated.

I seem to have hit a snag though as there are a bunch of functions used in <complex> that are not overloaded (or specialized) for dual numbers. This results in errors like

/Users/schwd/miniconda3/envs/moose/bin/../include/c++/v1/complex:685:15: error: no matching function for call to 'scalbn'
    _Tp __y = scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);

and

/Users/schwd/miniconda3/envs/moose/bin/../include/c++/v1/complex:676:29: error: no matching function for call to 'fabs'
    _Tp __logbw = logb(fmax(fabs(__c), fabs(__d)));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions