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

Fixes issues #6, #7 by extending power, misc fixes #9

Merged
merged 15 commits into from
Nov 16, 2022
Merged

Conversation

Vindaar
Copy link
Member

@Vindaar Vindaar commented Nov 16, 2022

Mainly fixes #6 and #7 by improving the handling of how the power operation is implemented. Now also includes a submodule for static integer power, so that unchained powers are supported as long as the power is static (as we need to be able to compute the type at CT!).

Further fixes a few small miscellaneous things. Full changelog below.

* v0.2.2
- export ~to~ procedure (used to convert inner type of a
  ~Measurement~)
- fix ~**~, ~^~ for two Measurements
- allow to disable printing of unicode symbols for string repr of
  ~Measurement~ by compiling with ~-d:noUnicode~
- fix issue #6 to allow ~measurement~ procedure to construct correct
  type for given types other than ~float~
- fix division of a literal with a measurement
- fix power math operation for different argument types, including
  fixing issue #7
  - adds a new private submodule for a helper macro to generate
    `power` calls for static integers (including negative)

'u32 was the literal used during development. Was auto converted to
u64 as it's a literal, but better use correct one.
Also changes the spacing in the unicode case to half width space.

Compile with `-d:noUnicode` to print using `+-` and regular space instead.
This is also useful for users of the library
Must return `auto` as it must be based on the return type of `fn(x)` call.
No idea what the hell is going on in 1.6, but if it's restricted to
FloatLike, we get a "cannot instantiate Measurement" error from the
`**` procedure, shrug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

different behaviorur ± vs measurement(a,b) when used with unchained
1 participant