Frink Sample Programs

Documentation * FAQ * What's New * Download * Frink Applet * Web Interface * Frink Server Pages * Donate

Below is a collection of sample Frink programs.

You can also download all of these sample programs in a single zipfile, FrinkSamples.zip

allFactors[text] Calculates all factors of a number (not just prime factors.)
ArbitraryPrecision[text] Calculates some functions (e.g. log and exp) to arbitrary precision.
baseball[text] Calculates trajectory of a baseball.
bert[text] Calculates the probability of two first names appearing in the same movie.
binarySearch[text] Routines for binary-searching an ordered list.
bitwiseXOR[text] Calculates a bitwise XOR function for arbitrarily-large numbers.
ChineseNumbers[text] Formats integers into their Chinese equivalents (formal and casual)
classtest[text] A sample of object-oriented programming; demonstrates writing and using a class specification.
closestFraction[text] Routines for finding the closest fraction to a number. Also see continuedFraction.frink .
commonTransformations[text] Contains transformation rules primarily for finding derivatives of expressions.
compound[text] Routines for calculating masses of chemical compounds.
continuedFraction[text] Routines for generating continued fraction representations of numbers.
CoordinateConversions[text] Converts latitude and longitude to and from UTM coordinates.
Datum[text] A data structure used to represent the ellipsoidal shape of the earth, used in various navigation routines.
daylight[text] Calculates duration of daylight over the course of a year.
derivatives[text] Transformation rules for finding derivatives of expressions.
elements[text] A basic periodic table of the elements.
exectest[text] Demonstrates starting external processes using Frink's ability to call Java code.
Fourier[text] Routines for discrete and fast Fourier transforms (FFT) of data.
geometry[text] Functions for planar geometry.
hints[text] Provides hints and help for common errors in Frink calculations.
holeearthfullgradient[text] Calculates time to fall through a hole in the center of the earth with realistic model of densities.
holeearthgradient[text] Calculates time to fall through a hole in the center of the earth with overly-simplistic model of densities.
holeearthuniform[text] Calculates time to fall through a hole in the center of the earth with naïve uniform density model.
homonyms[text] Finds homophones of words.
HTMLUtils[text] Utilities for processing HTML.
JacobiSymbol[text] Functions for calculating the Jacobi symbol and Legendre symbol.
JVMinfo[text] Displays the properties of your Java Virtual Machine. Demonstrates use of Java Introspection.
LogIntegral[text] Calculates the logarithmic integral Li[x].
lottery[text] Routines for calculating lottery odds.
LucasLehmer[text] Implements the Lucas-Lehmer test for proving primality of Mersenne primes.
Maidenhead[text] Converts between lat/long and Maidenhead coordinates.
mandelbrot[text] Draws a Mandelbrot set in plain text.
mithengecorridor[text] Data for the Infinite Corridor at MIT.
mithengemoon[text] Calculates moon alignments with MIT's Infinite Corridor.
mithengesun[text] Calculates sun alignments in MIT's Infinite Corridor.
navigation[text] A library of high-precision calculations for navigating on the earth.
note[text] Functions for converting frequencies to musical notes.
palindromicNumbers[text] Finds palindromic numbers by the "reverse and add" method.
pi[text] Calculates π to arbitrary precision.
planets[text] A library to calculate the positions of the the planets to high accuracy using the VSOP87 theory.
pollardP-1[text] An implementation of the Pollard p-1 factoring algorithm.
randomDistribution[text] Randomly selects elements from a discrete set with a known distribution.
RiemannZeta[text] Calculates values of the Riemann Zeta function.
root[text] Finds roots of numbers to arbitrary precision.
siderealtime[text] Calculates Greenwich Mean Sidereal Time.
sieve[text] Sieve of Eratosthenes to find prime numbers.
simplegraph[text] An simple but interesting program that uses interval arithmetic to plot equations.
solve[text] A simple program that solves a variety of algebraic equations.
solvingTransformations[text] A library of transformation rules to solve algebraic equations.
StandardAtmosphere[text] A class which implements the U.S. Standard Atmosphere of 1976. This allows calculation of pressure, temperature, air density, speed of sound, etc. at varying altitudes.
StandardAtmosphereTest[text] Contains examples of doing standard atmosphere calculations.
statistics[text] Functions for statistics including the forward and inverse error function, the normal distribution, etc.
stock[text] Fetches stock prices from the internet.
sun[text] A massive library of astronomical calculations to find positions of the sun, moon, and other calculations.
sunplot[text] Creates data to plot the location of the sun for an entire year.
sunrise[text] Calculates times of sunrise, sunset, and twilights.
timezonediff[text] Calculates the difference between two time zones.
trigram[text] Program to find the most frequent n-letter patterns in words.
webspider[text] Simple program to find all of the links in an HTML page.
wheelgame3[text] Simulator to find optimum play for the big-wheel-spinnin' "Showcase Showdown" game on The Price Is Right
WilliamsPPlus1[text] Factorization using the Williams p+1 factorization method.
xmldump[text] Demonstrates dumping units in an XML format.
ziplocator[text] Locates latitude and longitude of U.S. zip codes (requires data file)

Descriptions of the following programs will be added later:

99bottles AgencyInitiation aldrich1 AMT
anagramchallenge anagramQuandary animate anonymousFunction
ArcTest AudreysQuilt BallBearing ballgame
baseconv basetiming BBP benchmark1
BenfordsLaw billionPrimes Boggle BoulderArtsAndMaths27
BourisPrimeTest breaktest CacheFreeGDMII cambridgetemp
cambridgetempFourier CarTalkPuzzle CarTalkPuzzle2 ChineseMarch
circleTest classcrashtest classRedefinitionTest colorboxes
constraintTest consttest convergatron coriolis
crossstitch crystalradio DeadDrop decipherbible
decipherrabbit decode decrypt definedUnicode
deltat dollarConvert drawSolarSystem DurinsDay
e e2 earthdisttest EarthTemperature
eBinarySplitting ECM encoding erf2
error exactDivideTest factor factor2
factorialTest fetchweather flag FloydSteinbergDither
fontDetails fontList forensicSeismology fortest
fortest2 fortest3 fourierTemp fouriertest
frinklog GeneralPathExample GeneralPathExamples GeneralPathTest
GoogleEarth GoogleTranslate goosePuzzle goosePuzzle1
graphicalSieve graphpaper gravtest guitoolstest
harvest harvest2 hinttest iau1980
iftest IndianAstronomy inputtest integrals
interfacetest intervalgraph intervaltest KevinDecrypt
lambda LatLongToUTM lefthand letterGraph
lettergrid LiarLiar LiarLiarII lights
listFonts longestWord MD5crack meeus33a
meeus47a meeus47b mersenne mersennesimple
mersennetest mersennetiming mithengefoner mithengeplanets
mithengereverse mithengereverse2 mithengereverse3 mithengereverse4
mnemonics mnemonicsMajor modinverse modtimetest
modtimetest2 MonthWithoutAFullMoon moonangle mooncomparison
moonDrawingTest mooreslaw multiline musicalscale
namefreq NancyDrewDogsPuzzle nextLargestPrime nextPrimeTest
nonterm normalCurve normalCurve2 NovaCrypt
numberCheckerboard outputtest partitions perihelion
piBinarySplitting piChudnovsky pixelAveragingTest planetDistance
planetLocations polygonTest ponderThis201004 ponderThis201004b
primebits primechain primeContest primecss
primeDish primelist primeprog primeQuadruples
primeratio primeregex primetest primetest2
primetest3 proctest pushclasstest pushtest
quadraticPrimes quadtree RainbowCache randomprime
regression repeatingDigits rewriteImage Richter
RightStuff risesetchart rollForIntelligence rot13
roulette Rump secant simplegraph2
simplegraph3 simulatedOverload singularics sizesort
Sneaky1 Sneaky2 SolarCooker SolarCooker2
solveTest solveTest2 spiral stocktest
Sudoku SudokuSmooth sumdigits suntest
suntimetest systemSolver systemSolver2 systemSolverDemo
systemSolverTest T9 TAIMinusUTC TAK
temperatureFrequency textAlignTest textcenter textcenter3
textcenterfixed TierraEstella timefunc TLE
tns toStringTest TravellersDilemma trs80ify
Tupper unicodeGraphics unicodeGraphics2 unittable
universeNote use usehttp useparent
UTMtest vd venus venus2
VINChecker vsop87 wheelgame WoodhengeCache
wordTransform WWIICache wynnhenge wynnhengemoon
XtotheX XtotheXbetter YourDatumOrMine ZehnGray

Alan Eliasen was born 14989 days, 12 hours, 46 minutes ago.

Back to Frink Documentation