Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parametrize data types #10

Open
lucaferranti opened this issue Nov 7, 2022 · 0 comments
Open

parametrize data types #10

lucaferranti opened this issue Nov 7, 2022 · 0 comments
Labels
discussion discuss design choices enhancement New feature or request

Comments

@lucaferranti
Copy link
Owner

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.

@lucaferranti lucaferranti added discussion discuss design choices enhancement New feature or request labels Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion discuss design choices enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant