Procedures

ProcedureLocationProcedure TypeDescription
abs_max_valforeng_math_setsInterface
abs_max_val_r32foreng_math_setsFunction
abs_max_val_r64foreng_math_setsFunction
acosdforeng_math_trigInterface

Calculate and return in degrees

Read more…
acosd_r32foreng_math_trigFunction

Single precision

acosd_r64foreng_math_trigFunction

Double precision

arithmetic_meanforeng_math_statsInterface
array_epsilonforeng_math_setsInterface
array_epsilon_r32foreng_math_setsFunction
array_epsilon_r64foreng_math_setsFunction
asindforeng_math_trigInterface

Calculate and return in degrees

Read more…
asind_r32foreng_math_trigFunction

Single precision

asind_r64foreng_math_trigFunction

Double precision

atandforeng_math_trigInterface

Calculate and return in degrees

Read more…
atand_r32foreng_math_trigFunction

Single precision

atand_r64foreng_math_trigFunction

Double precision

belongs_toforeng_math_setsInterface

Check if
belongs to if there is at least one element in for which

belongs_to_intforeng_math_setsFunction

Check if a value belongs to a set

belongs_to_r32foreng_math_setsFunction

Check if a value belongs to a set within a certain tolerance . If is not specified, it will automatically calculated using the function

belongs_to_r64foreng_math_setsFunction

Check if a value belongs to a set within a certain tolerance . If is not specified, it will automatically calculated using the function

calc_b_llsforeng_numeric_regressionFunction
calc_correlation_coefficient_llsforeng_numeric_regressionFunction
calc_current_flowchapter_4Function
calc_current_flowforeng_science_elecFunction
calc_decibelsforeng_science_physFunction
calc_derivativeforeng_numeric_calculusFunction
calc_gravityforeng_science_physFunction
calc_m_llsforeng_numeric_regressionFunction
calc_tensionforeng_science_physFunction
celcius_to_fahrenheitforeng_science_tempInterface
celcius_to_fahrenheit_r32foreng_science_tempFunction
celcius_to_fahrenheit_r64foreng_science_tempFunction
celcius_to_kelvinforeng_science_tempInterface
celcius_to_kelvin_r32foreng_science_tempFunction
celcius_to_kelvin_r64foreng_science_tempFunction
chapter_selectdemoSubroutine
chapter_selecteddemoSubroutine
cosdforeng_math_trigInterface

Calculate where is in degrees

Read more…
cosd_r32foreng_math_trigFunction

Single precision

cosd_r64foreng_math_trigFunction

Double precision

coshdforeng_math_trigInterface
coshd_r32foreng_math_trigFunction

Single precision

coshd_r64foreng_math_trigFunction

Double precision

cross_productforeng_math_geomInterface
cross_product_r32foreng_math_geomFunction
cross_product_r64foreng_math_geomFunction
deg_to_radforeng_math_trigInterface

Convert from degrees to radians

deg_to_rad_r32foreng_math_trigFunction
deg_to_rad_r64foreng_math_trigFunction
distanceforeng_math_geomFunction
eliminate_columnforeng_numeric_matricesInterface
eliminate_column_128foreng_numeric_matricesInterface
eliminate_column_32foreng_numeric_matricesInterface
eliminate_column_64foreng_numeric_matricesInterface
exp_seriesforeng_math_miscInterface

Compute using a truncated taylor series

exp_series_r32foreng_math_miscFunction

Compute using a taylor series with 12 terms

exp_series_r64foreng_math_miscFunction

Calculate using a taylor series with 20 terms

factorialforeng_math_miscInterface

Compute

factorial_int128foreng_math_miscFunction

Recursively compute the factorial of a 128-bit integer [supported on gfortran]. The max value that can be passed is 33 If x is less than 0 or greater 33, the function will return 0

factorial_int16foreng_math_miscFunction

Recursively compute the factorial of a 16-bit integer. The max value that can be passed is 7 If x is less than 0 or greater 7, the function will return 0

factorial_int32foreng_math_miscFunction

Recursively compute the factorial of a 32-bit integer. The max value that can be passed is 16 If x is less than 0 or greater 16, the function will return 0

factorial_int64foreng_math_miscFunction

Recursively compute the factorial of a 64-bit integer. The max value that can be passed is 20 If x is less than 0 or greater 20, the function will return 0

fahrenheit_to_celciusforeng_science_tempInterface
fahrenheit_to_celcius_r32foreng_science_tempFunction
fahrenheit_to_celcius_r64foreng_science_tempFunction
fahrenheit_to_kelvinforeng_science_tempInterface
fahrenheit_to_kelvin_r32foreng_science_tempFunction
fahrenheit_to_kelvin_r64foreng_science_tempFunction
fibonacci_loopforeng_math_miscFunction

