Comments (7)
Thank you for the feedback, can you give me an example expression that reproduces this?
from evalex.
please try SRRT(24)
from evalex.
My mistake, I think it will only work on perfect squares.
from evalex.
SQRT(24)
seems to work fine for me. Adding
assertEquals("4.8989794", new Expression("SQRT(24)").eval().toPlainString());
to the existing SQRT tests still passes.
from evalex.
What kind of Java and machine are you using? I tested in on a 64bit Intel Windows machine, without problem.
from evalex.
I am using mac pro (2.6 GHz Intel Core i7), Yes running junit tests on native machine works fine.
I am using Android's emulator on genymotion (ARM hypervisor), I also tried it on Samsung Galaxy 7 note ( ARM) and it gets stuck in a while loop.
Since its android , it is running on Dalvik VM, and the code is Dex'ed Dalvik code.
do { ixPrev = ix; ix = ix.add(n.divide(ix)).shiftRight(1); // Give other threads a chance to work; Thread.yield(); } while (ix.compareTo(ixPrev) != 0);
here's the loop result.
loop 1:
ixPrev=ix=4
ix = 5
loop 2:
ixPrev = ix = 5;
ix = 4
loop 3:
ixPrev=ix=4
ix=5
Hope that helps.
from evalex.
I have now tried out 4 different Android devices and 2 different emulator configurations, but I was unable to reproduce. I'll close this issue for now. If there is a way how I can reproduce this bug here, let me know.
from evalex.
Related Issues (20)
- Set source and target compiler level to 1.8 HOT 1
- Use Travis CI instead of Rultor to release to Maven Central HOT 2
- Reformat code to use Google style
- Provide TRUE and FALSE as public static LazyNumbers HOT 2
- Unexpected Exceptions HOT 1
- getUsedVariables() throws NPE
- Validate only a String HOT 4
- Has anyone looked into performance? HOT 2
- Activating a research fault localization bot on your project?
- how to set the scale like BigDecimal HOT 3
- How to deal with Vector or Matrix? HOT 2
- setPrecision function HOT 2
- Three new features for evalex HOT 3
- Detect whether an Expression is a simple number HOT 3
- How do I get declared variables in version 3? HOT 7
- NumberFormatException for ISO dates as a variable value HOT 2
- Function ACOTH(x) is missing
- using E as a variable behaves different from 1.6 release HOT 1
- acot(-1) produces wrong result HOT 1
- Using library breaks R8/Proguard HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evalex.