Symbolic math calculations with Fortran 95

In summary, the conversation discusses the struggle of using symbolic math calculations with FORTRAN 95 in Silverfrost ftn 95 platform. The person is trying to calculate c=a+b without initializing a or b and print out the generic expression instead. They have tried using different data types but have not been successful in handling the error exception. They ask for help from others and mention that they are new to FORTRAN. Borek suggests using a different language like Mapple instead.
  • #1
Nomar_1985
2
0
Hi all
I am struggling to work symbolic math calculations with Fotran 95 in the Silverfrost ftn 95 plataform.

Say you want to calculate c=a+b but without initializing "a" or "b" to get a value "c", but rather print out or obtain the actual generic expresion "a+b"

I have tried to solve that using different data types (REAL, CHARACTER etc) but no way to handle the error exception for me.

Could somebody please give any light on this? I am new to Fotran and have not been able to find any solution on this.

Thanks in advance
 
Technology news on Phys.org
  • #2
Why do you try to use FORTRAN? Of all languages I ever used I would never select it for doing such things.
 
  • #3
Hi Borek, you are right, I had the same tought.
Better to do it with Mapple,
I just wanted to know if there was a relatively "simple" way to make it out
Thanks
 

FAQ: Symbolic math calculations with Fortran 95

1. What is symbolic math in Fortran 95?

Symbolic math in Fortran 95 refers to the ability to perform mathematical calculations using symbolic expressions, rather than just numerical values. This allows for more complex and precise calculations to be performed, as well as the ability to manipulate mathematical equations.

2. How do I perform symbolic math calculations in Fortran 95?

To perform symbolic math calculations in Fortran 95, you will need to use a symbolic math library or module, such as the Symbolic Math Toolbox from Fortran Market. This will provide you with the necessary tools and functions to manipulate and evaluate symbolic expressions.

3. Can I mix symbolic and numerical calculations in Fortran 95?

Yes, Fortran 95 allows for the mixing of symbolic and numerical calculations. This means that you can use both symbolic expressions and numerical values in the same calculation, as long as they are compatible data types.

4. What are the advantages of using symbolic math in Fortran 95?

There are several advantages to using symbolic math in Fortran 95. One of the main advantages is the ability to perform more complex and accurate calculations, especially in the fields of science and engineering. Symbolic math also allows for easier manipulation and solving of mathematical equations.

5. Are there any limitations to using symbolic math in Fortran 95?

While symbolic math in Fortran 95 has many advantages, there are also some limitations to be aware of. One limitation is that symbolic math calculations can be more computationally expensive and slower than numerical calculations. Additionally, not all Fortran 95 compilers may support symbolic math, so it is important to check the documentation of your compiler.

Similar threads

Replies
12
Views
15K
Replies
20
Views
8K
Replies
7
Views
3K
Replies
4
Views
26K
Replies
13
Views
4K
Replies
2
Views
4K
Replies
16
Views
2K
Replies
4
Views
1K
Back
Top