Update current F number Update previous two numbers

fill_urandforeng_math_probInterface

Fill a rank 1, 2, or 3 array with a uniform random variable from min (inclusive) to max (inclusive for integer functions, exclusive for real)

Read more…
fill_urand_rank1_i32foreng_math_probSubroutine
fill_urand_rank1_i64foreng_math_probSubroutine
fill_urand_rank1_r32foreng_math_probSubroutine
fill_urand_rank1_r64foreng_math_probSubroutine
fill_urand_rank2_i32foreng_math_probSubroutine
fill_urand_rank2_i64foreng_math_probSubroutine
fill_urand_rank2_r32foreng_math_probSubroutine
fill_urand_rank2_r64foreng_math_probSubroutine
fill_urand_rank3_i32foreng_math_probSubroutine
fill_urand_rank3_i64foreng_math_probSubroutine
fill_urand_rank3_r32foreng_math_probSubroutine
fill_urand_rank3_r64foreng_math_probSubroutine
gauss_elimforeng_numeric_matricesInterface
gauss_elim_inverse_128foreng_numeric_matricesInterface
gauss_elim_inverse_32foreng_numeric_matricesInterface
gauss_elim_inverse_64foreng_numeric_matricesInterface
gauss_elim_mult_128foreng_numeric_matricesInterface
gauss_elim_mult_32foreng_numeric_matricesInterface
gauss_elim_mult_64foreng_numeric_matricesInterface
gauss_elim_sing_128foreng_numeric_matricesInterface
gauss_elim_sing_32foreng_numeric_matricesInterface
gauss_elim_sing_64foreng_numeric_matricesInterface
generate_sys_eqnsforeng_numeric_regressionSubroutine
geometric_meanforeng_math_statsInterface
harmonic_meanforeng_math_statsInterface
intersectionforeng_math_setsInterface

Compute the intersection of two sets

intersection_intforeng_math_setsFunction
intersection_r32foreng_math_setsFunction
intersection_r64foreng_math_setsFunction
inverseforeng_numeric_matricesInterface
is_alphchapter_4Function

Test whether an ASCII character is a letter

is_alphforeng_io_charFunction

Check if a character belongs to the alphabet This function checks the ASCII collating sequence of the passed character and returns true if the character belongs to the Roman alphabet.

is_alphnumchapter_4Function

Test whether an ASCII character is alpha-numeric

is_alphnumforeng_io_charFunction

Check if a character is alphanumeric This function checks the ASCII collating sequence of the passed character and returns true if the character is alpha (A-Z, a-z) or numeric (0-9)

is_lowerchapter_4Function

Test whether an ASCII character is a lowercase letter

is_lowerforeng_io_charFunction

Check if a character is a lowercase alpha character Returns true if the ASCII value of char lies between LOWER_A_ASCII and LOWER_Z_ASCII

is_numchapter_4Function

Test whether an ASCII character is numeric

is_numforeng_io_charFunction

Check if a character is a numerical digit. Return true if a character is between 0-9

is_upperchapter_4Function

Test whether an ASCII character is an uppercase letter

is_upperforeng_io_charFunction

Check if a character is a uppercase alpha character Returns true if the ASCII value of char lies between UPPER_A_ASCII and UPPER_Z_ASCII

kelvin_to_celciusforeng_science_tempInterface
kelvin_to_celcius_r32foreng_science_tempFunction
kelvin_to_celcius_r64foreng_science_tempFunction
kelvin_to_fahrenheitforeng_science_tempInterface
kelvin_to_fahrenheit_r32foreng_science_tempFunction
kelvin_to_fahrenheit_r64foreng_science_tempFunction
line2_atxforeng_math_geomFunction
line2_atyforeng_math_geomFunction
line2_from_two_point2foreng_math_geomSubroutine
line2_printforeng_math_geomSubroutine
lls_coefficient_fitforeng_numeric_regressionSubroutine

Linear Least Squares Fit with correlation coefficient

lls_fitforeng_numeric_regressionSubroutine

Linear Least Squares Fit

luforeng_numeric_matricesInterface
lu_decomp_128foreng_numeric_matricesInterface
lu_decomp_32foreng_numeric_matricesInterface
lu_decomp_64foreng_numeric_matricesInterface
meanforeng_math_statsInterface
nth_rootforeng_math_miscInterface

Compute

nth_root_r32foreng_math_miscFunction
nth_root_r64foreng_math_miscFunction
operator(*)foreng_math_geomInterface
p4_1chapter_4Subroutine

