Mathfun.py 2.1

Software ID: 119819

Mathfun.py 2.1 Description

Mathfun.py project s a rather small Python library that contains some of the more obscure (others would say less useful 8^) mathematical formula/functions that I have always found interesting/amusing. These include primality tests, fibonacci sequences and turning characters into numbers, among other things. The next paragraph includes a little story about my strange habits as a teenager. The paragraph after that contains some ramblings about primes and formulas. The paragraph after that hasnt been decided on yet, but you can be assured that it will be more stream-of- consciousness rambling about something mathematic by yours truly. One of the reasons that this library exists is that, as a junior programmer in high school, I spent an insane amount of time writing BASIC programs on our IIgs that would calculate the first 100 primes or some other such nonsense. I would write it one way, get out a stop watch, run it, record the time it took, rewrite it, rerun it, retime it and calculate the difference as percentage decrease in time. Repeat the previous until you get BASIC that looked like an explosion in a type factory. All in some sort of quest to... well, I dont really know what I was shooting for. I just enjoyed it. Calculating if a number was prime, calculating the prime factorization, calculating the first N prime numbers... Yeah, I was a strange one. But, in retrospect, all that solitary math kinda helped. While I reinvented many a prime wheel, I did it on my own, which was something of a personal fulfillment once I had learned more of a history of mathematics. And I never forgot most of those formulas that I worked out on that Apple. For instance, mathfun.isprime(number) utilizes most of what I learned back in high school. It iterates through the odd numbers, up to the integer value of the square root of the number in question. I still remember the epiphany that I had that I only needed to calculate through the square root of the number. 8^) Theres a minor paradox with the calculation of a prime. The quickest way to generate primes would be to only attempt modular arithmetic with prime numbers. However, to do it that way means that you have to generate a list of prime numbers first, which involves a primality test on every odd number up to the square root of the number in question. This would be sloooooow for the primality test for any single number. (For instance, isprime(10000) would involved roughly 50 full primality tests to generate the list needed to be a maximally efficient test on it.) So, we accept that even if were not going to get any results doing (N mod 9), its much quicker to eat those wasted cycles than to determine if 9 is prime first. However, if youre doing nothing more than simply cranking out prime after prime, it becomes much more efficient to only do the primality test with a list of primes, since (if you start from 2) youve already determined the ealier ones before. (Theres probably a break-even time first (machine dependent) before "determine all primes with primes" becomes more efficient than "crank through the odd numbers".) Its easy to see however, that for very large numbers its much better to only work with primes. Theres also a minor question of the speed of the data structures used to store the prime list versus the very fast next odd number test. However, Ill leave that one up to the True Computer Scientists.





POPULAR DOWNLOADS IN THIS SECTION
TeeChart for .NET
XMLFox Advance XML and XSD Editor
HelpScribble
Nevron Diagram for .NET
Flexible TreeView
Syser Debugger
QuickForum
Trace Modeler for UML Sequence Diagrams
AWinstall
AWinstall is a professional, efficient and easy-to-use setup builder for creating compact and intelligent setups for your Win32 and .NET applications. A modern user interface, help and wizards allow you to create professional setups in minutes.
Download Now!
OxyProject Metrics
OxyProject Metrics is an application that provides code metrics for software projects empowering software professionals to assess the complexity and maturity of a software product.
Download Now!
Syncro SVN Client
Syncro SVN Client is a cross platform application supporting all range of Subversion operations, in a very productive user interface.
Download Now!
Quick.Forum - freeware and fast message board
Freeware, fast, simple, and multilingual message board.
Download Now!
OxyGen Code Generator
Outputs include SQL Statements, Data Access Layer classes, Caching and Domain Model classes. The Business Layer is exposed through WCF, XML Web Services and ASP.NET. Searching, Paging Table Inheritance included.
Download Now!
Facebook Sharer PRO
Share Multiple Messages On Facebook Script
Download Now!
Pacestar UML Diagrammer
Pacestar UML Diagrammer helps you to quickly and easily generate all varieties of UML2 diagrams. Develop, document, and communicate your designs in a systematic yet flexible AND commonly understood notation.
Download Now!
Barcode Professional for WPF
Barcode for WPF .NET. High quality vector-based Linear, Postal and 2D Symbologies. Visual Studio support. WPF data-binding support. Crystal Reports .NET Support. Save barcode images in image files. XML Paper Specification (XPS).
Download Now!
IntegralUI TreeView
With IntegralUI TreeView you can create rich hierarchical presentation of your data. Use XML tags to fill the tree node content with text in multiple colors and paragraghs, images, custom controls, checkbox, flag and hyperlinks.
Download Now!
Just BASIC
Just BASIC is a free personal Windows programming tool and tutorial. Great for teaching or learning programming. Create utilities, games, business apps with syntax coloring editor, debugger, GUI editor. Produces standalone applications.
Download Now!
Gantt Chart Library 2.0
Gantt Chart Library 2.0 contains Gantt Chart related previous version Windows client components, such as the GanttChartView, and ResourceLoadChartView controls.
Download Now!
EJS TreeGrid Gantt chart
Interactive DHTML Gantt chart by EJS TreeGrid. Supports dependencies (ss,sf,fs,ff), expected and real flow, completion percent, milestones, flags, resources, any zoom, editing, dragging. Also formulas, sort, filter, group, search, print, paging, AJAX
Download Now!
Size: 9.2 KB | License: Freeware | Category: Programming
ini.py Ini. Ini.py is a Python module/class that allows developers to utilize Windows .INI files quickly and easily. A developer can access the file through a Windows-like interface (GetProfileString, SetProfileString) or as a common Python dictionary.

OS: Any Platform
Size: 0 | License: Freeware | Category: Programming
py-logger py-logger 1. py-logger 1.0.0

OS: Any Platform
Size: 0 | License: Freeware | Category: Programming
Pylotaz Pylotaz 1 is considered as an interesting and impressive game in which is developed with programming language Python and the bookshops Charts py game.Fua developed for the subject IG04-MTP , as a personal project. Licensed under the GPL, feel free to download and use

OS: Any Platform
Size: 3.9 MB | License: Freeware | Category: Programming
Py-mailer Py-mailer is a Python-based software that allows you to login with your Gmail credentials and send emails. Py-mailer is a Python-based software that allows you to login with your Gmail credentials and send emails. You can only send emails to one user at a time and attachments are not supported. Now you can use this fast, quick and easy-yo-use tool to...

Size: 5.1 MB | License: Shareware | Price: US$0.99 | Category: Programming
MathStressPE MathFun with MathStress - in an exciting competition with your friends. Speed up your calculations while playing this fast and fun game.It is very useful to automate basic math, like tables and basic additon and subtraction.This will make more ... MathFun with MathStress - in an exciting competition with your friends. Speed up your calculations while playing this fast and fun game. It is very useful to automate basic math, like tables and basic additon and subtraction. This will make...

OS: iOS