Following expression gives me different result in the editor and on the watch:
(((floor(((floor(((((((floor(365.25*((#Dy #-floor((12-#DM #)/10))+4712)))+(floor(30.6*((#DM #+9)>=12?(#DM #+9)-12:(#DM #+9))+0.5))+#Dd#+59)-(floor(floor(((#Dy #-floor((12-#DM #)/10))/100)+49)0.75)-38))-2451550.1)/29.530588853)-floor((((((floor(365.25 ((#Dy #-floor((12-#DM #)/10))+4712)))+(floor(30.6*((#DM #+9)>=12?(#DM #+9)-12:(#DM #+9))+0.5))+#Dd#+59)-(floor(floor(((#Dy #-floor((12-#DM #)/10))/100)+49)*0.75)-38))-2451550.1)/29.530588853)))*29.53))/3.5)))*45)-90)
On the watch I get 135 on 17.12.2017 and in the editor 270 which is correct.
Mellin
December 17, 2017, 8:40pm
2
Without even fully analyzing the formula I will point out a key mistake: brackets.
Right before “>=” I can see one end bracket but before that, I can see 2 start brackets.
I don’t see no Problem here. Can you please post correct solution?
Mellin
December 17, 2017, 9:40pm
4
…
oh…
OH…
OH?!??!?!?!??!
You tried to put a condition inside of a math equation?!
Well, there’s your problem…
Facer supports conditions only when they are in the most outside layers of the math.
That’s why I pointed the problem with bracket, because right now facer will see this:
(((floor(((floor(((((((floor(365.25*((#Dy #-floor((12-#DM #)/10))+4712)))+(floor(30.6*((#DM #+9)
…as the question in that condition.
And, when it will count brackets in that question it will break.
It might work in the editor (because it runs on your PC), but not in Android Wear or Tizen device.
Not only that but if that block of text is just one line it won’t work for another reason - there are 2 conditions there.
Facer doesn’t allow 2 conditions in one line.
Not next to each other, not one inside of the other.
Yes I figured it already on my own but thanks for your help you have pointed me in right direction.
I have changed the expression so that conditional is outside of the equation:
$(#DM #+9)>=12?(((floor(((floor(((((((floor(365.25*((#Dy #-floor((12-#DM #)/10))+4712)))+(floor(30.6*((#DM #-3))+0.5))+#Dd#+59)-(floor(floor(((#Dy #-floor((12-#DM #)/10))/100)+49)0.75)-38))-2451550.1)/29.530588853)-floor((((((floor(365.25 ((#Dy #-floor((12-#DM #)/10))+4712)))+(floor(30.6*((#DM #-3))+0.5))+#Dd#+59)-(floor(floor(((#Dy #-floor((12-#DM #)/10))/100)+49)0.75)-38))-2451550.1)/29.530588853)))29.53))/3.5)))45)-90):(((floor(((floor(((((((floor(365.25 ((#Dy #-floor((12-#DM #)/10))+4712)))+(floor(30.6 ((#DM #+9))+0.5))+#Dd#+59)-(floor(floor(((#Dy #-floor((12-#DM #)/10))/100)+49)0.75)-38))-2451550.1)/29.530588853)-floor((((((floor(365.25 ((#Dy #-floor((12-#DM #)/10))+4712)))+(floor(30.6 ((#DM #+9))+0.5))+#Dd#+59)-(floor(floor(((#Dy #-floor((12-#DM #)/10))/100)+49)*0.75)-38))-2451550.1)/29.530588853)))*29.53))/3.5)))*45)-90)$
It is one monster of expression but like this it works and gives same results in editor and on the watch.
Mellin
December 18, 2017, 12:46am
6
Good to hear it.
Make sure to share the end result when it’s out.
You don’t need all those ‘floor()’ expressions, probably less than 20% …
The formula still looks wrong. I recognize some of the maths, but not all of it …
You should use ‘365.2425’ for year-length, and (for example) ‘+49)0.75)-38’ is not valid syntax.