Test if the following equalities are valid statements, and if they are, evaluate them

p4_10chapter_4Subroutine

Examine the followin while loops and determine the value of ires at the end of each of the loops.

p4_11chapter_4Subroutine

Modify program ball from example 4-7 to read in the acceleration due to gravity at a particular location, and to calculate the maximum range of the ball for that acceleration. After modifying the program, run it with accelerations of -9.8, -9.7, and -9.6m/s2.

Read more…
p4_12chapter_4Subroutine

Modify program ball from Example 4-7 to read in the initial velocity with which the ball is thrown. After modifying the program, run it with initial velocities of 10, 20, and 20 m/sec. What effect does changin the initial velocity have on the range of the ball? What effect does it have on the best angle theta at which to throw the ball?

p4_13chapter_4Subroutine
p4_14chapter_4Subroutine

Write a Fortran program to evaluate the function y(x) = ln(1/1-x) for any user-specified value of x, where ln is the natural logarithm. Write the program with a while loop, so that the program repeats the calculation for each legal value of x entered into the program. When an illegal value of x is entered, terminate the program.

p4_15chapter_4Subroutine

Write a Fortran program to convert all uppercase characters in a user-supplied character string to lowercase, without changing the uppercase and nonalphabetic characters in the string. Assume that your computer uses the ASCII collating sequence.

p4_16chapter_4Subroutine

Calculating Orbits.

Read more…
p4_17chapter_4Subroutine

Write a program caps that reads in a character string, searches for all of the words within the string, and capitalizes the first letter of each word, while shifting the remainder of the word to lowercase. Assume that all nonalphabetic and nonumeric characters can mark the boundaries of a word within the character variable (periods, commas,etc.). Nonalphabetic characters should be left unchanged.

p4_18chapter_4Subroutine

Write a computer program to calculate the current flowing through this diode for all voltages from -1.0V to +0.6 V, in 0.1 V steps. Repeat this process for the following temperatures: 75F, 100F, and 125F

p4_19chapter_4Subroutine

Write a program that promps a user for a binary number, which will be entered as a string of 0s and 1s in a character variable. This program should be able to handle numbers whos binary representation is up to 10 bits, corresponding to values from 0 to 1023.

p4_3chapter_4Subroutine

Write a Fortran program to evaluate the equation y(x) = x^2 - 3x + 2 for all values between -1 and 3, in steps of 0.1.

p4_4chapter_4Subroutine

Write the Fortran statements required to calculate y(t) from the equation:

Read more…
p4_5chapter_4Subroutine

Write a Fortran program to calculate the factorial function. Be sure to handle the special cases of 0! and of illegal input values.

p4_6chapter_4Subroutine

What is the difference in behavior between a cycle statement and an exit statement?

p4_7chapter_4Subroutine

Modify program stats_2 to use the DO WHILE construct instaed of the while construct currently in the program

Read more…
p4_8chapter_4Subroutine

Examine the following DO statements and determine how many times each loop will be exectued.

Read more…
p4_9chapter_4Subroutine

Examine the following loops, determine the value of ires and the number of times each loop executes

p5_1chapter_5Subroutine

DISCUSSION QUESTION What is the purpose of a format? What are the three ways to define a format?

p5_2chapter_5Subroutine

DISCUSSION QUESTION What is printed out by the following Fortran statements?

p5_3chapter_5Subroutine

DISCUSSION QUESTION What is printed out by the following Fortran statements?

p5_4chapter_5Subroutine

DISCUSSION QUESTION Read in 5_4.dat and find out what the output will be for the following statements:

p5_5chapter_5Subroutine

DISCUSSION QUESTION Read in 5_5.dat and find out what the value of each variable will be when the READ statements have been completed

p5_6chapter_5Subroutine

Generate a table of the base 10 logarithms between 1 and 10 in steps of 0.1

p6_1chapter_6Subroutine

DISCUSSION QUESTION How may arrays be declared?

p6_10chapter_6Subroutine

Polar to Rectangular Conversion

Read more…
p6_11chapter_6Subroutine

Rectangular to Polar Conversion

Read more…
p6_3chapter_6Subroutine

DISCUSSION QUESTION Execute this subroutine on your computer with both bounds checking turned on and bounds checking turned off. What happens?

p6_4chapter_6Subroutine

DISCUSSION QUESTION Determine the shape and size of the arrays specified by the following statements:

p6_5chapter_6Subroutine

DISCUSSION QUESTION Determine which of the following Fortran program fragments are valid. For each valid statement, specify what will happen in the program. (Assume default typing for any variables that are not explicitly typed within the program fragments.)

p6_6chapter_6Subroutine

