Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some calls in Excel throw FPU exceptions which throw error messages #288

Closed
pmanach opened this issue Dec 5, 2014 · 13 comments
Closed

Some calls in Excel throw FPU exceptions which throw error messages #288

pmanach opened this issue Dec 5, 2014 · 13 comments
Milestone

Comments

@pmanach
Copy link

pmanach commented Dec 5, 2014

The following formula lead to an error :
HAPropsSI("T";"H";105000;"R";1;"P";101325)
HAPropsSI("W";"H";105000;"R";1;"P";101325)
HAPropsSI("T";"H";110000;"R";1;"P";101325)
HAPropsSI("W";"H";110000;"R";1;"P";101325)
....

@ibell
Copy link
Contributor

ibell commented Dec 5, 2014

Yes, at least one of the inputs must be either dry bulb temperature or
humidity ratio

On Thu, Dec 4, 2014 at 8:09 PM, pmanach notifications@github.com wrote:

The following formula lead to an error :
HAPropsSI("T";"H";105000;"R";1;"P";101325)
HAPropsSI("W";"H";105000;"R";1;"P";101325)
HAPropsSI("T";"H";110000;"R";1;"P";101325)
HAPropsSI("W";"H";110000;"R";1;"P";101325)
....


Reply to this email directly or view it on GitHub
#288.

@ibell
Copy link
Contributor

ibell commented Dec 5, 2014

Is that the error you get?

On Thu, Dec 4, 2014 at 8:10 PM, Ian Bell ian.h.bell@gmail.com wrote:

Yes, at least one of the inputs must be either dry bulb temperature or
humidity ratio

On Thu, Dec 4, 2014 at 8:09 PM, pmanach notifications@github.com wrote:

The following formula lead to an error :
HAPropsSI("T";"H";105000;"R";1;"P";101325)
HAPropsSI("W";"H";105000;"R";1;"P";101325)
HAPropsSI("T";"H";110000;"R";1;"P";101325)
HAPropsSI("W";"H";110000;"R";1;"P";101325)
....


Reply to this email directly or view it on GitHub
#288.

@ibell
Copy link
Contributor

ibell commented Dec 5, 2014

The first works for me.

@ibell
Copy link
Contributor

ibell commented Dec 5, 2014

Are you using the most up-to-date versions?

@pmanach
Copy link
Author

pmanach commented Dec 5, 2014

I just update the DLL.
The error remain.

Example 1 :
=HAPropsSI("T";"H";105000;"R";1;"P";101325)
Calling "get_global_param_string_private("errstring", errstring, 1000)", the error description is : "options.p is not valid in saturation_T_pure_1D_P for T = 139.78����������������������������������������������������������������������������������������������������������������������"

Example 2 :
=HAPropsSI("T";"H";105000;"R";0,99;"P";101325)
Calling "get_global_param_string_private("errstring", errstring, 1000)", the error description is : "options.p is not valid in saturation_T_pure_1D_P for T = 139.097���������������������������������������������������������������������������������������������������������������������"

Example 3 :
=HAPropsSI("W";"H";105000;"R";1;"P";101325)
Calling "get_global_param_string_private("errstring", errstring, 1000)", the error description is : "options.p is not valid in saturation_T_pure_1D_P for T = 139.78����������������������������������������������������������������������������������������������������������������������"

@ibell
Copy link
Contributor

ibell commented Dec 5, 2014

Hmm I'll look into it. This is from Excel, right? Windows?

On Fri, Dec 5, 2014 at 9:11 AM, pmanach notifications@github.com wrote:

I just update the DLL.
The error remain.

Example 1 :
=HAPropsSI("T";"H";105000;"R";1;"P";101325)
Calling "get_global_param_string_private("errstring", errstring, 1000)",
the error description is : "options.p is not valid in
saturation_T_pure_1D_P for T = 139.78"

