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

next: unsupported negative floating point number casts #1643

Closed
dastrm opened this issue Sep 16, 2024 · 1 comment
Closed

next: unsupported negative floating point number casts #1643

dastrm opened this issue Sep 16, 2024 · 1 comment

Comments

@dastrm
Copy link

dastrm commented Sep 16, 2024

Using -float(1) anywhere within a field operator works, whereas float(-1) does not.

@tehrengruber
Copy link
Contributor

This should be simple to add. The syntax type_name(scalar_val) is only implemented for literals, but float(-1) is actually a unary op on a literal, which is why it doesn't work. With GTIR the always somewhat artificial looking restriction that the argument has to be a literal is not required anymore anyway so we can fix this in one go.

nfarabullini added a commit that referenced this issue Sep 24, 2024
edits in reference to issue #1643 

```python
    def unary_float():
        return float(-1)
```
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

No branches or pull requests

3 participants