Git Product home page Git Product logo

calculator's Introduction

Calculator

Calculator is a simple 4 function calculator, with a panel that has more advanced functions when you need them. It includes history, real time graphing, base conversion, and more. It also comes with a lockscreen widget, a floating calculator, and a wear app so you can use whichever is most convenient. The goal is a simple and uncluttered calculator.

Features:

  • Basic arithmetic (+, -, *, /)
  • Trigonometry (sin, cos, tan, arcsin, arccos, arctan)
  • Complex numbers (5+7i)
  • Graphs functions (Y=X^2)
  • Hexadecimal and Binary support (1A+E)
  • Animated history (Long press to copy)
  • Tablet, Smartphone, and Wear supported
  • Completely open source!

Jar files:

arity-2.1.6.jar - Arity (http://code.google.com/p/arity/, mirrored https://github.com/Xlythe/Arity) Arity is used to solve math given as a string

ejml-0.21.jar - Efficient Java Matrix Library (http://code.google.com/p/efficient-java-matrix-library/) Used to resolve matrix math

License:

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

calculator's People

Contributors

adamp avatar alexkucherenko avatar bourdakos1 avatar dmitriplotnikov avatar dsandler avatar firefart avatar hyperb1iss avatar jaceksur avatar jham avatar jwvanv avatar kruton avatar mikejurka avatar neel-google avatar onoratoj avatar pawitp avatar transientresponse avatar whydoubt avatar xlythe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

calculator's Issues

Graphing - Marching Squares

Rewrite graphing so that it can handle all equations, not just the narrow subset of functions. Example: x^2+y^2=1. Suggested algorithm is marching squares.

negative Numbers in Matrix Multiplications

The Calculator can't handle negative Numbers in Matrix Multiplications: e.g. [[1,2][3,4]]x[[-1,2][2,-1]] gives the result: [[NaN,NaN][NaN,NaN]]

-unverified, reported from app store

graph not graphing

in adaition, the buttons for default mode, and zoom are not working aswell.

fraction numbers

Can please add a possibility to show a decimal number as fraction?
For example 0,25 = 1/4

Matrices do not work in nl due to matrix_separator same as decimal separator

When I view the matrices panel of the calculator app, and press the comma key, the view switches to the simple calculation view and no matrix calculation is possible.

Propose that the matrix separator be set to a semicolon ';', to make it completely separate from the decimal point, which in the Netherlands and other parts of the world is a comma ','.

New permissions?

As a user of the testing version on Google play, I just got a notification that this app wants new permissions.
Suddenly this looks less like a calculator and more like spyware. In one update, you've added internet access, location reporting, account/data access, and filesystem access. And yet, your change notes fail to mention a reason for any of these. As someone concerned with privacy, I would appreciate some kind of explanation.

Looking at your repository, it would be nice to see your default branch switched over to the only active branch you have, and it would be even nicer to see downloadable releases (or at least tags that match your play store releases) and a changelog.

Add modulo functionality

It would be nice if the app could calculate x mod y.

However, this functionality is only needed by people like computer scientists, who require this kind of special calculations.
So I propose to disable it by default and provide a switch in settings menu to enable it.

If enabled, the "mod" could be the long-press-function of the division button.
Another option is to add an additional button to the advanced display.

What's the status of this version vs CyanogenMod and the lost v4.3 functionality ?

I have version 4.3 which I have been using happily since 2014 in blissful unawareness of later versions - thanks for a great app!

Now, having just installed CM 12.1 on a spare device, I expected to see the same old calculator but I didn't.

So it looks some of the nice functions (e.g. matrix) in 4.3 disappeared with the merge with lollipop code and the CM version diverged from this one shortly after (nov 2014?).

If I sideload my 4.3 apk, the Google Play Store wants to update it to 5.1.1 (but I've set the Play Store not to update).

I'm confused because 4.3 (com.android2.calculator3) appears richer (therefore better?) than the latest here (com.android2.calculator3 version 5.1.1) and the latest bundled with CM (com.android.calculator2 version 5.1.1-eb9065775b).

So I just wonder what's happening.

  • What are the differences between the version here and the one on CM?
  • Is the functional line in 4.3 going to be reinstated at some point and is that going to become the CM standard.

I'm not complaining, just interested. Thanks for the great app.

(4.3 is accessible on F-Droid for anyone interested)

Feature request: customisable buttons

I'd like it if the buttons that were on display could be configured so I could have a calculator with all and only the functions I actually use available at once. Thanks.

Increase button font size or weight

I noticed the text from the buttons from the orange panel is hard to read, unless I squeeze my eyes or look closely. Then I tried Google calculator and found no issue there. Why?

Well, I could try blaming the background color, but I have no way to support this argument.

After some investigation, I discovered the lines used to draw each character are slightly wider in the Google calculator. Could that be because of different font weights? (Such as light/medium/bold.) No, that's not the case. The issue is slightly smaller font sizes in this calculator, when compared to Google's.

calculator-font

On a computer screen, where pixels are larger, both sizes seem visible enough. However, on a phone OLED screen, one size is more readable than the other.

key layouts (dots etc.)

On the calculator app, we have this key layout:
https://lh4.ggpht.com/hyeVjYhhjUBEX15vgG1whZXBSMdAYX8VLrpdfOdJ7xDtGHVgz6c4ZfTd3tS_Krzvibk=h900

The problem is most calculators look like this:
http://i1.ppfry.com/media/catalog/product/c/a/800x880/casio-hand-held-calculator-hl-4a-casio-hand-held-calculator-hl-4a-0y9hnd.jpg

You can see the 0 is on the left, while the dot is between the = and the 0. It's the same on a numeric pad on a computer : 0 on the left, dot on the right.

Since the calculator app is doing the opposite, it's quite confusing. Could it be possible a add an option to select the preferred layout?

Graphs

I'm having a hard time figuring out where I can find the graph feature.
The app description says you can swipe left and right to access more panels but there's only one at the right with the same options as the standard calculator except for a plus that creates a bar at the bottom that leads to one more panel with with some letters (no x and y though).

Jar origin

Could you write the origin of the libraries being used? I can guess where most of the come from except for slider.jar

Reboot OS bug

Steps to reproduce:
-Add a widget to lockscreen
-Copy text (so that "paste" will show up in an EditText)
-Go to the lockscreen and minimize the page with the calculator widget
-Hold down on the EditText until the cursor + paste appears
-Click paste
-CyanogenMod reboots

Aspect ratio problems

My phone (LG Optimus Dynamic II model L39C Tracfone) has the old-school 320x480 display resolution. This is a 3:2 ratio instead of the newer 16:9 or 16:10 screens. The issue is that the wrong elements are trying to scale down, causing a visual mess. The text box padding and history bar should scale, and the font as well. Instead I get a squashed graph, ridiculously huge history bar, and the button text overlapping. I'd attach a screenshot but I am sending this from my phone. I might try to attach one later.

I also hate the new icon.

Force close

When I swipe to left to open functions panel then press back button, app force closes. Here is a logcat:

java.lang.RuntimeException: Cannot animate in collapsed state
at com.xlythe.calculator.material.view.CalculatorPadView$DisplayAnimator.onUpdate(CalculatorPadView.java:540)
at com.xlythe.calculator.material.view.CalculatorPadView$DisplayAnimator$1.onAnimationUpdate(CalculatorPadView.java:523)
at android.animation.ValueAnimator.animateValue(ValueAnimator.java:1463)
at android.animation.ValueAnimator.setCurrentFraction(ValueAnimator.java:642)
at android.animation.ValueAnimator.setCurrentPlayTime(ValueAnimator.java:589)
at android.animation.ValueAnimator.start(ValueAnimator.java:1106)
at android.animation.ValueAnimator.start(ValueAnimator.java:1117)
at com.xlythe.calculator.material.view.CalculatorPadView.collapse(CalculatorPadView.java:414)
at com.xlythe.calculator.material.view.CalculatorPadView.collapse(CalculatorPadView.java:396)
at com.xlythe.calculator.material.BasicCalculator.onBackPressed(BasicCalculator.java:425)
at com.xlythe.calculator.material.GraphingCalculator.onBackPressed(GraphingCalculator.java:306)
at android.app.Activity.onKeyUp(Activity.java:2488)
at android.view.KeyEvent.dispatch(KeyEvent.java:2685)
at android.app.Activity.dispatchKeyEvent(Activity.java:2741)
at android.support.v7.app.AppCompatActivity.dispatchKeyEvent(AppCompatActivity.java:547)
at android.support.v7.view.WindowCallbackWrapper.dispatchKeyEvent(WindowCallbackWrapper.java:57)
at android.support.v7.app.AppCompatDelegateImplBase$AppCompatWindowCallbackBase.dispatchKeyEvent(AppCompatDelegateImplBase.java:315)
at com.android.internal.policy.PhoneWindow$DecorView.dispatchKeyEvent(PhoneWindow.java:2317)
at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:4131)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4093)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3646)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3699)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3665)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3791)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3673)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3848)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3646)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3699)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3665)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3673)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3646)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3699)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3665)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3791)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3673)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3848)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3646)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3699)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3665)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3673)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3646)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3699)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3665)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3791)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3673)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3848)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3646)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5926)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5900)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5861)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6029)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:331)
at android.os.Looper.loop(Looper.java:218)
at android.app.ActivityThread.main(ActivityThread.java:5526)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)

where is matrix ?

first i should tank your .
i see matrix classes and layouts in source code but where is in UI ?
i change
switch (v.getId()) {
case R.id.btn_advanced:
layout = advancedPad;
break;
case R.id.btn_hex:
layout = matrixPad;
break;
case R.id.btn_matrix:
layout = matrixPad;
break;
case R.id.btn_close:
// Special case. This button just closes the tray.
showFab();
hideTray();
return;
}
this code to see matrix page , but seems it is not ready ?

Binary operators?

On the bases "tab", there's plenty of room to add AND, OR, XOR, and NOT operators, which would make this calculator pretty much perfect for me for everyday use.

Tangent of 90

Tangent of 90 in Degrees shows up "1.633124e16" instead of infinity/Error.

Add widget functionality

History widget, scientific widget. These can either be as separate widgets (that you'd add side by side) or one widget with a button to flip between views.

Calculator 4.3 being reported as Trojan by Avast! Mobile

I have the F-Droid build of Calculator 4.3 on my phone and Avast! Mobile just started identifying it as containing a Trojan today. It has been on my phone since July without a previous report. I have also reported this to F-Droid. The specific notice is, "Trojan detected - Android:Revtcp-A [Trj]". I have no idea if this is a false positive or an actual problem.

advertising non-free content in 4.3

Hello and greetings.
Calculator is offered in the F-Droid repository. But with the update from version 3.4.2 to version 4.3 an additional theme store was introduced. Isn't this kind of proprietary software now?

It should get marked with a F-Droid warning now, sorry.

Also its file size really inflated quite a bit because of that. And the widget responds awfully slow now. 3.4.2 is the much better version.

Paid content does what?

Hello,

What does the paid content do, and what is it actually?

There's no description for it.

UI hint of alternate function on long-tap

The older Holo version of this calculator shows the alternate function at the top-right of each button, in a darker color.

Google Calculator has a INV button that switches sin/cos/tan/ln/log/ to their inverse forms, and highlight the new functions in bold.

The current calculator has support for alternate functions for some of the buttons by long-tapping them, but there is no indication that such feature is available. At the first glance, a new user will assume the calculator is missing features such as asin.

More compact UI like Google Calculator

The new Google Calculator has a much improved UI over previous versions, displaying all primary functions on a single screen:

I would love to see this implemented in my favourite calculator! I use parentheses all the time, and swiping back and forth so much is a real nuisance. Thanks for your continued work on this great, open source product.

Edit: Resized image

Custom function page

Add a page to write and store custom functions. Examples would be Fahrenheit to Celsius, Miles to Kilometers, or factoring a polynomial.

Deactive state for disabled keys

When you're in bin, 2,3,4,5,6,7,8,9 all look clickable, even though they're not. Add a button background that makes it obvious they're disabled.

Hang up when "CLR" is tapped

Some blue bubboe appears in the input field and the app. buzzes when "CLR" is tapped.

By the way the "CLR" button appears randomly, usually "УДАЛИТЬ" is instead of that button.

Coma thousands separator

This would also include spaces every 2 characters in hex and spaces every 4 characters in binary. Include it as an option in settings, defaulted to off. Biggest issue is that the delete key would mess up comas big time. Maybe include them in onDraw? Use the dec-hex-bin code to get numbers out of the equation, and then split at the decimal.

Only 6 decimal places of precision

If you calculate an irrational number, such as pi or the square root of 2, the calculator only gives you 6 decimal places of precision. This probably isn't a huge deal for casual use, but it seems like a very arbitrary limitation to have in 2016. Here is a demonstration of this app vs the stock android app, using the square root of 2.

Using the Xlythe app first:

Calculate SQRT(2) and hit [=]
xlythe1

The UI only shows 6 decimal places. To test if this is just a UI issue or a calculation issue, we can multiply that result by SQRT(2) and see what the result is:

xlythe2

2.000001

Now the same process with the stock android app in Android 7.0:

stock1

16 decimal places, lets see how it carries over.

stock2

2, the correct answer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.