calculator

Smart design of a math parser?

What is the smartest way to design a math parser? what i mean is a function that takes a math string (like: "2 + 3 / 2 + (2 * 5)") and returns the calculated value? I did write one in VB6 ages ago but it ended up being way to bloated and not very portable (or smart for that matter...). General ideas, psuedo code or real code is appreciat...

What's your favorite programmable calculator?

The HP-32S still holds a soft spot in my heart, even though it only had 4 registers. I have fond memories of writing a nonlinear solver for finding an azeotrope curve during a Thermodynamics final. Despite the increase in power, memory, pixels and features the HP-32G that followed never could steal my heart away. Here's to you, HP-32S...

Best Programmer Calculator for iPhone

What is the best programmer's calculator application for the iPhone? ...

IDE for HP Calculator Programming?

Typing in programs longer than 50 characters got old really fast on my HP49g+. What IDEs are designed for programming HP calculators? Are there any plugins to Visual Studio, Eclipse, xCode, etc. for this purpose? ...

floating point hex octal binary

Hi, I am working on a calculator that allows you to perform calculations past the decimal point in octal, hexadecimal, binary, and of course decimal. I am having trouble though finding a way to convert floating point decimal numbers to floating point hexadecimal, octal, binary and vice versa. The plan is to do all the math in decimal a...

basic php form help

I'm trying to make a calculator that will take inputs from users and estimate for them how much money they'll save if they use various different VoIP services. I've set it up like this: <form method="get" action="voip_calculator.php"> How much is your monthly phone bill? <input name="monthlybill" type="text" value="$" size="8"> ...

incrementing array value with each button press?

Hi, I am building a calculator in C#. I am not sure what the best way is to have it increment a number in an array every time the button is pressed. Here is one of my current button event handler methods: //Assign button '2' to 2 with array address of 1 private void num2_Click(object sender, EventArgs e) { numbers[1...

What calculator is an aid to you as a programmer?

I have decided to break down, and buy a calculator to use at work. One that I can hold in my hand. The features I want involve HEX/OCT/DEC/BIN conversion, and the basic statistical functions and solar/battery power. I am primarily a CRUD programmer, I also do a little statistics work from time to time. The question is three fold....

Win Form Calculator: Buttons 0 - 9 Event handler to perform repetitive task

I have a win form UI that looks like a typical calculator. Naturally I do not want to rewrite the same logic for every single numeric button(0-9). I want to be able to know which button was clicked so I can perform calculations based on it's text property. Should I just make a method that accepts the button object as a parameter to promo...

First Java program (calculator) problems

I'm in the process of learning Java and my first project is a calculator, however I've run into a snag. I'm trying to get my calculator to let me enter a number then click an operator (+, -, x, /), enter another number then hit an operator again and have the display update and be able to keep this going. Example, I would like to be abl...

Rational number calculator

I want to make a rational number calculator, but I don't know how to neglect some characters. E.g., if the program has to calculate the expression "2/9+9/3" and the answer should be in unsimplified form, how to neglect '/' in the above expression while taking input? ...

Is there a calculator with LaTeX-syntax?

When I write math in LaTeX I often need to perform simple arithmetic on numbers in my LaTeX source, like 515.1544 + 454 = ???. I usually copy-paste the LaTeX code into Google to get the result, but I still have to manually change the syntax, e.g. \frac{154,7}{25} - (289 - \frac{1337}{42}) must be changed to 154,7/25 - (289 - 1...

equation string in vb .net

Hello I'm trying to build a scientific calculator with vb .net, except it is vista glass :-p I basically want the user to be able to enter an equation like SQRT(5 * 6) / (2 ^ 4) and then I want vb to use system.math to solve it. If I write this in my code, vb is able to do it, so how could I do this at runtime. Thanks ...

How would I add a PHP statement to conditionally subtract?

I have a form that uses PHP to calculate a total based on the selections that the user makes. There are 13 selections total. There are two sections that I am stuck on, "Blue" and "Orange": If the User selects "Blue", $250.00 is added to the price If the User selects "Orange", $150.00 is added to the price The thing I am trying to figu...

android program crashing (new to platform)

So it is my first real Android program (!hello world), but i do have java experience.The program compiles fine, but on running it crashes as soon as it opens (tried debugging, but it crashes before it hits my breakpoint). Was looking for any advice from anyone who is more experienced with android. package org.me.tipcalculator; import an...

UPS freight calculator

I have managed to get a UPS Shipping calculator working in PHP. I now found out that the standard shipping from UPS is capped at 150lbs. For anything over 150lbs, I need to ship via freight. Has anyone ever coded a Freight Calculator with UPS? The calculator I wrote for anything under 150lbs does not require a UPS account. I was hop...

How can I box content in LaTeX such that all boxes are on the same line and the same height?

I need to represent calculator key presses by the text for the keys to press surrounded by a box. I tried to get away with just the bare key presses (no box) but I got marked down for it because it would appear my assessor is a bit of a pedant. Anyway, a bit of research turned up the likes of \boxit and \fbox. I gave them both a go but...

What's the easiest approach for a calculator keypad algorithm?

Want to code a key pad for an calculator. What I want to make is: Keypad with keys from 0 to 9 Special keys: + - * / . = My conceptual so far: When a numeric key is pressed, convert it's int value into an string and append that string to the bufferString. That way the input value gets built up. When the user presses . (to make a float...

Real time 'price x quantity' calculator

Hi, I'm using ASP.NET and a Repeater control to display my data. The data I have is in stored in a List. How would I implement a simple calculator that is affected in real time? Would I have to use AJAX, or is it possible to do it client-side? I'd like the user to be able to change the quantity, with the new price being visible immedi...

C++ simple operations (+,-,/,*) evaluation class

I am looking for a C++ class I can incorporate into a project I am working on. the functionality I need is evaluation of string operations to numerical form: for example "2 + 3*7" should evaluate to 23. I do realize what I am asking is a kind of an interpreter, and that there are tools to build them, by my background in CS is very poo...