Android :: Math Floating Point Library

Jan 12, 2010

I need maths for my game physics and lots of them, so I use the. Math library. And guess what? I never casted so much to floats in my entire life. And i know how costly it is to use doubles on an embedded device because I read the performance optimization page in the google android sdk docs. So I am wondering if we couldn't get a Math package with functions taking and returning floats instead of the default doubles. e.g. Math.sinf Math.cosf.

Android :: Math floating point library


Android :: Getting Hardware Floating Point With NDK

Jun 9, 2010

I've begun playing with the android NDK. One of the things I've just learnt is about creating an application.mk file to specify the armv7 abi. I'm building the san-Angeles example with the following parameters. Code...

View 1 Replies View Related

Android :: BigFraction Class In The Apache-Commons-Math Library Return Incorrect Division Results?

May 14, 2010

In the spirit of using existing, tested and stable libraries of code, I started using the Apache-Commons-Math library and its BigFraction class to perform some rational calculations for an Android app I'm writing called RationalCalc.

It works great for every task that I have thrown at it, except for one nagging problem. When dividing certain BigFraction values, I am getting incorrect results.

If I create a BigFraction with the inverse of the divisor and multiply instead, I get the same incorrect answer but perhaps that is what the library is doing internally anyway.

Does anyone know what I am doing wrong?

The division works correctly with a BigFraction of 2.5 but not 2.51, 2.49, etc...

[UPDATE]

This was indeed a bug in the apache-commons-math 2.0 libraries. The bug is fixed in v.2.1.

It is now listed in the Fixed Issues section of the bug tracker:

When multiplying two BigFraction objects with numerators larger than will fit in an java-primitive int the result of BigFraction.ZERO is incorrectly returned..attempting to reproduce the issue and setting me on the right track.

CODE:.....................

View 1 Replies View Related

Android :: OpenGL ES Fixed - Floating Point

Oct 13, 2009

I've started developing an OpenGL ES app and I would like to get the best possible performace (as everybody, I guess).

As far as I know, HTC Magic (myTouch, G2) doesn't have floating point unit, so I think every calculation is done internally with fixed point math. That beign the case, altough I fed OpenGL with floating point vertex positions and normals, there would not be any permormace penalty since it would be using integer math instead of floating point emulation.

View 2 Replies View Related

Android :: Floating Point Support On G1 Phone

May 17, 2009

I have been searching about the floating point support on G1 phone (aka the HTC Dream phone) for a few hours.

So far, my conclusion is that the ARM-based Qualcomm MSM7201 CPU does not have VFP (floating point coprocessor) and therefore floating point calculations have to be done via software-float.

This is quite disappointing as I am interested in developing applications with heavy math.

However, I also notice that the Qualcomm CPU has QDSP4000™ and QDSP5000™ high-performance digital signal processors (DSP), according to http://www.qctconnect.com/products/msm_7201.html

Therefore, here is my question: would it be possible to leverage the DSP modules in the MSM7201 CPU to do the floating point math?

Also, I would like to develop the heavy-math modules in C/C++ and call it via JNI, and so I just want to double-check whether this is a feasible approach.

View 13 Replies View Related

Android :: Floating Point Hardware Support?

Feb 22, 2010

I'm currently developing a application on a HTC Dream aka T-mobile G1. afaik the processor has a FPU coprocessor, called VFP (Vector Floating Point) in ARM terms. So far I couldn't find any information about if the FPU is used for floating point calculations or if those are emulated in software. does anyone have any information about that? the opengl implementation supports both fixed point and floating point. will my applications be slower when I'm using floating point, because they get transformed into fixed point internally? or is floating point implemented in hardware?

View 5 Replies View Related

Android :: Open GL Fixed Vs Floating Point?

Jan 6, 2010

OpenGL ES allows values to be specified in either fixed point or floating point format, but I haven't been able to find any information about how this is actually implemented on Android devices. Are there actually two different pipelines, one for fixed point and one for floating point? If so, what happens if you mix and match them, such as specifying your matrix in floating point but your vertices in fixed point? Alternatively, does it implement everything with just one format internally, and convert the other format to it as necessary? If so, then you presumably get the best performance if you always specify values in the internal format so as to avoid conversions. How then can I determine which format is used internally?

View 9 Replies View Related

Android :: Add Floating Point Value To Resources / Values

Jul 19, 2010

I'm trying to add a little space between lines to my Text Views using android:lineSpacingMultiplier
from the documentation: Code...

View 1 Replies View Related

Android :: Floating Point Support / Determine At Runtime?

Oct 20, 2009

Is there a way to determine if the system supports floating point? That way, I could choose between two algorithms to use.

View 4 Replies View Related

Android :: Floating Fixed Point For NDK OpenGL Apps?

Aug 2, 2010

