How to check if my lapack,cbas lib support long double type?

In summary, the user is using Debian Lenny and wants to know how to check if their lapack and cblas libs support long double type. They are considering downloading the source and re-compiling with long-double option, but are unsure if this will cause issues for other dependent programs. They plan to test with a long double type in their code, but are also wondering if anyone has done this before without any problems.
  • #1
olin
2
0
I'm using Debian Lenny. I want to know how I can check if my lapack,cblas libs support long double type.

If these libs don't support long double. I need to download the source and re-compile them with long-double option. If I do this, do the compiled new libs overwrite the old libs (which don't support long double)? Will this cause problem for other dependent programs that don't need long double?

Thank you very much!
 
Computer science news on Phys.org
  • #2
It should be in the documentation for whatever version of the libraries you're using. You can also just write test scripts where you try to use the libraries with long doubles that you know will break if unsupported.

In theory it won't break dependency, and if does it's likely cause the other programs are either hardcoded to require one of the older versions or can't find the new one.
 
  • #3
Thank you for the comments. I'll try to test it using a long double type in the code. But I think the default libs that Debian installs should be double only. (That's why the author of the program that I want to use suggests to download sources for these libs and compile it with long double support manually).

I believes that all re-compiled long double libs will have the same version (and the same name I guess) as the original double libs. I just need to use --long-double when compiling these libs. So I think the new libs will overwrite the old ones. But I don't know if my other programs using only double type can call these new libs without any issues. I know I should test it myself, I just want to ask if anyone done this before for caution. Thank you.
 

1. How do I know if my lapack library supports long double type?

To check if your lapack library supports long double type, you can look at the documentation or search for the data types supported by the library. You can also try using the long double type in your code and see if it compiles without any errors.

2. Can I change the data type in my lapack library to support long double type?

It is not recommended to change the data type in your lapack library as it may result in compatibility issues and errors. It is best to use a library that already supports long double type.

3. What is the difference between float, double, and long double in lapack?

Float, double, and long double are different data types used to represent decimal numbers with varying levels of precision. Float has the lowest precision, followed by double, and then long double. Using long double in lapack can provide more accurate results for certain calculations.

4. How can I check if my cbas library supports long double type?

Similar to lapack, you can check the documentation or search for the supported data types in your cbas library. You can also try using long double in your code and see if it compiles without any errors.

5. Are there any performance differences between using long double and other data types in lapack and cbas?

Using long double in lapack and cbas may result in slightly slower performance compared to using float or double. This is because long double requires more memory and processing power. However, the difference in performance may not be significant and may vary depending on the specific calculations performed.

Similar threads

  • Computing and Technology
Replies
26
Views
3K
  • Computing and Technology
Replies
15
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
Replies
7
Views
219
  • Computing and Technology
Replies
22
Views
2K
  • Computing and Technology
2
Replies
44
Views
3K
  • Programming and Computer Science
Replies
4
Views
1K
  • Computing and Technology
Replies
7
Views
1K
  • Computing and Technology
2
Replies
37
Views
5K
Replies
3
Views
978
Back
Top