Click here to Skip to main content
15,888,003 members
Home / Discussions / C#
   

C#

 
GeneralRe: Async task Pin
Dave Kreskowiak21-Feb-21 5:10
mveDave Kreskowiak21-Feb-21 5:10 
GeneralRe: Async task Pin
Kenneth Haugland21-Feb-21 8:10
mvaKenneth Haugland21-Feb-21 8:10 
GeneralRe: Async task Pin
Richard Deeming21-Feb-21 22:19
mveRichard Deeming21-Feb-21 22:19 
GeneralRe: Async task Pin
Kenneth Haugland22-Feb-21 6:58
mvaKenneth Haugland22-Feb-21 6:58 
GeneralRe: Async task Pin
Richard Deeming21-Feb-21 22:19
mveRichard Deeming21-Feb-21 22:19 
GeneralRe: Async task Pin
Dave Kreskowiak22-Feb-21 3:42
mveDave Kreskowiak22-Feb-21 3:42 
Questionc# OPCgroup.SyncWrite vs. Float type Pin
Roberto64_Ge18-Feb-21 22:00
Roberto64_Ge18-Feb-21 22:00 
AnswerRe: c# OPCgroup.SyncWrite vs. Float type Pin
OriginalGriff18-Feb-21 22:38
mveOriginalGriff18-Feb-21 22:38 
You are possibly mixing floats and doubles in there: we can't see the definition of the force or filter arrays, but the casting kinda implies the type.
So if force is an array of float values, then when you do this:
C#
filter[0] = (float) (force[0] + 0.0 + filter[2]);
The system is obliged to implicitly cast the force elements to double in order to do the addition, and that may be what is causing imprecision, and thus an error (we can't tell what you should have or what you get, so "NOT WORKING" isn't particularly helpful!)

You could try keeping it all in float values and see if that helps:
C#
filter[0] = (float) (force[0] + 0.0F + filter[2]);


If not, then you need to use the debugger to find out what values exist in the force array, and what values you actually get / expect as a result.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
Roberto64_Ge19-Feb-21 0:24
Roberto64_Ge19-Feb-21 0:24 
GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
OriginalGriff19-Feb-21 0:55
mveOriginalGriff19-Feb-21 0:55 
GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
Roberto64_Ge19-Feb-21 1:41
Roberto64_Ge19-Feb-21 1:41 
GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
OriginalGriff19-Feb-21 1:58
mveOriginalGriff19-Feb-21 1:58 
GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
Roberto64_Ge19-Feb-21 2:28
Roberto64_Ge19-Feb-21 2:28 
GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
Roberto64_Ge19-Feb-21 8:27
Roberto64_Ge19-Feb-21 8:27 
GeneralRe: c# OPCgroup.SyncWrite vs. Float type Pin
Roberto64_Ge23-Feb-21 0:53
Roberto64_Ge23-Feb-21 0:53 
QuestionWinforms Usercontrol Databinding question Pin
Member 1501196518-Feb-21 5:20
Member 1501196518-Feb-21 5:20 
AnswerRe: Winforms Usercontrol Databinding question Pin
Gerry Schmitz18-Feb-21 7:38
mveGerry Schmitz18-Feb-21 7:38 
GeneralRe: Winforms Usercontrol Databinding question Pin
Member 1501196518-Feb-21 7:47
Member 1501196518-Feb-21 7:47 
GeneralRe: Winforms Usercontrol Databinding question Pin
Gerry Schmitz18-Feb-21 8:07
mveGerry Schmitz18-Feb-21 8:07 
QuestionArticle "tip/trick "Converting Enum member names and values in C#"" Pin
Сергій Ярошко16-Feb-21 22:46
professionalСергій Ярошко16-Feb-21 22:46 
AnswerRe: Article "tip/trick "Converting Enum member names and values in C#"" Pin
PIEBALDconsult17-Feb-21 3:17
mvePIEBALDconsult17-Feb-21 3:17 
GeneralRe: Article "tip/trick "Converting Enum member names and values in C#"" Pin
Сергій Ярошко17-Feb-21 4:13
professionalСергій Ярошко17-Feb-21 4:13 
GeneralRe: Article "tip/trick "Converting Enum member names and values in C#"" Pin
Richard Deeming17-Feb-21 4:31
mveRichard Deeming17-Feb-21 4:31 
GeneralRe: Article "tip/trick "Converting Enum member names and values in C#"" Pin
PIEBALDconsult17-Feb-21 5:19
mvePIEBALDconsult17-Feb-21 5:19 
QuestionHow C# handles binary files? Pin
Member 1477325816-Feb-21 21:59
Member 1477325816-Feb-21 21:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.