admin管理员组

文章数量:1289869

Is there a relatively terse way to force scientific notation display in the following:

q)1000000000*25
25000000000

I.e., to instead return a scientific formatted value, as in:

q)1e9*25
2.5e+10

without having to use any scientifically notated arguments?

Is there a relatively terse way to force scientific notation display in the following:

q)1000000000*25
25000000000

I.e., to instead return a scientific formatted value, as in:

q)1e9*25
2.5e+10

without having to use any scientifically notated arguments?

Share Improve this question asked Feb 19 at 22:58 tommylicioustommylicious 3295 silver badges11 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 1

The scientific notation isn't just a display choice, it's a datatype-specific construct (specifically for float datatype). There's no way to make a long integer look like a float without it being a float.

Even for floats, whether or not it displays as scientific notation depends on the precision settings in the instance

q)\P 0
q)1e9*25
25000000000f
q)\P 7
q)1e9*25
2.5e+010

本文标签: kdbForce scientific notation displayStack Overflow