Example 2 :
=HAPropsSI("T";"H";105000;"R";0,99;"P";101325)
Calling "get_global_param_string_private("errstring", errstring, 1000)",
the error description is : "options.p is not valid in
saturation_T_pure_1D_P for T = 139.097"

Example 3 :
=HAPropsSI("W";"H";105000;"R";1;"P";101325)
Calling "get_global_param_string_private("errstring", errstring, 1000)",
the error description is : "options.p is not valid in
saturation_T_pure_1D_P for T = 139.78"


Reply to this email directly or view it on GitHub
#288 (comment).

@pmanach
Copy link
Author

pmanach commented Dec 5, 2014

yes VBA on EXCEL / WINDOWS

@ibell
Copy link
Contributor

ibell commented Dec 5, 2014

Aha. Are you using 64-bit excel? The line that reads

Private Declare PtrSafe Function HAPropsSI_private Lib
"C:\CoolProp\CoolProp_x64.dll" Alias "HAProps" (ByVal Output As String,
ByVal Input1Name As String, ByVal Value1 As Double, ByVal Input2Name As
String, ByVal Value2 As Double, ByVal Input3name As String, ByVal Value3 As
Double) As Double

Should read

Private Declare PtrSafe Function HAPropsSI_private Lib
"C:\CoolProp\CoolProp_x64.dll" Alias "HAPropsSI" (ByVal Output As String,
ByVal Input1Name As String, ByVal Value1 As Double, ByVal Input2Name As
String, ByVal Value2 As Double, ByVal Input3name As String, ByVal Value3 As
Double) As Double

i.e. the alias name was wrong.

On Fri, Dec 5, 2014 at 10:57 AM, pmanach notifications@github.com wrote:

yes VBA on EXCEL / WINDOWS


Reply to this email directly or view it on GitHub
#288 (comment).

ibell added a commit that referenced this issue Dec 5, 2014
See also #288

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
@ibell ibell added this to the v5.0.3 milestone Dec 5, 2014
@pmanach
Copy link
Author

pmanach commented Dec 6, 2014

Ian, I use only 32-bit version in my excel sheet.

@ibell
Copy link
Contributor

ibell commented Dec 6, 2014

OK can you send me a minimal xlsx file that demonstrates this error? Its
working fully for me
On Dec 5, 2014 7:23 PM, "pmanach" notifications@github.com wrote:

Ian, I use only 32-bit version in my excel sheet.


Reply to this email directly or view it on GitHub
#288 (comment).

@pmanach
Copy link
Author

pmanach commented Dec 6, 2014

Hello Ian,
find per attached the XLSM
Sincerely,PY

Date: Fri, 5 Dec 2014 17:27:52 -0800
From: notifications@github.com
To: CoolProp@noreply.github.com
CC: pierreyvesmanach@hotmail.com
Subject: Re: [CoolProp] HAPropsSI("T";"H";105000;"R";1;"P";101325) lead to an error (#288)

OK can you send me a minimal xlsx file that demonstrates this error? Its

working fully for me

On Dec 5, 2014 7:23 PM, "pmanach" notifications@github.com wrote:

Ian, I use only 32-bit version in my excel sheet.

Reply to this email directly or view it on GitHub

#288 (comment).


Reply to this email directly or view it on GitHub.

                  =

@ibell
Copy link
Contributor

ibell commented Dec 6, 2014

No file attached to issue. Please email directly to ian.h.bell@gmail.com

@ibell ibell closed this as completed Dec 6, 2014
@ibell ibell reopened this Dec 6, 2014
@ibell
Copy link
Contributor

ibell commented Dec 6, 2014

This is a bug with excel. I have debugged the DLL, it wants to return the correct value, but the wrong value is returned to Excel.

@ibell ibell changed the title HAPropsSI("T";"H";105000;"R";1;"P";101325) lead to an error Some calls in Excel throw FPU exceptions which throw error messages Dec 6, 2014
@ibell ibell closed this as completed in 31c34e5 Dec 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants