User Tools

Site Tools


2014:mathematics_asm

This is an old revision of the document!


Mathematics function in assembly

by Cyprien Guillemot, Bonjun Gu, Pil Hun Choi

What did you do?

For our final project we decided to code some mathematics function in assembly. We made:

  • Exponential
  • Logarithm
  • Cos
  • Sin
  • Tan
  • Power

How Did You Do It?

To make all these functions we use the Taylor series. We use recursive algorithm to make it. Each time the function calculate a term and add it to the sum. In order to achieve this, we made two functions that are used in every function: power and fact.

How to run it?

To run it, download Mars. Load one of the file in the archive. Build and run it. The result should be in the register $f0. If you want to calculate at other value, change the value of the register $f5. The value of $a1 is the number of term to calculate.

2014/mathematics_asm.1418679981.txt.gz · Last modified: 2014/12/15 16:46 by 2014_mathematics-asm