DISCUSSION QUESTION What is meant by each of the following array terms? Size, shape, extent, rank, conformable.

p6_7chapter_6Subroutine

DISCUSSION QUESTION Given an array my_array defined as shown, determine whether each of the following array sections is valid

p6_8chapter_6Subroutine

DISCUSSION QUESTION What will the output from each of the WRITE statements in the following subroutine be? Why is the output of the two statements different?

p7_1chapter_7Subroutine

DISCUSSION QUESTION
What is the difference between a subroutine and a function?

p7_10chapter_7Subroutine

NOT APPLICABLE

p7_2chapter_7Subroutine

DISCUSSION QUESTION
When a subroutine is called, how is data passed from the calling program to the subroutine, and how are the results of the subroutine returned to the calling program?

p7_3chapter_7Subroutine

DISCUSSION QUESTION
What are the advantages and disadvantages of the pass-by-reference scheme used in Fortran?

p7_4chapter_7Subroutine

DISCUSSION QUESTION
What are the advantages and disadvantages of each procedure array type?

p7_5chapter_7Subroutine

DISCUSSION QUESTION
Suppose a 15-element array is passed to a subroutine. What happens if the subroutine attempts to write to element a(16)?

p7_6chapter_7Subroutine

DISCUSSION QUESTION
If a real value is passed to a subroutine in an argument that is declared to be an integer, what happens?

p7_7chapter_7Subroutine

DISCUSSION QUESTION
How can p7_6 be modified so that the compiler catches the argument mismatch between the actual argument and the dummy argument in the subroutine?

p7_8chapter_7Subroutine

DISCUSSION QUESTION
What is the purpose of the INTENT attribute? Where can it be used? Why should it be used?

p7_9chapter_7Subroutine

NOT APPLICABLE

point2_distance_between_point2foreng_math_geomFunction
point2_from_array_intforeng_math_geomSubroutine
point2_from_array_r32foreng_math_geomSubroutine
point2_from_array_r64foreng_math_geomSubroutine
point2_from_polar_intforeng_math_geomFunction
point2_from_polar_r32foreng_math_geomFunction
point2_from_polar_r64foreng_math_geomFunction
point2_minus_point2foreng_math_geomFunction
point2_plus_point2foreng_math_geomFunction
point2_print_cartesianforeng_math_geomSubroutine
point2_print_polarforeng_math_geomSubroutine

Print the polar coordinates of a point in this form

point2_rhoforeng_math_geomFunction

Calculate the magnitude (distance from the origin) of

point2_thetaforeng_math_geomFunction

Return the angle (in degrees) of the polar representation of a point

point2_to_arrayforeng_math_geomFunction
point2_unary_minusforeng_math_geomFunction
point3_cross_point3foreng_math_geomFunction
point3_distance_between_point3foreng_math_geomFunction
point3_dot_point3foreng_math_geomFunction
point3_from_array_intforeng_math_geomSubroutine
point3_from_array_r32foreng_math_geomSubroutine
point3_from_array_r64foreng_math_geomSubroutine
point3_from_spherical_intforeng_math_geomFunction
point3_from_spherical_r32foreng_math_geomFunction
point3_from_spherical_r64foreng_math_geomFunction
point3_minus_point3foreng_math_geomFunction
point3_phiforeng_math_geomFunction

return the azimuth phi

point3_plus_point3foreng_math_geomFunction
point3_print_cartesianforeng_math_geomSubroutine
point3_print_sphericalforeng_math_geomSubroutine

Print the polar coordinates of a point in this form

point3_rhoforeng_math_geomFunction

Calculate the magnitude (distance from the origin) of

point3_thetaforeng_math_geomFunction

Return the inlination theta

point3_to_arrayforeng_math_geomFunction
point3_unary_minusforeng_math_geomFunction
poissonforeng_math_probFunction
problem_selectdemoSubroutine
program_enddemoSubroutine
program_startdemoSubroutine
rad_to_degforeng_math_trigInterface

Conver from radians to degrees

rad_to_deg_r32foreng_math_trigFunction
rad_to_deg_r64foreng_math_trigFunction
rank1_arithmetic_mean_i32foreng_math_statsFunction

Calculate the arithmetic mean of a rank 1 array

rank1_arithmetic_mean_i64foreng_math_statsFunction

Calculate the arithmetic mean of a rank 1 array

rank1_arithmetic_mean_r32foreng_math_statsFunction

Calculate the arithmetic mean of a rank 1 array

rank1_arithmetic_mean_r64foreng_math_statsFunction

Calculate the arithmetic mean of a rank 1 array

