Skip to content

Error in calculating power function #2192

@shaoziyang

Description

@shaoziyang

Describe the bug
I calculate a expression in makecode, then send the value to serial port. In simulator it is ok, but in real serial port, it will get wrong number.

let P = 100240
basic.forever(function () {
    serial.writeValue("T", (P / 101325) ** (1 / 5.255))
    basic.pause(1000)
})

In simulator, it will show:

T:0.997953407897062

But in real serial port it will show:

T: 1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions