Solving simultaneous equations – Fortran dll

The file simultaneous.zip has been modified to allow access to a Fortran simultaneous equation routine, compiled as a dll.  The original file was posted in solving simultaneous equations.  The advantages of a compiled routine include:

  • Much better performance
  • Greater precision through use of Fortran 80 bit variables
  • Better security

Performance for solving a set of simultaneous equations with 250 unknowns 10 times is shown in the screen shot below.  The Fortran dll is over 18 times faster than the VBA routine.

Fortran Gaussian Elimination routine

Fortran Gaussian Elimination routine

 

To install GES() either:
Create a Folder “Spread” under Windows\System32
Copy the file GE5.dll to the new Spread folder
or:
Copy the file GE5.dll to the Windows\System32 folder
Open the Visual Basic Editor and change:
Declare Function GE Lib “..\Spread\GE5.dll”
to:
Declare Function GE Lib “GE5.dll”

The download zip file includes spreadsheet Simultaneous.xls, the dll file GE5.dll, and the Fortran source code GE5.f95

The Fortran routine is based on a program published by CR Bond

Posted in Arrays, Fortran, Link to dll, Maths, UDFs, VBA | Tagged , , , , , | 3 Comments

Physics Puzzle

The question below was set in a VCE (high school exam) physics exam in Victoria Australia.  After the exam the question was discussed by a number of physics experts who failed to reach a concensus on what the correct answer was!

What do you think?

It's all relative

It's all relative

Posted in Newton | Tagged , , , | 11 Comments

Trigonometric Functions – dll

I have converted the trigonometric functions presented in this earlier post into a Fortran dll.  The dll and associated spreadsheet and add-in files can be downloaded from here.

This file and the associated file Trig.dll provide trigonometric and hyperbolic functions not provided in VBA.
The functions are provided in two formats, either operating on a single value, or as an array formula.
“Degree” versions are also provided of all the trigonometric functions.
All the functions may be used either in VBA or directly in the worksheet, but the native Excel functions will be faster for spreadsheet use where available.
To install simply copy the dll file to your Windows/System32 folder and open the Trig Funcs.xls or xlsb file.

Introduction

Introduction

List of Trig Functions

List of Trig Functions

List of Hyperbolic Functions

List of Hyperbolic Functions

Trig Function Examples

Trig Function Examples

Hyperbolic Function Examples

Hyperbolic Function Examples

Posted in Excel, Link to dll, Maths, Newton, UDFs | Tagged , , , , , , | 2 Comments

Elegant proofs 3

At The Math Less Travelled it says:

“Did you know that the ratio between the side of any triangle and the sine of the opposite angle is equal to the diameter of the triangle’s circumcircle? I didn’t! I just learned it today when researching the law of sines. All that time spent on the law of sines in high school, and no one ever bothered to tell me that in any triangle, not only are all the ratios between side lengths and sines of opposite angles equal to each other, they are also equal to something else interesting — namely, the diameter of the circumcircle!

Among other things, this means in particular that if you inscribe any angle in a circle with diameter one, the length of the chord it subtends is equal to the sine of the angle:”

Follow the link above for a very neat wordless proof of this proposition, and see below for my own, possibly even neater, proof, using exactly the same number of words:

sinproof

Posted in Maths, Newton | Tagged , , | Leave a comment

Another old bridge, and some newer ones

A further collection of notable bridges from Southern Germany and Austria.

Würzburg’s Old Main Bridge (Alte Mainbrücke) was built 1473–1543 to replace the destroyed Romanesque bridge from 1133. It was adorned from 1730 on in two phases with well-known statues of saints and famous persons.

Wurzburg Old Bridge and the Fortress Marienberg

Wurzburg Old Bridge and the Fortress Marienberg

 

Wurzburg Old Bridge and the city from the fortress

Wurzburg Old Bridge and the city from the fortress

 

Statues on the Wurzburg Old Bridge

Statues on the Wurzburg Old Bridge

 The concrete arch bridge upstream of the old bridge at Wurzburg is also an elegant structure, but one about which I have not been able to find any details.

A newer arch bridge at Wurzburg

A newer arch bridge at Wurzburg

 

The Ludwigsbrucke is immediately oustside the Deutsche Museum in Munich, which includes, amongst many other exhibits, an interesting bridge exhibition.  The Ludwigsbrucke was constructed in 1936 with a span of 43 m, and was an early example of the use of precasting, with the arch soffit being formed from precast concrete, which was used as permanent form-work for the main concrete structure.

Ludwigsbrucke, Munich

Ludwigsbrucke, Munich

 

The nearby Luitpoldbrucke is similar in appearance, but is larger and older.  Built in 1901 with 63 m span.

Luitpoldbrucke, Munich

Luitpoldbrucke, Munich

 Of the bridges crossing the Salzach River at Salzburg it is the Mozart Footbridge (2nd from top) which is the most famous (having been filmed together with young Trapps practicing their scales in the Sound of Music), but to my mind the recent concrete footbridge is the more attractive.

Five bridges crossing the Salzach River at Salzburg

Bridges crossing the Salzach River at Salzburg

Footbridge over the Salzach River, Salzburg

Footbridge over the Salzach River, Salzburg

Posted in Arch structures, Historic Bridges, Newton | Tagged , , , | Leave a comment