LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-14-2009, 01:17 AM   #16
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208

Quote:
Originally Posted by mcnalu View Post
Incidentally, this seems to be a calculation for the energy of a photon of 250nm wavelength less 3.6eV.
Well spotted! 3.6 eV is the work function of Zinc
 
Old 10-14-2009, 02:05 AM   #17
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
Quote:
Originally Posted by jiml8 View Post
Interesting.

When I copy/paste that line into bash, it gives the answer -87.6, which is quite obviously incorrect. It has to be incorrect because the number simply cannot be that large and negative; only 3.6 is subtracted from what has to be a positive number because the operators are all multiplication and division, and all numbers are positive.
Code:
zcalc
1> ((6.63E-34 * 3.00E+8 / 250E-9) / 1.60E-19) - 3.6
1.3725
Zcalc (the ZSH calculator) wins again
 
Old 10-14-2009, 02:24 AM   #18
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by jiml8 View Post
The result is actually a voltage, since the energy computation is divided by the electronic charge. This means that the 3.6 is volts, not eV. Looks like something to do with a space charge potential.
It's an energy computation in eV for the maximum energy of electrons emitted from Zinc as a result of incident photons of wavelength 250 nM. Algebraically it is (h c / λ) - φ modified with the charge on an electron as a Joules to eV unit conversion factor. You can't get away with anything on LQ -- no stone left unturned!
 
Old 10-14-2009, 03:20 AM   #19
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578

Original Poster
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Thanks to all for replies

@pixellany: yet another reason to learn about python someday.

@sahko: zsh's zcalc is impressive,

@Woodsman: I ruled out KDE-based solutions, wanting to keep the computer KDE-free.

@shadowsnipes: I decided on Speedcrunch after reading reviews and ruling out Galculator as probably large, given its graphing capability although I may come back to it if I ever want a graphing calculator.

For completeness here is a list of all identified calculators, far too many to even look at reviews of them all
  • abakus - calculator for KDE
  • apcalc - Arbitrary precision calculator (original name: calc)
  • apcalc-common - Arbitrary precision calculator (common files)
  • apcalc-dev - Library for arbitrary precision arithmetic
  • bc - The GNU bc arbitrary precision calculator language
  • cafix - Communicates with CASIO graphic calculators
  • calc - An advanced calculator and mathematical tool for Emacs.
  • calcoo - Scientific calculator (GTK+)
  • calculator
  • concalc - console calculator
  • dc - The GNU dc arbitrary precision reverse-polish calculator
  • edenmath.app - Scientific calculator for GNUstep
  • extcalc - multifunctional scientific graphic calculator
  • fung-calc
  • gafix - An editor for Casio calculators
  • galculator - A GTK+ 2.0 based calculator
  • gcalctool - A GTK2 desktop calculator
  • genius - general purpose calculator and math tool with many features
  • gonvert
  • graphmonkey - a GTK#-based graphing calculator
  • grpn - GTK+ reverse polish notation calculator
  • hcalc
  • hexcalc
  • kalgebra - calculator based on MathML language
  • kalgebra-kde4 - mathematical calculator for KDE4
  • kcalc - calculator for KDE
  • kconvert
  • keurocalc - universal currency converter and calculator - binary package
  • keurocalc-data - universal currency converter and calculator - data package
  • kunit
  • orpie - RPN calculator for the terminal
  • pcalc
  • pgcalc2
  • qalc - Powerful and easy to use command line calculator
  • qalculate - Powerful and easy to use desktop calculator - transitional
  • qalculate-bases
  • qalculate-currency
  • qalculate-gtk - Powerful and easy to use desktop calculator - GTK version
  • qalculate-kde - Powerful and easy to use desktop calculator - KDE version
  • qalculate-units
  • rcalc - graphical symbolic calculator
  • rpc
  • rpncalc - RPN calculator trying to emulate an HP28S
  • sipcalc - Advanced console-based ip subnet calculator
  • snac - complete algebraic calculator for GNOME
  • speedcrunch - High precision calculator
  • stepulator.app - Scientific calculator implementing RPN notation for GNUstep
  • tiemu - Texas Instruments calculators emulator
  • tilp - TI calculator <-> PC communication program for X
  • tilp2 - TI calculator <-> PC communication program for X
  • transcalc
  • units
  • wcalc - A flexible command-line scientific calculator
  • wmcalc - Dockable calculator application
  • xabacus - simulation of the ancient calculator (plain X version)
  • xmabacus - simulation of the ancient calculator (Motif version)
 
Old 10-14-2009, 12:56 PM   #20
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
There's nothing much to learn about python:

Code:
bash-3.1$ python
Python 2.6.2 (r262:71600, Jun  9 2009, 14:36:10) 
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> ((6.63E-34 * 3.00E+8 / 250E-9) / 1.60E-19) - 3.6
1.3725000000000001
>>>
 
Old 10-14-2009, 01:36 PM   #21
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
For completeness here is a list of all identified calculators, far too many to even look at reviews of them all
Good Grief!!!!

Quote:
There's nothing much to learn about python:
Well......maybe not to do simple arithmetic.....
Code:
Python 2.6.3 (r263:75183, Oct  4 2009, 11:40:05)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> sin (30)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'sin' is not defined      ##OK--forgot to import the math module
>>> import math
>>> sin (30)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'sin' is not defined       ##forgot to say "math.sin"
>>> math.sin(30)
-0.98803162409286183                    ##Oops, python works in radians
>>> math.sin(30*pi()/180)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'pi' is not defined      ##so it's math.pi, maybe?
>>> math.sin(30*math.pi()/180)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'float' object is not callable    ##Huh?
>>> help
Type help() for interactive help, or help(object) for help about object.
>>> help math
  File "<stdin>", line 1
    help math
            ^
SyntaxError: invalid syntax
>>> help pi
  File "<stdin>", line 1
    help pi
          ^
SyntaxError: invalid syntax
###Arrrrgh!! Am I to believe Python does not know what pi is??????........
>>>
 
  


Reply

Tags
gcalctool



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C Calculator ChrisRain Programming 13 03-27-2007 02:33 AM
I need a calculator Starch Programming 5 02-14-2005 06:06 PM
looking for better gui calculator arnold Linux - Software 1 02-27-2004 02:20 PM
TI calculator adam_boz Linux - General 1 08-22-2002 10:15 AM
Calculator KyleYankan Linux - Software 6 08-03-2002 01:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration