hashicorp / hashicorp/terraform-plugin-framework
cannot store 33.33333333 in float64
- Dominant language
- Go
- Stars
- 384
- Forks
- 107
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
### Module version
```
1.15.1
```
### Relevant provider source code
```go
// schema
Parameters: []function.Parameter{
function.Float64Parameter{
Name: "number",
Description: "Input number parameter for determining the rounding.",
},
},
// go type reflection
var inputNum float64
resp.Error = req.Arguments.Get(ctx, &inputNum)
```
### Terraform Configuration Files
Please see mschuchard/terraform-provider-stdlib#2
### Debug Output
upon request
### Expected Behavior
The return of `100 / 3` in HCL2 is valid as a `float64` `tftype`.
I am unsure whether this is an issue in my provider, `tftypes`, terraform core, or `go-cty`, and so I am filing this issue here first for feedback since my suspicion is the issue is related to the return type of the `/` operator, and therefore most likely `tftypes` or `go-cty` in that order.
### Actual Behavior
Please see mschuchard/terraform-provider-stdlib#2
### Steps to Reproduce
n/a
### References
linked above
Contributor guide
Assessment
This issue has not been assessed yet.