I'm trying to decide on whether to primarily use floats or ints for all 3D-related elements in my app (which is C++ for the most part). I understand that most ARM-based devices have no hardware floating point support, so I figure that any heavy lifting with floats would be noticeably slower. However, I'm planning to prep all data for the most part (i.e. have vertex buffers where applicable and transform using matrices that don't change a lot), so I'm just stuffing data down OpenGL's throat. Can I assume that this goes more or less straight to the GPU and will as such be reasonably fast? (Btw, the minimum requirement is OpenGL ES 2.0, so that presumably excludes older 1.x-based phones.)Also - how is the penalty when I mix and match ints and floats? Assuming that all my geometry is just pre-built float buffers, but I use ints for matrices since those do require expensive operations like matrix multiplications, how much wrath will I incur here. By the way, I know that I should keep my expectations low (sounds like even asking for floats on the CPU is asking for too much), but is there anything remotely like 128-bit VMX registers?

View 2 Replies View Related

Android : New App - Math Alarm Clock

Aug 6, 2009

Im the developer of a fairly new app the Math Alarm Clock. A month ago I looked for alarm clock which was a challenge to turn off and didnt find any on the market so I developed this. Basically you tell it how hard you want the math (4 levels of difficulty) from (5*8) to [(17*19)- 16*12)]. It is smart enough to never give you stupid easy questions such as (73-73) or (1*10). Then choose how many in a row you must answer correctly from 1 to 6 to turn off the alarm. Specify a few math-free snoozes if you like to snooze a few times before entering math. Or turn the math off completely and use it as a regular alarm.

The other unique feature is the music alarm. Of the other alarm clocks I found one required you to change music into a ringtone and the other only allowed you to pick one song. This alarm clock allows you to choose an individual song or choose a random song from a specific artist or a random song from a specific album.
And for any Canadian Rogers Dream or Magic users you may have noticed other alarm clocks will completely crash your phone and require a factory reset. This has been fixed in the Math Alarm Clock and it should work with no problem on HTC based phones.

Lastly as the comments point out, I respond to feedback very fast and for the most part have requested features implemented within 24 hours.

The last few comments:

"This developer rocks! I requested a feature and it was added within hours. This is the best alarm clock for the G1 hands down!" 5/5
"Great app, developer is quick to update. Highly recommend!" 5/5
"Awesome app!" 5/5
"Amazing! The only alarm that actually wakes me up" 5/5

View 5 Replies View Related

Android :: Faster Way Than Math.atan2 For Arc Tangents?

May 24, 2009

Using arc tangents for interpreting accelerometers seems to be a pretty easy way to go to get a desired result. I just benchmarked (float)Math.atan2(x,y) and it's a very slow function. I checked FloatMath for Android 1.0 SDK and it has sin and cos but no tan or atan. Is there a faster way to do this?

View 2 Replies View Related

Android : Game Math / Logic Calulating Movement?

Aug 26, 2010

I know this is more of a general programming question, but my Android friends here have always been helpful. I am trying to make an image move from one part of the screen to a position the user touches, as a constant speed. I don't know the best way to go about doing this and the way I have been trying to get to work is taxing my brain too much.

I have been using geometry to calculate slope, then using Sin * movement speed to calculate the difference in X,Y coordinates.

This is the codecode...

The problem that I'm having is the image is veering way of course when traveling in Y heavy paths. When traveling horizontally it works almost perfect.

I know there is probably an easier way though I don't know how to use a lot of things (like OpenGLES) so if your advice is to use a different method please link a tutorial for that method if you know of one.

View 7 Replies View Related

Android :: Display Math Notation Like Square , Exponent In Textview?

Oct 17, 2010

I want to create a mobile learning for an high school. Is there a way to display math notation like square, exponent etc in textview? Or should we use another component?

View 3 Replies View Related

Android :: Store Values In SharedPreferences In Library Code / Have It To Projects That Include Library?

Nov 11, 2010

I have an Android library project that makes calls to PreferencesManager.getDefaultSharedPreferences.

I have 2 version of my app, paid/free, and they are not able to access the preferences stored by the library code.

Can someone tell me the right way to store values in SharedPreferences in library code and have the values available to projects that include the library?

View 2 Replies View Related

Android :: Self-contained Test Library Project Cannot Find Library Classes

Aug 17, 2010

According to this SDK guide, unit-testing a Library project can be achieved by creating a standard application project, reference the Library project and then instrument the application for unit testing. However, when I do this and launch the test application I get the message.No tests found with test runner 'JUnit 3".I'm using Eclipse and the Android ADT plugin, all latest versions.the projects compile just fine. The test project also installs fine to the emulator. But in the console I can see that it looks for <library>.apk, which of course doesn't exist since I'm compiling this as a library into the test project.

View 1 Replies View Related

Android :: Load Native Library Which Depends On Third Shared Library

Aug 26, 2009

I created a jni library which depends the third shared library, I must copy the third shared library to /system/lib, otherwise, Java application can't load jni library. But you know, on G1 with official OS image, /system/lib is readonly. I tried to call System.setProperty to set java.library.path to the location stored the thired shared library before load jni library, but the issue still exists.