rank1_geometric_mean_i32foreng_math_statsFunction
rank1_geometric_mean_i64foreng_math_statsFunction
rank1_geometric_mean_r32foreng_math_statsFunction
rank1_geometric_mean_r64foreng_math_statsFunction
rank1_harmonic_mean_i32foreng_math_statsFunction
rank1_harmonic_mean_i64foreng_math_statsFunction
rank1_harmonic_mean_r32foreng_math_statsFunction
rank1_harmonic_mean_r64foreng_math_statsFunction
rank1_root_mean_squared_mean_i32foreng_math_statsFunction
rank1_root_mean_squared_mean_i64foreng_math_statsFunction
rank1_root_mean_squared_mean_r32foreng_math_statsFunction
rank1_root_mean_squared_mean_r64foreng_math_statsFunction
rank_1_mean_i32foreng_math_statsFunction

Calculate the mean of a 1d data set, given the "type"

Read more…
rank_1_mean_i64foreng_math_statsFunction

Calculate the mean of a 1d data set, given the "type"

Read more…
rank_1_mean_r32foreng_math_statsFunction

Calculate the mean of a 1d data set, given the "type"

Read more…
rank_1_mean_r64foreng_math_statsFunction

Calculate the mean of a 1d data set, given the "type"

Read more…
rms_meanforeng_math_statsInterface
scalar_times_vector3_intforeng_math_geomFunction
scalar_times_vector3_r32foreng_math_geomFunction
scalar_times_vector3_r64foreng_math_geomFunction
sindforeng_math_trigInterface

Calculate where is in degrees

Read more…
sind_r32foreng_math_trigFunction

Single precision

sind_r64foreng_math_trigFunction

Double precision

sind_seriesforeng_math_miscFunction

Compute sine using a truncated taylor series

sinhdforeng_math_trigInterface
sinhd_r32foreng_math_trigFunction

Single precision

sinhd_r64foreng_math_trigFunction

Double precision

standard_normal_randforeng_math_probFunction
std_devforeng_math_statsInterface
std_dev_i32foreng_math_statsFunction
std_dev_i64foreng_math_statsFunction
std_dev_r32foreng_math_statsFunction
std_dev_r64foreng_math_statsFunction
tandforeng_math_trigInterface

Calculate where is in degrees

Read more…
tand_r32foreng_math_trigFunction

Single precision

tand_r64foreng_math_trigFunction

Double precision

tanhdforeng_math_trigInterface
tanhd_r32foreng_math_trigFunction

Single precision

tanhd_r64foreng_math_trigFunction

Double precision

to_celciuschapter_4Function

Convert a temperature from Fahrenheit to celcius

to_continuedemoSubroutine
to_kelvinchapter_4Function

Convert a temperature in Fahrenheit to Kelvin

to_lowerchapter_4Subroutine

Convert a single character to lowercase

to_lowerforeng_io_charFunction

Convert an uppercase alpha character to its lowercase counterpart. If the passed character is not uppercase, return the same character.

to_upperchapter_4Subroutine

Convert a single character to uppercase

to_upperforeng_io_charFunction

Convert a lowercase alpha character to its uppercase counterpart. If the passed character is not lowercase, return the same character.

unionforeng_math_setsInterface

Compute the union of two sets

union_intforeng_math_setsFunction
union_r32foreng_math_setsFunction
union_r64foreng_math_setsFunction
urandforeng_math_probInterface

Return a uniform random variable from min (inclusive) to max (inclusive for integer functions, exclusive for real)

urand_i32foreng_math_probFunction

Return a uniform random variable [min, max]

urand_i64foreng_math_probFunction

Return a uniform random variable [min, max]

urand_r32foreng_math_probFunction

Return a uniform random variable [min, max)

urand_r64foreng_math_probFunction

Return a uniform random variable [min, max)

vector3_angle_between_vector3foreng_math_geomFunction

Return angle between vectors in degrees

vector3_cross_vector3foreng_math_geomFunction
vector3_dot_vector3foreng_math_geomFunction
vector3_from_array_intforeng_math_geomSubroutine
vector3_from_array_r32foreng_math_geomSubroutine
vector3_from_array_r64foreng_math_geomSubroutine
vector3_magnitudeforeng_math_geomFunction
vector3_minus_vector3foreng_math_geomFunction
vector3_plus_vector3foreng_math_geomFunction
vector3_printforeng_math_geomSubroutine
vector3_times_scalar_intforeng_math_geomFunction
vector3_times_scalar_r32foreng_math_geomFunction
vector3_times_scalar_r64foreng_math_geomFunction
vector3_to_arrayforeng_math_geomFunction
vector3_unary_minusforeng_math_geomFunction