Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Incorrect result
#1
Hello.
Please correct the code. It gives an incorrect result.

P# = 3.141592653589793#
K# = 57.29577951308232#
S# = 279.559511
H# = 40
CLS: N# = 1: F# = 1: GOTO 22
21 F# = F# + N#
22 T# = SQR(2) * SQR(S# / (P# * F# / 180 - SIN(F# / K#))): L# = 2* T# * SIN(F# / 2 / K#)
IF (L# - H#) < 1E-10 THEN 23
IF H# > L#  THEN 24
GOTO 21
23 PRINT USING "##.####"; T#: GOTO 25
24 F# = F# - N#: N# = N# / 2: GOTO 21
25 PRINT " Ok."


T# = 25.0000 -> result correct
T# = 24.7711 -> incorrect result

Chris
Reply


Messages In This Thread
Incorrect result - by Chris - 08-14-2024, 08:53 AM
RE: Incorrect result - by SMcNeill - 08-14-2024, 09:56 AM
RE: Incorrect result - by luke - 08-14-2024, 12:26 PM
RE: Incorrect result - by Chris - 08-14-2024, 12:47 PM
RE: Incorrect result - by Pete - 08-14-2024, 03:03 PM
RE: Incorrect result - by SMcNeill - 08-14-2024, 03:34 PM
RE: Incorrect result - by Pete - 08-14-2024, 03:40 PM
RE: Incorrect result - by Chris - 08-15-2024, 06:29 PM
RE: Incorrect result - by TerryRitchie - 08-15-2024, 06:51 PM
RE: Incorrect result - by Kernelpanic - 08-15-2024, 07:39 PM
RE: Incorrect result - by Chris - 08-15-2024, 07:43 PM



Users browsing this thread: 1 Guest(s)