Point4D.Multiply inconsistent behaviour with NaN values
I've noticed some peculiar behaviour with System.Windows.Media.Media3D.Point4d.Mutiply when used with NaN values.
The following assumes that I expect that 0 * NaN should result in 0. There is an argument against that logic, but that is not the point here.
I have a 4x4 matrix defined, in the case that it is an Identity matrix and there is a NaN component in the vector, I would like to get some defined vector output where it is possible to calculate the component.
E.g. (1,2,NaN,4) * (Identity Matrix) = (1,2,NaN,4).
I was caught out for a while:
By stepping through using the debugger gives the output I want (1,2,NaN,4).
But allowing the debug code to run through uninterrupted gives the result (NaN, NaN, Nan, Nan).
There is a slightly surprising workaround: - using Matrix.IsIdentity seems to trigger the result I want
If I use the default Matrix constructor instead of a manually created one (normally created elsewhere in code), there is no problem.
Can anyone explain this inconsistency?
Simple C# console demo:
using System;
using System.Windows.Media.Media3D;
namespace TestNan
class Program
static void Main(string[] args)
Point4D testPoint = new Point4D(1.0, 2.0, Double.NaN, 4.0);
Matrix3D testMatrix = new Matrix3D(1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
0.0, 0.0, 0.0, 1.0);
var testResult1 = Point4D.Multiply(testPoint, testMatrix);
Console.WriteLine(testResult1.ToString());// NaN,NaN,NaN,NaN
var b = testMatrix.IsIdentity;
var testResult2 = Point4D.Multiply(testPoint, testMatrix);
Console.WriteLine(testResult2.ToString());// 1, 2, NaN, 4
Console.ReadKey();
>>Can anyone explain this inconsistency?
The Matrix3D class has an internal boolean flag that it uses to determine if the matrix is actually an identity matrix and this flag is not set when you create a Matrix3D object using the constructor that takes the 16 double values despite the fact that
you are actually creating an identity matrix (the flag is then eventually set when you access the IsIdentity property).
If you use the Matrix3D.Identity static property, the flag will get set to the correct value immediately and the results will be the expected:
static void Main(string[] args)
Point4D testPoint = new Point4D(1.0, 2.0, Double.NaN, 4.0);
Matrix3D testMatrix = Matrix3D.Identity;
var testResult1 = Point4D.Multiply(testPoint, testMatrix);
Console.WriteLine(testResult1.ToString());
var b = testMatrix.IsIdentity;
var testResult2 = Point4D.Multiply(testPoint, testMatrix);
Console.WriteLine(testResult2.ToString());// 1, 2, NaN, 4
Console.ReadKey();
Hope that helps.
Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't post several questions in the same thread.
Similar Messages
-
JDB shows inconsistent behaviour with JNI Based Programs.
package com.RJCBEmulator;
public class Testing
public static void main(String[] args) {
System.out.println("Start");
NativeObject myClass = new NativeObject();
System.out.println("Second line main" );
myClass.printInfo();
public class NativeObject {
static
System.loadLibrary("RJCBEmulator");
public NativeObject()
nativeHandle = InitializeNative(1);
public native long InitializeNative(int nClassId);
public void printInfo()
System.out.println( "Successful" );
public long nativeHandle;
JNIEXPORT jlong JNICALL Java_com_RJCBEmulator_NativeObject_InitializeNative(JNIEnv *env, jobject obj, jint jnIID)
printf( "Inside InitializeNative\n");
jlong retVal;
switch( jnIID )
case 1 :
// do something
break;
case 2 :
// do something
break;
return 999;
when executed this program with java, I get this trace.
Start
Inside InitializeNative
Second line main
Successful
and when running the same program in jdb, I get the following trace
Start
Second line main
Successful
Inside InitializeNative
I am using jre1.4.1, I tried it with 1.3.1 and it works. Looks like JNI code is getting executed on a separate thread in JDB based on jre1.4.1.
Is there anybody who is facing this problem? Is there a workaround?Start by testing your application using J2SE 1.4.1
(or the latest release available to you) and adding
"-Xcheck:jni" to the command line. This will perform
extra run-time checking on all JNI calls.
I don't
just want to see what native code parts that is
entered, I also want to be able to set breakpoints in
the native code (C code).There are debuggers that can work with both Java Language
and native code, but they need native support (in addition
to the Java Platform Debugger Architecture [JPDA]) to do it.
One example (on Solaris) is the latest release of dbx.
For more information, take a look at:
http://wwws.sun.com/software/sundev/suncc/documentation/mr/READMEs/dbx.html#new -
How to create a matrix with constant values and multiply it with the output of adc
How to create a matrix with constant values and multiply it with the output of adc
nitinkajay wrote:
How to create a matrix with constant values and multiply it with the output of adc
Place array constant on diagram, drag a double to it, r-click "add dimension". There, a constant 2D double array, a matrix.
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV -
Multiply Prop Factors with a KF value ?
Hi
In DP 5.0, Can we multiply Proportional Factors with another KF values in a macro ?
I want to write a macro with APODPDANT mulitiplied by another KF with its value. Is it possible ? Because when i look at Prop Factors, i see them as 42,000/40,000 like that. Only when i go to percentae view, then i can see actual factors. So can i use these actual factors to multiply in a macro ?
If not, how can i use them to multiply with another KF in a macro ?
Any help is highly appreciated.
Thanks
VenkatHi,
The system calculates the proportional factor by multiplying the KF values in a CVC as well as the total to a very large value and then maintains the proportions.
Thus the absolute values displayed in APODPDANT are really not of much use.
Please try to build some other logic.
Hope it helps.
Thanks & regards
Ankur Shrivastava -
Multiplot graph with missing values fills them with zero instead of NaN
I have a waveform graph with multiple arrays (2D) which has different numbers of points in each array. LabVIEW finds the array with the most points and then plots all arrays with that many points. It assigns the missing points a value of zero and displays those zero values. This means arrays with fewer points than the maximum will have values of zero appear in their plots. This can be avoided by filling in missing points with NaN. I am acquiring data in a loop and displaying it which requires continuous determination of the number of actual points and filling in of missing points with NaN. Not difficult, but this could be avoided if LabVIEW would fill missing points with NaN instead of with zero. Any way to have this happen automatically ?
Steve
Attachments:
Graph MultiPlot Missing Data.vi 18 KBYou can also consider using an XY graph so you don't have to do additional data manipulation. See attached for comparison.
Attachments:
Graph MultiPlot Missing Data mod.vi 22 KB -
Default Value in Formula Variable - Inconsistent behaviour
Hi,
I am facing a very strange issue in a formula variable.
I had created three formula variables with default values and the user (Power user who has the Bex access) was able to change the default value themselves for two of these variables.
Now he wants to change all the three, so I have tried to check the issue and changed all the three for testing purpose.
Now, he is unable to change any of them!!! Sad, now I cant even say that "You dont have the Auth to do so"
Any clue? Anyone has faced similar issue.
Any thoughts are highy welcome! Suddenly users wants to get this one URGENTLY, usually he used to access the report once in month. Now he wants to use the same once in half an hour
We are on BI 7.0 with SP 24
Any thoughts PLS
Regardshi,
probably you can refer to SAP Note 1413030 - SAPBWNews NW 7.x BW Add-On Frontend Patch 1300 - GUI 7.10 or maybe SAP Note 1294382 - SAPBINews NW7.0 BI Add-On Frontend SP900 - GUI 7.1 that might help you in sorting out your problem, plus you can buy more time from the user as well
regards
laksh -
Hello,i am new to bipublisher and i am trying to do a sum in my report (rtf) but i get a NaN value.
I am pretty sure it's because i have null value in the field i am trying to sum but i don't know how to fix that.
Here is how my rtf is made (summary) :
For each Line
LINE_ENT_CR
End Each line
Sum result
I tried using this but for some reason now i always have a blank result <? sum( LINE_ENT_CR [ .! = '' ]) ?>
Anyone can help me ?
Thank youSimply try this: <?sum(//LINE_ENT_CR[.!=''])?>
regards
Jorge -
Request failed with SID value not found
Hi Gurus, I have this error message "No SID found for value '15.00' of charateristic 0CURKEY_TC" and similar message with "10.00" and "*0.0" value, when trying to activate data in standard DSO in BI7.0.
This is a Dev system just setup for traning purposes so I do not have any Master data to load. I am only loading transactional data from DataSource 0PU_IS_PS_32
I tried searching for the answer and did the following
1) Transfer Global Settings from the source system (which solved other problems but not this one)
2) In RSRV, I do not see any errors for this InfoObject
3) I am not sure how I can update table T006 and or TCURC with these values?
I also tried following the Note: 619987 and does not know how I can implement this function module "If you nevertheless receive this error message for the initial value, this means that there is an inconsistency in the SID table for the 0UNIT or 0CURRENCY characteristic. You can eliminate this inconsistency by calling the RSDMD_INITIAL_LINE_INSERT function module with I_CHABASNM = 0UNIT or 0CURRENCY"
Is there any help that anybody can extend, it will be greatly appreciated.Dear,
SID error comes during activation of ODS because the related MD is not available for assigning SIDs.
So as a first step ensure that the related master data is loaded and Attribute change run has been triggered.
Or Load the MD and Activate the MD (Modeling > InfoObject > Search the Infoobject > Right click > Activate Master Data)
Once you perform this you can retrigger the activation. It should work fine.
Else as a workaround you can blank out these particular values and activate.
There is also one more workaround wherein you can create the Master data entries directly in BW itself. But both the above step should be done after consulting Business and considering data volume that needs to be edited/created.
In most case once you perform the loading and activation of MD your activation should work fine when repeated.
There are cases where it failed again with the same error. In that case try this also (ensure that PSA is there).
Delete the request in red.
Go to monitor
Edit > Setting for further update > Packet should be processed in the background.
Edit > Update Reversal > Read everything manually > Yes
Background processing successfully scheduled
Then you can see the Load running again.
Once this is done perform activation again
Hope it helps
Regards
Bala -
Web Forms using substitution variables with multiple values
Hi,
I am trying to select a substitution variable in a webform (Hyperion Planning 11.1.1.3) with multiple values in EAS, but is not working does somebody knows if this an expected behaviour.
I allready try ex.
&Months = "Jan","Feb", "Mar"
&Months = Jan, Feb, Mar
&Months = Jan:Mar
Please let me know something, since as far as I recall in previous versions of Hyperion Planning this was possible.
Kind RegardsWe experienced the same issue, our requirement was that for the first half of the year the substitution variable was = Oct and for the second part of the year Jan:Dec. We were lucky that for the second scenario we had a Total Year member as well (that at the bottom level is Jan:Dec). So on web form we picked Level0 descendants of the substitution variable. That worked fine but not the range.
-
Hi All,
there is a big problem in Inconsistency between Condition Base Value in Rebate Monitor / Semi Automatic Bypass / MIS.
We have discovered issues with inconsistent figures.
Condition Base Value Rebate Monitor until Feb 29th is not equal with value from Semi Automatic Bypass with Settle to date Feb 29th
- first analysis indicates, that Semi Automatic Bypass is taking 3 Billing documents into account which have Service Rendered Date March 3rd , but Billing Date Feb 29th:
THE Rebates Monitor and Semi Automatic Bypass figures are always provided based on Requested Delivery Date/Service Rendered Date (and not based on Billing Date) and to ensure, that figures are always consistent.
How to fix it?
Thanks in advance and regards
WilliamHi,
USE FMs SD_BONUS_READ and SD_BONUS_STAT_TARGET to fetch the values.
Babul. -
Inconsistent results with localtimestamp and current_timestamp
Running XE on Windows XP with the system timezone to GMT rebooted, restarted XE)
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
I'm getting incorrect and inconsistent results with current_timestamp and localtimestamp:
With SQL, localtimestamp computes the wrong offset (appears to use 1987-2006 DST rules):
select
dbtimezone
, sessiontimezone
, current_timestamp
, current_timestamp + numtodsinterval(18,'day') as current_timestamp18
, localtimestamp
from dual;
+00:00
US/Eastern
17-MAR-10 10.27.17.376000000 AM US/EASTERN
04-APR-10 10.27.17.376000000 AM US/EASTERN
17-MAR-10 09.27.17.376000000 AM
however, in PL/SQL, both current_timestamp and localtimestamp return the wrong hour value, and adding 18 to current_timestamp shows it is using 1987-2006 DST rules (1st sunday of april)/ note that this happens in straight PL/SQL and in embedded SQL (same results selecting from tables other than DUAL):
begin
for r1 in (
select
dbtimezone
, sessiontimezone
, current_timestamp
, current_timestamp + numtodsinterval(18,'day') as current_timestamp18
, localtimestamp
from dual
loop
dbms_output.put_line('SQL dbtimezone = ' || r1.dbtimezone);
dbms_output.put_line('SQL sessiontimezone = ' || r1.sessiontimezone);
dbms_output.put_line('SQL current_timestamp = ' || r1.current_timestamp);
dbms_output.put_line('SQL current_timestamp +18 = ' || r1.current_timestamp18);
dbms_output.put_line('SQL localtimestamp = ' || r1.localtimestamp);
end loop;
dbms_output.put_line('dbtimezone = ' || dbtimezone);
dbms_output.put_line('sessiontimezone = ' || sessiontimezone);
dbms_output.put_line('systimestamp = ' || systimestamp);
dbms_output.put_line('current_timestamp = ' || current_timestamp);
dbms_output.put_line('current_timestamp +18 = ' || (current_timestamp + numtodsinterval(18,'day')));
dbms_output.put_line('localtimestamp = ' || localtimestamp);
end;
SQL dbtimezone = +00:00
SQL sessiontimezone = US/Eastern
SQL current_timestamp = 17-MAR-10 09.29.32.784000 AM US/EASTERN
SQL current_timestamp +18 = 04-APR-10 10.29.32.784000000 AM US/EASTERN
SQL localtimestamp = 17-MAR-10 09.29.32.784000 AM
dbtimezone = +00:00
sessiontimezone = US/Eastern
systimestamp = 17-MAR-10 02.29.32.784000000 PM +00:00
current_timestamp = 17-MAR-10 09.29.32.784000000 AM US/EASTERN
current_timestamp +18 = 04-APR-10 10.29.32.784000000 AM US/EASTERN
localtimestamp = 17-MAR-10 09.29.32.784000000 AM
dbtimezone = +00:00
sessiontimezone = US/Eastern
systimestamp = 17-MAR-10 02.16.21.366000000 PM +00:00
current_timestamp = 17-MAR-10 09.16.21.366000000 AM US/EASTERN
current_timestamp +18 = 04-APR-10 10.16.21.366000000 AM US/EASTERN
localtimestamp = 17-MAR-10 09.16.21.366000000 AM
is this a known bug?
is there a patch or a work-around for XE?
are other datasbase versions affected?Can't patch XE, unfortunately it comes with pre-2007 DST rules.
There is a metalink note describing how to fix the DST changes, and while it's not really a "supported" method, neither is XE- if you can get updated timezone files from a later patch set for the same release, 10gR2, on the right operating system, shutdown/startup the database the updated DST rules will be in place. The timezone files are in $ORACLE_HOME/oracore/zoneinfo.
Another unfortunately, any values already stored in the database using timestamp with local timezone datatypes for the affected period of the DST changes won't be correct, i.e. there is no 2010-03-14 02:01 (?) but with older timezone rules in place that would be a valid timestamp. The data has to be saved before updating the timezone file, and re-translated to timestamp w/local tz datatypes after the update.
IMHO storing literal timezone info isn't an ideal practice, let the client settings do the time interpretation, time is always changing. Its the interpretation of the time that gets changed. From time to time. :( -
Task Total Slack Calculated values mismatching with the values in reporting database
Hi,
We require 'Task Total Slack' as one of the items in a report for Project Server 2010. We're developing the reports using SSRS wherein the SQL Queries are fired on the reporting database of Project Server 2010.
We've come across a situation wherein the total slack values from reporting database for tasks are mismatching with the values that are seen in either PWA or Project Professional for total slack field. We also could not find a consistent factor by which
the slack is multiplied for reflecting in the database in case the Slack in days was being converted into Hours in reporting databse.
Is there a definite way that these values are being represented in reporting database which is quite different from the way these values are seen in Project Professional? Please help resolving this issue.Hi Abhijit PS,
Can you give an example of the mismatch? Also you could tell us if this is happening for all tasks and all projects. Your concern may be seen from 2 different points of view:
Either this is indeed a bug with a slack of 2 days for example in Project Pro and 4 days in your report from the reporting DB. In this case, you should check if the projects have been published correctly and if the Reporting DB is correctly sync'ed with
the draft DB.
Or it could be the normal behavior and it is just a matter of finding why. For example, the durations are stored in the DB in minutes, meaning that a 1day duration might be stored as 480 if you have 8 working hours in a day (8*60).
Hope this helps,
Guillaume Rouyre, MBA, MVP, P-Seller | -
Hello
I had a code done by my colleague who is not working with us anymore. In an array 8 columns and programmatically generated no. of rows all values initialize as NaN values. I have never come across NaN values before.
From research I gather it is not a number but it really isn't making much sense to me. Why the cells in array are written as NaN? What is the significance of NaN? Can I leave the cells empty and not showing NaN in it?
Kind Regards
Austin
Solved!
Go to Solution.Hi Austin,
for the constant you can use the standard numeric constant (set to any floating point format) and type "NaN" into it.
As NaN is a number you can type it into numeric inputs... (The same applies to +Inf and -Inf, they are standard numbers too!)
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome -
Data inconsistency: Area 30 for value takeover is missing
Hi Experts,
I am trying to enter Asset Transaction: Asset Sale Without Customer (ABAON) but I am getting the error below:
Data inconsistency: Area 30 for value takeover is missing
Message no. AAPO105
Diagnosis
According to its formula, depreciation area 31 is defined for mandatory takeover of values from depreciation area 30. However, depreciation area 30 was not posted during the current transaction (chart of depreciation MY01). This is not allowed.
Procedure
Check the specifications for the current transaction type.
I have checked OAYZ configuration. Area 30 does not have a 'Deactivate' tick on it. What does the Deactivate tick mean? If I need to change and tick it, how do I so since it is grayed out?
I hope someone can help me out with this.
Thanks,
JosefHi Josef,
This might be due to new depreciation area addition recently, is it ?
For the message in AFBN,
Depreciation area that you entered in chart of depreciation cannot be processed, as this program can only process real depreciation areas and not derived areas.
If it is a derived depreciation area then this program not works.
Based on initial error message it appears 31 is deriving values from 30. You might have run AFBN for area 30. Please check what the parameters in area 30. Some time dep.area defined as derived can be a real dep.area if it is the differences derived value from other dep.areas.
In that case please check the link back where exactly the values should come and flow.
Regards -
ECC 6.0 VERSION UPGRADE - INCONSISTENCY BEHAVIOUR -MM - Reg
Hai,
We are in the process of ECC 6.O upgrade from ECC 5.0,
we started the CT1/ CT2 testing and found the following error.
While inwarding Material against Subcontracting purchase order / S.L.Agreement ,
The system shows the error message of CHALLEN MATERIAL IS DIFFRENT FROM MATERIAL DOCUMENT , during GR
note :- for the same material , same p.o , some times systems allows for GR & some times gives above error message.
if i try with some other login , the behaviourseems to be same as my login
Can anyone tell this why this inconsistency behaviour of system during GR for sub contracting item..
Regards,
Suresh.Pgo to SE38, here type the program RM07CUFA,
click on execute... type ur mov type 541... here make the purchase order field from display to optional..
this will effected for new subcontracting scenerio....
Maybe you are looking for
-
ITunes movie downloads taking long time to download
iTunes has been "downloading" Transformers Dark of the Moon for 1 hr still shows no progress. I have internet connection What do I need to do?
-
KO22 internal order budget issue
Hello All, while making changes for internal order budget with transaction code KO22 the system shows a error as u201CItem order xxxxxx budget exceededu201D & for some orders u2018Item order xxxxxx budget almost exhaustedu201D & also referring to a b
-
What's the method for updating a book?
I use a variation of FrameMaker 10's FM_Outputs_CondText.jsx to automate generation of PDFs. What do I need to add to force a book update? It looked to me as if it were doing that, but I just noticed that the build date variable in the front matter i
-
Why do my print jobs keep cancelling? Photosmart D110. Internet connected. Shows connected and ready. Get email saying received. It cancels immediately. This is something new. It was printing fine.
-
I've created some dictionaries (zwl's) free to download.
Hi Everyone, I've spent some hours to gather word lists from several sources, and I'm happy to announce that I've finally completed some ZWL dictionaries for Squiggly. The already available are: Portuguese PT (portugues_PT.zwl) Portuguese BR (portugu