Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team

Question
Jay Ess 6
Hi
I have this code in vba Etime = y * sin2l0 - 2# * e * sinm + 4# * e * y * sinm * cos2l0 - 0.5 * y * y * sin4l0 - 1.25 * e * e * sin2m
which returns 2.19286480758148
However when i run this lua as follows Etime = y * sin2l0 - 2 * e * sinm + 4 * e * y * sinm * cos2l0 - 0.5 * y * y * sin4l0 - 1.25 * e * e * sin2m
I get a different result of -23.475237189689
Can anyone please guide me what I am doing wrong please?
Many thanks for any help provided.
Here are the variables with the correct numbers in both vba and in lua
y = 4.3027925017093
e = 1.6699503037352
sin2l0 -0.16774718359489
Edited by Jay Esssinm -0.9503036952014
cos2l0 0.98583004741993
sin4l0 -0.33074042791581
sin2m 0.5917054702608
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.