Skip to content

parametrize data types #10

@lucaferranti

Description

@lucaferranti

currently dual (and multidual) numbers hard-code to use real. It would be good to make the type a generic

struct dual {
  type t;
  var primPart: t;
  var dualPart: t;
}

this would have a few advantages:

  • allow dual of dual, which would effectively mimic hyperdual numbers and give support for higher order derivatives
  • allow to use dual number of custom types (after all, I mainly created this to eventually use it with my interval arithmetic library)

I had tried at some point but hit a few corners. Now that there's a working non-generic skeleton, it should be expanded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussiondiscuss design choicesenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions