Re: [math] Refactored Precision

2015-12-14 Thread Thomas Neidhart
On Mon, Dec 14, 2015 at 9:17 AM, Ole Ersoy  wrote:

> Hi,
>
> Just a heads up for those of you interested or have nothing better to do
> at 2 am :).  I refactored the Precision class into classes PrecisionAssert
> and RoundDouble.
>
> https://github.com/firefly-numbers/firefly-numbers
>
> I created a new github organization for the package, since it deals less
> with math and more with number precision in general.  I also removed
> support for float.  It seems like most of the code in CM uses double, and
> if float is needed then it should be provided via it's own module.  I also
> replaced calls to FastMath with Math.  Most of the calls were for abs() and
> ulp()...functions that I would think would have similar performance
> regardless.
>
> Probably moving onto FastMath next.  I plan on only including functions
> that have a performance benefit, and delegating to Math for everything else.
>

Hi Ole,

what is the motivation for posting these questions on the math ML?
Do you intend to contribute some new functionality or propose changes back
to commons-math?

Or is this project intended to be a fork of commons-math?

Thomas


[configuration] - Maven Release

2015-12-14 Thread Nicolas SAVOINI
Hello,

When will be the next Maven release for the commnon-configuration2 ?
The last one is the Alpha1, without the size() method, which i need

Thanks,
Nicolas Savoini

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



[Proposal] simple expression language in commons-math

2015-12-14 Thread Himanshu
Hi,

Recently I needed to embed support for simple math expressions in my
project. Example grammar is...

expr : ('-'|'!') expr
 | expr '^' expr
 | expr ('*'|'/'|'%') expr
 | expr ('+'|'-') expr
 | expr ('<'|'<='|'>'|'>='|'=='|'!=') expr
 | '(' expr  ')'
 | ID
 | DOUBLE
 | LONG
 ;

with basic math functions like sqrt supported in the expressions. I thought
such expression language would be available in commons-math, but it is not
(please correct me if I am wrong).

I am working on it already for my project and would love to contribute to
commons-math. Just wondering, How likely is commons community ready to
accept same?

-- Himanshu


Re: [Proposal] simple expression language in commons-math

2015-12-14 Thread Gary Gregory
Then perhaps you can implement your scripting language through the Java
Scripting API [1]?

Users can choose which scripting language they want, or an application
(like yours) can hard-wire access to a single engine.

This seems like an orthogonal concern to [math] though

Gary

[1]
https://docs.oracle.com/javase/8/docs/technotes/guides/scripting/prog_guide/api.html

On Mon, Dec 14, 2015 at 10:35 PM, Himanshu  wrote:

> Hi,
>
> Thanks for replying.
>
> However, The problem with JavaScript is that it exposes much more than I want 
> it to.
> Users can't be allowed to pass arbitrary scripts and have server execute it, 
> due to potential
> security issues.
>
> -- Himanshu
>
>
> > This seems out of scope to me; especially since Java has built-in support
> > for JavaScript and any and all languages that support the Java scripting
> > API.
> >
> > Gary
>
> On Mon, Dec 14, 2015 at 8:48 PM, Himanshu  wrote:
>
> > Hi,
> >
> > Recently I needed to embed support for simple math expressions in my
> > project. Example grammar is...
> >
> > expr : ('-'|'!') expr
> >  | expr '^' expr
> >  | expr ('*'|'/'|'%') expr
> >  | expr ('+'|'-') expr
> >  | expr ('<'|'<='|'>'|'>='|'=='|'!=') expr
> >  | '(' expr  ')'
> >  | ID
> >  | DOUBLE
> >  | LONG
> >  ;
> >
> > with basic math functions like sqrt supported in the expressions. I thought
> > such expression language would be available in commons-math, but it is not
> > (please correct me if I am wrong).
> >
> > I am working on it already for my project and would love to contribute to
> > commons-math. Just wondering, How likely is commons community ready to
> > accept same?
> >
> > -- Himanshu
> >
>
>


-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition

JUnit in Action, Second Edition 
Spring Batch in Action 
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory


Re: [Proposal] simple expression language in commons-math

2015-12-14 Thread Gary Gregory
This seems out of scope to me; especially since Java has built-in support
for JavaScript and any and all languages that support the Java scripting
API.

Gary

On Mon, Dec 14, 2015 at 8:48 PM, Himanshu  wrote:

> Hi,
>
> Recently I needed to embed support for simple math expressions in my
> project. Example grammar is...
>
> expr : ('-'|'!') expr
>  | expr '^' expr
>  | expr ('*'|'/'|'%') expr
>  | expr ('+'|'-') expr
>  | expr ('<'|'<='|'>'|'>='|'=='|'!=') expr
>  | '(' expr  ')'
>  | ID
>  | DOUBLE
>  | LONG
>  ;
>
> with basic math functions like sqrt supported in the expressions. I thought
> such expression language would be available in commons-math, but it is not
> (please correct me if I am wrong).
>
> I am working on it already for my project and would love to contribute to
> commons-math. Just wondering, How likely is commons community ready to
> accept same?
>
> -- Himanshu
>



-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition

JUnit in Action, Second Edition 
Spring Batch in Action 
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory


Re: [Proposal] simple expression language in commons-math

2015-12-14 Thread Himanshu
Hi,

Thanks for replying.

However, The problem with JavaScript is that it exposes much more than
I want it to.
Users can't be allowed to pass arbitrary scripts and have server
execute it, due to potential
security issues.

-- Himanshu


> This seems out of scope to me; especially since Java has built-in support
> for JavaScript and any and all languages that support the Java scripting
> API.
>
> Gary

On Mon, Dec 14, 2015 at 8:48 PM, Himanshu  wrote:

> Hi,
>
> Recently I needed to embed support for simple math expressions in my
> project. Example grammar is...
>
> expr : ('-'|'!') expr
>  | expr '^' expr
>  | expr ('*'|'/'|'%') expr
>  | expr ('+'|'-') expr
>  | expr ('<'|'<='|'>'|'>='|'=='|'!=') expr
>  | '(' expr  ')'
>  | ID
>  | DOUBLE
>  | LONG
>  ;
>
> with basic math functions like sqrt supported in the expressions. I thought
> such expression language would be available in commons-math, but it is not
> (please correct me if I am wrong).
>
> I am working on it already for my project and would love to contribute to
> commons-math. Just wondering, How likely is commons community ready to
> accept same?
>
> -- Himanshu
>


Re: [math] Refactored Precision

2015-12-14 Thread Ole Ersoy

Hi Thomas,

On 12/14/2015 06:37 AM, Thomas Neidhart wrote:

On Mon, Dec 14, 2015 at 9:17 AM, Ole Ersoy  wrote:


Hi,

Just a heads up for those of you interested or have nothing better to do
at 2 am :).  I refactored the Precision class into classes PrecisionAssert
and RoundDouble.

https://github.com/firefly-numbers/firefly-numbers

I created a new github organization for the package, since it deals less
with math and more with number precision in general.  I also removed
support for float.  It seems like most of the code in CM uses double, and
if float is needed then it should be provided via it's own module.  I also
replaced calls to FastMath with Math.  Most of the calls were for abs() and
ulp()...functions that I would think would have similar performance
regardless.

Probably moving onto FastMath next.  I plan on only including functions
that have a performance benefit, and delegating to Math for everything else.


Hi Ole,

what is the motivation for posting these questions on the math ML?
Do you intend to contribute some new functionality or propose changes back
to commons-math?

Or is this project intended to be a fork of commons-math?

Thomas


I sent a few emails earlier regarding the precision code with questions that 
were questions...

We have been discussing refactoring CM, so I've started what can be thought of 
as a Java 8 (/leaning towards Java 9) useable prototype of such such 
refactoring.  As I'm going through the process and reviewing the code, I ask 
questions (Hopefully good ones) when I find something that I think could be 
simplified, etc.

So far there are probably 6 big changes that CM that might be useful for CM:
1) Lombok to reduce boileplate code (Can be seen in the new exception module - 
Also generates javadoc)
2) Removal of float precision utilities in Precison
3) Java 8 and Java 8 constructs
4) Coming (Observer design for Optimizers)
5) The dependency structure of the modules
6) Hopefully increased generic use for modules like the numbers module

Fork usually has a negative connotation.  When architects draw up designs there 
are usually several that can be used for comparison and contrast.  The primary 
purpose of sharing the results of the refactoring is that.  I probably should 
be make it clear that I am 100% for CM.  I think the developers and 
contributors are amazing and I have tremendous respect for all of you.

Cheers,
- Ole


-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org



[math] Refactored Precision

2015-12-14 Thread Ole Ersoy

Hi,

Just a heads up for those of you interested or have nothing better to do at 2 
am :).  I refactored the Precision class into classes PrecisionAssert and 
RoundDouble.

https://github.com/firefly-numbers/firefly-numbers

I created a new github organization for the package, since it deals less with 
math and more with number precision in general.  I also removed support for 
float.  It seems like most of the code in CM uses double, and if float is 
needed then it should be provided via it's own module.  I also replaced calls 
to FastMath with Math.  Most of the calls were for abs() and ulp()...functions 
that I would think would have similar performance regardless.

Probably moving onto FastMath next.  I plan on only including functions that 
have a performance benefit, and delegating to Math for everything else.

Cheers,
- Ole

-
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org