Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Is there 'float' in FunC?

Do I get it right that there is no implementation of a floating-point numbers type such as float in FunC?


This question was imported from Telegram Chat: https://t.me/tondev/78960

  
  
Posted one year ago
Votes Newest

Answers


There is no float in FunC, and TVM in general. Floating point numbers are useful in scientific calculations. Because they don't have exact precision, they are usually not that useful in applications working with money.

TON amounts like 1.234567890 are stored as a big integer of nano tons like 1234567890 and when displayed to user, they are divided by 1 billion in client side applications, so the user can view a more friendly and understandable amount. Other monetary values like jettons use the same principle.

Because FunC gives you a very low level access to bits, someone can write a floating point library on top of it, but doesn't seem that useful.

1
1
Posted one year ago
17K Views
1 Answer
one year ago
one year ago
Tags