E**(i*pi)=-1 or e**(j*pi)=-1, something I found out in Python using part of Eulers Identit equation.
Well guys and gals I have discovered after all these years that Python does complex numbers without the 'complex()' function or 'cmath' import.
It is well known that Euler's Identity E**(i*pi)+1=0 so I decided to experiment
As you can see within the limitations of the floating point accuracy e**(pi*1j)=-1.
We all live and learn and it also works for Python 1.4.0 for the AMIGA.
Last edited by wisecracker; 12-13-2019 at 03:02 PM..
Reason: Added last two lines.
These 2 Users Gave Thanks to wisecracker For This Post:
Hay, guys,
Any ideas how to calculate like this:
in first file, there're number of lines listing 2+3, 6*9 .......
Then, how to get the result and put them in another file in format:
2+3 5
6*9 54
......
sheerly by shell command, no scripts required. (4 Replies)
Hi,
Is there a way to evaluate an equation contained in a string within an AWK script?
For example:
A = "(5*2)-1" (this equation is read from a file and varies line by line)
In this example, I can't see any way to get an answer of 9 unless I do:
cmd = "awk 'BEGIN{print "A"}'"
cmd |... (3 Replies)
if input to the perl program is ' ( p * ((a+b) * (c+d))) + q ' it shuld give the output as ' pac + pad + pbc + pbd + q ' .can anyone suggest a way to do this ? (7 Replies)
I'm running a MPI program using a cluster of 4 machines(different machines of different processing power,cpu utilization etc.). I'm trying to balance the computation among the machine to get the minimum execution time for that. I tried to balance it by creating a threshold value by taking the load... (1 Reply)
HI All,
I have a script in bash that i want that script will perform action
When the size of a particular folder exceeds the 80%.
Here is an example of script that result is exactly 80% :
#!/bin/bash
CHECK=$(df -h /var/log/syslog | grep '80%' | xargs echo | cut -d' ' -f5)
if ];... (1 Reply)
Below is my code for comparing string for Exact Match found in python.
for word in jdbc_trgt.split(','):
global comp
comp=word.strip();
print "GloBAL:" + comp
fiIn = open('list.txt').readlines()
for lines in fiIn:
print "line1s:" +... (6 Replies)
Hello Forum,
We have two bootstraps of Chef in our environment which are identified by colour:
/var/chef/cache/cookbooks/bootstrap_cookbooks_version_green
and
/var/chef/cache/cookbooks/bootstrap_cookbooks_version_red
I'm attempting to identify which version is installed based on the name... (11 Replies)
Discussion started by: greavette
11 Replies
LEARN ABOUT OSX
pydoc2.6
PYDOC(1) BSD General Commands Manual PYDOC(1)NAME
pydoc -- the Python documentation tool
SYNOPSIS
pydoc name
pydoc -k keyword
pydoc -p port
pydoc -g
pydoc -w module ...
pydoc --help
DESCRIPTION
pydoc shows text documentation on something related to python(1). The name argument may be the name of a Python keyword, topic, function,
module, or package, or a dotted reference to a class or function within a module or module in a package. If name contains a '/', it is used
as the path to a Python source file to document. If name is 'keywords', 'topics', or 'modules', a listing of these things is displayed.
OPTIONS -k keyword Search for a keyword in the synopsis lines of all available modules.
-p port Start an HTTP server on the given port on the local machine.
-g Pop up a graphical interface for finding and serving documentation.
-w module ... Write out the HTML documentation for a module to a file in the current directory. If module contains a '/', it is treated as
a filename; if it names a directory, documentation is written for all the contents.
--help Prints out a help message.
AUTHOR
Moshe Zadka, based on "pydoc --help"
SEE ALSO python(1)
Dec 19, 2003