Skip to content

Change the underlying type of VectorXreal from double to float/long double #222

Answered by allanleal
zhanggiene asked this question in Q&A
Discussion options

You must be logged in to vote

If you check the implementation of Real, you'll see that the underlying floating point type is a template type (T). So, you can achieve what you want with float (or any other type).

using realf = Real<1, float>;

You'll need to use Eigen types with float too. Maybe create new aliases for them.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@zhanggiene
Comment options

@allanleal
Comment options

@zhanggiene
Comment options

Answer selected by zhanggiene
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants