[ 
https://issues.apache.org/jira/browse/JEXL-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16924945#comment-16924945
 ] 

Henri Biestro commented on JEXL-313:
------------------------------------

There is no configuration option for the behaviour you seek. It can (easily?) 
be achieved deriving the JexlArithmetic and overriding (or overloading) the 
add/subtract/multiply/divide/mod methods.

> Can one expression return a Float even when its elements are Integer?
> ---------------------------------------------------------------------
>
>                 Key: JEXL-313
>                 URL: https://issues.apache.org/jira/browse/JEXL-313
>             Project: Commons JEXL
>          Issue Type: Wish
>    Affects Versions: 3.1
>            Reporter: Osy
>            Priority: Minor
>
> For example a simple expression like "3/2" or another like 
> "((10/10)*(100/2)/(100*(10+1)))" are always returning an Integer result.
> But I want to maintain sme syntax without add decimal part to any number or a 
> letter to qualify the number type.
> I mean, I want to still using *"3/2"* instead "3.0/2" or "3D/2"  to get a 
> Float - or decimal - result.
> It is possible?



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to