View 6 Replies View Related

Android :: Differences Between Jar Library And Library Project

Jul 15, 2010

As I understand, the three ways of distributing my application are via Jar, Android Library and Android Library Project.Jar - cannot contain resources or XML layouts (so this is out for me)Android Library - I don't really know how this works but the Google API uses it..Android Library Project - includes resources but allows the client free rein on the code as it is distributed as source.If I am to create a closed source application that requires drawables and XML files that I want to distribute to other Android programmers, what should I use? And can someone direct me to a tutorial on creating an Android Library?

View 4 Replies View Related

HTC Incredible :: Searching Pictures (Math Problem) On Google?

Jun 23, 2010

I remember watching a commercial or seeing something about this phone where you could take a picture of lets say a math problem and then search it up on google. Is this true and is it an app that all android OS phones can use?

View 5 Replies View Related

Motorola Droid :: Where To Get Scientific / Some Uber Math Calculus Calculator?

Feb 4, 2010

There has to be a better calculator out there, I mean CA MON! I am not looking for a scientific or some uber math calculus crazy calculator but I am looking for something that isn't so .

I mean we have a DROID! Why is this Calc so CRAPPY! Please tell me there is something out there, in the market, or even a 3rd party APK file.

View 19 Replies View Related

Android :: Rotate Floating AVD

Oct 13, 2010

When the AVD screen is in an Eclipse frame there is a button on the frame to rotate orientation. How do I cause the same action when the AVD screen is floating outside Eclipse?

View 4 Replies View Related

Android :: Floating Bar In Layout

Jul 18, 2010

How to add a floating bar that will stay at the top of a layout page, even when a user is scrolling through the contents of that layout?

View 1 Replies View Related

Android :: How Is This Floating Menu Implemented

Nov 11, 2010

What is this widget called (the one with the three buttons).

View 4 Replies View Related

Android :: How To Make Floating Button

Nov 25, 2009

I wonder how to make floating buttons, like the zoom button in the build-in web browsee?

Actually there are 2 things i'd like to know:

1. How to make a view(button) floating above other views? 2. How to make the fade in/fade out effect regarding to touch screen?

View 2 Replies View Related

Android :: How To Design A Floating Keyboard

Oct 13, 2010

I am a developer and recently completed the implementation of my keyboard MessagEase. It's available on the Market (with its very- different features, making it quite unlike QWERTY).

This keyboard works fine as a replacement of the standard keyboard on an Android Phone. But for a An Android Tablet, it would work best if it's implemented as a floating, movable keyboard.

(the footprint of this keyboard is mostly dependable on the size of a human's finger; it remains the same even if the tablet's display is much larger than a phone's. Therefore it'll take a relatively smaller area on a tablet.)

If I use the current SDK hooks, it will have to take a significant portion of the screen, defeating the purpose.

View 2 Replies View Related

Android :: How Can I Have A Floating Image With Text?

Jun 7, 2010

It's kind of hard to explain, but an example of what I'm wanting to accomplish is like this: thought about generating the layout in html and using a web view, but I need to be able to perform an action when the user clicks on the image. Does anyone have any ideas?

View 1 Replies View Related

Android :: Floating Layout With Buttons?

Nov 17, 2010

I want to create layout like this on facebook app. Тo appear with effect from bottom to top.I don't know where to find example (xml and code) for this.

View 2 Replies View Related

Android :: Floating Apps - Which Run On There Own In The Background Like Facebook

Jan 17, 2010

I love Android, coming over from the Iphone i have Tmobile Pulse!

I love how Android had "Floating Apps" Apps which run on there own in the background, like facebook?

Is there anymore apps like this, which can do the same, a Gmail one would be awesome or news feed (RSS)

Also on my Android i have a big cluttered messy list off apps on one page, looks like this, comes with some games i don't want. How can i get rid of them ?

View 3 Replies View Related

Android : Floating Popup Window - How To Implement?

Aug 30, 2010

I would like to have the following screen in my application: button at the bottom of the screen; when user presses the button, a list with a number of items will appear and user should be able to click one of those to start another activity. The number of items can be different (depending on some other conditions); the popup is to be adjusted to the button. How would you suggest implementing this?

View 3 Replies View Related

Android :: Layout When Setting WindowIs Floating To True?

Mar 3, 2010

I've got a ListActivity using the Theme.Dialog theme and windowNoTitle set to true.

Unfortunately, when I do this, the header rows (just normal rows in the list but they look like sub headers) refuse to fill_parent width (instead, they wrap_content - the header text).

I noticed this was not a problem when using the Theme theme so I started narrowing everything down to what was causing the problem.

The answer: windowIsFloating. Theme.Dialog sets this to true, and if I override this to false, then the headers happily fill the parent width.

Is there a way around this (because I would like to set windowIsFloating to true)?

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved