[P4-dev] Floating point support in P4

Zhenyu Zhou zzy at cs.duke.edu
Sun Sep 2 23:52:17 EDT 2018


Hello,

I'm new to p4 and have a question regarding p4: does it support floating
point calculations? Say, floating point multiplication and division (eg.
0.9*0.3 = 0.27).

I find this video (https://www.youtube.com/watch?v=U3Mn6o2j4zQ, 16min20s)
suggesting that floating point is not supported. But the spec (
https://p4.org/p4-spec/docs/P4-16-v1.0.0-spec.html#sec-expr-eval-order)
says:

expression
    ......
    | expression '*' expression
    | expression '/' expression


I'm kind of confused here. Any insights for this? Can I achieve
such arithmetic?

Thanks in advance!

Zhenyu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20180902/a9911973/attachment.html>


More information about the P4-dev mailing list