CARX in Calligra Sheets: Polar Radius and Angle to X
Compute a horizontal Cartesian coordinate from a radius and radian angle; includes independent worksheet results, traps and official 26.08.2 source checks.
Verification status: Consult the documentation, examples and any stated test scope below. How formula examples are checked
Availability and version history
- Introduced: Documented by 26.08.2; original introduction not established.
- Availability: Supported in Calligra Sheets 26.08.2, based on the function-specific registration.
- Scope: The official application listing provides Linux installation; other packaged builds are unverified here.
- Checked: October 14, 2026. Documentation/source check; no new native test in Calligra Sheets 26.08.2.
Quick answer
CARX converts the radius and angle in radians of a point into its horizontal x-coordinate. The documented syntax is =CARX(Radius;Angle). For instance, =CARX(12;0) produces 12 in KDE’s handbook. For the deliberately approximate input =CARX(12;1.5707), KDE documents 0.00115592, and the independent calculation 12 × cos(1.5707) = 0.001155921537… supports that rounded value. It is not exactly zero because 1.5707 is only an approximation of Ï€/2. KDE handbook; 26.08.2 source.
Scope of proof: KDE handbook and version-pinned function wrapper checked; worksheet output values independently calculated, not observed running Calligra. No screenshot or live test is claimed.
Why calculate an x-coordinate from polar data?
A polar point uses a distance r and direction θ instead of x/y distances. Projecting the radius onto the horizontal axis yields:
x = r × cos(θ)
The inspected func_carx wrapper in Calligra 26.08.2 directly multiplies the first argument by the cosine of the second (calc->mul(args[0], calc->cos(args[1]))). CARX(12;0)=12 follows because cos(0)=1. This is source-supported mathematics; it does not establish how invalid strings, overflow, or uncommon locale formats appear on-screen. Pinned code; [XML metadata](https://github.com/KDE/calligra/blob/72123cc643f6625351139e7df294544255a1056f/sheets/functions/conversion.xml).
Use this for plotting a point from an angle and distance, breaking a vector into components, or placing radial labels on a chart. Pair with CARY for the vertical coordinate. Positive angles rotate counterclockwise in an ordinary mathematical x/y plane; screen graphics with the y-axis pointing downward need an additional coordinate convention adjustment.
Exact syntax, units, parameters and optional defaults
=CARX(Radius;Angle)
| Position | Parameter | Required | Type in KDE’s release XML metadata | Interpretation |
|---|---|---|---|---|
| 1 | Radius |
Yes | Double (numeric) |
Distance from the origin in the polar-coordinate model. |
| 2 | Angle |
Yes | Double (numeric) |
Direction measured in radians from the positive x-axis, with mathematical counterclockwise sign convention. |
The CARX function registration in pinned Calligra 26.08.2 sets setParamCount(2): two arguments exactly, no optional arguments or documented defaults. A numeric expression or referenced numeric cell is appropriate for either parameter. A mathematical radius should normally be non-negative; the function wrapper performs a direct multiplication rather than checking for negative radii. Do not treat a negative radius as a validated native error or as a measured distance without modelling its orientation. Pinned source; [KDE XML metadata syntax](https://github.com/KDE/calligra/blob/72123cc643f6625351139e7df294544255a1056f/sheets/functions/conversion.xml); handbook.
Radians, not degrees: 90 as an input means 90 radians, not 90°. Use =RADIANS(90) or =PI()/2 for a mathematical quarter-turn. Equivalently a 30° angle can be entered as =PI()/6. The handbook’s function-entry examples use semicolons; other locales can differ in decimal display and input parsing. Use Insert → Function in the actual installation to verify its entry syntax. KDE formula editor.
Release and platform scope: Source verified against Calligra Sheets 26.08.2, dated October 8, 2026 in KDE’s releases. This review does not assert behavior for earlier releases or native execution on any operating system, package channel, or UI locale. KDE releases.
Reproducible worksheet: ten polar-coordinate cases
- In a blank Calligra sheet, put Point in A1, Radius in B1, Angle in radians in C1, CARX result in D1 and Other component (independent expected) in E1.
- Copy the A/B/C input entries shown in the table. For an angle cell containing
=PI()/6, type that as a formula; plain1.5707is a numeric angle in radians. Enter radii as numbers without quotation marks. - In D2, type
=CARX(B2;C2)and fill the formula down through D11. Select nine decimal places to compare rounded displays. Do not mistake a near-zero floating-point result for an exact zero. - The last column is an independent mathematical cross-check, derived from the alternate polar component, not an observation from a Calligra test. Optionally calculate it in E2 with
=CARY(B2;C2)and fill down; CARY is a separate source-registered Calligra function.
| Row | Label A | Radius B | Angle input C | D formula | Expected x in D | Independent other component |
|---|---|---|---|---|---|---|
| 2 | East | 12 | 0 |
=CARX(B2;C2) |
12.000000000 | 0.000000000 |
| 3 | Near north | 12 | 1.5707 |
=CARX(B3;C3) |
0.001155922 | 11.999999944 |
| 4 | 30 degrees | 10 | =PI()/6 |
=CARX(B4;C4) |
8.660254038 | 5.000000000 |
| 5 | North | 10 | =PI()/2 |
=CARX(B5;C5) |
0.000000000 | 10.000000000 |
| 6 | West | 8 | =PI() |
=CARX(B6;C6) |
-8.000000000 | 0.000000000 |
| 7 | South | 8 | =-PI()/2 |
=CARX(B7;C7) |
0.000000000 | -8.000000000 |
| 8 | Northeast | 5 | =PI()/4 |
=CARX(B8;C8) |
3.535533906 | 3.535533906 |
| 9 | Southeast | 5 | =-PI()/4 |
=CARX(B9;C9) |
3.535533906 | -3.535533906 |
| 10 | Zero radius | 0 | =PI()/3 |
=CARX(B10;C10) |
0.000000000 | 0.000000000 |
| 11 | Northwest | 5 | =3*PI()/4 |
=CARX(B11;C11) |
-3.535533906 | 3.535533906 |
All expected decimals in the table were independently computed with Python math.cos/math.sin applied to the displayed radius and radian angle. The display is rounded to nine decimal places. For instance, a 90° angle entered as =PI()/2 can yield a minute non-zero floating result for cosine even though the exact trigonometric value is zero; testing your actual Calligra build is the appropriate final check. The handbook’s example =CARX(12;1.5707) is not the same input as =CARX(12;PI()/2) because 1.5707 ≠π/2. KDE example; pinned wrapper.
Advanced example 1: horizontal component of a 25-unit force at 35°
Put 25 in B2 and 35 in C2 (C2 measured in degrees). Enter:
=CARX(B2;RADIANS(C2))
Independent expected x-component: 20.4788011072 units (25 × cos 35°). To calculate the corresponding vertical component, use =CARY(B2;RADIANS(C2)), independently expected 14.3394109088 units. These are projections, not a guarantee that force units or directional signs can be ignored. The conversion helper RADIANS converts degree inputs to radians; CARX and CARY are distinct Calligra functions. KDE RADIANS/CARX docs; pinned function.
Advanced example 2: shift a polar point away from the origin
Imagine a circular diagram centred at existing Cartesian coordinates xâ‚€=100 and yâ‚€=200. Put the centre in A2/B2, radius 50 in C2 and direction =PI()/3 in D2. Compute new x:
=A2+CARX(C2;D2)
Independently expected 125. Compute y with =B2+CARY(C2;D2) for an independent expectation of 243.301270189. This is a coordinate translation after the polar projection, not a change in CARX’s own argument order.
Advanced example 3: cross-check a polar conversion with a length
For a nonnegative radius r, the mathematical identity is CARX(r;θ)² + CARY(r;θ)² ≈ r² within numerical rounding. Put radius 10 in B2, angle =PI()/6 in C2 and use:
=SQRT(CARX(B2;C2)^2+CARY(B2;C2)^2)
Independently expected 10. The ≈ qualifier matters for floating-point arithmetic, especially when angles are approximated. Never use an exact equality comparison as a universal floating-point test. KDE CARX/CARY source; KDE SQRT handbook.
Error handling, boundary behavior and practical troubleshooting
| Symptom or boundary | What the checked evidence establishes | Corrective action / validation still required |
|---|---|---|
| A circle plotted in the wrong quadrant | CARX is radius × cosine; only the horizontal component is returned. | Calculate the vertical component with CARY and verify the chart’s y-axis direction. |
| Formula does not parse | Registered function requires exactly two inputs. KDE’s English help uses ;. |
Confirm equal sign, spelling and separator: =CARX(B2;C2). Check the installed locale via Insert → Function. |
Output is surprising for =CARX(12;90) |
Source uses trigonometric radians, not degrees. | Use =CARX(12;RADIANS(90)) or =CARX(12;PI()/2). |
| Very small nonzero near north/south | Standard floating-point cosine of an approximate π/2 can be tiny but nonzero. | Compare at sensible precision, e.g., absolute tolerance, rather than testing =0. |
| Negative radius | Source wrapper does not explicitly reject a negative first argument. | Treat as a modelling/sign-convention issue; native Calligra validation has not been done. |
| Text, blank cell, extreme magnitude | Generic numeric conversion/error rendering not validated in the actual application. | Ensure referenced cells are numeric; test error behavior, coercion and overflow in the target version. |
| Unexpected chart positioning | Mathematical y-axis convention may differ from screens. | Decide whether positive y increases up or down before combining CARX/CARY. |
No invented error codes: The CARX wrapper has no explicit range/zero error branch. This does not prove that all inputs succeed or that the UI emits a particular error. Source and math checks are distinct from native execution.
Portability and compatibility
For software where the CARX function name is not verified, the mathematical expansion =radius*COS(angle) expresses the same polar x projection for numeric inputs. In Calligra, the independent alternative =B2*COS(C2) can be compared with =CARX(B2;C2); COS is documented by KDE. This is an identity, not a claim that another spreadsheet implements Calligra’s CARX name, numeric coercion, errors or locale rules. No Microsoft Excel, Google Sheets or LibreOffice native execution was performed. KDE COS; KDE CARX source.
Verified related functions and source links
Explore the related mathematical functions below:
- SIN in Calligra Sheets — sine of a radian angle.
- COS in Calligra Sheets — cosine of a radian angle.
- PI in Calligra Sheets — reference for π and the unit circle.
- RADIANS in Calligra Sheets — degrees to radians.
- DEGREES in Calligra Sheets — radians to degrees.
- SQRT in Calligra Sheets — square root; useful for vector length.
- ACOS in Calligra Sheets — inverse cosine; useful for understanding POLA’s implementation.
CARX and CARY calculate Cartesian components; POLR calculates length.
Evidence and dated verification
Research checked on 2026-10-13 UTC:
- KDE Sheets function handbook — this function documents function name, syntax, argument labels, return type and examples. Its handbook text is not proof of runtime behavior on every version.
- KDE Calligra 26.08.2 pinned
conversion.xmlspecifies the two ordered Double parameters and related functions. - KDE Calligra 26.08.2 pinned
conversion.cppregisters the function and reveals its implementation, including caveats the handbook omits. - KDE Sheets formula-entry instructions document Insert → Function, the
=formula format and the semicolon between arguments in the English handbook. - KDE Calligra Sheets release list identifies 26.08.2 as released October 8, 2026.
What was and was not validated: Documentation inspection: yes. Version-pinned source review: yes. Mathematical outputs: independently calculated in Python’s standard math module. Native Calligra execution: no. No Linux, Windows, Flatpak or other platform build was run; no locale-specific execution or UI screenshots were captured.